Version Description
- Major update
Download this release
Release Info
Developer | webdorado |
Plugin | Contact Form by WD – responsive drag & drop contact form builder tool |
Version | 1.8.27 |
Comparing to | |
See all releases |
Code changes from version 1.7.33 to 1.8.27
- admin/controllers/FMControllerBlocked_ips_fmc.php +7 -7
- admin/controllers/FMControllerFormMakerEditCSS_fmc.php +2 -2
- admin/controllers/{FMControllerShow_matrix_fmc.php → FMControllerFormcontactwdmathcaptcha.php} +42 -42
- admin/controllers/FMControllerFromeditcountryinpopup_fmc.php +42 -42
- admin/controllers/{FMControllerFeatured_plugins_fmc.php → FMControllerGoptions_fmc.php} +28 -8
- admin/controllers/FMControllerManage_fmc.php +311 -53
- admin/controllers/FMControllerSubmissions_fmc.php +39 -14
- admin/controllers/FMControllerThemes_fmc.php +11 -6
- admin/controllers/FMControllerWidget_fmc.php +2 -2
- admin/models/FMModelBlocked_ips_fmc.php +3 -4
- admin/models/{FMModelFeatured_plugins_fmc.php → FMModelFormcontactwdmathcaptcha.php} +2 -1
- admin/models/FMModelFormcontactwindow.php +1 -1
- admin/models/FMModelFromeditcountryinpopup_fmc.php +30 -30
- admin/models/FMModelGenerete_csv_fmc.php +206 -219
- admin/models/FMModelGenerete_xml_fmc.php +217 -235
- admin/models/{FMModelShow_matrix_fmc.php → FMModelGoptions_fmc.php} +29 -30
- admin/models/FMModelManage_fmc.php +490 -148
- admin/models/FMModelSubmissions_fmc.php +156 -84
- admin/models/FMModelThemes_fmc.php +3 -4
- admin/models/FMModelUninstall_fmc.php +10 -6
- admin/views/FMViewBlocked_ips_fmc.php +145 -131
- admin/views/FMViewFeatured_plugins_fmc.php +0 -171
- admin/views/FMViewFormMakerEditCSS_fmc.php +70 -48
- admin/views/FMViewFormMakerPreview_fmc.php +1 -1
- admin/views/FMViewFormcontactwdcaptcha.php +3 -1
- admin/views/FMViewFormcontactwdmathcaptcha.php +123 -0
- admin/views/FMViewFromeditcountryinpopup_fmc.php +184 -140
- admin/views/FMViewFromipinfoinpopup_fmc.php +0 -1
- admin/views/FMViewGenerete_csv_fmc.php +60 -32
- admin/views/FMViewGenerete_xml_fmc.php +48 -29
- admin/views/FMViewGoptions_fmc.php +101 -0
- admin/views/FMViewLicensing_fmc.php +41 -5
- admin/views/FMViewManage_fmc.php +3621 -3435
- admin/views/FMViewShow_matrix_fmc.php +0 -127
- admin/views/FMViewSubmissions_fmc.php +3252 -1429
admin/controllers/FMControllerBlocked_ips_fmc.php
CHANGED
@@ -20,12 +20,12 @@ class FMControllerBlocked_ips_fmc {
|
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
public function execute() {
|
22 |
$task = WDW_FMC_Library::get('task');
|
23 |
-
$id = WDW_FMC_Library::get('current_id', 0);
|
24 |
$message = WDW_FMC_Library::get('message');
|
25 |
echo WDW_FMC_Library::message_id($message);
|
26 |
if (method_exists($this, $task)) {
|
27 |
-
|
28 |
-
|
29 |
}
|
30 |
else {
|
31 |
$this->display();
|
@@ -45,7 +45,7 @@ class FMControllerBlocked_ips_fmc {
|
|
45 |
$message = $this->save_db();
|
46 |
// $this->display();
|
47 |
$page = WDW_FMC_Library::get('page');
|
48 |
-
WDW_FMC_Library::
|
49 |
}
|
50 |
|
51 |
public function save_db() {
|
@@ -98,7 +98,7 @@ class FMControllerBlocked_ips_fmc {
|
|
98 |
}
|
99 |
// $this->display();
|
100 |
$page = WDW_FMC_Library::get('page');
|
101 |
-
WDW_FMC_Library::
|
102 |
}
|
103 |
|
104 |
public function delete($id) {
|
@@ -112,7 +112,7 @@ class FMControllerBlocked_ips_fmc {
|
|
112 |
}
|
113 |
// $this->display();
|
114 |
$page = WDW_FMC_Library::get('page');
|
115 |
-
WDW_FMC_Library::
|
116 |
}
|
117 |
|
118 |
public function delete_all() {
|
@@ -133,7 +133,7 @@ class FMControllerBlocked_ips_fmc {
|
|
133 |
}
|
134 |
// $this->display();
|
135 |
$page = WDW_FMC_Library::get('page');
|
136 |
-
WDW_FMC_Library::
|
137 |
}
|
138 |
|
139 |
////////////////////////////////////////////////////////////////////////////////////////
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
public function execute() {
|
22 |
$task = WDW_FMC_Library::get('task');
|
23 |
+
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
24 |
$message = WDW_FMC_Library::get('message');
|
25 |
echo WDW_FMC_Library::message_id($message);
|
26 |
if (method_exists($this, $task)) {
|
27 |
+
check_admin_referer('nonce_fmc', 'nonce_fmc');
|
28 |
+
$this->$task($id);
|
29 |
}
|
30 |
else {
|
31 |
$this->display();
|
45 |
$message = $this->save_db();
|
46 |
// $this->display();
|
47 |
$page = WDW_FMC_Library::get('page');
|
48 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
49 |
}
|
50 |
|
51 |
public function save_db() {
|
98 |
}
|
99 |
// $this->display();
|
100 |
$page = WDW_FMC_Library::get('page');
|
101 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
102 |
}
|
103 |
|
104 |
public function delete($id) {
|
112 |
}
|
113 |
// $this->display();
|
114 |
$page = WDW_FMC_Library::get('page');
|
115 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
116 |
}
|
117 |
|
118 |
public function delete_all() {
|
133 |
}
|
134 |
// $this->display();
|
135 |
$page = WDW_FMC_Library::get('page');
|
136 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
137 |
}
|
138 |
|
139 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/controllers/FMControllerFormMakerEditCSS_fmc.php
CHANGED
@@ -20,7 +20,7 @@ class FMControllerFormMakerEditCSS_fmc {
|
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
public function execute() {
|
22 |
$task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
|
23 |
-
$id = ((isset($_POST['current_id'])) ? esc_html($_POST['current_id']) : 0);
|
24 |
if (method_exists($this, $task)) {
|
25 |
$this->$task($id);
|
26 |
}
|
@@ -69,7 +69,7 @@ class FMControllerFormMakerEditCSS_fmc {
|
|
69 |
|
70 |
public function update_db() {
|
71 |
global $wpdb;
|
72 |
-
$id = (isset($_POST['current_id']) ? (int)esc_html(stripslashes( $_POST['current_id'])) : 0);
|
73 |
$title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
|
74 |
$css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
|
75 |
$default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
|
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 |
}
|
69 |
|
70 |
public function update_db() {
|
71 |
global $wpdb;
|
72 |
+
$id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes( $_POST['current_id'])) : 0);
|
73 |
$title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
|
74 |
$css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
|
75 |
$default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
|
admin/controllers/{FMControllerShow_matrix_fmc.php → FMControllerFormcontactwdmathcaptcha.php}
RENAMED
@@ -1,43 +1,43 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$this->display();
|
23 |
-
}
|
24 |
-
|
25 |
-
public function display() {
|
26 |
-
require_once WD_FMC_DIR . "/admin/models/
|
27 |
-
$model = new
|
28 |
-
|
29 |
-
require_once WD_FMC_DIR . "/admin/views/
|
30 |
-
$view = new
|
31 |
-
$view->display();
|
32 |
-
}
|
33 |
-
|
34 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
-
// Getters & Setters //
|
36 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
-
// Private Methods //
|
39 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
-
// Listeners //
|
42 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMControllerFormcontactwdmathcaptcha {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$this->display();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function display() {
|
26 |
+
require_once WD_FMC_DIR . "/admin/models/FMModelFormcontactwdmathcaptcha.php";
|
27 |
+
$model = new FMModelFormcontactwdmathcaptcha();
|
28 |
+
|
29 |
+
require_once WD_FMC_DIR . "/admin/views/FMViewFormcontactwdmathcaptcha.php";
|
30 |
+
$view = new FMViewFormcontactwdmathcaptcha($model);
|
31 |
+
$view->display();
|
32 |
+
}
|
33 |
+
|
34 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
+
// Getters & Setters //
|
36 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
+
// Private Methods //
|
39 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
+
// Listeners //
|
42 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
}
|
admin/controllers/FMControllerFromeditcountryinpopup_fmc.php
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
$this->display();
|
23 |
-
}
|
24 |
-
|
25 |
-
public function display() {
|
26 |
-
require_once WD_FMC_DIR . "/admin/models/
|
27 |
-
$model = new
|
28 |
-
|
29 |
-
require_once WD_FMC_DIR . "/admin/views/
|
30 |
-
$view = new
|
31 |
-
$view->display();
|
32 |
-
}
|
33 |
-
|
34 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
-
// Getters & Setters //
|
36 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
-
// Private Methods //
|
39 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
-
// Listeners //
|
42 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMControllerFromeditcountryinpopup_fmc {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
$this->display();
|
23 |
+
}
|
24 |
+
|
25 |
+
public function display() {
|
26 |
+
require_once WD_FMC_DIR . "/admin/models/FMModelFromeditcountryinpopup_fmc.php";
|
27 |
+
$model = new FMModelFromeditcountryinpopup_fmc();
|
28 |
+
|
29 |
+
require_once WD_FMC_DIR . "/admin/views/FMViewFromeditcountryinpopup_fmc.php";
|
30 |
+
$view = new FMViewFromeditcountryinpopup_fmc($model);
|
31 |
+
$view->display();
|
32 |
+
}
|
33 |
+
|
34 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
+
// Getters & Setters //
|
36 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
+
// Private Methods //
|
39 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
+
// Listeners //
|
42 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
}
|
admin/controllers/{FMControllerFeatured_plugins_fmc.php → FMControllerGoptions_fmc.php}
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class
|
4 |
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
// Events //
|
6 |
////////////////////////////////////////////////////////////////////////////////////////
|
@@ -19,24 +19,44 @@ class FMControllerFeatured_plugins_fmc {
|
|
19 |
// Public Methods //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
public function execute() {
|
22 |
-
$task = (
|
|
|
|
|
|
|
23 |
if (method_exists($this, $task)) {
|
24 |
-
|
|
|
25 |
}
|
26 |
else {
|
27 |
-
|
28 |
}
|
29 |
}
|
30 |
|
31 |
public function display() {
|
32 |
-
require_once WD_FMC_DIR . "/admin/models/
|
33 |
-
$model = new
|
34 |
|
35 |
-
require_once WD_FMC_DIR . "/admin/views/
|
36 |
-
$view = new
|
37 |
$view->display();
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
// Getters & Setters //
|
42 |
////////////////////////////////////////////////////////////////////////////////////////
|
1 |
<?php
|
2 |
|
3 |
+
class FMControllerGoptions_fmc {
|
4 |
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
// Events //
|
6 |
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
// Public Methods //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
public function execute() {
|
22 |
+
$task = WDW_FMC_Library::get('task');
|
23 |
+
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
24 |
+
$message = WDW_FMC_Library::get('message');
|
25 |
+
echo WDW_FMC_Library::message_id($message);
|
26 |
if (method_exists($this, $task)) {
|
27 |
+
check_admin_referer('nonce_fmc', 'nonce_fmc');
|
28 |
+
$this->$task($id);
|
29 |
}
|
30 |
else {
|
31 |
+
$this->display();
|
32 |
}
|
33 |
}
|
34 |
|
35 |
public function display() {
|
36 |
+
require_once WD_FMC_DIR . "/admin/models/FMModelGoptions_fmc.php";
|
37 |
+
$model = new FMModelGoptions_fmc();
|
38 |
|
39 |
+
require_once WD_FMC_DIR . "/admin/views/FMViewGoptions_fmc.php";
|
40 |
+
$view = new FMViewGoptions_fmc($model);
|
41 |
$view->display();
|
42 |
}
|
43 |
|
44 |
+
public function save() {
|
45 |
+
$message = $this->save_db();
|
46 |
+
$page = WDW_FMC_Library::get('page');
|
47 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
48 |
+
}
|
49 |
+
|
50 |
+
public function save_db() {
|
51 |
+
global $wpdb;
|
52 |
+
$public_key = (isset($_POST['public_key']) ? esc_html(stripslashes( $_POST['public_key'])) : '');
|
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 |
+
update_option('fmc_settings', array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => $csv_delimiter));
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
////////////////////////////////////////////////////////////////////////////////////////
|
61 |
// Getters & Setters //
|
62 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/controllers/FMControllerManage_fmc.php
CHANGED
@@ -24,13 +24,49 @@ class FMControllerManage_fmc {
|
|
24 |
$message = WDW_FMC_Library::get('message');
|
25 |
echo WDW_FMC_Library::message_id($message);
|
26 |
if (method_exists($this, $task)) {
|
27 |
-
|
28 |
-
|
29 |
}
|
30 |
else {
|
31 |
-
|
32 |
}
|
33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
public function display() {
|
36 |
require_once WD_FMC_DIR . "/admin/models/FMModelManage_fmc.php";
|
@@ -57,7 +93,24 @@ class FMControllerManage_fmc {
|
|
57 |
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
58 |
$view = new FMViewManage_fmc($model);
|
59 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
public function edit_old() {
|
@@ -66,9 +119,7 @@ class FMControllerManage_fmc {
|
|
66 |
|
67 |
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
68 |
$view = new FMViewManage_fmc($model);
|
69 |
-
|
70 |
-
$id = WDW_FMC_Library::get('current_id', 0);
|
71 |
-
// var_dump('s');
|
72 |
$view->edit_old($id);
|
73 |
}
|
74 |
|
@@ -88,9 +139,10 @@ class FMControllerManage_fmc {
|
|
88 |
|
89 |
public function save_options_old() {
|
90 |
$message = $this->save_db_options_old();
|
|
|
91 |
$page = WDW_FMC_Library::get('page');
|
92 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
93 |
-
WDW_FMC_Library::
|
94 |
}
|
95 |
|
96 |
public function apply_options_old() {
|
@@ -103,7 +155,7 @@ class FMControllerManage_fmc {
|
|
103 |
$page = WDW_FMC_Library::get('page');
|
104 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
105 |
$fieldset_id = WDW_FMC_Library::get('fieldset_id', 'general');
|
106 |
-
WDW_FMC_Library::
|
107 |
}
|
108 |
|
109 |
public function save_db_options_old() {
|
@@ -199,9 +251,10 @@ function before_reset() {
|
|
199 |
|
200 |
public function save_layout() {
|
201 |
$message = $this->save_db_layout();
|
|
|
202 |
$page = WDW_FMC_Library::get('page');
|
203 |
-
$current_id =(int)
|
204 |
-
WDW_FMC_Library::
|
205 |
}
|
206 |
|
207 |
public function apply_layout() {
|
@@ -213,7 +266,8 @@ function before_reset() {
|
|
213 |
$view = new FMViewManage_fmc($model);
|
214 |
$page = WDW_FMC_Library::get('page');
|
215 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
216 |
-
WDW_FMC_Library::
|
|
|
217 |
}
|
218 |
|
219 |
public function save_db_layout() {
|
@@ -242,6 +296,7 @@ function before_reset() {
|
|
242 |
|
243 |
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
244 |
$view = new FMViewManage_fmc($model);
|
|
|
245 |
global $wpdb;
|
246 |
$id = (int)WDW_FMC_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
|
247 |
$view->form_options($id);
|
@@ -249,9 +304,10 @@ function before_reset() {
|
|
249 |
|
250 |
public function save_options() {
|
251 |
$message = $this->save_db_options();
|
|
|
252 |
$page = WDW_FMC_Library::get('page');
|
253 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
254 |
-
WDW_FMC_Library::
|
255 |
}
|
256 |
|
257 |
public function apply_options() {
|
@@ -261,28 +317,30 @@ function before_reset() {
|
|
261 |
|
262 |
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
263 |
$view = new FMViewManage_fmc($model);
|
|
|
|
|
264 |
$page = WDW_FMC_Library::get('page');
|
265 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
266 |
$fieldset_id = WDW_FMC_Library::get('fieldset_id', 'general');
|
267 |
-
WDW_FMC_Library::
|
268 |
}
|
269 |
|
270 |
public function remove_query() {
|
271 |
global $wpdb;
|
272 |
$cid = ((isset($_POST['cid']) && $_POST['cid'] != '') ? $_POST['cid'] : NULL);
|
273 |
if (count($cid)) {
|
274 |
-
|
275 |
$cids = implode(',', $cid);
|
276 |
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_query WHERE id IN ( ' . $cids . ' )';
|
277 |
if ($wpdb->query($query)) {
|
278 |
-
echo
|
279 |
}
|
280 |
else {
|
281 |
-
echo
|
282 |
}
|
283 |
}
|
284 |
else {
|
285 |
-
echo
|
286 |
}
|
287 |
$this->apply_options();
|
288 |
}
|
@@ -305,12 +363,14 @@ function before_reset() {
|
|
305 |
|
306 |
}";
|
307 |
global $wpdb;
|
|
|
308 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
309 |
-
$published = (
|
310 |
-
$savedb = (
|
311 |
-
$theme = (int)((isset($_POST['theme']) && (esc_html($_POST['theme']) != 0)) ? esc_html(stripslashes($_POST['theme'])) : $wpdb->get_var("SELECT
|
312 |
$requiredmark = (isset($_POST['requiredmark']) ? esc_html(stripslashes($_POST['requiredmark'])) : '*');
|
313 |
$sendemail = (isset($_POST['sendemail']) ? esc_html(stripslashes($_POST['sendemail'])) : 1);
|
|
|
314 |
$mail = (isset($_POST['mail']) ? esc_html(stripslashes($_POST['mail'])) : '');
|
315 |
if (isset($_POST['mailToAdd']) && esc_html(stripslashes($_POST['mailToAdd'])) != '') {
|
316 |
$mail .= esc_html(stripslashes($_POST['mailToAdd'])) . ',';
|
@@ -351,6 +411,9 @@ function before_reset() {
|
|
351 |
$user_id_wd = (isset($_POST['user_id_wd']) ? stripslashes($_POST['user_id_wd']) : 'administrator,');
|
352 |
$frontend_submit_fields = (isset($_POST['frontend_submit_fields']) ? stripslashes($_POST['frontend_submit_fields']) : '');
|
353 |
$frontend_submit_stat_fields = (isset($_POST['frontend_submit_stat_fields']) ? stripslashes($_POST['frontend_submit_stat_fields']) : '');
|
|
|
|
|
|
|
354 |
$send_to = '';
|
355 |
for ($i = 0; $i < 20; $i++) {
|
356 |
if (isset($_POST['send_to' . $i])) {
|
@@ -370,12 +433,28 @@ function before_reset() {
|
|
370 |
$submit_text_type = 0;
|
371 |
$article_id = 0;
|
372 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
$save = $wpdb->update($wpdb->prefix . 'formmaker', array(
|
374 |
'published' => $published,
|
375 |
'savedb' => $savedb,
|
376 |
'theme' => $theme,
|
377 |
'requiredmark' => $requiredmark,
|
378 |
'sendemail' => $sendemail,
|
|
|
379 |
'mail' => $mail,
|
380 |
'from_mail' => $from_mail,
|
381 |
'from_name' => $from_name,
|
@@ -410,44 +489,54 @@ function before_reset() {
|
|
410 |
'send_to' => $send_to,
|
411 |
'frontend_submit_fields' => $frontend_submit_fields,
|
412 |
'frontend_submit_stat_fields' => $frontend_submit_stat_fields,
|
|
|
|
|
|
|
|
|
413 |
), array('id' => $id));
|
414 |
if ($save !== FALSE) {
|
415 |
-
|
|
|
|
|
|
|
416 |
}
|
417 |
else {
|
418 |
-
|
419 |
}
|
420 |
}
|
421 |
|
422 |
public function save_as_copy_old() {
|
423 |
$message = $this->save_db_as_copy_old();
|
|
|
424 |
$page = WDW_FMC_Library::get('page');
|
425 |
-
WDW_FMC_Library::
|
426 |
}
|
427 |
|
428 |
public function save_old() {
|
429 |
$message = $this->save_db_old();
|
|
|
430 |
$page = WDW_FMC_Library::get('page');
|
431 |
-
WDW_FMC_Library::
|
432 |
}
|
433 |
|
434 |
public function apply_old() {
|
435 |
global $wpdb;
|
436 |
$message = $this->save_db_old();
|
437 |
-
|
438 |
$id = (int) $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
439 |
$current_id = (int)WDW_FMC_Library::get('current_id', $id);
|
440 |
$page = WDW_FMC_Library::get('page');
|
441 |
-
WDW_FMC_Library::
|
442 |
}
|
443 |
|
444 |
public function save_db_old() {
|
445 |
global $wpdb;
|
|
|
446 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
447 |
$title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
|
448 |
$form = (isset($_POST['form']) ? stripslashes($_POST['form']) : '');
|
449 |
$form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
|
450 |
-
$counter = (
|
451 |
$label_order = (isset($_POST['label_order']) ? esc_html(stripslashes($_POST['label_order'])) : '');
|
452 |
$label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
|
453 |
$pagination = (isset($_POST['pagination']) ? esc_html(stripslashes($_POST['pagination'])) : '');
|
@@ -481,6 +570,7 @@ function before_reset() {
|
|
481 |
|
482 |
public function save_db_as_copy_old() {
|
483 |
global $wpdb;
|
|
|
484 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
485 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
486 |
$title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
|
@@ -539,7 +629,8 @@ function before_reset() {
|
|
539 |
'sendemail' => $row->sendemail,
|
540 |
'savedb' => $row->savedb,
|
541 |
'form_fields' => $row->form_fields,
|
542 |
-
'published' => $row->published
|
|
|
543 |
), array(
|
544 |
'%s',
|
545 |
'%s',
|
@@ -587,7 +678,6 @@ function before_reset() {
|
|
587 |
'%d'
|
588 |
));
|
589 |
$id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
590 |
-
update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
|
591 |
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
592 |
'form_id' => $id,
|
593 |
'views' => 0
|
@@ -607,14 +697,14 @@ function before_reset() {
|
|
607 |
$message = $this->save_db_as_copy();
|
608 |
// $this->display();
|
609 |
$page = WDW_FMC_Library::get('page');
|
610 |
-
WDW_FMC_Library::
|
611 |
}
|
612 |
|
613 |
public function save() {
|
614 |
$message = $this->save_db();
|
615 |
// $this->display();
|
616 |
$page = WDW_FMC_Library::get('page');
|
617 |
-
WDW_FMC_Library::
|
618 |
}
|
619 |
|
620 |
public function apply() {
|
@@ -622,9 +712,9 @@ function before_reset() {
|
|
622 |
// $this->edit();
|
623 |
global $wpdb;
|
624 |
$id = (int) $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
625 |
-
$current_id = WDW_FMC_Library::get('current_id', $id);
|
626 |
$page = WDW_FMC_Library::get('page');
|
627 |
-
WDW_FMC_Library::
|
628 |
}
|
629 |
|
630 |
public function save_db() {
|
@@ -638,11 +728,11 @@ function before_submit() {
|
|
638 |
// before form reset
|
639 |
function before_reset() {
|
640 |
}";
|
641 |
-
|
642 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
643 |
$title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
|
|
|
644 |
$form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
|
645 |
-
$sortable = (isset($_POST['sortable']) ?
|
646 |
$counter = (isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
|
647 |
$label_order = (isset($_POST['label_order']) ? esc_html(stripslashes($_POST['label_order'])) : '');
|
648 |
$pagination = (isset($_POST['pagination']) ? esc_html(stripslashes($_POST['pagination'])) : '');
|
@@ -653,10 +743,10 @@ function before_reset() {
|
|
653 |
$recaptcha_theme = (isset($_POST['recaptcha_theme']) ? esc_html(stripslashes($_POST['recaptcha_theme'])) : '');
|
654 |
$label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
|
655 |
$form_fields = (isset($_POST['form_fields']) ? stripslashes($_POST['form_fields']) : '');
|
656 |
-
|
657 |
if ($id != 0) {
|
658 |
$save = $wpdb->update($wpdb->prefix . 'formmaker', array(
|
659 |
'title' => $title,
|
|
|
660 |
'form_front' => $form_front,
|
661 |
'sortable' => $sortable,
|
662 |
'counter' => $counter,
|
@@ -676,7 +766,7 @@ function before_reset() {
|
|
676 |
'title' => $title,
|
677 |
'mail' => '',
|
678 |
'form_front' => $form_front,
|
679 |
-
'theme' => $
|
680 |
'counter' => $counter,
|
681 |
'label_order' => $label_order,
|
682 |
'pagination' => $pagination,
|
@@ -727,6 +817,7 @@ function before_reset() {
|
|
727 |
'user_id_wd' => 'administrator,',
|
728 |
'frontend_submit_fields' => '',
|
729 |
'frontend_submit_stat_fields' => '',
|
|
|
730 |
), array(
|
731 |
'%s',
|
732 |
'%s',
|
@@ -782,9 +873,9 @@ function before_reset() {
|
|
782 |
'%s',
|
783 |
'%s',
|
784 |
'%s',
|
|
|
785 |
));
|
786 |
$id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
787 |
-
update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
|
788 |
// $_POST['current_id'] = $id;
|
789 |
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
790 |
'form_id' => $id,
|
@@ -794,6 +885,177 @@ function before_reset() {
|
|
794 |
'%d'
|
795 |
));
|
796 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
797 |
if ($save !== FALSE) {
|
798 |
return 1;
|
799 |
}
|
@@ -804,6 +1066,7 @@ function before_reset() {
|
|
804 |
|
805 |
public function save_db_as_copy() {
|
806 |
global $wpdb;
|
|
|
807 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
808 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
809 |
$title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
|
@@ -875,6 +1138,7 @@ function before_reset() {
|
|
875 |
'user_id_wd' => $row->user_id_wd,
|
876 |
'frontend_submit_fields' => $row->frontend_submit_fields,
|
877 |
'frontend_submit_stat_fields' => $row->frontend_submit_stat_fields,
|
|
|
878 |
), array(
|
879 |
'%s',
|
880 |
'%s',
|
@@ -930,18 +1194,19 @@ function before_reset() {
|
|
930 |
'%s',
|
931 |
'%s',
|
932 |
'%s',
|
|
|
933 |
));
|
934 |
-
$
|
935 |
-
update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
|
936 |
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
937 |
-
'form_id' => $
|
938 |
'views' => 0
|
939 |
), array(
|
940 |
'%d',
|
941 |
'%d'
|
942 |
));
|
943 |
if ($save !== FALSE) {
|
944 |
-
|
|
|
945 |
}
|
946 |
else {
|
947 |
return 2;
|
@@ -952,12 +1217,9 @@ function before_reset() {
|
|
952 |
global $wpdb;
|
953 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id);
|
954 |
if ($wpdb->query($query)) {
|
955 |
-
$arr = explode(',', get_option('contact_form_forms'));
|
956 |
-
$arr = array_diff($arr, array((int)$id));
|
957 |
-
$arr = implode(',', $arr);
|
958 |
-
update_option('contact_form_forms', $arr);
|
959 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $id));
|
960 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="%d"', $id));
|
|
|
961 |
$message = 3;
|
962 |
}
|
963 |
else {
|
@@ -965,7 +1227,7 @@ function before_reset() {
|
|
965 |
}
|
966 |
// $this->display();
|
967 |
$page = WDW_FMC_Library::get('page');
|
968 |
-
WDW_FMC_Library::
|
969 |
}
|
970 |
|
971 |
public function delete_all() {
|
@@ -977,10 +1239,6 @@ function before_reset() {
|
|
977 |
if (isset($_POST['check_' . $form_id])) {
|
978 |
$flag = TRUE;
|
979 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
|
980 |
-
$arr = explode(',', get_option('contact_form_forms'));
|
981 |
-
$arr = array_diff($arr, array((int)$form_id));
|
982 |
-
$arr = implode(',', $arr);
|
983 |
-
update_option('contact_form_forms', $arr);
|
984 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $form_id));
|
985 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="%d"', $form_id));
|
986 |
}
|
@@ -993,7 +1251,7 @@ function before_reset() {
|
|
993 |
}
|
994 |
// $this->display();
|
995 |
$page = WDW_FMC_Library::get('page');
|
996 |
-
WDW_FMC_Library::
|
997 |
}
|
998 |
|
999 |
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
$message = WDW_FMC_Library::get('message');
|
25 |
echo WDW_FMC_Library::message_id($message);
|
26 |
if (method_exists($this, $task)) {
|
27 |
+
check_admin_referer('nonce_fmc', 'nonce_fmc');
|
28 |
+
$this->$task($id);
|
29 |
}
|
30 |
else {
|
31 |
+
$this->display();
|
32 |
}
|
33 |
}
|
34 |
+
public function undo()
|
35 |
+
{
|
36 |
+
require_once WD_FMC_DIR . "/admin/models/FMModelManage_fmc.php";
|
37 |
+
$model = new FMModelManage_fmc();
|
38 |
+
|
39 |
+
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
40 |
+
|
41 |
+
global $wpdb;
|
42 |
+
$backup_id = (int)WDW_FMC_Library::get('backup_id');
|
43 |
+
$id = (int)WDW_FMC_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_fmc($model);
|
49 |
+
$view->edit($backup_id);
|
50 |
+
|
51 |
+
}
|
52 |
+
public function redo()
|
53 |
+
{
|
54 |
+
require_once WD_FMC_DIR . "/admin/models/FMModelManage_fmc.php";
|
55 |
+
$model = new FMModelManage_fmc();
|
56 |
+
|
57 |
+
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
58 |
+
global $wpdb;
|
59 |
+
$backup_id = (int)WDW_FMC_Library::get('backup_id');
|
60 |
+
$id = (int)WDW_FMC_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_fmc($model);
|
66 |
+
$view->edit($backup_id);
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
|
71 |
public function display() {
|
72 |
require_once WD_FMC_DIR . "/admin/models/FMModelManage_fmc.php";
|
93 |
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
94 |
$view = new FMViewManage_fmc($model);
|
95 |
$id = (int)WDW_FMC_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() {
|
119 |
|
120 |
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
121 |
$view = new FMViewManage_fmc($model);
|
122 |
+
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
|
|
|
|
123 |
$view->edit_old($id);
|
124 |
}
|
125 |
|
139 |
|
140 |
public function save_options_old() {
|
141 |
$message = $this->save_db_options_old();
|
142 |
+
// $this->edit_old();
|
143 |
$page = WDW_FMC_Library::get('page');
|
144 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
145 |
+
WDW_FMC_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() {
|
155 |
$page = WDW_FMC_Library::get('page');
|
156 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
157 |
$fieldset_id = WDW_FMC_Library::get('fieldset_id', 'general');
|
158 |
+
WDW_FMC_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() {
|
251 |
|
252 |
public function save_layout() {
|
253 |
$message = $this->save_db_layout();
|
254 |
+
// $this->edit();
|
255 |
$page = WDW_FMC_Library::get('page');
|
256 |
+
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
257 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
|
258 |
}
|
259 |
|
260 |
public function apply_layout() {
|
266 |
$view = new FMViewManage_fmc($model);
|
267 |
$page = WDW_FMC_Library::get('page');
|
268 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
269 |
+
WDW_FMC_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() {
|
296 |
|
297 |
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
298 |
$view = new FMViewManage_fmc($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_FMC_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
|
302 |
$view->form_options($id);
|
304 |
|
305 |
public function save_options() {
|
306 |
$message = $this->save_db_options();
|
307 |
+
// $this->edit();
|
308 |
$page = WDW_FMC_Library::get('page');
|
309 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
310 |
+
WDW_FMC_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() {
|
317 |
|
318 |
require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
|
319 |
$view = new FMViewManage_fmc($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_FMC_Library::get('page');
|
323 |
$current_id = (int)WDW_FMC_Library::get('current_id', 0);
|
324 |
$fieldset_id = WDW_FMC_Library::get('fieldset_id', 'general');
|
325 |
+
WDW_FMC_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 . ' )';
|
335 |
if ($wpdb->query($query)) {
|
336 |
+
echo WDW_FMC_Library::message('Items Succesfully Deleted.', 'updated');
|
337 |
}
|
338 |
else {
|
339 |
+
echo WDW_FMC_Library::message('Error. Please install plugin again.', 'error');
|
340 |
}
|
341 |
}
|
342 |
else {
|
343 |
+
echo WDW_FMC_Library::message('You must select at least one item.', 'error');
|
344 |
}
|
345 |
$this->apply_options();
|
346 |
}
|
363 |
|
364 |
}";
|
365 |
global $wpdb;
|
366 |
+
// $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
|
367 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
368 |
+
$published = (isset($_POST['published']) ? esc_html(stripslashes($_POST['published'])) : 1);
|
369 |
+
$savedb = (isset($_POST['savedb']) ? esc_html(stripslashes($_POST['savedb'])) : 1);
|
370 |
+
$theme = (int)((isset($_POST['theme']) && (esc_html($_POST['theme']) != 0)) ? esc_html(stripslashes($_POST['theme'])) : $wpdb->get_var("SELECT id FROM " . $wpdb->prefix . "formmaker_themes WHERE `default`='1'"));
|
371 |
$requiredmark = (isset($_POST['requiredmark']) ? esc_html(stripslashes($_POST['requiredmark'])) : '*');
|
372 |
$sendemail = (isset($_POST['sendemail']) ? esc_html(stripslashes($_POST['sendemail'])) : 1);
|
373 |
+
$save_uploads = (isset($_POST['save_uploads']) ? esc_html(stripslashes($_POST['save_uploads'])) : 1);
|
374 |
$mail = (isset($_POST['mail']) ? esc_html(stripslashes($_POST['mail'])) : '');
|
375 |
if (isset($_POST['mailToAdd']) && esc_html(stripslashes($_POST['mailToAdd'])) != '') {
|
376 |
$mail .= esc_html(stripslashes($_POST['mailToAdd'])) . ',';
|
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])) {
|
433 |
$submit_text_type = 0;
|
434 |
$article_id = 0;
|
435 |
}
|
436 |
+
|
437 |
+
$mail_verification_post_id = (int)$wpdb->get_var('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE mail_verification_post_id!=0');
|
438 |
+
if($mail_verify) {
|
439 |
+
$email_verification_post = array(
|
440 |
+
'post_title' => 'Email Verification',
|
441 |
+
'post_content' => '[email_verification]',
|
442 |
+
'post_status' => 'publish',
|
443 |
+
'post_author' => 1,
|
444 |
+
'post_type' => 'fmemailverification',
|
445 |
+
);
|
446 |
+
|
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,
|
454 |
'theme' => $theme,
|
455 |
'requiredmark' => $requiredmark,
|
456 |
'sendemail' => $sendemail,
|
457 |
+
'save_uploads' => $save_uploads,
|
458 |
'mail' => $mail,
|
459 |
'from_mail' => $from_mail,
|
460 |
'from_name' => $from_name,
|
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(
|
499 |
+
'theme' => $theme
|
500 |
+
), array('id' => $id));
|
501 |
+
return 8;
|
502 |
}
|
503 |
else {
|
504 |
+
return 2;
|
505 |
}
|
506 |
}
|
507 |
|
508 |
public function save_as_copy_old() {
|
509 |
$message = $this->save_db_as_copy_old();
|
510 |
+
// $this->display();
|
511 |
$page = WDW_FMC_Library::get('page');
|
512 |
+
WDW_FMC_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_FMC_Library::get('page');
|
519 |
+
WDW_FMC_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_FMC_Library::get('current_id', $id);
|
528 |
$page = WDW_FMC_Library::get('page');
|
529 |
+
WDW_FMC_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_FMC_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'])) : '');
|
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_FMC_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'])) : '');
|
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',
|
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
|
697 |
$message = $this->save_db_as_copy();
|
698 |
// $this->display();
|
699 |
$page = WDW_FMC_Library::get('page');
|
700 |
+
WDW_FMC_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_FMC_Library::get('page');
|
707 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
708 |
}
|
709 |
|
710 |
public function apply() {
|
712 |
// $this->edit();
|
713 |
global $wpdb;
|
714 |
$id = (int) $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
715 |
+
$current_id = (int)WDW_FMC_Library::get('current_id', $id);
|
716 |
$page = WDW_FMC_Library::get('page');
|
717 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
|
718 |
}
|
719 |
|
720 |
public function save_db() {
|
728 |
// before form reset
|
729 |
function before_reset() {
|
730 |
}";
|
|
|
731 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
732 |
$title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
|
733 |
+
$theme = (isset($_POST['theme']) ? esc_html(stripslashes($_POST['theme'])) : $wpdb->get_var("SELECT id FROM " . $wpdb->prefix . "formmaker_themes WHERE `default`='1'"));
|
734 |
$form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
|
735 |
+
$sortable = (isset($_POST['sortable']) ? stripslashes($_POST['sortable']) : 1);
|
736 |
$counter = (isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
|
737 |
$label_order = (isset($_POST['label_order']) ? esc_html(stripslashes($_POST['label_order'])) : '');
|
738 |
$pagination = (isset($_POST['pagination']) ? esc_html(stripslashes($_POST['pagination'])) : '');
|
743 |
$recaptcha_theme = (isset($_POST['recaptcha_theme']) ? esc_html(stripslashes($_POST['recaptcha_theme'])) : '');
|
744 |
$label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
|
745 |
$form_fields = (isset($_POST['form_fields']) ? stripslashes($_POST['form_fields']) : '');
|
|
|
746 |
if ($id != 0) {
|
747 |
$save = $wpdb->update($wpdb->prefix . 'formmaker', array(
|
748 |
'title' => $title,
|
749 |
+
'theme' => $theme,
|
750 |
'form_front' => $form_front,
|
751 |
'sortable' => $sortable,
|
752 |
'counter' => $counter,
|
766 |
'title' => $title,
|
767 |
'mail' => '',
|
768 |
'form_front' => $form_front,
|
769 |
+
'theme' => $theme,
|
770 |
'counter' => $counter,
|
771 |
'label_order' => $label_order,
|
772 |
'pagination' => $pagination,
|
817 |
'user_id_wd' => 'administrator,',
|
818 |
'frontend_submit_fields' => '',
|
819 |
'frontend_submit_stat_fields' => '',
|
820 |
+
'save_uploads' => 1,
|
821 |
), array(
|
822 |
'%s',
|
823 |
'%s',
|
873 |
'%s',
|
874 |
'%s',
|
875 |
'%s',
|
876 |
+
'%d',
|
877 |
));
|
878 |
$id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
|
|
879 |
// $_POST['current_id'] = $id;
|
880 |
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
881 |
'form_id' => $id,
|
885 |
'%d'
|
886 |
));
|
887 |
}
|
888 |
+
|
889 |
+
$backup_id = (isset($_POST['backup_id']) ? (int)esc_html(stripslashes($_POST['backup_id'])) : '');
|
890 |
+
|
891 |
+
if($backup_id)
|
892 |
+
{
|
893 |
+
$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 ";
|
894 |
+
|
895 |
+
if($wpdb->get_var($query))
|
896 |
+
{
|
897 |
+
$query = "DELETE FROM ".$wpdb->prefix."formmaker_backup WHERE backup_id > ".$backup_id." AND id = ".$id;
|
898 |
+
$wpdb->query($query);
|
899 |
+
}
|
900 |
+
|
901 |
+
$row = $wpdb->get_row($wpdb->prepare("SELECT form_fields, form_front FROM ".$wpdb->prefix."formmaker_backup WHERE backup_id = '%d'", $backup_id));
|
902 |
+
|
903 |
+
if($row->form_fields==$form_fields and $row->form_front==$form_front)
|
904 |
+
{
|
905 |
+
$save = $wpdb->update($wpdb->prefix . 'formmaker_backup', array(
|
906 |
+
'cur' => 1,
|
907 |
+
'title' => $title,
|
908 |
+
'theme' => $theme,
|
909 |
+
'form_front' => $form_front,
|
910 |
+
'sortable' => $sortable,
|
911 |
+
'counter' => $counter,
|
912 |
+
'label_order' => $label_order,
|
913 |
+
'label_order_current' => $label_order_current,
|
914 |
+
'pagination' => $pagination,
|
915 |
+
'show_title' => $show_title,
|
916 |
+
'show_numbers' => $show_numbers,
|
917 |
+
'public_key' => $public_key,
|
918 |
+
'private_key' => $private_key,
|
919 |
+
'recaptcha_theme' => $recaptcha_theme,
|
920 |
+
'form_fields' => $form_fields,
|
921 |
+
), array('backup_id' => $backup_id));
|
922 |
+
|
923 |
+
|
924 |
+
if ($save !== FALSE) {
|
925 |
+
return 1;
|
926 |
+
}
|
927 |
+
else {
|
928 |
+
return 2;
|
929 |
+
}
|
930 |
+
}
|
931 |
+
}
|
932 |
+
|
933 |
+
$wpdb->query("UPDATE ".$wpdb->prefix."formmaker_backup SET cur=0 WHERE id=".$id );
|
934 |
+
|
935 |
+
$save = $wpdb->insert($wpdb->prefix . 'formmaker_backup', array(
|
936 |
+
'cur' => 1,
|
937 |
+
'id' => $id,
|
938 |
+
'title' => $title,
|
939 |
+
'mail' => '',
|
940 |
+
'form_front' => $form_front,
|
941 |
+
'theme' => $theme,
|
942 |
+
'counter' => $counter,
|
943 |
+
'label_order' => $label_order,
|
944 |
+
'pagination' => $pagination,
|
945 |
+
'show_title' => $show_title,
|
946 |
+
'show_numbers' => $show_numbers,
|
947 |
+
'public_key' => $public_key,
|
948 |
+
'private_key' => $private_key,
|
949 |
+
'recaptcha_theme' => $recaptcha_theme,
|
950 |
+
'javascript' => $javascript,
|
951 |
+
'submit_text' => '',
|
952 |
+
'url' => '',
|
953 |
+
'article_id' => 0,
|
954 |
+
'submit_text_type' => 0,
|
955 |
+
'script_mail' => '%all%',
|
956 |
+
'script_mail_user' => '%all%',
|
957 |
+
'label_order_current' => $label_order_current,
|
958 |
+
'tax' => 0,
|
959 |
+
'payment_currency' => '',
|
960 |
+
'paypal_email' => '',
|
961 |
+
'checkout_mode' => 'testmode',
|
962 |
+
'paypal_mode' => 0,
|
963 |
+
'published' => 1,
|
964 |
+
'form_fields' => $form_fields,
|
965 |
+
'savedb' => 1,
|
966 |
+
'sendemail' => 1,
|
967 |
+
'requiredmark' => '*',
|
968 |
+
'from_mail' => '',
|
969 |
+
'from_name' => '',
|
970 |
+
'reply_to' => '',
|
971 |
+
'send_to' => '',
|
972 |
+
'autogen_layout' => 1,
|
973 |
+
'custom_front' => '',
|
974 |
+
'mail_from_user' => '',
|
975 |
+
'mail_from_name_user' => '',
|
976 |
+
'reply_to_user' => '',
|
977 |
+
'condition' => '',
|
978 |
+
'mail_cc' => '',
|
979 |
+
'mail_cc_user' => '',
|
980 |
+
'mail_bcc' => '',
|
981 |
+
'mail_bcc_user' => '',
|
982 |
+
'mail_subject' => '',
|
983 |
+
'mail_subject_user' => '',
|
984 |
+
'mail_mode' => 1,
|
985 |
+
'mail_mode_user' => 1,
|
986 |
+
'mail_attachment' => 1,
|
987 |
+
'mail_attachment_user' => 1,
|
988 |
+
'sortable' => $sortable,
|
989 |
+
'user_id_wd' => 'administrator,',
|
990 |
+
'frontend_submit_fields' => '',
|
991 |
+
'frontend_submit_stat_fields' => '',
|
992 |
+
), array(
|
993 |
+
'%d',
|
994 |
+
'%d',
|
995 |
+
'%s',
|
996 |
+
'%s',
|
997 |
+
'%s',
|
998 |
+
'%d',
|
999 |
+
'%d',
|
1000 |
+
'%s',
|
1001 |
+
'%s',
|
1002 |
+
'%s',
|
1003 |
+
'%s',
|
1004 |
+
'%s',
|
1005 |
+
'%s',
|
1006 |
+
'%s',
|
1007 |
+
'%s',
|
1008 |
+
'%s',
|
1009 |
+
'%s',
|
1010 |
+
'%d',
|
1011 |
+
'%d',
|
1012 |
+
'%s',
|
1013 |
+
'%s',
|
1014 |
+
'%s',
|
1015 |
+
'%s',
|
1016 |
+
'%s',
|
1017 |
+
'%s',
|
1018 |
+
'%s',
|
1019 |
+
'%d',
|
1020 |
+
'%d',
|
1021 |
+
'%s',
|
1022 |
+
'%d',
|
1023 |
+
'%d',
|
1024 |
+
'%s',
|
1025 |
+
'%s',
|
1026 |
+
'%s',
|
1027 |
+
'%s',
|
1028 |
+
'%s',
|
1029 |
+
'%d',
|
1030 |
+
'%s',
|
1031 |
+
'%s',
|
1032 |
+
'%s',
|
1033 |
+
'%s',
|
1034 |
+
'%s',
|
1035 |
+
'%s',
|
1036 |
+
'%s',
|
1037 |
+
'%s',
|
1038 |
+
'%s',
|
1039 |
+
'%s',
|
1040 |
+
'%s',
|
1041 |
+
'%d',
|
1042 |
+
'%d',
|
1043 |
+
'%d',
|
1044 |
+
'%d',
|
1045 |
+
'%d',
|
1046 |
+
'%s',
|
1047 |
+
'%s',
|
1048 |
+
'%s',
|
1049 |
+
)) ;
|
1050 |
+
|
1051 |
+
$query = "SELECT count(backup_id) FROM ".$wpdb->prefix."formmaker_backup WHERE id = ".$id;
|
1052 |
+
$wpdb->get_var($query);
|
1053 |
+
if($wpdb->get_var($query)>10)
|
1054 |
+
{
|
1055 |
+
$query = "DELETE FROM ".$wpdb->prefix."formmaker_backup WHERE id = ".$id." ORDER BY backup_id ASC LIMIT 1 ";
|
1056 |
+
$wpdb->query($query);
|
1057 |
+
}
|
1058 |
+
|
1059 |
if ($save !== FALSE) {
|
1060 |
return 1;
|
1061 |
}
|
1066 |
|
1067 |
public function save_db_as_copy() {
|
1068 |
global $wpdb;
|
1069 |
+
// $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
|
1070 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
1071 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
1072 |
$title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
|
1138 |
'user_id_wd' => $row->user_id_wd,
|
1139 |
'frontend_submit_fields' => $row->frontend_submit_fields,
|
1140 |
'frontend_submit_stat_fields' => $row->frontend_submit_stat_fields,
|
1141 |
+
'save_uploads' => $row->save_uploads,
|
1142 |
), array(
|
1143 |
'%s',
|
1144 |
'%s',
|
1194 |
'%s',
|
1195 |
'%s',
|
1196 |
'%s',
|
1197 |
+
'%d',
|
1198 |
));
|
1199 |
+
$new_id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
|
|
1200 |
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
1201 |
+
'form_id' => $new_id,
|
1202 |
'views' => 0
|
1203 |
), array(
|
1204 |
'%d',
|
1205 |
'%d'
|
1206 |
));
|
1207 |
if ($save !== FALSE) {
|
1208 |
+
|
1209 |
+
return 1;
|
1210 |
}
|
1211 |
else {
|
1212 |
return 2;
|
1217 |
global $wpdb;
|
1218 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id);
|
1219 |
if ($wpdb->query($query)) {
|
|
|
|
|
|
|
|
|
1220 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $id));
|
1221 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="%d"', $id));
|
1222 |
+
|
1223 |
$message = 3;
|
1224 |
}
|
1225 |
else {
|
1227 |
}
|
1228 |
// $this->display();
|
1229 |
$page = WDW_FMC_Library::get('page');
|
1230 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
1231 |
}
|
1232 |
|
1233 |
public function delete_all() {
|
1239 |
if (isset($_POST['check_' . $form_id])) {
|
1240 |
$flag = TRUE;
|
1241 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
|
|
|
|
|
|
|
|
|
1242 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $form_id));
|
1243 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="%d"', $form_id));
|
1244 |
}
|
1251 |
}
|
1252 |
// $this->display();
|
1253 |
$page = WDW_FMC_Library::get('page');
|
1254 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
1255 |
}
|
1256 |
|
1257 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/controllers/FMControllerSubmissions_fmc.php
CHANGED
@@ -22,12 +22,16 @@ class FMControllerSubmissions_fmc {
|
|
22 |
$task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
|
23 |
$id = ((isset($_POST['current_id'])) ? (int)esc_html($_POST['current_id']) : 0);
|
24 |
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
|
|
|
25 |
if (method_exists($this, $task)) {
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
28 |
}
|
29 |
else {
|
30 |
-
|
31 |
}
|
32 |
}
|
33 |
|
@@ -42,6 +46,7 @@ class FMControllerSubmissions_fmc {
|
|
42 |
}
|
43 |
|
44 |
public function show_stats() {
|
|
|
45 |
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
|
46 |
require_once WD_FMC_DIR . "/admin/models/FMModelSubmissions_fmc.php";
|
47 |
$model = new FMModelSubmissions_fmc();
|
@@ -58,12 +63,10 @@ class FMControllerSubmissions_fmc {
|
|
58 |
|
59 |
require_once WD_FMC_DIR . "/admin/views/FMViewSubmissions_fmc.php";
|
60 |
$view = new FMViewSubmissions_fmc($model);
|
61 |
-
$id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? (int)
|
62 |
|
63 |
$form_id = (int)$wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
|
64 |
-
$form = $wpdb->
|
65 |
-
$theme_id = (int)$form->theme;
|
66 |
-
$css = $wpdb->get_var("SELECT css FROM " . $wpdb->prefix . "formmaker_themes WHERE id='" . $theme_id . "'");
|
67 |
|
68 |
if (isset($form->form)) {
|
69 |
$old = TRUE;
|
@@ -78,7 +81,7 @@ class FMControllerSubmissions_fmc {
|
|
78 |
else {
|
79 |
$view->edit($id);
|
80 |
}
|
81 |
-
}
|
82 |
|
83 |
public function save() {
|
84 |
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
|
@@ -667,9 +670,20 @@ class FMControllerSubmissions_fmc {
|
|
667 |
|
668 |
public function delete($id) {
|
669 |
global $wpdb;
|
670 |
-
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
|
671 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id);
|
|
|
672 |
if ($wpdb->query($query)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
673 |
echo WDW_FMC_Library::message('Item Succesfully Deleted.', 'updated');
|
674 |
}
|
675 |
else {
|
@@ -680,13 +694,24 @@ class FMControllerSubmissions_fmc {
|
|
680 |
|
681 |
public function delete_all() {
|
682 |
global $wpdb;
|
683 |
-
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ?
|
684 |
$cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
|
685 |
-
|
686 |
array_walk($cid, create_function('&$value', '$value = (int)$value;'));
|
687 |
$cids = implode(',', $cid);
|
688 |
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )';
|
|
|
689 |
if ($wpdb->query($query)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
690 |
echo WDW_FMC_Library::message('Items Succesfully Deleted.', 'updated');
|
691 |
}
|
692 |
else {
|
@@ -705,7 +730,7 @@ class FMControllerSubmissions_fmc {
|
|
705 |
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
|
706 |
$cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
|
707 |
if (count($cid)) {
|
708 |
-
array_walk($cid, create_function('&$value', '$value = (int)$value;'));
|
709 |
$cids = implode(',', $cid);
|
710 |
$query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( '. $cids .' )';
|
711 |
$rows = $wpdb->get_results($query);
|
@@ -733,10 +758,10 @@ class FMControllerSubmissions_fmc {
|
|
733 |
public function unblock_ip() {
|
734 |
global $wpdb;
|
735 |
$flag = FALSE;
|
736 |
-
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
|
737 |
$cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
|
738 |
if (count($cid)) {
|
739 |
-
|
740 |
$cids = implode(',', $cid);
|
741 |
$query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( '. $cids .' )';
|
742 |
$rows = $wpdb->get_results($query);
|
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_fmc', 'nonce_fmc');
|
29 |
+
else
|
30 |
+
check_ajax_referer('nonce_fmc_ajax', 'nonce_fmc_ajax');
|
31 |
+
$this->$task($id);
|
32 |
}
|
33 |
else {
|
34 |
+
$this->display($form_id);
|
35 |
}
|
36 |
}
|
37 |
|
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_FMC_DIR . "/admin/models/FMModelSubmissions_fmc.php";
|
52 |
$model = new FMModelSubmissions_fmc();
|
63 |
|
64 |
require_once WD_FMC_DIR . "/admin/views/FMViewSubmissions_fmc.php";
|
65 |
$view = new FMViewSubmissions_fmc($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;
|
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);
|
670 |
|
671 |
public function delete($id) {
|
672 |
global $wpdb;
|
673 |
+
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
|
674 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id);
|
675 |
+
// $elements_col = $wpdb->get_col($wpdb->prepare('SELECT element_value FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id));
|
676 |
if ($wpdb->query($query)) {
|
677 |
+
// foreach ($elements_col as $element_value) {
|
678 |
+
// $destination = str_replace(site_url() . '/', '', $element_value);
|
679 |
+
// $destination = str_replace('*@@url@@*', '', $destination);
|
680 |
+
// if ($destination) {
|
681 |
+
// $destination = ABSPATH . $destination;
|
682 |
+
// if (file_exists($destination)) {
|
683 |
+
// unlink($destination);
|
684 |
+
// }
|
685 |
+
// }
|
686 |
+
// }
|
687 |
echo WDW_FMC_Library::message('Item Succesfully Deleted.', 'updated');
|
688 |
}
|
689 |
else {
|
694 |
|
695 |
public function delete_all() {
|
696 |
global $wpdb;
|
697 |
+
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
|
698 |
$cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
|
699 |
+
if (count($cid)) {
|
700 |
array_walk($cid, create_function('&$value', '$value = (int)$value;'));
|
701 |
$cids = implode(',', $cid);
|
702 |
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )';
|
703 |
+
// $elements_col = $wpdb->get_col('SELECT element_value FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )');
|
704 |
if ($wpdb->query($query)) {
|
705 |
+
// foreach ($elements_col as $element_value) {
|
706 |
+
// $destination = str_replace(site_url() . '/', '', $element_value);
|
707 |
+
// $destination = str_replace('*@@url@@*', '', $destination);
|
708 |
+
// if ($destination) {
|
709 |
+
// $destination = ABSPATH . $destination;
|
710 |
+
// if (file_exists($destination)) {
|
711 |
+
// unlink($destination);
|
712 |
+
// }
|
713 |
+
// }
|
714 |
+
// }
|
715 |
echo WDW_FMC_Library::message('Items Succesfully Deleted.', 'updated');
|
716 |
}
|
717 |
else {
|
730 |
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
|
731 |
$cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
|
732 |
if (count($cid)) {
|
733 |
+
array_walk($cid, create_function('&$value', '$value = (int)$value;'));
|
734 |
$cids = implode(',', $cid);
|
735 |
$query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( '. $cids .' )';
|
736 |
$rows = $wpdb->get_results($query);
|
758 |
public function unblock_ip() {
|
759 |
global $wpdb;
|
760 |
$flag = FALSE;
|
761 |
+
$form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
|
762 |
$cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
|
763 |
if (count($cid)) {
|
764 |
+
array_walk($cid, create_function('&$value', '$value = (int)$value;'));
|
765 |
$cids = implode(',', $cid);
|
766 |
$query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( '. $cids .' )';
|
767 |
$rows = $wpdb->get_results($query);
|
admin/controllers/FMControllerThemes_fmc.php
CHANGED
@@ -56,23 +56,28 @@ class FMControllerThemes_fmc {
|
|
56 |
|
57 |
require_once WD_FMC_DIR . "/admin/views/FMViewThemes_fmc.php";
|
58 |
$view = new FMViewThemes_fmc($model);
|
|
|
59 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
60 |
$view->edit($id, FALSE);
|
61 |
}
|
62 |
|
63 |
public function save() {
|
64 |
$message = $this->save_db();
|
|
|
65 |
$page = WDW_FMC_Library::get('page');
|
66 |
-
WDW_FMC_Library::
|
67 |
}
|
68 |
|
69 |
public function apply() {
|
70 |
$message = $this->save_db();
|
71 |
global $wpdb;
|
|
|
|
|
|
|
72 |
$id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'formmaker_themes');
|
73 |
$current_id = (int)WDW_FMC_Library::get('current_id', $id);
|
74 |
$page = WDW_FMC_Library::get('page');
|
75 |
-
WDW_FMC_Library::
|
76 |
// $this->edit();
|
77 |
}
|
78 |
|
@@ -126,7 +131,7 @@ class FMControllerThemes_fmc {
|
|
126 |
}
|
127 |
// $this->display();
|
128 |
$page = WDW_FMC_Library::get('page');
|
129 |
-
WDW_FMC_Library::
|
130 |
}
|
131 |
|
132 |
public function delete_all() {
|
@@ -136,7 +141,7 @@ class FMControllerThemes_fmc {
|
|
136 |
$theme_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'formmaker_themes');
|
137 |
foreach ($theme_ids_col as $theme_id) {
|
138 |
if (isset($_POST['check_' . $theme_id])) {
|
139 |
-
$isDefault = $wpdb->get_var($wpdb->prepare('SELECT default FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id));
|
140 |
if ($isDefault) {
|
141 |
$message = 4;
|
142 |
}
|
@@ -154,7 +159,7 @@ class FMControllerThemes_fmc {
|
|
154 |
}
|
155 |
// $this->display();
|
156 |
$page = WDW_FMC_Library::get('page');
|
157 |
-
WDW_FMC_Library::
|
158 |
}
|
159 |
|
160 |
public function setdefault($id) {
|
@@ -169,7 +174,7 @@ class FMControllerThemes_fmc {
|
|
169 |
}
|
170 |
// $this->display();
|
171 |
$page = WDW_FMC_Library::get('page');
|
172 |
-
WDW_FMC_Library::
|
173 |
}
|
174 |
|
175 |
////////////////////////////////////////////////////////////////////////////////////////
|
56 |
|
57 |
require_once WD_FMC_DIR . "/admin/views/FMViewThemes_fmc.php";
|
58 |
$view = new FMViewThemes_fmc($model);
|
59 |
+
// $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
|
60 |
$id = (int)WDW_FMC_Library::get('current_id', 0);
|
61 |
$view->edit($id, FALSE);
|
62 |
}
|
63 |
|
64 |
public function save() {
|
65 |
$message = $this->save_db();
|
66 |
+
// $this->display();
|
67 |
$page = WDW_FMC_Library::get('page');
|
68 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
69 |
}
|
70 |
|
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_FMC_Library::get('current_id', $id);
|
79 |
$page = WDW_FMC_Library::get('page');
|
80 |
+
WDW_FMC_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 |
|
131 |
}
|
132 |
// $this->display();
|
133 |
$page = WDW_FMC_Library::get('page');
|
134 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
135 |
}
|
136 |
|
137 |
public function delete_all() {
|
141 |
$theme_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'formmaker_themes');
|
142 |
foreach ($theme_ids_col as $theme_id) {
|
143 |
if (isset($_POST['check_' . $theme_id])) {
|
144 |
+
$isDefault = $wpdb->get_var($wpdb->prepare('SELECT `default` FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id));
|
145 |
if ($isDefault) {
|
146 |
$message = 4;
|
147 |
}
|
159 |
}
|
160 |
// $this->display();
|
161 |
$page = WDW_FMC_Library::get('page');
|
162 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
163 |
}
|
164 |
|
165 |
public function setdefault($id) {
|
174 |
}
|
175 |
// $this->display();
|
176 |
$page = WDW_FMC_Library::get('page');
|
177 |
+
WDW_FMC_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
|
178 |
}
|
179 |
|
180 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/controllers/FMControllerWidget_fmc.php
CHANGED
@@ -18,12 +18,12 @@ class FMControllerWidget_fmc extends WP_Widget {
|
|
18 |
public function __construct() {
|
19 |
$widget_ops = array(
|
20 |
'classname' => 'form_maker_widget',
|
21 |
-
'description' => 'Add
|
22 |
);
|
23 |
// Widget Control Settings.
|
24 |
$control_ops = array('id_base' => 'form_maker_widget');
|
25 |
// Create the widget.
|
26 |
-
parent::__construct('form_maker_widget', '
|
27 |
require_once WD_FMC_DIR . "/admin/models/FMModelWidget_fmc.php";
|
28 |
$this->model = new FMModelWidget_fmc();
|
29 |
|
18 |
public function __construct() {
|
19 |
$widget_ops = array(
|
20 |
'classname' => 'form_maker_widget',
|
21 |
+
'description' => 'Add Form Maker widget.'
|
22 |
);
|
23 |
// Widget Control Settings.
|
24 |
$control_ops = array('id_base' => 'form_maker_widget');
|
25 |
// Create the widget.
|
26 |
+
parent::__construct('form_maker_widget', 'Form Maker', $widget_ops, $control_ops);
|
27 |
require_once WD_FMC_DIR . "/admin/models/FMModelWidget_fmc.php";
|
28 |
$this->model = new FMModelWidget_fmc();
|
29 |
|
admin/models/FMModelBlocked_ips_fmc.php
CHANGED
@@ -21,10 +21,9 @@ class FMModelBlocked_ips_fmc {
|
|
21 |
public function get_rows_data() {
|
22 |
global $wpdb;
|
23 |
$where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE `ip` LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
|
24 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc']) &&
|
25 |
-
$
|
26 |
-
$
|
27 |
-
$order_by = in_array($order_by, $order_by_array) ? $order_by : 'id';
|
28 |
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
29 |
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
30 |
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
21 |
public function get_rows_data() {
|
22 |
global $wpdb;
|
23 |
$where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE `ip` LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
|
24 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
|
25 |
+
$order_by_array = array('id', 'ip');
|
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']) {
|
29 |
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
admin/models/{FMModelFeatured_plugins_fmc.php → FMModelFormcontactwdmathcaptcha.php}
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class
|
4 |
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
// Events //
|
6 |
////////////////////////////////////////////////////////////////////////////////////////
|
@@ -18,6 +18,7 @@ class FMModelFeatured_plugins_fmc {
|
|
18 |
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
// Public Methods //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
21 |
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
// Getters & Setters //
|
23 |
////////////////////////////////////////////////////////////////////////////////////////
|
1 |
<?php
|
2 |
|
3 |
+
class FMModelFormcontactwdmathcaptcha {
|
4 |
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
// Events //
|
6 |
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
// Public Methods //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
// Getters & Setters //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/models/FMModelFormcontactwindow.php
CHANGED
@@ -21,7 +21,7 @@ class FMModelFormcontactwindow {
|
|
21 |
|
22 |
public function get_form_data() {
|
23 |
global $wpdb;
|
24 |
-
|
25 |
return $row;
|
26 |
}
|
27 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
|
22 |
public function get_form_data() {
|
23 |
global $wpdb;
|
24 |
+
$row = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE `id` IN(" . get_option('contact_form_forms', 0) . ") order by `title`");
|
25 |
return $row;
|
26 |
}
|
27 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/models/FMModelFromeditcountryinpopup_fmc.php
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Getters & Setters //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
26 |
-
// Private Methods //
|
27 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
-
// Listeners //
|
30 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMModelFromeditcountryinpopup_fmc {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Getters & Setters //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
26 |
+
// Private Methods //
|
27 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
+
// Listeners //
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
}
|
admin/models/FMModelGenerete_csv_fmc.php
CHANGED
@@ -18,258 +18,245 @@ class FMModelGenerete_csv_fmc {
|
|
18 |
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
// Public Methods //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
global $wpdb;
|
25 |
-
$params = array();
|
26 |
-
$form_id = (int)$_REQUEST['form_id'];
|
27 |
-
$paypal_info_fields = array('currency', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'ipn', 'tax', 'shipping');
|
28 |
-
|
29 |
-
$paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
$rows_lable = $wpdb->get_results($query_lable);
|
47 |
-
$ptn = "/[^a-zA-Z0-9_]/";
|
48 |
-
$rpltxt = "";
|
49 |
-
$title = preg_replace($ptn, $rpltxt, $rows_lable[0]->title);
|
50 |
-
$sorted_labels_id = array();
|
51 |
-
$sorted_labels = array();
|
52 |
-
$label_titles = array();
|
53 |
-
if ($labels) {
|
54 |
-
$label_id = array();
|
55 |
-
$label_order = array();
|
56 |
-
$label_order_original = array();
|
57 |
-
$label_type = array();
|
58 |
-
///stexic
|
59 |
-
$label_all = explode('#****#', $rows_lable[0]->label_order);
|
60 |
-
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
61 |
-
foreach ($label_all as $key => $label_each) {
|
62 |
-
$label_id_each = explode('#**id**#', $label_each);
|
63 |
-
array_push($label_id, $label_id_each[0]);
|
64 |
-
$label_oder_each = explode('#**label**#', $label_id_each[1]);
|
65 |
-
array_push($label_order_original, $label_oder_each[0]);
|
66 |
-
$ptn = "/[^a-zA-Z0-9_]/";
|
67 |
-
$rpltxt = "";
|
68 |
-
$label_temp = preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
69 |
-
array_push($label_order, $label_temp);
|
70 |
-
array_push($label_type, $label_oder_each[1]);
|
71 |
-
}
|
72 |
-
foreach ($label_id as $key => $label) {
|
73 |
-
if (in_array($label, $labels)) {
|
74 |
-
array_push($sorted_labels, $label_order[$key]);
|
75 |
-
array_push($sorted_labels_id, $label);
|
76 |
-
array_push($label_titles, stripslashes($label_order_original[$key]));
|
77 |
-
}
|
78 |
-
}
|
79 |
-
}
|
80 |
-
$m = count($sorted_labels);
|
81 |
-
$group_id_s = array();
|
82 |
-
|
83 |
-
if (count($rows) > 0 and $m){
|
84 |
|
85 |
-
$
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
$
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
$element_value = str_replace("***br***", ', ', $t->element_value);
|
127 |
-
if (strpos($element_value, "***quantity***")) {
|
128 |
-
$element_value = str_replace("***quantity***", '', $element_value);
|
129 |
-
}
|
130 |
if (strpos($element_value, "***property***")) {
|
131 |
-
|
132 |
-
|
133 |
if(substr($element_value, -2) == ', ') {
|
134 |
$data_temp[stripslashes($label_titles[$h])]= substr($element_value, 0, -2);
|
135 |
-
|
136 |
else {
|
137 |
$data_temp[stripslashes($label_titles[$h])]= $element_value;
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
$element = explode("***", $element);
|
146 |
$data_temp[stripslashes($label_titles[$h])] = ' ' . $element[1] . '/' . $element[0];
|
147 |
}
|
148 |
-
|
149 |
-
$data_temp[stripslashes($label_titles[$h])] = str_replace("@@@", ' ', $
|
150 |
}
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
$items_count = sizeof($grading) - 1;
|
155 |
$items = "";
|
156 |
$total = "";
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
}
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
$mat_rows = $matrix_value[0];
|
169 |
$mat_columns = $matrix_value[$mat_rows + 1];
|
170 |
$matrix = "";
|
171 |
-
$aaa =
|
172 |
-
|
173 |
$selected_value = "";
|
174 |
-
|
175 |
-
|
176 |
for ($k = 1; $k <= $mat_rows; $k++) {
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
|
|
|
|
|
|
181 |
}
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
$checked = '1';
|
188 |
-
}
|
189 |
-
else {
|
190 |
-
$checked = '0';
|
191 |
-
}
|
192 |
-
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
193 |
-
}
|
194 |
-
}
|
195 |
else {
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows + 1 + $l].']='.$selected_text."; ";
|
220 |
-
$var_checkbox++;
|
221 |
-
}
|
222 |
-
}
|
223 |
-
}
|
224 |
}
|
225 |
}
|
226 |
$data_temp[stripslashes($label_titles[$h])] = $matrix;
|
227 |
}
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
}
|
238 |
-
|
239 |
-
if($is_paypal)
|
240 |
-
{
|
241 |
-
$item_total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s",$i,'item_total'));
|
242 |
-
|
243 |
-
$total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s",$i,'total'));
|
244 |
|
245 |
-
|
|
|
246 |
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
}
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
else {
|
262 |
-
$data_temp['PAYPAL_'.$paypal_info_labels[$key]]='';
|
263 |
-
}
|
264 |
-
}
|
265 |
-
}
|
266 |
-
$data[] = $data_temp;
|
267 |
-
}
|
268 |
-
array_push($params, $data);
|
269 |
-
array_push($params, $title);
|
270 |
-
array_push($params, $is_paypal_info);
|
271 |
-
return $params;
|
272 |
-
}
|
273 |
////////////////////////////////////////////////////////////////////////////////////////
|
274 |
// Getters & Setters //
|
275 |
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
// Public Methods //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function get_data() {
|
22 |
+
global $wpdb;
|
23 |
+
$is_paypal_info = FALSE;
|
24 |
+
$params = array();
|
25 |
+
$group_id_s = array();
|
26 |
+
$form_id = (int)$_REQUEST['form_id'];
|
27 |
+
$limitstart = (int)$_REQUEST['limitstart'];
|
28 |
+
|
29 |
+
$paypal_info_fields = array('currency', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'ipn', 'tax', 'shipping');
|
30 |
+
$paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
|
31 |
+
|
32 |
+
$query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d", $form_id);
|
33 |
+
$group_id_s = $wpdb->get_col($query);
|
34 |
|
35 |
+
$query = $wpdb->prepare("SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d",$form_id);
|
36 |
+
$labels = $wpdb->get_col($query);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
+
$query_lable = $wpdb->prepare("SELECT label_order,title FROM " . $wpdb->prefix . "formmaker where id=%d", $form_id);
|
39 |
+
$rows_lable = $wpdb->get_results($query_lable);
|
40 |
+
$ptn = "/[^a-zA-Z0-9_]/";
|
41 |
+
$rpltxt = "";
|
42 |
+
$title = isset($rows_lable[0]) ? preg_replace($ptn, $rpltxt, $rows_lable[0]->title) : '';
|
43 |
|
44 |
+
$sorted_labels_id = array();
|
45 |
+
$sorted_labels = array();
|
46 |
+
$label_titles = array();
|
47 |
+
$label_id = array();
|
48 |
+
$label_order = array();
|
49 |
+
$label_order_original = array();
|
50 |
+
$label_type = array();
|
51 |
+
if ($labels) {
|
52 |
+
$label_all = explode('#****#', $rows_lable[0]->label_order);
|
53 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
54 |
+
foreach ($label_all as $key => $label_each) {
|
55 |
+
$label_id_each = explode('#**id**#', $label_each);
|
56 |
+
array_push($label_id, $label_id_each[0]);
|
57 |
+
$label_oder_each = explode('#**label**#', $label_id_each[1]);
|
58 |
+
array_push($label_order_original, $label_oder_each[0]);
|
59 |
+
$label_temp = preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
60 |
+
array_push($label_order, $label_temp);
|
61 |
+
array_push($label_type, $label_oder_each[1]);
|
62 |
+
}
|
63 |
+
foreach ($label_id as $key => $label) {
|
64 |
+
if (in_array($label, $labels) && $label_type[$key] !='type_arithmetic_captcha') {
|
65 |
+
array_push($sorted_labels, $label_order[$key]);
|
66 |
+
array_push($sorted_labels_id, $label);
|
67 |
+
array_push($label_titles, stripslashes($label_order_original[$key]));
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
$m = count($sorted_labels);
|
73 |
+
$wpdb->query("SET SESSION group_concat_max_len = 1000000");
|
74 |
|
75 |
+
$query = $wpdb->prepare("SELECT group_id, ip, date, user_id_wd, GROUP_CONCAT( element_label SEPARATOR ',') as element_label, GROUP_CONCAT( element_value SEPARATOR '*:*el_value*:*') as element_value FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d GROUP BY group_id ORDER BY date ASC limit %d, %d", $form_id, $limitstart, 1000);
|
76 |
+
$rows = $wpdb->get_results($query, OBJECT_K);
|
|
|
77 |
|
78 |
+
$data = array();
|
79 |
+
$group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
+
for ($www = $limitstart; $www < $group_id_s_count; $www++) {
|
82 |
+
$i = $group_id_s[$www];
|
83 |
+
$field_key = array_search($i, $label_id);
|
84 |
+
if($label_type[$field_key] != 'type_arithmetic_captcha') {
|
85 |
+
$data_temp = array();
|
86 |
+
$tt = $rows[$i];
|
87 |
+
|
88 |
+
$date = $tt->date;
|
89 |
+
$ip = $tt->ip;
|
90 |
+
$user_id = get_userdata($tt->user_id_wd);
|
91 |
+
$username = $user_id ? $user_id->display_name : "";
|
92 |
+
$useremail = $user_id ? $user_id->user_email : "";
|
93 |
+
$data_temp['Submit date'] = $date;
|
94 |
+
$data_temp['Ip']=$ip;
|
95 |
+
$data_temp['Submitter\'s Username']=$username;
|
96 |
+
$data_temp['Submitter\'s Email Address']=$useremail;
|
97 |
+
|
98 |
+
$element_labels = explode(',', $tt->element_label);
|
99 |
+
$element_values = explode('*:*el_value*:*', $tt->element_value);
|
100 |
+
for ($h = 0; $h < $m; $h++) {
|
101 |
+
if(isset($data_temp[$label_titles[$h]]))
|
102 |
+
$label_titles[$h] .= '(1)';
|
103 |
+
|
104 |
+
if(in_array($sorted_labels_id[$h], $element_labels)) {
|
105 |
+
$element_value = $element_values[array_search($sorted_labels_id[$h], $element_labels)];
|
106 |
+
|
107 |
+
if (strpos($element_value, "*@@url@@*")) {
|
108 |
+
$file_names = '';
|
109 |
+
$new_files = explode("*@@url@@*", $element_value);
|
110 |
+
foreach ($new_files as $new_file) {
|
111 |
+
if ($new_file) {
|
112 |
+
$file_names .= $new_file . ", ";
|
113 |
+
}
|
114 |
+
}
|
115 |
+
$data_temp[stripslashes($label_titles[$h])] = $file_names;
|
116 |
+
}
|
117 |
+
elseif (strpos($element_value, "***br***")) {
|
118 |
+
$element_value = str_replace("***br***", ', ', $element_value);
|
119 |
+
if (strpos($element_value, "***quantity***")) {
|
120 |
+
$element_value = str_replace("***quantity***", '', $element_value);
|
121 |
+
}
|
|
|
|
|
|
|
|
|
122 |
if (strpos($element_value, "***property***")) {
|
123 |
+
$element_value = str_replace("***property***", '', $element_value);
|
124 |
+
}
|
125 |
if(substr($element_value, -2) == ', ') {
|
126 |
$data_temp[stripslashes($label_titles[$h])]= substr($element_value, 0, -2);
|
127 |
+
}
|
128 |
else {
|
129 |
$data_temp[stripslashes($label_titles[$h])]= $element_value;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
elseif (strpos($element_value, "***map***")) {
|
133 |
+
$data_temp[stripslashes($label_titles[$h])] = 'Longitude:' . str_replace("***map***", ', Latitude:', $element_value);
|
134 |
+
}
|
135 |
+
elseif (strpos($element_value, "***star_rating***")) {
|
136 |
+
$element = str_replace("***star_rating***", '', $element_value);
|
137 |
$element = explode("***", $element);
|
138 |
$data_temp[stripslashes($label_titles[$h])] = ' ' . $element[1] . '/' . $element[0];
|
139 |
}
|
140 |
+
elseif (strpos($element_value, "@@@") || $element_value == "@@@" || $element_value == "@@@@@@@@@") {
|
141 |
+
$data_temp[stripslashes($label_titles[$h])] = str_replace("@@@", ' ', $element_value);
|
142 |
}
|
143 |
+
elseif (strpos($element_value, "***grading***")) {
|
144 |
+
$element = str_replace("***grading***", '', $element_value);
|
145 |
+
$grading = explode(":", $element);
|
146 |
$items_count = sizeof($grading) - 1;
|
147 |
$items = "";
|
148 |
$total = "";
|
149 |
+
for ($k = 0; $k < $items_count / 2; $k++) {
|
150 |
+
$items .= $grading[$items_count / 2 + $k] . ": " . $grading[$k] . ", ";
|
151 |
+
$total += $grading[$k];
|
152 |
+
}
|
153 |
+
$items .= "Total: " . $total;
|
154 |
+
$data_temp[stripslashes($label_titles[$h])] = $items;
|
155 |
}
|
156 |
+
elseif (strpos($element_value, "***matrix***")) {
|
157 |
+
$element = str_replace("***matrix***", '', $element_value);
|
158 |
+
$matrix_value = explode('***', $element);
|
159 |
+
$matrix_value = array_slice($matrix_value, 0, count($matrix_value) - 1);
|
160 |
$mat_rows = $matrix_value[0];
|
161 |
$mat_columns = $matrix_value[$mat_rows + 1];
|
162 |
$matrix = "";
|
163 |
+
$aaa = array();
|
164 |
+
$var_checkbox = 1;
|
165 |
$selected_value = "";
|
166 |
+
$selected_value_yes = "";
|
167 |
+
$selected_value_no = "";
|
168 |
for ($k = 1; $k <= $mat_rows; $k++) {
|
169 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2] == "radio") {
|
170 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2 + $k] == 0) {
|
171 |
+
$checked = "0";
|
172 |
+
$aaa[1] = "";
|
173 |
+
}
|
174 |
+
else {
|
175 |
+
$aaa = explode("_", $matrix_value[$mat_rows + $mat_columns + 2 + $k]);
|
176 |
}
|
177 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
178 |
+
$checked = $aaa[1] == $l ? '1' : '0';
|
179 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
180 |
+
}
|
181 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
else {
|
183 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "checkbox") {
|
184 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
185 |
+
$checked = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox] == 1 ? '1' : '0';
|
186 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
187 |
+
$var_checkbox++;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
else {
|
191 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "text") {
|
192 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
193 |
+
$text_value = $matrix_value[$mat_rows+$mat_columns+2+$var_checkbox];
|
194 |
+
$matrix .='['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$text_value."; ";
|
195 |
+
$var_checkbox++;
|
196 |
+
}
|
197 |
+
}
|
198 |
+
else {
|
199 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
200 |
+
$selected_text = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox];
|
201 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows + 1 + $l].']='.$selected_text."; ";
|
202 |
+
$var_checkbox++;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
}
|
|
|
|
|
|
|
|
|
|
|
206 |
}
|
207 |
}
|
208 |
$data_temp[stripslashes($label_titles[$h])] = $matrix;
|
209 |
}
|
210 |
+
else {
|
211 |
+
$val = htmlspecialchars_decode($element_value);
|
212 |
+
$val = stripslashes(str_replace(''', "'", $val));
|
213 |
+
$data_temp[stripslashes($label_titles[$h])] = ($element_value ? $val : '');
|
214 |
+
}
|
215 |
+
}
|
216 |
+
else
|
217 |
+
$data_temp[stripslashes($label_titles[$h])] = '';
|
218 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
|
220 |
+
$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);
|
221 |
+
$is_paypal = $wpdb->get_results($query);
|
222 |
|
223 |
+
if($is_paypal) {
|
224 |
+
$item_total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s", $i, 'item_total'));
|
225 |
+
$total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s", $i, 'total'));
|
226 |
+
$payment_status = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s", $i, '0'));
|
227 |
+
$data_temp['Item Total'] = $item_total;
|
228 |
+
$data_temp['Total'] = $total;
|
229 |
+
$data_temp['Payment Status'] = $payment_status;
|
230 |
+
}
|
231 |
+
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_sessions where group_id=%d",$i);
|
232 |
+
$paypal_info = $wpdb->get_results($query);
|
233 |
+
if ($paypal_info) {
|
234 |
+
$is_paypal_info = TRUE;
|
235 |
+
}
|
236 |
+
if ($is_paypal) {
|
237 |
+
foreach ($paypal_info_fields as $key=>$paypal_info_field) {
|
238 |
+
if ($paypal_info) {
|
239 |
+
$data_temp['PAYPAL_'.$paypal_info_labels[$key]]=$paypal_info[0]->$paypal_info_field;
|
240 |
+
}
|
241 |
+
else {
|
242 |
+
$data_temp['PAYPAL_'.$paypal_info_labels[$key]]='';
|
243 |
+
}
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
$data[$i] = $data_temp;
|
248 |
+
}
|
249 |
}
|
250 |
+
|
251 |
+
array_push($params, $data);
|
252 |
+
array_push($params, $title);
|
253 |
+
array_push($params, $is_paypal_info);
|
254 |
+
|
255 |
+
return $params;
|
256 |
+
|
257 |
+
}
|
258 |
+
|
259 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
////////////////////////////////////////////////////////////////////////////////////////
|
261 |
// Getters & Setters //
|
262 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/models/FMModelGenerete_xml_fmc.php
CHANGED
@@ -20,268 +20,250 @@ class FMModelGenerete_xml_fmc {
|
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
|
22 |
public function get_data() {
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
$file_names .= $new_file . ", ";
|
123 |
-
}
|
124 |
-
}
|
125 |
-
$data_temp[stripslashes($label_titles[$h])] = $file_names;
|
126 |
-
}
|
127 |
-
elseif (strpos($t->element_value, "***br***")) {
|
128 |
-
$element_value = str_replace("***br***", ', ', $t->element_value);
|
129 |
-
if (strpos($element_value, "***quantity***")) {
|
130 |
-
$element_value = str_replace("***quantity***", '', $element_value);
|
131 |
-
}
|
132 |
if (strpos($element_value, "***property***")) {
|
133 |
-
|
134 |
-
|
135 |
if(substr($element_value, -2) == ', ') {
|
136 |
$data_temp[stripslashes($label_titles[$h])]= substr($element_value, 0, -2);
|
137 |
-
|
138 |
else {
|
139 |
$data_temp[stripslashes($label_titles[$h])]= $element_value;
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
$element = explode("***", $element);
|
148 |
$data_temp[stripslashes($label_titles[$h])] = ' ' . $element[1] . '/' . $element[0];
|
149 |
}
|
150 |
-
|
151 |
-
$data_temp[stripslashes($label_titles[$h])] = str_replace(
|
152 |
}
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
$items_count = sizeof($grading) - 1;
|
157 |
$items = "";
|
158 |
$total = "";
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
}
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
$mat_rows = $matrix_value[0];
|
171 |
$mat_columns = $matrix_value[$mat_rows + 1];
|
172 |
$matrix = "";
|
173 |
-
$aaa =
|
174 |
-
|
175 |
$selected_value = "";
|
176 |
-
|
177 |
-
|
178 |
for ($k = 1; $k <= $mat_rows; $k++) {
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
}
|
184 |
-
|
185 |
-
$aaa = explode("_", $matrix_value[$mat_rows + $mat_columns + 2 + $k]);
|
186 |
-
}
|
187 |
-
for ($l = 1; $l <= $mat_columns; $l++) {
|
188 |
-
if ($aaa[1] == $l) {
|
189 |
-
$checked = '1';
|
190 |
-
}
|
191 |
-
else {
|
192 |
-
$checked = '0';
|
193 |
-
}
|
194 |
-
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
195 |
-
}
|
196 |
-
}
|
197 |
else {
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows + 1 + $l].']='.$selected_text."; ";
|
222 |
-
$var_checkbox++;
|
223 |
-
}
|
224 |
-
}
|
225 |
-
}
|
226 |
}
|
227 |
}
|
228 |
$data_temp[stripslashes($label_titles[$h])] = $matrix;
|
229 |
}
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
$item_total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s",$i,'item_total'));
|
242 |
-
|
243 |
-
|
244 |
-
$total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s",$i,'total'));
|
245 |
-
|
246 |
-
|
247 |
-
$payment_status = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s",$i,'0'));
|
248 |
-
|
249 |
|
250 |
-
|
251 |
-
$data_temp['Item Total'] = $item_total;
|
252 |
|
253 |
-
|
254 |
-
$data_temp['Total'] = $total;
|
255 |
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
////////////////////////////////////////////////////////////////////////////////////////
|
286 |
// Getters & Setters //
|
287 |
////////////////////////////////////////////////////////////////////////////////////////
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
|
22 |
public function get_data() {
|
23 |
+
global $wpdb;
|
24 |
+
$is_paypal_info = FALSE;
|
25 |
+
$params = array();
|
26 |
+
$group_id_s = array();
|
27 |
+
$form_id = (int)$_REQUEST['form_id'];
|
28 |
+
$limitstart = (int)$_REQUEST['limitstart'];
|
29 |
+
|
30 |
+
$paypal_info_fields = array('currency', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'ipn', 'tax', 'shipping');
|
31 |
+
$paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
|
32 |
+
|
33 |
+
$query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d", $form_id);
|
34 |
+
$group_id_s = $wpdb->get_col($query);
|
35 |
+
|
36 |
+
$query = $wpdb->prepare("SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d",$form_id);
|
37 |
+
$labels = $wpdb->get_col($query);
|
38 |
+
|
39 |
+
$query_lable = $wpdb->prepare("SELECT label_order,title FROM " . $wpdb->prefix . "formmaker where id=%d", $form_id);
|
40 |
+
$rows_lable = $wpdb->get_results($query_lable);
|
41 |
+
$ptn = "/[^a-zA-Z0-9_]/";
|
42 |
+
$rpltxt = "";
|
43 |
+
$title = isset($rows_lable[0]) ? preg_replace($ptn, $rpltxt, $rows_lable[0]->title) : '';
|
44 |
+
|
45 |
+
$sorted_labels_id = array();
|
46 |
+
$sorted_labels = array();
|
47 |
+
$label_titles = array();
|
48 |
+
$label_id = array();
|
49 |
+
$label_order = array();
|
50 |
+
$label_order_original = array();
|
51 |
+
$label_type = array();
|
52 |
+
if ($labels) {
|
53 |
+
$label_all = explode('#****#', $rows_lable[0]->label_order);
|
54 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
55 |
+
foreach ($label_all as $key => $label_each) {
|
56 |
+
$label_id_each = explode('#**id**#', $label_each);
|
57 |
+
array_push($label_id, $label_id_each[0]);
|
58 |
+
$label_oder_each = explode('#**label**#', $label_id_each[1]);
|
59 |
+
array_push($label_order_original, $label_oder_each[0]);
|
60 |
+
$label_temp = preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
61 |
+
array_push($label_order, $label_temp);
|
62 |
+
array_push($label_type, $label_oder_each[1]);
|
63 |
+
}
|
64 |
+
foreach ($label_id as $key => $label) {
|
65 |
+
if (in_array($label, $labels) && $label_type[$key] !='type_arithmetic_captcha') {
|
66 |
+
array_push($sorted_labels, $label_order[$key]);
|
67 |
+
array_push($sorted_labels_id, $label);
|
68 |
+
array_push($label_titles, stripslashes($label_order_original[$key]));
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
$m = count($sorted_labels);
|
74 |
+
|
75 |
+
$query = $wpdb->prepare("SELECT group_id, ip, date, user_id_wd, GROUP_CONCAT( element_label SEPARATOR ',') as element_label, GROUP_CONCAT( element_value SEPARATOR '*:*el_value*:*') as element_value FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d GROUP BY group_id ORDER BY date ASC limit %d, %d", $form_id, $limitstart, 1000);
|
76 |
+
$rows = $wpdb->get_results($query, OBJECT_K);
|
77 |
+
|
78 |
+
$data = array();
|
79 |
+
$group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
|
80 |
+
|
81 |
+
for ($www = $limitstart; $www < $group_id_s_count; $www++) {
|
82 |
+
$i = $group_id_s[$www];
|
83 |
+
$field_key = array_search($i, $label_id);
|
84 |
+
if($label_type[$field_key] != 'type_arithmetic_captcha') {
|
85 |
+
$data_temp = array();
|
86 |
+
$tt = $rows[$i];
|
87 |
+
|
88 |
+
$date = $tt->date;
|
89 |
+
$ip = $tt->ip;
|
90 |
+
$user_id = get_userdata($tt->user_id_wd);
|
91 |
+
$username = $user_id ? $user_id->display_name : "";
|
92 |
+
$useremail = $user_id ? $user_id->user_email : "";
|
93 |
+
$data_temp['Submit date'] = $date;
|
94 |
+
$data_temp['Ip']=$ip;
|
95 |
+
$data_temp['Submitter\'s Username']=$username;
|
96 |
+
$data_temp['Submitter\'s Email Address']=$useremail;
|
97 |
+
|
98 |
+
$element_labels = explode(',', $tt->element_label);
|
99 |
+
$element_values = explode('*:*el_value*:*', $tt->element_value);
|
100 |
+
for ($h = 0; $h < $m; $h++) {
|
101 |
+
if(isset($data_temp[$label_titles[$h]]))
|
102 |
+
$label_titles[$h] .= '(1)';
|
103 |
+
|
104 |
+
if(in_array($sorted_labels_id[$h], $element_labels)) {
|
105 |
+
$element_value = $element_values[array_search($sorted_labels_id[$h], $element_labels)];
|
106 |
+
|
107 |
+
if (strpos($element_value, "*@@url@@*")) {
|
108 |
+
$file_names = '';
|
109 |
+
$new_files = explode("*@@url@@*", $element_value);
|
110 |
+
foreach ($new_files as $new_file) {
|
111 |
+
if ($new_file) {
|
112 |
+
$file_names .= $new_file . ", ";
|
113 |
+
}
|
114 |
+
}
|
115 |
+
$data_temp[stripslashes($label_titles[$h])] = $file_names;
|
116 |
+
}
|
117 |
+
elseif (strpos($element_value, "***br***")) {
|
118 |
+
$element_value = str_replace("***br***", ', ', $element_value);
|
119 |
+
if (strpos($element_value, "***quantity***")) {
|
120 |
+
$element_value = str_replace("***quantity***", '', $element_value);
|
121 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
if (strpos($element_value, "***property***")) {
|
123 |
+
$element_value = str_replace("***property***", '', $element_value);
|
124 |
+
}
|
125 |
if(substr($element_value, -2) == ', ') {
|
126 |
$data_temp[stripslashes($label_titles[$h])]= substr($element_value, 0, -2);
|
127 |
+
}
|
128 |
else {
|
129 |
$data_temp[stripslashes($label_titles[$h])]= $element_value;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
elseif (strpos($element_value, "***map***")) {
|
133 |
+
$data_temp[stripslashes($label_titles[$h])] = 'Longitude:' . str_replace("***map***", ', Latitude:', $element_value);
|
134 |
+
}
|
135 |
+
elseif (strpos($element_value, "***star_rating***")) {
|
136 |
+
$element = str_replace("***star_rating***", '', $element_value);
|
137 |
$element = explode("***", $element);
|
138 |
$data_temp[stripslashes($label_titles[$h])] = ' ' . $element[1] . '/' . $element[0];
|
139 |
}
|
140 |
+
elseif (strpos($element_value, "@@@") || $element_value == "@@@" || $element_value == "@@@@@@@@@") {
|
141 |
+
$data_temp[stripslashes($label_titles[$h])] = str_replace("@@@", ' ', $element_value);
|
142 |
}
|
143 |
+
elseif (strpos($element_value, "***grading***")) {
|
144 |
+
$element = str_replace("***grading***", '', $element_value);
|
145 |
+
$grading = explode(":", $element);
|
146 |
$items_count = sizeof($grading) - 1;
|
147 |
$items = "";
|
148 |
$total = "";
|
149 |
+
for ($k = 0; $k < $items_count / 2; $k++) {
|
150 |
+
$items .= $grading[$items_count / 2 + $k] . ": " . $grading[$k] . ", ";
|
151 |
+
$total += $grading[$k];
|
152 |
+
}
|
153 |
+
$items .= "Total: " . $total;
|
154 |
+
$data_temp[stripslashes($label_titles[$h])] = $items;
|
155 |
}
|
156 |
+
elseif (strpos($element_value, "***matrix***")) {
|
157 |
+
$element = str_replace("***matrix***", '', $element_value);
|
158 |
+
$matrix_value = explode('***', $element);
|
159 |
+
$matrix_value = array_slice($matrix_value, 0, count($matrix_value) - 1);
|
160 |
$mat_rows = $matrix_value[0];
|
161 |
$mat_columns = $matrix_value[$mat_rows + 1];
|
162 |
$matrix = "";
|
163 |
+
$aaa = array();
|
164 |
+
$var_checkbox = 1;
|
165 |
$selected_value = "";
|
166 |
+
$selected_value_yes = "";
|
167 |
+
$selected_value_no = "";
|
168 |
for ($k = 1; $k <= $mat_rows; $k++) {
|
169 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2] == "radio") {
|
170 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2 + $k] == 0) {
|
171 |
+
$checked = "0";
|
172 |
+
$aaa[1] = "";
|
173 |
+
}
|
174 |
+
else {
|
175 |
+
$aaa = explode("_", $matrix_value[$mat_rows + $mat_columns + 2 + $k]);
|
176 |
+
}
|
177 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
178 |
+
$checked = $aaa[1] == $l ? '1' : '0';
|
179 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
180 |
}
|
181 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
else {
|
183 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "checkbox") {
|
184 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
185 |
+
$checked = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox] == 1 ? '1' : '0';
|
186 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
187 |
+
$var_checkbox++;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
else {
|
191 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "text") {
|
192 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
193 |
+
$text_value = $matrix_value[$mat_rows+$mat_columns+2+$var_checkbox];
|
194 |
+
$matrix .='['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$text_value."; ";
|
195 |
+
$var_checkbox++;
|
196 |
+
}
|
197 |
+
}
|
198 |
+
else {
|
199 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
200 |
+
$selected_text = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox];
|
201 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows + 1 + $l].']='.$selected_text."; ";
|
202 |
+
$var_checkbox++;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
}
|
|
|
|
|
|
|
|
|
|
|
206 |
}
|
207 |
}
|
208 |
$data_temp[stripslashes($label_titles[$h])] = $matrix;
|
209 |
}
|
210 |
+
else {
|
211 |
+
$val = htmlspecialchars_decode($element_value);
|
212 |
+
$val = stripslashes(str_replace(''', "'", $val));
|
213 |
+
$data_temp[stripslashes($label_titles[$h])] = ($element_value ? $val : '');
|
214 |
+
}
|
215 |
+
}
|
216 |
+
else
|
217 |
+
$data_temp[stripslashes($label_titles[$h])] = '';
|
218 |
+
}
|
219 |
+
|
220 |
+
$item_total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s",$i,'item_total'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
222 |
+
$total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s",$i,'total'));
|
|
|
223 |
|
224 |
+
$payment_status = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s",$i,'0'));
|
|
|
225 |
|
226 |
+
|
227 |
+
if($item_total)
|
228 |
+
$data_temp['Item Total'] = $item_total;
|
229 |
+
|
230 |
+
if($total)
|
231 |
+
$data_temp['Total'] = $total;
|
232 |
+
|
233 |
+
if($payment_status)
|
234 |
+
$data_temp['Payment Status'] = $payment_status;
|
235 |
+
|
236 |
+
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_sessions where group_id= %d", $i);
|
237 |
+
|
238 |
+
|
239 |
+
|
240 |
+
$paypal_info = $wpdb->get_results($query);
|
241 |
+
if ($paypal_info) {
|
242 |
+
$is_paypal_info = TRUE;
|
243 |
+
}
|
244 |
+
if ($is_paypal_info) {
|
245 |
+
foreach ($paypal_info_fields as $key=>$paypal_info_field) {
|
246 |
+
if ($paypal_info) {
|
247 |
+
$data_temp['PAYPAL_' . $paypal_info_labels[$key]] = $paypal_info[0]->$paypal_info_field;
|
248 |
+
}
|
249 |
+
else {
|
250 |
+
$data_temp['PAYPAL_' . $paypal_info_labels[$key]] = '';
|
251 |
+
}
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
$data[$i] = $data_temp;
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
array_push($params, $data);
|
260 |
+
array_push($params, $title);
|
261 |
+
array_push($params, $is_paypal_info);
|
262 |
+
|
263 |
+
return $params;
|
264 |
+
|
265 |
+
}
|
266 |
+
|
267 |
////////////////////////////////////////////////////////////////////////////////////////
|
268 |
// Getters & Setters //
|
269 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/models/{FMModelShow_matrix_fmc.php → FMModelGoptions_fmc.php}
RENAMED
@@ -1,31 +1,30 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
|
26 |
-
|
27 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
-
|
29 |
-
|
30 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMModelGoptions_fmc {
|
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 |
+
// Getters & Setters //
|
23 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
// Private Methods //
|
26 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
27 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
28 |
+
// Listeners //
|
29 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
30 |
}
|
admin/models/FMModelManage_fmc.php
CHANGED
@@ -20,12 +20,11 @@ class FMModelManage_fmc {
|
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
public function get_rows_data() {
|
22 |
global $wpdb;
|
23 |
-
|
24 |
-
$where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? '
|
25 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc']) &&
|
26 |
-
|
27 |
-
|
28 |
-
$order_by = in_array($order_by, $order_by_array) ? $order_by : 'id';
|
29 |
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
30 |
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
31 |
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
@@ -91,6 +90,7 @@ class FMModelManage_fmc {
|
|
91 |
$row->mail_from_user = '';
|
92 |
$row->mail_from_name_user = '';
|
93 |
$row->reply_to_user = '';
|
|
|
94 |
}
|
95 |
return $row;
|
96 |
}
|
@@ -98,7 +98,7 @@ class FMModelManage_fmc {
|
|
98 |
public function get_row_data_new($id) {
|
99 |
global $wpdb;
|
100 |
if ($id != 0) {
|
101 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . '
|
102 |
$labels2 = array();
|
103 |
$label_id = array();
|
104 |
$label_order_original = array();
|
@@ -120,7 +120,7 @@ class FMModelManage_fmc {
|
|
120 |
$labels = array();
|
121 |
$paramss = array();
|
122 |
$fields = explode('*:*new_field*:*', $row->form_fields);
|
123 |
-
$fields = array_slice($fields, 0, count($fields) - 1);
|
124 |
foreach ($fields as $field) {
|
125 |
$temp=explode('*:*id*:*',$field);
|
126 |
array_push($ids, $temp[0]);
|
@@ -144,26 +144,27 @@ class FMModelManage_fmc {
|
|
144 |
{
|
145 |
case 'type_section_break':
|
146 |
{
|
147 |
-
$arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows" ><div id="X_'.$id.'" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/delete_el.png" title="Remove the field" onclick="remove_section_break("'.$id.'")"></div><div id="edit_'.$id.'" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/edit.png" title="Edit the field" onclick="edit("'.$id.'")"><span id="'.$id.'_element_labelform_id_temp" style="display: none;">custom_'.$id.'</span></div><div id="
|
148 |
break;
|
149 |
}
|
150 |
case 'type_editor':
|
151 |
{
|
152 |
-
$arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows" type="type_editor" style="margin-top:0px;"><div id="X_'.$id.'" valign="middle" align="right" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/delete_el.png" title="Remove the field" onclick="remove_row("'.$id.'")" onmouseover="chnage_icons_src(this,"delete_el")" onmouseout="chnage_icons_src(this,"delete_el")"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/left.png" title="Move the field to the left" onclick="left_row("'.$id.'")" onmouseover="chnage_icons_src(this,"left")" onmouseout="chnage_icons_src(this,"left")"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/up.png" title="Move the field up" onclick="up_row("'.$id.'")" onmouseover="chnage_icons_src(this,"up")" onmouseout="chnage_icons_src(this,"up")"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/down.png" title="Move the field down" onclick="down_row("'.$id.'")" onmouseover="chnage_icons_src(this,"down")" onmouseout="chnage_icons_src(this,"down")"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/right.png" title="Move the field to the right" onclick="right_row("'.$id.'")" onmouseover="chnage_icons_src(this,"right")" onmouseout="chnage_icons_src(this,"right")"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/edit.png" title="Edit the field" onclick="edit("'.$id.'")" onmouseover="chnage_icons_src(this,"edit")" onmouseout="chnage_icons_src(this,"edit")"></div><div id="
|
153 |
break;
|
154 |
}
|
155 |
|
156 |
case 'type_send_copy':
|
157 |
case 'type_captcha':
|
|
|
158 |
case 'type_recaptcha':
|
159 |
{
|
160 |
-
$arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows"><div id="X_'.$id.'" valign="middle" align="right" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/delete_el.png" title="Remove the field" onclick="remove_row("'.$id.'")"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/left.png" title="Move the field to the left" onclick="left_row("'.$id.'")"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/up.png" title="Move the field up" onclick="up_row("'.$id.'")"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/down.png" title="Move the field down" onclick="down_row("'.$id.'")"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/right.png" title="Move the field to the right" onclick="right_row("'.$id.'")"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/edit.png" title="Edit the field" onclick="edit("'.$id.'")"></div><div id="
|
161 |
break;
|
162 |
}
|
163 |
|
164 |
default :
|
165 |
{
|
166 |
-
$arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows" ><div id="X_'.$id.'" valign="middle" align="right" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/delete_el.png" title="Remove the field" onclick="remove_row("'.$id.'")" onmouseover="chnage_icons_src(this,"delete_el")" onmouseout="chnage_icons_src(this,"delete_el")"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/left.png" title="Move the field to the left" onclick="left_row("'.$id.'")" onmouseover="chnage_icons_src(this,"left")" onmouseout="chnage_icons_src(this,"left")"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/up.png" title="Move the field up" onclick="up_row("'.$id.'")" onmouseover="chnage_icons_src(this,"up")" onmouseout="chnage_icons_src(this,"up")"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/down.png" title="Move the field down" onclick="down_row("'.$id.'")" onmouseover="chnage_icons_src(this,"down")" onmouseout="chnage_icons_src(this,"down")"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/right.png" title="Move the field to the right" onclick="right_row("'.$id.'")" onmouseover="chnage_icons_src(this,"right")" onmouseout="chnage_icons_src(this,"right")"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/edit.png" title="Edit the field" onclick="edit("'.$id.'")" onmouseover="chnage_icons_src(this,"edit")" onmouseout="chnage_icons_src(this,"edit")"></div><div id="
|
167 |
break;
|
168 |
}
|
169 |
|
@@ -177,7 +178,7 @@ class FMModelManage_fmc {
|
|
177 |
$param[$params_name] = $temp[0];
|
178 |
$temp = $temp[1];
|
179 |
}
|
180 |
-
$rep ='<div id="wdform_field'.$id.'" type="type_section_break" class="wdform_field_section_break">'.$arrows.'<span id="'.$id.'_element_labelform_id_temp" style="display: none;">custom_'.$id.'</span><div id="'.$id.'_element_sectionform_id_temp" align="left" class="wdform_section_break">'.$param['w_editor'].'</div></div>';
|
181 |
break;
|
182 |
}
|
183 |
case 'type_editor': {
|
@@ -188,7 +189,7 @@ class FMModelManage_fmc {
|
|
188 |
$param[$params_name] = $temp[0];
|
189 |
$temp = $temp[1];
|
190 |
}
|
191 |
-
$rep =$arrows.'<div id="wdform_field'.$id.'" type="type_editor" class="wdform_field" >'.$param['w_editor'].'</div><
|
192 |
break;
|
193 |
}
|
194 |
case 'type_send_copy': {
|
@@ -213,27 +214,38 @@ class FMModelManage_fmc {
|
|
213 |
break;
|
214 |
}
|
215 |
case 'type_text': {
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
}
|
236 |
-
|
237 |
$params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_first_val', 'w_title', 'w_required', 'w_unique', 'w_class');
|
238 |
$temp = $params;
|
239 |
foreach ($params_names as $params_name) {
|
@@ -322,6 +334,8 @@ class FMModelManage_fmc {
|
|
322 |
case 'type_name': {
|
323 |
$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');
|
324 |
$temp = $params;
|
|
|
|
|
325 |
foreach ($params_names as $params_name) {
|
326 |
$temp = explode('*:*' . $params_name . '*:*', $temp);
|
327 |
$param[$params_name] = $temp[0];
|
@@ -339,15 +353,24 @@ class FMModelManage_fmc {
|
|
339 |
$w_first_val = explode('***', $param['w_first_val']);
|
340 |
$w_title = explode('***', $param['w_title']);
|
341 |
$w_mini_labels = explode('***', $param['w_mini_labels']);
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
break;
|
352 |
}
|
353 |
case 'type_address': {
|
@@ -404,24 +427,22 @@ class FMModelManage_fmc {
|
|
404 |
if($w_disabled_fields[5]=='yes' && $w_disabled_fields[6]=='yes')
|
405 |
$address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><select type="text" id="'.$id.'_stateform_id_temp" name="'.($id+3).'_stateform_id_temp" onchange="change_value("'.$id.'_stateform_id_temp")" style="width: 100%;" '.$param['attributes'].' disabled ><option value=""></option><option value="Alabama">Alabama</option><option value="Alaska">Alaska</option><option value="Arizona">Arizona</option><option value="Arkansas">Arkansas</option><option value="California">California</option><option value="Colorado">Colorado</option><option value="Connecticut">Connecticut</option><option value="Delaware">Delaware</option><option value="Florida">Florida</option><option value="Georgia">Georgia</option><option value="Hawaii">Hawaii</option><option value="Idaho">Idaho</option><option value="Illinois">Illinois</option><option value="Indiana">Indiana</option><option value="Iowa">Iowa</option><option value="Kansas">Kansas</option><option value="Kentucky">Kentucky</option><option value="Louisiana">Louisiana</option><option value="Maine">Maine</option><option value="Maryland">Maryland</option><option value="Massachusetts">Massachusetts</option><option value="Michigan">Michigan</option><option value="Minnesota">Minnesota</option><option value="Mississippi">Mississippi</option><option value="Missouri">Missouri</option><option value="Montana">Montana</option><option value="Nebraska">Nebraska</option><option value="Nevada">Nevada</option><option value="New Hampshire">New Hampshire</option><option value="New Jersey">New Jersey</option><option value="New Mexico">New Mexico</option><option value="New York">New York</option><option value="North Carolina">North Carolina</option><option value="North Dakota">North Dakota</option><option value="Ohio">Ohio</option><option value="Oklahoma">Oklahoma</option><option value="Oregon">Oregon</option><option value="Pennsylvania">Pennsylvania</option><option value="Rhode Island">Rhode Island</option><option value="South Carolina">South Carolina</option><option value="South Dakota">South Dakota</option><option value="Tennessee">Tennessee</option><option value="Texas">Texas</option><option value="Utah">Utah</option><option value="Vermont">Vermont</option><option value="Virginia">Virginia</option><option value="Washington">Washington</option><option value="West Virginia">West Virginia</option><option value="Wisconsin">Wisconsin</option><option value="Wyoming">Wyoming</option></select><label class="mini_label" style="display: block;" id="'.$id.'_mini_label_state">'.$w_mini_labels[3].'</label></span>';
|
406 |
else
|
407 |
-
$address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><input type="text" id="'.$id.'_stateform_id_temp" name="'.($id+3).'_stateform_id_temp" onchange="change_value("'.$id.'_stateform_id_temp")" style="width: 100%;" '.$param['attributes'].'><label class="mini_label" style="display: block;" id="'.$id.'_mini_label_state">'.$w_mini_labels[3].'</label></span>';
|
408 |
}
|
409 |
|
410 |
if($w_disabled_fields[4]=='no')
|
411 |
{
|
412 |
$g++;
|
413 |
-
$address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><input type="text" id="'.$id.'_postalform_id_temp" name="'.($id+4).'_postalform_id_temp" onchange="change_value("'.$id.'_postalform_id_temp")" style="width: 100%;" '.$param['attributes'].'><label class="mini_label" style="display: block;" id="'.$id.'_mini_label_postal">'.$w_mini_labels[4].'</label></span>';
|
414 |
}
|
415 |
|
416 |
if($w_disabled_fields[5]=='no')
|
417 |
{
|
418 |
$g++;
|
419 |
-
$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("'.$id.'_countryform_id_temp")" style="width: 100%;" '.$param['attributes'].'><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="
|
420 |
-
lue="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="Nepa">Nepa</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 Ki
|
421 |
-
ngdom</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>';
|
422 |
}
|
423 |
|
424 |
-
$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;"><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>';
|
425 |
break;
|
426 |
}
|
427 |
case 'type_submitter_mail': {
|
@@ -453,6 +474,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
453 |
{
|
454 |
$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');
|
455 |
$temp=$params;
|
|
|
|
|
456 |
foreach($params_names as $params_name )
|
457 |
{
|
458 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -467,12 +490,23 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
467 |
foreach($attrs as $attr)
|
468 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
469 |
}
|
470 |
-
|
|
|
|
|
|
|
|
|
|
|
471 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
472 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
473 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
474 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
477 |
{
|
478 |
if($choices_checked=='true')
|
@@ -481,8 +515,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
481 |
$param['w_choices_checked'][$key]='';
|
482 |
}
|
483 |
|
484 |
-
$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"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;" '.($param['w_flow']=='hor' ? 'for_hor="'.$id.'_hor"' : '').'>';
|
485 |
-
|
486 |
if($param['w_flow']=='hor')
|
487 |
{
|
488 |
$j = 0;
|
@@ -496,9 +530,28 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
496 |
continue;
|
497 |
|
498 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
499 |
-
|
500 |
-
|
501 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
}
|
503 |
|
504 |
$j++;
|
@@ -517,17 +570,56 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
517 |
for($l=0; $l<$param['w_rowcol']; $l++)
|
518 |
{
|
519 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
520 |
-
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="checkbox" value="
|
521 |
-
|
522 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
}
|
524 |
else
|
525 |
for($l=0; $l<count($param['w_choices']); $l++)
|
526 |
{
|
527 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
528 |
-
|
529 |
-
else
|
530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
}
|
532 |
|
533 |
$rep.='</div>';
|
@@ -541,9 +633,27 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
541 |
{
|
542 |
$l = count($param['w_choices']) - count($param['w_choices'])%$param['w_rowcol'] + $k;
|
543 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$l)
|
544 |
-
|
545 |
-
else
|
546 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
}
|
548 |
|
549 |
$rep.='</div>';
|
@@ -560,6 +670,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
560 |
|
561 |
$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');
|
562 |
$temp=$params;
|
|
|
|
|
563 |
foreach($params_names as $params_name )
|
564 |
{
|
565 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -574,12 +686,21 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
574 |
foreach($attrs as $attr)
|
575 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
576 |
}
|
577 |
-
|
|
|
|
|
|
|
|
|
578 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
579 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
580 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
581 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
582 |
-
|
|
|
|
|
|
|
|
|
|
|
583 |
|
584 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
585 |
{
|
@@ -589,7 +710,7 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
589 |
$param['w_choices_checked'][$key]='';
|
590 |
}
|
591 |
|
592 |
-
$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"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;" '.($param['w_flow']=='hor' ? 'for_hor="'.$id.'_hor"' : '').'>';
|
593 |
|
594 |
|
595 |
if($param['w_flow']=='hor')
|
@@ -604,10 +725,29 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
604 |
if($j >= count($param['w_choices'])%$param['w_rowcol'] && $l==(int)(count($param['w_choices'])/$param['w_rowcol']))
|
605 |
continue;
|
606 |
|
607 |
-
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i
|
608 |
-
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$l+$i).'" idi="'.((int)$param['w_rowcol']*$l+$i).'" style="display: table-cell;"><input type="radio" value="'.$param['w_choices'][(int)$param['w_rowcol']*$l+$i].'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'" name="'.$id.'_elementform_id_temp" other="1" onclick="set_default("'.$id.'","'.((int)$param['w_rowcol']*$l+$i).'","form_id_temp"); show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$l+$i].' '.$param['attributes'].' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$l+$i).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'">'.$param['w_choices'][(int)$param['w_rowcol']*$l+$i].'</label></div>';
|
609 |
-
else
|
610 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
}
|
612 |
|
613 |
$j++;
|
@@ -626,17 +766,55 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
626 |
for($l=0; $l<$param['w_rowcol']; $l++)
|
627 |
{
|
628 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
629 |
-
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="radio" value="'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp" other="1" onclick="set_default("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp"); show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'">'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
630 |
-
else
|
631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
632 |
}
|
633 |
else
|
634 |
for($l=0; $l<count($param['w_choices']); $l++)
|
635 |
{
|
636 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
637 |
-
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="radio" value="'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp" other="1" onclick="set_default("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp"); show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'">'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
638 |
-
else
|
639 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
}
|
641 |
|
642 |
$rep.='</div>';
|
@@ -650,9 +828,29 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
650 |
{
|
651 |
$l = count($param['w_choices']) - count($param['w_choices'])%$param['w_rowcol'] + $k;
|
652 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$l)
|
653 |
-
$rep.='<div valign="top" id="'.$id.'_td_little'.$l.'" idi="'.$l.'" style="display: table-cell;"><input type="radio" value="'.$param['w_choices'][$l].'" id="'.$id.'_elementform_id_temp'.$l.'" name="'.$id.'_elementform_id_temp" other="1" onclick="set_default("'.$id.'","'.$l.'","form_id_temp"); show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][$l].' '.$param['attributes'].' disabled/><label id="'.$id.'_label_element'.$l.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$l.'">'.$param['w_choices'][$l].'</label></div>';
|
654 |
-
else
|
655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
656 |
}
|
657 |
|
658 |
$rep.='</div>';
|
@@ -670,6 +868,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
670 |
{
|
671 |
$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');
|
672 |
$temp=$params;
|
|
|
|
|
673 |
foreach($params_names as $params_name )
|
674 |
{
|
675 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -690,7 +890,16 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
690 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
691 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
692 |
$param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
|
693 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
694 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
695 |
{
|
696 |
if($choices_checked=='true')
|
@@ -699,14 +908,23 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
699 |
$param['w_choices_checked'][$key]='';
|
700 |
}
|
701 |
|
702 |
-
$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"><select id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" onchange="set_select(this)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled>';
|
703 |
foreach($param['w_choices'] as $key => $choice)
|
704 |
{
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
710 |
}
|
711 |
$rep.='</select></div></div>';
|
712 |
break;
|
@@ -814,7 +1032,9 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
814 |
case 'type_date':
|
815 |
{
|
816 |
$params_names=array('w_field_label_size','w_field_label_pos','w_date','w_required','w_class','w_format','w_but_val');
|
817 |
-
$temp
|
|
|
|
|
818 |
foreach($params_names as $params_name )
|
819 |
{
|
820 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -832,10 +1052,10 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
832 |
|
833 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
834 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
835 |
-
|
836 |
-
|
837 |
|
838 |
-
$rep ='<div id="wdform_field'.$id.'" type="type_date" 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" 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="text" value="'.$param['w_date'].'" class="wdform-date" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" maxlength="10" size="10" onchange="change_value("'.$id.'_elementform_id_temp")" '.$param['attributes'].' disabled/><input id="'.$id.'_buttonform_id_temp" class="button" type="reset" value="'.$param['w_but_val'].'" format="'.$param['w_format'].'" src="templates/bluestork/images/system/calendar.png" alt="calendario" '.$param['attributes'].' onclick="return showCalendar("'.$id.'_elementform_id_temp" , "'.$param['w_format'].'"
|
839 |
|
840 |
break;
|
841 |
}
|
@@ -996,6 +1216,36 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
996 |
|
997 |
break;
|
998 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
999 |
case 'type_recaptcha':
|
1000 |
{
|
1001 |
$params_names=array('w_field_label_size','w_field_label_pos','w_public','w_private','w_theme','w_class');
|
@@ -1142,6 +1392,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1142 |
{
|
1143 |
$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');
|
1144 |
$temp=$params;
|
|
|
|
|
1145 |
foreach($params_names as $params_name )
|
1146 |
{
|
1147 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -1168,7 +1420,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1168 |
$param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
|
1169 |
$param['w_property'] = explode('***',$param['w_property']);
|
1170 |
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
1171 |
-
|
|
|
1172 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
1173 |
{
|
1174 |
if($choices_checked=='true')
|
@@ -1181,11 +1434,20 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1181 |
$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>';
|
1182 |
foreach($param['w_choices'] as $key => $choice)
|
1183 |
{
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1189 |
}
|
1190 |
$rep.='</select><div id="'.$id.'_divform_id_temp">';
|
1191 |
if($param['w_quantity']=="yes")
|
@@ -1217,6 +1479,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1217 |
|
1218 |
$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','w_quantity_value');
|
1219 |
$temp=$params;
|
|
|
|
|
1220 |
foreach($params_names as $params_name )
|
1221 |
{
|
1222 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -1231,7 +1495,9 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1231 |
foreach($attrs as $attr)
|
1232 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
1233 |
}
|
1234 |
-
|
|
|
|
|
1235 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1236 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
1237 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
@@ -1239,7 +1505,10 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1239 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
1240 |
$param['w_property'] = explode('***',$param['w_property']);
|
1241 |
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
1242 |
-
|
|
|
|
|
|
|
1243 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
1244 |
{
|
1245 |
if($choices_checked=='true')
|
@@ -1248,30 +1517,49 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1248 |
$param['w_choices_checked'][$key]='';
|
1249 |
}
|
1250 |
|
1251 |
-
$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="
|
1252 |
|
1253 |
if($param['w_flow']=='hor')
|
1254 |
{
|
1255 |
$rep.= '<div id="'.$id.'_hor" style="display: table-row;">';
|
1256 |
foreach($param['w_choices'] as $key => $choice)
|
1257 |
{
|
1258 |
-
|
1259 |
-
$
|
1260 |
-
|
1261 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1262 |
}
|
1263 |
$rep.= '</div>';
|
1264 |
}
|
1265 |
else
|
1266 |
{
|
1267 |
-
|
1268 |
foreach($param['w_choices'] as $key => $choice)
|
1269 |
{
|
1270 |
-
|
1271 |
-
$
|
1272 |
-
|
1273 |
-
$
|
1274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1275 |
}
|
1276 |
$rep.='</div></div>';
|
1277 |
|
@@ -1303,6 +1591,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1303 |
|
1304 |
$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','w_quantity_value');
|
1305 |
$temp=$params;
|
|
|
|
|
1306 |
foreach($params_names as $params_name )
|
1307 |
{
|
1308 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -1317,7 +1607,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1317 |
foreach($attrs as $attr)
|
1318 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
1319 |
}
|
1320 |
-
|
|
|
1321 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1322 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
1323 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
@@ -1328,7 +1619,10 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1328 |
|
1329 |
$param['w_property'] = explode('***',$param['w_property']);
|
1330 |
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
1331 |
-
|
|
|
|
|
|
|
1332 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
1333 |
{
|
1334 |
if($choices_checked=='true')
|
@@ -1337,30 +1631,50 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1337 |
$param['w_choices_checked'][$key]='';
|
1338 |
}
|
1339 |
|
1340 |
-
$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="
|
1341 |
|
1342 |
if($param['w_flow']=='hor')
|
1343 |
{
|
1344 |
$rep.= '<div id="'.$id.'_hor" style="display: table-row;">';
|
1345 |
foreach($param['w_choices'] as $key => $choice)
|
1346 |
{
|
1347 |
-
|
1348 |
-
$
|
1349 |
-
|
1350 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1351 |
}
|
1352 |
$rep.= '</div>';
|
1353 |
}
|
1354 |
else
|
1355 |
{
|
1356 |
-
|
1357 |
foreach($param['w_choices'] as $key => $choice)
|
1358 |
{
|
1359 |
-
|
1360 |
-
$
|
1361 |
-
|
1362 |
-
$
|
1363 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1364 |
}
|
1365 |
$rep.='</div></div>';
|
1366 |
|
@@ -1391,8 +1705,10 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1391 |
case 'type_paypal_shipping':
|
1392 |
{
|
1393 |
|
1394 |
-
$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');
|
1395 |
$temp=$params;
|
|
|
|
|
1396 |
foreach($params_names as $params_name )
|
1397 |
{
|
1398 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -1407,7 +1723,9 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1407 |
foreach($attrs as $attr)
|
1408 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
1409 |
}
|
1410 |
-
|
|
|
|
|
1411 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1412 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
1413 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
@@ -1416,7 +1734,9 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1416 |
|
1417 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
1418 |
|
1419 |
-
|
|
|
|
|
1420 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
1421 |
{
|
1422 |
if($choices_checked=='true')
|
@@ -1425,36 +1745,55 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1425 |
$param['w_choices_checked'][$key]='';
|
1426 |
}
|
1427 |
|
1428 |
-
$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="
|
1429 |
|
1430 |
if($param['w_flow']=='hor')
|
1431 |
{
|
1432 |
$rep.= '<div id="'.$id.'_hor" style="display: table-row;">';
|
1433 |
foreach($param['w_choices'] as $key => $choice)
|
1434 |
{
|
1435 |
-
|
1436 |
-
$
|
1437 |
-
|
1438 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1439 |
}
|
1440 |
$rep.= '</div>';
|
1441 |
}
|
1442 |
else
|
1443 |
{
|
1444 |
-
|
1445 |
foreach($param['w_choices'] as $key => $choice)
|
1446 |
{
|
1447 |
-
|
1448 |
-
$
|
1449 |
-
|
1450 |
-
$
|
1451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1452 |
}
|
1453 |
$rep.='</div></div>';
|
1454 |
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
}
|
1459 |
case 'type_paypal_total':
|
1460 |
{
|
@@ -1510,7 +1849,7 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1510 |
$images = '';
|
1511 |
for($i=0; $i<$param['w_star_amount']; $i++)
|
1512 |
{
|
1513 |
-
$images .= '<img id="'.$id.'_star_'.$i.'" src="' . WD_FMC_URL . '/images/star.png" onmouseover="change_src('.$i.','.$id.',"form_id_temp")" onmouseout="reset_src('.$i.','.$id.')" onclick="select_star_rating('.$i.','.$id.', "form_id_temp")">';
|
1514 |
}
|
1515 |
|
1516 |
$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>';
|
@@ -1648,7 +1987,7 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1648 |
break;
|
1649 |
}
|
1650 |
case 'type_matrix': {
|
1651 |
-
$params_names=array('w_field_label_size','w_field_label_pos', 'w_field_input_type', 'w_rows', 'w_columns', 'w_required','w_class');
|
1652 |
$temp = $params;
|
1653 |
foreach ($params_names as $params_name) {
|
1654 |
$temp = explode('*:*'.$params_name.'*:*',$temp);
|
@@ -1664,6 +2003,7 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1664 |
}
|
1665 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1666 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
|
|
1667 |
$w_rows = explode('***',$param['w_rows']);
|
1668 |
$w_columns = explode('***',$param['w_columns']);
|
1669 |
$column_labels = '';
|
@@ -1686,7 +2026,7 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1686 |
$rows_columns .= '<div id="'.$id.'_element_td'.$i.'_'.$k.'" style="text-align: center; display: table-cell; padding: 5px 0 0 5px;"><input id="'.$id.'_input_elementform_id_temp'.$i.'_'.$k.'" align="center" size="14" type="checkbox" name="'.$id.'_input_elementform_id_temp'.$i.'_'.$k.'" value="1" disabled/></div>';
|
1687 |
else
|
1688 |
if($param['w_field_input_type']=='text')
|
1689 |
-
$rows_columns .= '<div id="'.$id.'_element_td'.$i.'_'.$k.'" style="text-align: center; display: table-cell; padding: 5px 0 0 5px;"><input id="'.$id.'_input_elementform_id_temp'.$i.'_'.$k.'" align="center"
|
1690 |
else
|
1691 |
if($param['w_field_input_type']=='select')
|
1692 |
$rows_columns .= '<div id="'.$id.'_element_td'.$i.'_'.$k.'" style="text-align: center; display: table-cell; padding: 5px 0 0 5px;"><select id="'.$id.'_select_yes_noform_id_temp'.$i.'_'.$k.'" name="'.$id.'_select_yes_noform_id_temp'.$i.'_'.$k.'" disabled><option value=""> </option><option value="yes">Yes</option><option value="no">No</option></select></div>';
|
@@ -1698,7 +2038,7 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1698 |
|
1699 |
|
1700 |
|
1701 |
-
$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"><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>';
|
1702 |
|
1703 |
break;
|
1704 |
}
|
@@ -1756,11 +2096,12 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1756 |
else {
|
1757 |
$row = new stdClass();
|
1758 |
$row->id = 0;
|
|
|
1759 |
$row->title = '';
|
1760 |
$row->mail = '';
|
1761 |
$row->form = '';
|
1762 |
$row->form_front = '';
|
1763 |
-
$row->theme =
|
1764 |
$row->javascript = '';
|
1765 |
$row->submit_text = '';
|
1766 |
$row->url = '';
|
@@ -1801,6 +2142,7 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1801 |
$row->mail_from_user = '';
|
1802 |
$row->mail_from_name_user = '';
|
1803 |
$row->reply_to_user = '';
|
|
|
1804 |
|
1805 |
$row->condition = '';
|
1806 |
$row->mail_cc = '';
|
@@ -1848,8 +2190,8 @@ ngdom</option><option value="United States">United States</option><option value=
|
|
1848 |
|
1849 |
public function page_nav() {
|
1850 |
global $wpdb;
|
1851 |
-
|
1852 |
-
$where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? '
|
1853 |
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker " . $where;
|
1854 |
$total = $wpdb->get_var($query);
|
1855 |
$page_nav['total'] = $total;
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
public function get_rows_data() {
|
22 |
global $wpdb;
|
23 |
+
$where = 'WHERE `id` IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')';
|
24 |
+
$where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE 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;
|
90 |
$row->mail_from_user = '';
|
91 |
$row->mail_from_name_user = '';
|
92 |
$row->reply_to_user = '';
|
93 |
+
$row->save_uploads = 1;
|
94 |
}
|
95 |
return $row;
|
96 |
}
|
98 |
public function get_row_data_new($id) {
|
99 |
global $wpdb;
|
100 |
if ($id != 0) {
|
101 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_backup WHERE backup_id="%d"', $id));
|
102 |
$labels2 = array();
|
103 |
$label_id = array();
|
104 |
$label_order_original = array();
|
120 |
$labels = array();
|
121 |
$paramss = array();
|
122 |
$fields = explode('*:*new_field*:*', $row->form_fields);
|
123 |
+
$fields = array_slice($fields, 0, count($fields) - 1);
|
124 |
foreach ($fields as $field) {
|
125 |
$temp=explode('*:*id*:*',$field);
|
126 |
array_push($ids, $temp[0]);
|
144 |
{
|
145 |
case 'type_section_break':
|
146 |
{
|
147 |
+
$arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows" ><div id="X_'.$id.'" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/delete_el.png?ver='. get_option("wd_form_maker_version").'" title="Remove the field" onclick="remove_section_break("'.$id.'")" onmouseover="chnage_icons_src(this,"delete_el")" onmouseout="chnage_icons_src(this,"delete_el")"></div><div id="edit_'.$id.'" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/edit.png?ver='. get_option("wd_form_maker_version").'" title="Edit the field" onclick="edit("'.$id.'")" onmouseover="chnage_icons_src(this,"edit")" onmouseout="chnage_icons_src(this,"edit")"><span id="'.$id.'_element_labelform_id_temp" style="display: none;">custom_'.$id.'</span></div><div id="duplicate_'.$id.'" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/duplicate.png?ver='. get_option("wd_form_maker_version").'" title="Duplicate the field" onclick="duplicate("'.$id.'")" onmouseover="chnage_icons_src(this,"duplicate")" onmouseout="chnage_icons_src(this,"duplicate")"></div></div>';
|
148 |
break;
|
149 |
}
|
150 |
case 'type_editor':
|
151 |
{
|
152 |
+
$arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows" type="type_editor" style="margin-top:0px;"><div id="X_'.$id.'" valign="middle" align="right" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/delete_el.png?ver='. get_option("wd_form_maker_version").'" title="Remove the field" onclick="remove_row("'.$id.'")" onmouseover="chnage_icons_src(this,"delete_el")" onmouseout="chnage_icons_src(this,"delete_el")"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/left.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the left" onclick="left_row("'.$id.'")" onmouseover="chnage_icons_src(this,"left")" onmouseout="chnage_icons_src(this,"left")"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field up" onclick="up_row("'.$id.'")" onmouseover="chnage_icons_src(this,"up")" onmouseout="chnage_icons_src(this,"up")"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field down" onclick="down_row("'.$id.'")" onmouseover="chnage_icons_src(this,"down")" onmouseout="chnage_icons_src(this,"down")"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/right.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the right" onclick="right_row("'.$id.'")" onmouseover="chnage_icons_src(this,"right")" onmouseout="chnage_icons_src(this,"right")"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/edit.png?ver='. get_option("wd_form_maker_version").'" title="Edit the field" onclick="edit("'.$id.'")" onmouseover="chnage_icons_src(this,"edit")" onmouseout="chnage_icons_src(this,"edit")"></div><div id="duplicate_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/duplicate.png?ver='. get_option("wd_form_maker_version").'" title="Duplicate the field" onclick="duplicate("'.$id.'")" onmouseover="chnage_icons_src(this,"duplicate")" onmouseout="chnage_icons_src(this,"duplicate")"></div><div id="page_up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/page_up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the upper page" onclick="page_up("'.$id.'")" onmouseover="chnage_icons_src(this,"page_up")" onmouseout="chnage_icons_src(this,"page_up")"></div><div id="page_down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/page_down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the lower page" onclick="page_down("'.$id.'")" onmouseover="chnage_icons_src(this,"page_down")" onmouseout="chnage_icons_src(this,"page_down")"></div></div>';
|
153 |
break;
|
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_FMC_URL . '/images/delete_el.png?ver='. get_option("wd_form_maker_version").'" title="Remove the field" onclick="remove_row("'.$id.'")" onmouseover="chnage_icons_src(this,"delete_el")" onmouseout="chnage_icons_src(this,"delete_el")"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/left.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the left" onclick="left_row("'.$id.'")" onmouseover="chnage_icons_src(this,"left")" onmouseout="chnage_icons_src(this,"left")"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field up" onclick="up_row("'.$id.'")" onmouseover="chnage_icons_src(this,"up")" onmouseout="chnage_icons_src(this,"up")"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field down" onclick="down_row("'.$id.'")" onmouseover="chnage_icons_src(this,"down")" onmouseout="chnage_icons_src(this,"down")"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/right.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the right" onclick="right_row("'.$id.'")" onmouseover="chnage_icons_src(this,"right")" onmouseout="chnage_icons_src(this,"right")"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/edit.png?ver='. get_option("wd_form_maker_version").'" title="Edit the field" onclick="edit("'.$id.'")" onmouseover="chnage_icons_src(this,"edit")" onmouseout="chnage_icons_src(this,"edit")"></div><div id="duplicate_'.$id.'" valign="middle" class="element_toolbar"></div><div id="page_up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/page_up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the upper page" onclick="page_up("'.$id.'")" onmouseover="chnage_icons_src(this,"page_up")" onmouseout="chnage_icons_src(this,"page_up")"></div><div id="page_down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/page_down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the lower page" onclick="page_down("'.$id.'")" onmouseover="chnage_icons_src(this,"page_down")" onmouseout="chnage_icons_src(this,"page_down")"></div></div>';
|
162 |
break;
|
163 |
}
|
164 |
|
165 |
default :
|
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_FMC_URL . '/images/delete_el.png?ver='. get_option("wd_form_maker_version").'" title="Remove the field" onclick="remove_row("'.$id.'")" onmouseover="chnage_icons_src(this,"delete_el")" onmouseout="chnage_icons_src(this,"delete_el")"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/left.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the left" onclick="left_row("'.$id.'")" onmouseover="chnage_icons_src(this,"left")" onmouseout="chnage_icons_src(this,"left")"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field up" onclick="up_row("'.$id.'")" onmouseover="chnage_icons_src(this,"up")" onmouseout="chnage_icons_src(this,"up")"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field down" onclick="down_row("'.$id.'")" onmouseover="chnage_icons_src(this,"down")" onmouseout="chnage_icons_src(this,"down")"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/right.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the right" onclick="right_row("'.$id.'")" onmouseover="chnage_icons_src(this,"right")" onmouseout="chnage_icons_src(this,"right")"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/edit.png?ver='. get_option("wd_form_maker_version").'" title="Edit the field" onclick="edit("'.$id.'")" onmouseover="chnage_icons_src(this,"edit")" onmouseout="chnage_icons_src(this,"edit")"></div><div id="duplicate_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/duplicate.png?ver='. get_option("wd_form_maker_version").'" title="Duplicate the field" onclick="duplicate("'.$id.'")" onmouseover="chnage_icons_src(this,"duplicate")" onmouseout="chnage_icons_src(this,"duplicate")"></div><div id="page_up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/page_up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the upper page" onclick="page_up("'.$id.'")" onmouseover="chnage_icons_src(this,"page_up")" onmouseout="chnage_icons_src(this,"page_up")"></div><div id="page_down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FMC_URL . '/images/page_down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the lower page" onclick="page_down("'.$id.'")" onmouseover="chnage_icons_src(this,"page_down")" onmouseout="chnage_icons_src(this,"page_down")"></div></div>';
|
168 |
break;
|
169 |
}
|
170 |
|
178 |
$param[$params_name] = $temp[0];
|
179 |
$temp = $temp[1];
|
180 |
}
|
181 |
+
$rep ='<div id="wdform_field'.$id.'" type="type_section_break" class="wdform_field_section_break">'.$arrows.'<span id="'.$id.'_element_labelform_id_temp" style="display: none;">custom_'.$id.'</span><div id="'.$id.'_element_sectionform_id_temp" align="left" class="wdform_section_break">'.$param['w_editor'].'</div></div><div id="'.$id.'_element_labelform_id_temp" style="color:red;">custom_'.$id.'</div>';
|
182 |
break;
|
183 |
}
|
184 |
case 'type_editor': {
|
189 |
$param[$params_name] = $temp[0];
|
190 |
$temp = $temp[1];
|
191 |
}
|
192 |
+
$rep =$arrows.'<div id="wdform_field'.$id.'" type="type_editor" class="wdform_field" >'.$param['w_editor'].'</div><div id="'.$id.'_element_labelform_id_temp" style="color: red;">custom_'.$id.'</div>';
|
193 |
break;
|
194 |
}
|
195 |
case 'type_send_copy': {
|
214 |
break;
|
215 |
}
|
216 |
case 'type_text': {
|
217 |
+
$params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_first_val', 'w_title', 'w_required', 'w_unique');
|
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];
|
224 |
+
$temp = $temp[1];
|
225 |
+
}
|
226 |
+
if ($temp) {
|
227 |
+
$temp = explode('*:*w_attr_name*:*', $temp);
|
228 |
+
$attrs = array_slice($temp, 0, count($temp) - 1);
|
229 |
+
foreach ($attrs as $attr) {
|
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");
|
236 |
+
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
237 |
+
|
238 |
+
$param['w_regExp_status'] = (isset($param['w_regExp_status']) ? $param['w_regExp_status'] : "no");
|
239 |
+
$param['w_regExp_value'] = (isset($param['w_regExp_value']) ? $param['w_regExp_value'] : "");
|
240 |
+
$param['w_regExp_common'] = (isset($param['w_regExp_common']) ? $param['w_regExp_common'] : "");
|
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("'.$id.'_elementform_id_temp")" onblur="return_value("'.$id.'_elementform_id_temp")" onchange="change_value("'.$id.'_elementform_id_temp")" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div></div>';
|
245 |
+
|
246 |
+
break;
|
247 |
}
|
248 |
+
case 'type_number': {
|
249 |
$params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_first_val', 'w_title', 'w_required', 'w_unique', 'w_class');
|
250 |
$temp = $params;
|
251 |
foreach ($params_names as $params_name) {
|
334 |
case 'type_name': {
|
335 |
$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');
|
336 |
$temp = $params;
|
337 |
+
if(strpos($temp, 'w_name_fields') > -1)
|
338 |
+
$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');
|
339 |
foreach ($params_names as $params_name) {
|
340 |
$temp = explode('*:*' . $params_name . '*:*', $temp);
|
341 |
$param[$params_name] = $temp[0];
|
353 |
$w_first_val = explode('***', $param['w_first_val']);
|
354 |
$w_title = explode('***', $param['w_title']);
|
355 |
$w_mini_labels = explode('***', $param['w_mini_labels']);
|
356 |
+
|
357 |
+
$param['w_name_fields'] = isset($param['w_name_fields']) ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
|
358 |
+
$w_name_fields = explode('***', $param['w_name_fields']);
|
359 |
+
|
360 |
+
$w_name_format = '<div id="'.$id.'_td_name_input_first" style="display: table-cell;"><input type="text" class="'.($w_first_val[0]==$w_title[0] ? "input_deactive" : "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("'.$id.'_element_firstform_id_temp")"onblur="return_value("'.$id.'_element_firstform_id_temp")" onchange="change_value("'.$id.'_element_firstform_id_temp")" style="margin-right: 10px; width: '.$param['w_size'].'px;"'.$param['attributes'].' disabled /></div><div id="'.$id.'_td_name_input_last" style="display: table-cell;"><input type="text" class="'.($w_first_val[1]==$w_title[1] ? "input_deactive" : "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("'.$id.'_element_lastform_id_temp")"onblur="return_value("'.$id.'_element_lastform_id_temp")" onchange="change_value("'.$id.'_element_lastform_id_temp")" style="margin-right: 10px; width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>';
|
361 |
+
$w_name_format_mini_labels = '<div id="'.$id.'_td_name_label_first" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_first">'.$w_mini_labels[1].'</label></div><div id="'.$id.'_td_name_label_last" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_last">'.$w_mini_labels[2].'</label></div>';
|
362 |
+
|
363 |
+
if($w_name_fields[0] == 'yes') {
|
364 |
+
$w_name_format = '<div id="'.$id.'_td_name_input_title" style="display: table-cell;"><input type="text" class="'.($w_first_val[2]==$w_title[2] ? "input_deactive" : "input_active").'" id="'.$id.'_element_titleform_id_temp" name="'.$id.'_element_titleform_id_temp" value="'.$w_first_val[2].'" title="'.$w_title[2].'" onfocus="delete_value("'.$id.'_element_titleform_id_temp")" onblur="return_value("'.$id.'_element_titleform_id_temp")" onchange="change_value("'.$id.'_element_titleform_id_temp")" style="margin: 0px 10px 0px 0px; width: 40px;" disabled /></div>'.$w_name_format;
|
365 |
+
$w_name_format_mini_labels ='<div id="'.$id.'_td_name_label_title" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_title">'.$w_mini_labels[0].'</label></div>'.$w_name_format_mini_labels;
|
366 |
+
}
|
367 |
+
|
368 |
+
if($w_name_fields[1] == 'yes') {
|
369 |
+
$w_name_format = $w_name_format.'<div id="'.$id.'_td_name_input_middle" style="display: table-cell;"><input type="text" class="'.($w_first_val[3]==$w_title[3] ? "input_deactive" : "input_active").'" id="'.$id.'_element_middleform_id_temp" name="'.$id.'_element_middleform_id_temp" value="'.$w_first_val[3].'" title="'.$w_title[3].'" onfocus="delete_value("'.$id.'_element_middleform_id_temp")" onblur="return_value("'.$id.'_element_middleform_id_temp")" onchange="change_value("'.$id.'_element_middleform_id_temp")" style="width: '.$param['w_size'].'px;" disabled /></div>';
|
370 |
+
$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>';
|
371 |
+
}
|
372 |
+
|
373 |
+
$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" 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>';
|
374 |
break;
|
375 |
}
|
376 |
case 'type_address': {
|
427 |
if($w_disabled_fields[5]=='yes' && $w_disabled_fields[6]=='yes')
|
428 |
$address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><select type="text" id="'.$id.'_stateform_id_temp" name="'.($id+3).'_stateform_id_temp" onchange="change_value("'.$id.'_stateform_id_temp")" style="width: 100%;" '.$param['attributes'].' disabled ><option value=""></option><option value="Alabama">Alabama</option><option value="Alaska">Alaska</option><option value="Arizona">Arizona</option><option value="Arkansas">Arkansas</option><option value="California">California</option><option value="Colorado">Colorado</option><option value="Connecticut">Connecticut</option><option value="Delaware">Delaware</option><option value="Florida">Florida</option><option value="Georgia">Georgia</option><option value="Hawaii">Hawaii</option><option value="Idaho">Idaho</option><option value="Illinois">Illinois</option><option value="Indiana">Indiana</option><option value="Iowa">Iowa</option><option value="Kansas">Kansas</option><option value="Kentucky">Kentucky</option><option value="Louisiana">Louisiana</option><option value="Maine">Maine</option><option value="Maryland">Maryland</option><option value="Massachusetts">Massachusetts</option><option value="Michigan">Michigan</option><option value="Minnesota">Minnesota</option><option value="Mississippi">Mississippi</option><option value="Missouri">Missouri</option><option value="Montana">Montana</option><option value="Nebraska">Nebraska</option><option value="Nevada">Nevada</option><option value="New Hampshire">New Hampshire</option><option value="New Jersey">New Jersey</option><option value="New Mexico">New Mexico</option><option value="New York">New York</option><option value="North Carolina">North Carolina</option><option value="North Dakota">North Dakota</option><option value="Ohio">Ohio</option><option value="Oklahoma">Oklahoma</option><option value="Oregon">Oregon</option><option value="Pennsylvania">Pennsylvania</option><option value="Rhode Island">Rhode Island</option><option value="South Carolina">South Carolina</option><option value="South Dakota">South Dakota</option><option value="Tennessee">Tennessee</option><option value="Texas">Texas</option><option value="Utah">Utah</option><option value="Vermont">Vermont</option><option value="Virginia">Virginia</option><option value="Washington">Washington</option><option value="West Virginia">West Virginia</option><option value="Wisconsin">Wisconsin</option><option value="Wyoming">Wyoming</option></select><label class="mini_label" style="display: block;" id="'.$id.'_mini_label_state">'.$w_mini_labels[3].'</label></span>';
|
429 |
else
|
430 |
+
$address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><input type="text" id="'.$id.'_stateform_id_temp" name="'.($id+3).'_stateform_id_temp" onchange="change_value("'.$id.'_stateform_id_temp")" style="width: 100%;" '.$param['attributes'].' disabled><label class="mini_label" style="display: block;" id="'.$id.'_mini_label_state">'.$w_mini_labels[3].'</label></span>';
|
431 |
}
|
432 |
|
433 |
if($w_disabled_fields[4]=='no')
|
434 |
{
|
435 |
$g++;
|
436 |
+
$address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><input type="text" id="'.$id.'_postalform_id_temp" name="'.($id+4).'_postalform_id_temp" onchange="change_value("'.$id.'_postalform_id_temp")" style="width: 100%;" '.$param['attributes'].' disabled><label class="mini_label" style="display: block;" id="'.$id.'_mini_label_postal">'.$w_mini_labels[4].'</label></span>';
|
437 |
}
|
438 |
|
439 |
if($w_disabled_fields[5]=='no')
|
440 |
{
|
441 |
$g++;
|
442 |
+
$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("'.$id.'_countryform_id_temp")" 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>';
|
|
|
|
|
443 |
}
|
444 |
|
445 |
+
$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>';
|
446 |
break;
|
447 |
}
|
448 |
case 'type_submitter_mail': {
|
474 |
{
|
475 |
$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');
|
476 |
$temp=$params;
|
477 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
478 |
+
$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');
|
479 |
foreach($params_names as $params_name )
|
480 |
{
|
481 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
490 |
foreach($attrs as $attr)
|
491 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
492 |
}
|
493 |
+
if(!isset($param['w_value_disabled']))
|
494 |
+
$param['w_value_disabled'] = 'no';
|
495 |
+
|
496 |
+
if(!isset($param['w_field_option_pos']))
|
497 |
+
$param['w_field_option_pos'] = 'left';
|
498 |
+
|
499 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
500 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
501 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
502 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
503 |
+
|
504 |
+
if(isset($param['w_choices_value']))
|
505 |
+
{
|
506 |
+
$param['w_choices_value'] = explode('***',$param['w_choices_value']);
|
507 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
508 |
+
}
|
509 |
+
|
510 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
511 |
{
|
512 |
if($choices_checked=='true')
|
515 |
$param['w_choices_checked'][$key]='';
|
516 |
}
|
517 |
|
518 |
+
$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"' : '').'>';
|
519 |
+
|
520 |
if($param['w_flow']=='hor')
|
521 |
{
|
522 |
$j = 0;
|
530 |
continue;
|
531 |
|
532 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
533 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$l+$i).'" idi="'.((int)$param['w_rowcol']*$l+$i).'" style="display: table-cell;"><input type="checkbox" value="" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'" name="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'" other="1" onclick="if(set_checked("'.$id.'","'.((int)$param['w_rowcol']*$l+$i).'","form_id_temp")) show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$l+$i].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled /><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$l+$i).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'">'.$param['w_choices'][(int)$param['w_rowcol']*$l+$i].'</label></div>';
|
534 |
+
else
|
535 |
+
{
|
536 |
+
$where = '';
|
537 |
+
$order_by = '';
|
538 |
+
$db_info = '';
|
539 |
+
if(isset($param['w_choices_value']))
|
540 |
+
$choise_value = $param['w_choices_value'][(int)$param['w_rowcol']*$l+$i];
|
541 |
+
else
|
542 |
+
$choise_value = $param['w_choices'][(int)$param['w_rowcol']*$l+$i];
|
543 |
+
|
544 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][(int)$param['w_rowcol']*$l+$i])
|
545 |
+
{
|
546 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][(int)$param['w_rowcol']*$l+$i]);
|
547 |
+
$where = "where='".$w_choices_params[0]."'";
|
548 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
549 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
550 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
551 |
+
}
|
552 |
+
|
553 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$l+$i).'" idi="'.((int)$param['w_rowcol']*$l+$i).'" style="display: table-cell;"><input type="checkbox" value="'.$choise_value.'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'" name="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'" onclick="set_checked("'.$id.'","'.((int)$param['w_rowcol']*$l+$i).'","form_id_temp")" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$l+$i].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$l+$i).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'" '.$where.' '.$order_by.' '.$db_info.'>'.$param['w_choices'][(int)$param['w_rowcol']*$l+$i].'</label></div>';
|
554 |
+
}
|
555 |
}
|
556 |
|
557 |
$j++;
|
570 |
for($l=0; $l<$param['w_rowcol']; $l++)
|
571 |
{
|
572 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
573 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="checkbox" value="" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" other="1" onclick="if(set_checked("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp")) show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled /><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'">'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
574 |
+
else
|
575 |
+
{
|
576 |
+
$where = '' ;
|
577 |
+
$order_by = '' ;
|
578 |
+
$db_info = '' ;
|
579 |
+
if(isset($param['w_choices_value']))
|
580 |
+
$choise_value = $param['w_choices_value'][(int)$param['w_rowcol']*$i+$l];
|
581 |
+
else
|
582 |
+
$choise_value = $param['w_choices'][(int)$param['w_rowcol']*$i+$l];
|
583 |
+
|
584 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][(int)$param['w_rowcol']*$i+$l])
|
585 |
+
{
|
586 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][(int)$param['w_rowcol']*$i+$l]);
|
587 |
+
$where = "where='".$w_choices_params[0]."'";
|
588 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
589 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
590 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
591 |
+
}
|
592 |
+
|
593 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="checkbox" value="'.$choise_value.'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" onclick="set_checked("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp")" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'"
|
594 |
+
'.$where.' '.$order_by.' '.$db_info.'>'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
595 |
+
}
|
596 |
}
|
597 |
else
|
598 |
for($l=0; $l<count($param['w_choices']); $l++)
|
599 |
{
|
600 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
601 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="checkbox" value="" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" other="1" onclick="if(set_checked("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp")) show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'">'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
602 |
+
else
|
603 |
+
{
|
604 |
+
$where = '' ;
|
605 |
+
$order_by = '' ;
|
606 |
+
$db_info = '' ;
|
607 |
+
if(isset($param['w_choices_value']))
|
608 |
+
$choise_value = $param['w_choices_value'][(int)$param['w_rowcol']*$i+$l];
|
609 |
+
else
|
610 |
+
$choise_value = $param['w_choices'][(int)$param['w_rowcol']*$i+$l];
|
611 |
+
|
612 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][(int)$param['w_rowcol']*$i+$l])
|
613 |
+
{
|
614 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][(int)$param['w_rowcol']*$i+$l]);
|
615 |
+
$where = "where='".$w_choices_params[0]."'";
|
616 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
617 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
618 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
619 |
+
}
|
620 |
+
|
621 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="checkbox" value="'.$choise_value.'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" onclick="set_checked("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp")" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" '.$where.' '.$order_by.' '.$db_info.'>'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
622 |
+
}
|
623 |
}
|
624 |
|
625 |
$rep.='</div>';
|
633 |
{
|
634 |
$l = count($param['w_choices']) - count($param['w_choices'])%$param['w_rowcol'] + $k;
|
635 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$l)
|
636 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.$l.'" idi="'.$l.'" style="display: table-cell;"><input type="checkbox" value="" id="'.$id.'_elementform_id_temp'.$l.'" name="'.$id.'_elementform_id_temp'.$l.'" other="1" onclick="if(set_checked("'.$id.'","'.$l.'","form_id_temp")) show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$l.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$l.'">'.$param['w_choices'][$l].'</label></div>';
|
637 |
+
else
|
638 |
+
{
|
639 |
+
$where = '' ;
|
640 |
+
$order_by = '' ;
|
641 |
+
$db_info = '' ;
|
642 |
+
if(isset($param['w_choices_value']))
|
643 |
+
$choise_value = $param['w_choices_value'][$l];
|
644 |
+
else
|
645 |
+
$choise_value = $param['w_choices'][$l];
|
646 |
+
|
647 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$l])
|
648 |
+
{
|
649 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$l]);
|
650 |
+
$where = "where='".$w_choices_params[0]."'";
|
651 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
652 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
653 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
654 |
+
}
|
655 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.$l.'" idi="'.$l.'" style="display: table-cell;"><input type="checkbox" value="'.$choise_value.'" id="'.$id.'_elementform_id_temp'.$l.'" name="'.$id.'_elementform_id_temp'.$l.'" onclick="set_checked("'.$id.'","'.$l.'","form_id_temp")" '.$param['w_choices_checked'][$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$l.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$l.'" '.$where.' '.$order_by.' '.$db_info.'>'.$param['w_choices'][$l].'</label></div>';
|
656 |
+
}
|
657 |
}
|
658 |
|
659 |
$rep.='</div>';
|
670 |
|
671 |
$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');
|
672 |
$temp=$params;
|
673 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
674 |
+
$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');
|
675 |
foreach($params_names as $params_name )
|
676 |
{
|
677 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
686 |
foreach($attrs as $attr)
|
687 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
688 |
}
|
689 |
+
if(!isset($param['w_value_disabled']))
|
690 |
+
$param['w_value_disabled'] = 'no';
|
691 |
+
|
692 |
+
if(!isset($param['w_field_option_pos']))
|
693 |
+
$param['w_field_option_pos'] = 'left';
|
694 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
695 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
696 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
697 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
698 |
+
|
699 |
+
if(isset($param['w_choices_value']))
|
700 |
+
{
|
701 |
+
$param['w_choices_value'] = explode('***',$param['w_choices_value']);
|
702 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
703 |
+
}
|
704 |
|
705 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
706 |
{
|
710 |
$param['w_choices_checked'][$key]='';
|
711 |
}
|
712 |
|
713 |
+
$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"' : '').'>';
|
714 |
|
715 |
|
716 |
if($param['w_flow']=='hor')
|
725 |
if($j >= count($param['w_choices'])%$param['w_rowcol'] && $l==(int)(count($param['w_choices'])/$param['w_rowcol']))
|
726 |
continue;
|
727 |
|
728 |
+
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$l+$i)
|
729 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$l+$i).'" idi="'.((int)$param['w_rowcol']*$l+$i).'" style="display: table-cell;"><input type="radio" value="'.$param['w_choices'][(int)$param['w_rowcol']*$l+$i].'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'" name="'.$id.'_elementform_id_temp" other="1" onclick="set_default("'.$id.'","'.((int)$param['w_rowcol']*$l+$i).'","form_id_temp"); show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$l+$i].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$l+$i).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'">'.$param['w_choices'][(int)$param['w_rowcol']*$l+$i].'</label></div>';
|
730 |
+
else
|
731 |
+
{
|
732 |
+
$where = '' ;
|
733 |
+
$order_by = '' ;
|
734 |
+
$db_info = '' ;
|
735 |
+
if(isset($param['w_choices_value']))
|
736 |
+
$choise_value = $param['w_choices_value'][(int)$param['w_rowcol']*$l+$i];
|
737 |
+
else
|
738 |
+
$choise_value = $param['w_choices'][(int)$param['w_rowcol']*$l+$i];
|
739 |
+
|
740 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][(int)$param['w_rowcol']*$l+$i])
|
741 |
+
{
|
742 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][(int)$param['w_rowcol']*$l+$i]);
|
743 |
+
$where = "where='".$w_choices_params[0]."'";
|
744 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
745 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
746 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
747 |
+
}
|
748 |
+
|
749 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$l+$i).'" idi="'.((int)$param['w_rowcol']*$l+$i).'" style="display: table-cell;"><input type="radio" value="'.$choise_value.'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'" name="'.$id.'_elementform_id_temp" onclick="set_default("'.$id.'","'.((int)$param['w_rowcol']*$l+$i).'","form_id_temp")" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$l+$i].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$l+$i).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$l+$i).'" '.$where.' '.$order_by.' '.$db_info.'>'.$param['w_choices'][(int)$param['w_rowcol']*$l+$i].'</label></div>';
|
750 |
+
}
|
751 |
}
|
752 |
|
753 |
$j++;
|
766 |
for($l=0; $l<$param['w_rowcol']; $l++)
|
767 |
{
|
768 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
769 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="radio" value="'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp" other="1" onclick="set_default("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp"); show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'">'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
770 |
+
else
|
771 |
+
{
|
772 |
+
$where = '' ;
|
773 |
+
$order_by = '' ;
|
774 |
+
$db_info = '' ;
|
775 |
+
if(isset($param['w_choices_value']))
|
776 |
+
$choise_value = $param['w_choices_value'][(int)$param['w_rowcol']*$i+$l];
|
777 |
+
else
|
778 |
+
$choise_value = $param['w_choices'][(int)$param['w_rowcol']*$i+$l];
|
779 |
+
|
780 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][(int)$param['w_rowcol']*$i+$l])
|
781 |
+
{
|
782 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][(int)$param['w_rowcol']*$i+$l]);
|
783 |
+
$where = "where='".$w_choices_params[0]."'";
|
784 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
785 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
786 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
787 |
+
}
|
788 |
+
|
789 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="radio" value="'.$choise_value.'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp" onclick="set_default("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp")" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" '.$where.' '.$order_by.' '.$db_info.'>'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
790 |
+
}
|
791 |
}
|
792 |
else
|
793 |
for($l=0; $l<count($param['w_choices']); $l++)
|
794 |
{
|
795 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==(int)$param['w_rowcol']*$i+$l)
|
796 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="radio" value="'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp" other="1" onclick="set_default("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp"); show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'">'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
797 |
+
else
|
798 |
+
{
|
799 |
+
$where = '' ;
|
800 |
+
$order_by = '' ;
|
801 |
+
$db_info = '' ;
|
802 |
+
if(isset($param['w_choices_value']))
|
803 |
+
$choise_value = $param['w_choices_value'][(int)$param['w_rowcol']*$i+$l];
|
804 |
+
else
|
805 |
+
$choise_value = $param['w_choices'][(int)$param['w_rowcol']*$i+$l];
|
806 |
+
|
807 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][(int)$param['w_rowcol']*$i+$l])
|
808 |
+
{
|
809 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][(int)$param['w_rowcol']*$i+$l]);
|
810 |
+
$where = "where='".$w_choices_params[0]."'";
|
811 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
812 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
813 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
814 |
+
}
|
815 |
+
|
816 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.((int)$param['w_rowcol']*$i+$l).'" idi="'.((int)$param['w_rowcol']*$i+$l).'" style="display: table-cell;"><input type="radio" value="'.$choise_value.'" id="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" name="'.$id.'_elementform_id_temp" onclick="set_default("'.$id.'","'.((int)$param['w_rowcol']*$i+$l).'","form_id_temp")" '.$param['w_choices_checked'][(int)$param['w_rowcol']*$i+$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.((int)$param['w_rowcol']*$i+$l).'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.((int)$param['w_rowcol']*$i+$l).'" '.$where.' '.$order_by.' '.$db_info.'>'.$param['w_choices'][(int)$param['w_rowcol']*$i+$l].'</label></div>';
|
817 |
+
}
|
818 |
}
|
819 |
|
820 |
$rep.='</div>';
|
828 |
{
|
829 |
$l = count($param['w_choices']) - count($param['w_choices'])%$param['w_rowcol'] + $k;
|
830 |
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$l)
|
831 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.$l.'" idi="'.$l.'" style="display: table-cell;"><input type="radio" value="'.$param['w_choices'][$l].'" id="'.$id.'_elementform_id_temp'.$l.'" name="'.$id.'_elementform_id_temp" other="1" onclick="set_default("'.$id.'","'.$l.'","form_id_temp"); show_other_input("'.$id.'","form_id_temp");" '.$param['w_choices_checked'][$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$l.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$l.'">'.$param['w_choices'][$l].'</label></div>';
|
832 |
+
else
|
833 |
+
{
|
834 |
+
$where = '' ;
|
835 |
+
$order_by = '' ;
|
836 |
+
$db_info = '' ;
|
837 |
+
if(isset($param['w_choices_value']))
|
838 |
+
$choise_value = $param['w_choices_value'][$l];
|
839 |
+
else
|
840 |
+
$choise_value = $param['w_choices'][$l];
|
841 |
+
|
842 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$l])
|
843 |
+
{
|
844 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$l]);
|
845 |
+
$where = "where='".$w_choices_params[0]."'";
|
846 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
847 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
848 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
849 |
+
}
|
850 |
+
|
851 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.$l.'" idi="'.$l.'" style="display: table-cell;"><input type="radio" value="'.$choise_value.'" id="'.$id.'_elementform_id_temp'.$l.'" name="'.$id.'_elementform_id_temp" onclick="set_default("'.$id.'","'.$l.'","form_id_temp")" '.$param['w_choices_checked'][$l].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$l.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$l.'"
|
852 |
+
'.$where.' '.$order_by.' '.$db_info.'>'.$param['w_choices'][$l].'</label></div>';
|
853 |
+
}
|
854 |
}
|
855 |
|
856 |
$rep.='</div>';
|
868 |
{
|
869 |
$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');
|
870 |
$temp=$params;
|
871 |
+
if(strpos($temp, 'w_choices_value') > -1)
|
872 |
+
$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');
|
873 |
foreach($params_names as $params_name )
|
874 |
{
|
875 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
890 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
891 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
892 |
$param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
|
893 |
+
|
894 |
+
if(isset($param['w_choices_value']))
|
895 |
+
{
|
896 |
+
$param['w_choices_value'] = explode('***',$param['w_choices_value']);
|
897 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
898 |
+
}
|
899 |
+
|
900 |
+
if(!isset($param['w_value_disabled']))
|
901 |
+
$param['w_value_disabled'] = 'no';
|
902 |
+
|
903 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
904 |
{
|
905 |
if($choices_checked=='true')
|
908 |
$param['w_choices_checked'][$key]='';
|
909 |
}
|
910 |
|
911 |
+
$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>';
|
912 |
foreach($param['w_choices'] as $key => $choice)
|
913 |
{
|
914 |
+
$where = '';
|
915 |
+
$order_by = '';
|
916 |
+
$db_info = '';
|
917 |
+
$choice_value = $param['w_choices_disabled'][$key]=='true' ? '' : (isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice);
|
918 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
919 |
+
{
|
920 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
921 |
+
$where = "where='".$w_choices_params[0]."'";
|
922 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
923 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
924 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
925 |
+
}
|
926 |
+
|
927 |
+
$rep.='<option id="'.$id.'_option'.$key.'" value="'.$choice_value.'" onselect="set_select("'.$id.'_option'.$key.'")" '.$param['w_choices_checked'][$key].' '.$where.' '.$order_by.' '.$db_info.'>'.$choice.'</option>';
|
928 |
}
|
929 |
$rep.='</select></div></div>';
|
930 |
break;
|
1032 |
case 'type_date':
|
1033 |
{
|
1034 |
$params_names=array('w_field_label_size','w_field_label_pos','w_date','w_required','w_class','w_format','w_but_val');
|
1035 |
+
$temp = $params;
|
1036 |
+
if(strpos($temp, 'w_disable_past_days') > -1)
|
1037 |
+
$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');
|
1038 |
foreach($params_names as $params_name )
|
1039 |
{
|
1040 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1052 |
|
1053 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1054 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
1055 |
+
$param['w_disable_past_days'] = isset($param['w_disable_past_days']) ? $param['w_disable_past_days'] : 'no';
|
1056 |
+
$disable_past_days = $param['w_disable_past_days'] == 'yes' ? 'true' : 'false';
|
1057 |
|
1058 |
+
$rep ='<div id="wdform_field'.$id.'" type="type_date" 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" 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_disable_past_days'].'" name="'.$id.'_dis_past_daysform_id_temp" id="'.$id.'_dis_past_daysform_id_temp"><input type="text" value="'.$param['w_date'].'" class="wdform-date" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" maxlength="10" size="10" onchange="change_value("'.$id.'_elementform_id_temp")" '.$param['attributes'].' disabled/><input id="'.$id.'_buttonform_id_temp" class="button" type="reset" value="'.$param['w_but_val'].'" format="'.$param['w_format'].'" src="templates/bluestork/images/system/calendar.png?ver='. get_option("wd_form_maker_version").'" alt="calendario" '.$param['attributes'].' onclick="return showCalendar("'.$id.'_elementform_id_temp" , "'.$param['w_format'].'", '.$disable_past_days.')"></div></div>';
|
1059 |
|
1060 |
break;
|
1061 |
}
|
1216 |
|
1217 |
break;
|
1218 |
}
|
1219 |
+
case 'type_arithmetic_captcha':
|
1220 |
+
{
|
1221 |
+
$params_names=array('w_field_label_size','w_field_label_pos', 'w_count', 'w_operations','w_class', 'w_input_size');
|
1222 |
+
$temp=$params;
|
1223 |
+
foreach($params_names as $params_name )
|
1224 |
+
{
|
1225 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1226 |
+
$param[$params_name] = $temp[0];
|
1227 |
+
$temp=$temp[1];
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
if($temp)
|
1231 |
+
{
|
1232 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
1233 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
1234 |
+
foreach($attrs as $attr)
|
1235 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
1236 |
+
}
|
1237 |
+
|
1238 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1239 |
+
$param['w_count'] = $param['w_count'] ? $param['w_count'] : 1;
|
1240 |
+
$param['w_operations'] = $param['w_operations'] ? $param['w_operations'] : '+, -, *, /';
|
1241 |
+
$param['w_input_size'] = $param['w_input_size'] ? $param['w_input_size'] : 60;
|
1242 |
+
|
1243 |
+
$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' => 'formcontactwdmathcaptcha', 'operations_count' => $param['w_count'], 'operations' => $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("_wd_arithmetic_captcha","form_id_temp")" '.$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("_wd_arithmetic_captcha","form_id_temp")" '.$param['attributes'].'></div></div></div></div></div></div>';
|
1244 |
+
|
1245 |
+
break;
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
|
1249 |
case 'type_recaptcha':
|
1250 |
{
|
1251 |
$params_names=array('w_field_label_size','w_field_label_pos','w_public','w_private','w_theme','w_class');
|
1392 |
{
|
1393 |
$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');
|
1394 |
$temp=$params;
|
1395 |
+
if(strpos($temp, 'w_choices_params') > -1)
|
1396 |
+
$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');
|
1397 |
foreach($params_names as $params_name )
|
1398 |
{
|
1399 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1420 |
$param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
|
1421 |
$param['w_property'] = explode('***',$param['w_property']);
|
1422 |
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
1423 |
+
if(isset($param['w_choices_params']))
|
1424 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
1425 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
1426 |
{
|
1427 |
if($choices_checked=='true')
|
1434 |
$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>';
|
1435 |
foreach($param['w_choices'] as $key => $choice)
|
1436 |
{
|
1437 |
+
$where = '';
|
1438 |
+
$order_by = '';
|
1439 |
+
$db_info = '';
|
1440 |
+
$choice_value = $param['w_choices_disabled'][$key]=="true" ? '' : $param['w_choices_price'][$key];
|
1441 |
+
|
1442 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
1443 |
+
{
|
1444 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
1445 |
+
$where = "where='".$w_choices_params[0]."'";
|
1446 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
1447 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
1448 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
1449 |
+
}
|
1450 |
+
$rep.='<option id="'.$id.'_option'.$key.'" value="'.$choice_value.'" onselect="set_select("'.$id.'_option'.$key.'")" '.$param['w_choices_checked'][$key].' '.$where.' '.$order_by.' '.$db_info.'>'.$choice.'</option>';
|
1451 |
}
|
1452 |
$rep.='</select><div id="'.$id.'_divform_id_temp">';
|
1453 |
if($param['w_quantity']=="yes")
|
1479 |
|
1480 |
$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','w_quantity_value');
|
1481 |
$temp=$params;
|
1482 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
1483 |
+
$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');
|
1484 |
foreach($params_names as $params_name )
|
1485 |
{
|
1486 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1495 |
foreach($attrs as $attr)
|
1496 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
1497 |
}
|
1498 |
+
if(!isset($param['w_field_option_pos']))
|
1499 |
+
$param['w_field_option_pos'] = 'left';
|
1500 |
+
|
1501 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1502 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
1503 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
1505 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
1506 |
$param['w_property'] = explode('***',$param['w_property']);
|
1507 |
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
1508 |
+
|
1509 |
+
if(isset($param['w_choices_params']))
|
1510 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
1511 |
+
|
1512 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
1513 |
{
|
1514 |
if($choices_checked=='true')
|
1517 |
$param['w_choices_checked'][$key]='';
|
1518 |
}
|
1519 |
|
1520 |
+
$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;">';
|
1521 |
|
1522 |
if($param['w_flow']=='hor')
|
1523 |
{
|
1524 |
$rep.= '<div id="'.$id.'_hor" style="display: table-row;">';
|
1525 |
foreach($param['w_choices'] as $key => $choice)
|
1526 |
{
|
1527 |
+
$where ='';
|
1528 |
+
$order_by ='';
|
1529 |
+
$db_info = '';
|
1530 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
1531 |
+
{
|
1532 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
1533 |
+
$where = "where='".$w_choices_params[0]."'";
|
1534 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
1535 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
1536 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
1537 |
+
}
|
1538 |
+
|
1539 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.$key.'" idi="'.$key.'" style="display: table-cell;"><input type="checkbox" id="'.$id.'_elementform_id_temp'.$key.'" name="'.$id.'_elementform_id_temp'.$key.'" value="'.$param['w_choices_price'][$key].'" onclick="set_checked("'.$id.'","'.$key.'","form_id_temp")" '.$param['w_choices_checked'][$key].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$key.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$key.'" '.$where.' '.$order_by.' '.$db_info.'>'.$choice.'</label></div>';
|
1540 |
}
|
1541 |
$rep.= '</div>';
|
1542 |
}
|
1543 |
else
|
1544 |
{
|
1545 |
+
|
1546 |
foreach($param['w_choices'] as $key => $choice)
|
1547 |
{
|
1548 |
+
$where ='';
|
1549 |
+
$order_by ='';
|
1550 |
+
$db_info ='';
|
1551 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
1552 |
+
{
|
1553 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
1554 |
+
$where = "where='".$w_choices_params[0]."'";
|
1555 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
1556 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
1557 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
1558 |
+
}
|
1559 |
+
|
1560 |
+
$rep.='<div id="'.$id.'_element_tr'.$key.'" style="display: table-row;"><div valign="top" id="'.$id.'_td_little'.$key.'" idi="'.$key.'" style="display: table-cell;"><input type="checkbox" id="'.$id.'_elementform_id_temp'.$key.'" name="'.$id.'_elementform_id_temp'.$key.'" value="'.$param['w_choices_price'][$key].'" onclick="set_checked("'.$id.'","'.$key.'","form_id_temp")" '.$param['w_choices_checked'][$key].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$key.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$key.'" '.$where.' '.$order_by.' '.$db_info.'>'.$choice.'</label></div></div>';
|
1561 |
+
}
|
1562 |
+
|
1563 |
}
|
1564 |
$rep.='</div></div>';
|
1565 |
|
1591 |
|
1592 |
$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','w_quantity_value');
|
1593 |
$temp=$params;
|
1594 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
1595 |
+
$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');
|
1596 |
foreach($params_names as $params_name )
|
1597 |
{
|
1598 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1607 |
foreach($attrs as $attr)
|
1608 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
1609 |
}
|
1610 |
+
if(!isset($param['w_field_option_pos']))
|
1611 |
+
$param['w_field_option_pos'] = 'left';
|
1612 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1613 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
1614 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
1619 |
|
1620 |
$param['w_property'] = explode('***',$param['w_property']);
|
1621 |
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
1622 |
+
|
1623 |
+
if(isset($param['w_choices_params']))
|
1624 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
1625 |
+
|
1626 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
1627 |
{
|
1628 |
if($choices_checked=='true')
|
1631 |
$param['w_choices_checked'][$key]='';
|
1632 |
}
|
1633 |
|
1634 |
+
$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;">';
|
1635 |
|
1636 |
if($param['w_flow']=='hor')
|
1637 |
{
|
1638 |
$rep.= '<div id="'.$id.'_hor" style="display: table-row;">';
|
1639 |
foreach($param['w_choices'] as $key => $choice)
|
1640 |
{
|
1641 |
+
$where ='';
|
1642 |
+
$order_by ='';
|
1643 |
+
$db_info ='';
|
1644 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
1645 |
+
{
|
1646 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
1647 |
+
$where = "where='".$w_choices_params[0]."'";
|
1648 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
1649 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
1650 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
1651 |
+
}
|
1652 |
+
|
1653 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.$key.'" idi="'.$key.'" style="display: table-cell;"><input type="radio" id="'.$id.'_elementform_id_temp'.$key.'" name="'.$id.'_elementform_id_temp" value="'.$param['w_choices_price'][$key].'" onclick="set_default("'.$id.'","'.$key.'","form_id_temp")" '.$param['w_choices_checked'][$key].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$key.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$key.'" '.$where.' '.$order_by.' '.$db_info.'>'.$choice.'</label></div>';
|
1654 |
}
|
1655 |
$rep.= '</div>';
|
1656 |
}
|
1657 |
else
|
1658 |
{
|
1659 |
+
|
1660 |
foreach($param['w_choices'] as $key => $choice)
|
1661 |
{
|
1662 |
+
|
1663 |
+
$where ='';
|
1664 |
+
$order_by ='';
|
1665 |
+
$db_info ='';
|
1666 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
1667 |
+
{
|
1668 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
1669 |
+
$where = "where='".$w_choices_params[0]."'";
|
1670 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
1671 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
1672 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
1673 |
+
}
|
1674 |
+
|
1675 |
+
$rep.='<div id="'.$id.'_element_tr'.$key.'" style="display: table-row;"><div valign="top" id="'.$id.'_td_little'.$key.'" idi="'.$key.'" style="display: table-cell;"><input type="radio" id="'.$id.'_elementform_id_temp'.$key.'" name="'.$id.'_elementform_id_temp" value="'.$param['w_choices_price'][$key].'" onclick="set_default("'.$id.'","'.$key.'","form_id_temp")" '.$param['w_choices_checked'][$key].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$key.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$key.'" '.$where.' '.$order_by.' '.$db_info.'>'.$choice.'</label></div></div>';
|
1676 |
+
}
|
1677 |
+
|
1678 |
}
|
1679 |
$rep.='</div></div>';
|
1680 |
|
1705 |
case 'type_paypal_shipping':
|
1706 |
{
|
1707 |
|
1708 |
+
$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');
|
1709 |
$temp=$params;
|
1710 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
1711 |
+
$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');
|
1712 |
foreach($params_names as $params_name )
|
1713 |
{
|
1714 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1723 |
foreach($attrs as $attr)
|
1724 |
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
1725 |
}
|
1726 |
+
if(!isset($param['w_field_option_pos']))
|
1727 |
+
$param['w_field_option_pos'] = 'left';
|
1728 |
+
|
1729 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
1730 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
1731 |
$param['w_choices'] = explode('***',$param['w_choices']);
|
1734 |
|
1735 |
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
1736 |
|
1737 |
+
if(isset($param['w_choices_params']))
|
1738 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
1739 |
+
|
1740 |
foreach($param['w_choices_checked'] as $key => $choices_checked )
|
1741 |
{
|
1742 |
if($choices_checked=='true')
|
1745 |
$param['w_choices_checked'][$key]='';
|
1746 |
}
|
1747 |
|
1748 |
+
$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;">';
|
1749 |
|
1750 |
if($param['w_flow']=='hor')
|
1751 |
{
|
1752 |
$rep.= '<div id="'.$id.'_hor" style="display: table-row;">';
|
1753 |
foreach($param['w_choices'] as $key => $choice)
|
1754 |
{
|
1755 |
+
$where ='';
|
1756 |
+
$order_by ='';
|
1757 |
+
$db_info ='';
|
1758 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
1759 |
+
{
|
1760 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
1761 |
+
$where = "where='".$w_choices_params[0]."'";
|
1762 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
1763 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
1764 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
1765 |
+
}
|
1766 |
+
|
1767 |
+
$rep.='<div valign="top" id="'.$id.'_td_little'.$key.'" idi="'.$key.'" style="display: table-cell;"><input type="radio" id="'.$id.'_elementform_id_temp'.$key.'" name="'.$id.'_elementform_id_temp" value="'.$param['w_choices_price'][$key].'" onclick="set_default("'.$id.'","'.$key.'","form_id_temp")" '.$param['w_choices_checked'][$key].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$key.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$key.'" '.$where.' '.$order_by.' '.$db_info.'>'.$choice.'</label></div>';
|
1768 |
}
|
1769 |
$rep.= '</div>';
|
1770 |
}
|
1771 |
else
|
1772 |
{
|
1773 |
+
|
1774 |
foreach($param['w_choices'] as $key => $choice)
|
1775 |
{
|
1776 |
+
$where ='';
|
1777 |
+
$order_by ='';
|
1778 |
+
$db_info ='';
|
1779 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
1780 |
+
{
|
1781 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
1782 |
+
$where = "where='".$w_choices_params[0]."'";
|
1783 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
1784 |
+
$order_by = "order_by='".$w_choices_params[0]."'";
|
1785 |
+
$db_info = "db_info='".$w_choices_params[1]."'";
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
$rep.='<div id="'.$id.'_element_tr'.$key.'" style="display: table-row;"><div valign="top" id="'.$id.'_td_little'.$key.'" idi="'.$key.'" style="display: table-cell;"><input type="radio" id="'.$id.'_elementform_id_temp'.$key.'" name="'.$id.'_elementform_id_temp" value="'.$param['w_choices_price'][$key].'" onclick="set_default("'.$id.'","'.$key.'","form_id_temp")" '.$param['w_choices_checked'][$key].' '.$param['attributes'].' '.($param['w_field_option_pos']=='right' ? 'style="float:left !important;"' : "").' disabled/><label id="'.$id.'_label_element'.$key.'" class="ch-rad-label" for="'.$id.'_elementform_id_temp'.$key.'" '.$where.' '.$order_by.' '.$db_info.'>'.$choice.'</label></div></div>';
|
1789 |
+
}
|
1790 |
+
|
1791 |
}
|
1792 |
$rep.='</div></div>';
|
1793 |
|
1794 |
+
$rep.='</div></div>';
|
1795 |
+
|
1796 |
+
break;
|
1797 |
}
|
1798 |
case 'type_paypal_total':
|
1799 |
{
|
1849 |
$images = '';
|
1850 |
for($i=0; $i<$param['w_star_amount']; $i++)
|
1851 |
{
|
1852 |
+
$images .= '<img id="'.$id.'_star_'.$i.'" src="' . WD_FMC_URL . '/images/star.png?ver='. get_option("wd_form_maker_version").'" onmouseover="change_src('.$i.','.$id.',"form_id_temp")" onmouseout="reset_src('.$i.','.$id.')" onclick="select_star_rating('.$i.','.$id.', "form_id_temp")">';
|
1853 |
}
|
1854 |
|
1855 |
$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>';
|
1987 |
break;
|
1988 |
}
|
1989 |
case 'type_matrix': {
|
1990 |
+
$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');
|
1991 |
$temp = $params;
|
1992 |
foreach ($params_names as $params_name) {
|
1993 |
$temp = explode('*:*'.$params_name.'*:*',$temp);
|
2003 |
}
|
2004 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
|
2005 |
$required_sym = ($param['w_required']=="yes" ? " *" : "");
|
2006 |
+
$param['w_textbox_size'] = isset($param['w_textbox_size']) ? $param['w_textbox_size'] : '100';
|
2007 |
$w_rows = explode('***',$param['w_rows']);
|
2008 |
$w_columns = explode('***',$param['w_columns']);
|
2009 |
$column_labels = '';
|
2026 |
$rows_columns .= '<div id="'.$id.'_element_td'.$i.'_'.$k.'" style="text-align: center; display: table-cell; padding: 5px 0 0 5px;"><input id="'.$id.'_input_elementform_id_temp'.$i.'_'.$k.'" align="center" size="14" type="checkbox" name="'.$id.'_input_elementform_id_temp'.$i.'_'.$k.'" value="1" disabled/></div>';
|
2027 |
else
|
2028 |
if($param['w_field_input_type']=='text')
|
2029 |
+
$rows_columns .= '<div id="'.$id.'_element_td'.$i.'_'.$k.'" style="text-align: center; display: table-cell; padding: 5px 0 0 5px;"><input id="'.$id.'_input_elementform_id_temp'.$i.'_'.$k.'" align="center" type="text" name="'.$id.'_input_elementform_id_temp'.$i.'_'.$k.'" value="" style="width:'.$param['w_textbox_size'].'px" disabled/></div>';
|
2030 |
else
|
2031 |
if($param['w_field_input_type']=='select')
|
2032 |
$rows_columns .= '<div id="'.$id.'_element_td'.$i.'_'.$k.'" style="text-align: center; display: table-cell; padding: 5px 0 0 5px;"><select id="'.$id.'_select_yes_noform_id_temp'.$i.'_'.$k.'" name="'.$id.'_select_yes_noform_id_temp'.$i.'_'.$k.'" disabled><option value=""> </option><option value="yes">Yes</option><option value="no">No</option></select></div>';
|
2038 |
|
2039 |
|
2040 |
|
2041 |
+
$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>';
|
2042 |
|
2043 |
break;
|
2044 |
}
|
2096 |
else {
|
2097 |
$row = new stdClass();
|
2098 |
$row->id = 0;
|
2099 |
+
$row->backup_id ='';
|
2100 |
$row->title = '';
|
2101 |
$row->mail = '';
|
2102 |
$row->form = '';
|
2103 |
$row->form_front = '';
|
2104 |
+
$row->theme = $wpdb->get_var("SELECT id FROM " . $wpdb->prefix . "formmaker_themes WHERE `default`='1'");
|
2105 |
$row->javascript = '';
|
2106 |
$row->submit_text = '';
|
2107 |
$row->url = '';
|
2142 |
$row->mail_from_user = '';
|
2143 |
$row->mail_from_name_user = '';
|
2144 |
$row->reply_to_user = '';
|
2145 |
+
$row->save_uploads = 1;
|
2146 |
|
2147 |
$row->condition = '';
|
2148 |
$row->mail_cc = '';
|
2190 |
|
2191 |
public function page_nav() {
|
2192 |
global $wpdb;
|
2193 |
+
$where = 'WHERE `id` IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')';
|
2194 |
+
$where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
|
2195 |
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker " . $where;
|
2196 |
$total = $wpdb->get_var($query);
|
2197 |
$page_nav['total'] = $total;
|
admin/models/FMModelSubmissions_fmc.php
CHANGED
@@ -1,50 +1,50 @@
|
|
1 |
<?php
|
2 |
class FMModelSubmissions_fmc {
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
|
49 |
public function get_labels_parameters($form_id) {
|
50 |
global $wpdb;
|
@@ -67,8 +67,11 @@ class FMModelSubmissions_fmc {
|
|
67 |
$sorted_label_names_original = array();
|
68 |
$where_labels = array();
|
69 |
$where2 = array();
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
72 |
$limit = ((isset($_POST['page_number'])) ? ((int) $_POST['page_number'] - 1) * 20 : 0);
|
73 |
$lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
|
74 |
$lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
|
@@ -77,6 +80,8 @@ class FMModelSubmissions_fmc {
|
|
77 |
|
78 |
$lists['username_search'] = ((isset($_POST['username_search'])) ? esc_html(stripslashes($_POST['username_search'])) : '');
|
79 |
$lists['useremail_search'] = ((isset($_POST['useremail_search'])) ? esc_html(stripslashes($_POST['useremail_search'])) : '');
|
|
|
|
|
80 |
if ($lists['ip_search']) {
|
81 |
$where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
|
82 |
}
|
@@ -94,6 +99,11 @@ class FMModelSubmissions_fmc {
|
|
94 |
if ($lists['useremail_search']) {
|
95 |
$where[] = 'user_id_wd IN (SELECT ID FROM ' . $wpdb->prefix . 'users WHERE user_email LIKE "%'.$lists['useremail_search'].'%")';
|
96 |
}
|
|
|
|
|
|
|
|
|
|
|
97 |
$where[] = 'form_id=' . $form_id . '';
|
98 |
$where = (count($where) ? ' ' . implode(' AND ', $where) : '');
|
99 |
if ($order_by == 'group_id' or $order_by == 'date' or $order_by == 'ip') {
|
@@ -117,8 +127,10 @@ class FMModelSubmissions_fmc {
|
|
117 |
if (strpos($form->label_order, 'type_paypal_')) {
|
118 |
$form->label_order = $form->label_order . "item_total#**id**#Item Total#**label**#type_paypal_payment_total#****#total#**id**#Total#**label**#type_paypal_payment_total#****#0#**id**#Payment Status#**label**#type_paypal_payment_status#****#";
|
119 |
}
|
|
|
120 |
$form_labels = explode('#****#', $form->label_order);
|
121 |
$form_labels = array_slice($form_labels, 0, count($form_labels) - 1);
|
|
|
122 |
foreach ($form_labels as $key => $form_label) {
|
123 |
$label_id = explode('#**id**#', $form_label);
|
124 |
array_push($labels_id, $label_id[0]);
|
@@ -130,6 +142,7 @@ class FMModelSubmissions_fmc {
|
|
130 |
array_push($label_names, $label_name);
|
131 |
array_push($label_types, $label_name_type[1]);
|
132 |
}
|
|
|
133 |
foreach ($labels_id as $key => $label_id) {
|
134 |
if (in_array($label_id, $labels)) {
|
135 |
if (!in_array($label_id, $sorted_labels_id)) {
|
@@ -197,7 +210,13 @@ class FMModelSubmissions_fmc {
|
|
197 |
$query = str_replace('SELECT t.group_id', 'SELECT count(t.group_id)', $join);
|
198 |
}
|
199 |
$total = $wpdb->get_var($query);
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
$results = $wpdb->get_results($query);
|
202 |
for ($i = 0; $i < count($results); $i++) {
|
203 |
array_push($rows_ord, $results[$i]->group_id);
|
@@ -212,7 +231,7 @@ class FMModelSubmissions_fmc {
|
|
212 |
$rows = $wpdb->get_results($query);
|
213 |
$group_ids = $rows_ord;
|
214 |
$lists['total'] = $total;
|
215 |
-
$lists['limit'] = (int) ($
|
216 |
$where_choices = $where;
|
217 |
array_push($labels_parameters, $sorted_labels_id);
|
218 |
array_push($labels_parameters, $sorted_label_types);
|
@@ -314,39 +333,38 @@ class FMModelSubmissions_fmc {
|
|
314 |
}
|
315 |
}
|
316 |
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
}
|
350 |
|
351 |
public function get_data_of_group_id($id) {
|
352 |
global $wpdb;
|
@@ -412,10 +430,10 @@ class FMModelSubmissions_fmc {
|
|
412 |
$stars = "";
|
413 |
$new_filename=explode('***', $new_filename);
|
414 |
for ($j = 0; $j < $new_filename[1]; $j++) {
|
415 |
-
$stars .= '<img id="' . $element_label . '_star_' . $j . '" src="' . WD_FMC_URL . '/images/star_' . $new_filename[2] . '.png" /> ';
|
416 |
}
|
417 |
for ($k = $new_filename[1]; $k < $new_filename[0]; $k++) {
|
418 |
-
$stars .= '<img id="' . $element_label . '_star_' . $k . '" src="' . WD_FMC_URL . '/images/star.png" /> ';
|
419 |
}
|
420 |
array_push($view_star_rating_array, $stars);
|
421 |
return $view_star_rating_array;
|
@@ -443,10 +461,10 @@ class FMModelSubmissions_fmc {
|
|
443 |
$element_value1 = str_replace("***star_rating***", '', $element_value);
|
444 |
$stars_value = explode('***', $element_value1);
|
445 |
for ($j = 0; $j < $stars_value[1]; $j++) {
|
446 |
-
$edit_stars .= '<img id="'.$label_id.'_star_'.$j.'" onclick="edit_star_rating('.$j.','.$label_id.')" src="' . WD_FMC_URL . '/images/star_'.$stars_value[2].'.png" /> ';
|
447 |
}
|
448 |
for( $k=$stars_value[1];$k<$stars_value[0];$k++) {
|
449 |
-
$edit_stars .= '<img id="'.$label_id.'_star_'.$k.'" onclick="edit_star_rating('.$k.','.$label_id.')" src="' . WD_FMC_URL . '/images/star.png" /> ';
|
450 |
}
|
451 |
array_push($star_rating_array, $edit_stars);
|
452 |
array_push($star_rating_array, $stars_value);
|
@@ -599,6 +617,60 @@ class FMModelSubmissions_fmc {
|
|
599 |
array_push($type_matrix_array, $new_filename);
|
600 |
return $type_matrix_array;
|
601 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
602 |
}
|
603 |
|
604 |
?>
|
1 |
<?php
|
2 |
class FMModelSubmissions_fmc {
|
3 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
4 |
+
// Events //
|
5 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
// Constants //
|
8 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
// Variables //
|
11 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
// Constructor & Destructor //
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
public function __construct() {
|
16 |
+
}
|
17 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
+
// Public Methods //
|
19 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
20 |
+
public function blocked_ips() {
|
21 |
+
global $wpdb;
|
22 |
+
$ips = $wpdb->get_col('SELECT ip FROM ' . $wpdb->prefix . 'formmaker_blocked');
|
23 |
+
return $ips;
|
24 |
+
}
|
25 |
|
26 |
+
public function get_form_titles() {
|
27 |
+
global $wpdb;
|
28 |
+
$query = "SELECT id, title FROM " . $wpdb->prefix . "formmaker WHERE `id` 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 |
+
}
|
32 |
|
33 |
+
public function get_statistics($form_id) {
|
34 |
+
global $wpdb;
|
35 |
+
$statistics = array();
|
36 |
+
$query = $wpdb->prepare('SELECT count(distinct group_id) FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id ="%d"', $form_id);
|
37 |
+
$statistics["total_entries"] = $wpdb->get_var($query);
|
38 |
+
$query = $wpdb->prepare('SELECT `views` FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $form_id);
|
39 |
+
$statistics["total_views"] = $wpdb->get_var($query);
|
40 |
+
if ($statistics["total_views"]) {
|
41 |
+
$statistics["conversion_rate"] = round((($statistics["total_entries"] / $statistics["total_views"]) * 100), 2) . '%';
|
42 |
+
}
|
43 |
+
else {
|
44 |
+
$statistics["conversion_rate"] = '0%';
|
45 |
+
}
|
46 |
+
return $statistics;
|
47 |
+
}
|
48 |
|
49 |
public function get_labels_parameters($form_id) {
|
50 |
global $wpdb;
|
67 |
$sorted_label_names_original = array();
|
68 |
$where_labels = array();
|
69 |
$where2 = array();
|
70 |
+
|
71 |
+
$pagination_clicked = (isset($_POST['pagination_clicked']) && $_POST['pagination_clicked'] == '1' ? '1' : '0');
|
72 |
+
|
73 |
+
$order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
|
74 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
|
75 |
$limit = ((isset($_POST['page_number'])) ? ((int) $_POST['page_number'] - 1) * 20 : 0);
|
76 |
$lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
|
77 |
$lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
|
80 |
|
81 |
$lists['username_search'] = ((isset($_POST['username_search'])) ? esc_html(stripslashes($_POST['username_search'])) : '');
|
82 |
$lists['useremail_search'] = ((isset($_POST['useremail_search'])) ? esc_html(stripslashes($_POST['useremail_search'])) : '');
|
83 |
+
$lists['id_search'] = ((isset($_POST['id_search'])) ? esc_html(stripslashes($_POST['id_search'])) : '');
|
84 |
+
|
85 |
if ($lists['ip_search']) {
|
86 |
$where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
|
87 |
}
|
99 |
if ($lists['useremail_search']) {
|
100 |
$where[] = 'user_id_wd IN (SELECT ID FROM ' . $wpdb->prefix . 'users WHERE user_email LIKE "%'.$lists['useremail_search'].'%")';
|
101 |
}
|
102 |
+
|
103 |
+
if ($lists['id_search']) {
|
104 |
+
$where[] = 'group_id ='.$lists['id_search'];
|
105 |
+
}
|
106 |
+
|
107 |
$where[] = 'form_id=' . $form_id . '';
|
108 |
$where = (count($where) ? ' ' . implode(' AND ', $where) : '');
|
109 |
if ($order_by == 'group_id' or $order_by == 'date' or $order_by == 'ip') {
|
127 |
if (strpos($form->label_order, 'type_paypal_')) {
|
128 |
$form->label_order = $form->label_order . "item_total#**id**#Item Total#**label**#type_paypal_payment_total#****#total#**id**#Total#**label**#type_paypal_payment_total#****#0#**id**#Payment Status#**label**#type_paypal_payment_status#****#";
|
129 |
}
|
130 |
+
|
131 |
$form_labels = explode('#****#', $form->label_order);
|
132 |
$form_labels = array_slice($form_labels, 0, count($form_labels) - 1);
|
133 |
+
|
134 |
foreach ($form_labels as $key => $form_label) {
|
135 |
$label_id = explode('#**id**#', $form_label);
|
136 |
array_push($labels_id, $label_id[0]);
|
142 |
array_push($label_names, $label_name);
|
143 |
array_push($label_types, $label_name_type[1]);
|
144 |
}
|
145 |
+
|
146 |
foreach ($labels_id as $key => $label_id) {
|
147 |
if (in_array($label_id, $labels)) {
|
148 |
if (!in_array($label_id, $sorted_labels_id)) {
|
210 |
$query = str_replace('SELECT t.group_id', 'SELECT count(t.group_id)', $join);
|
211 |
}
|
212 |
$total = $wpdb->get_var($query);
|
213 |
+
|
214 |
+
$query_sub_count = "SELECT count(distinct group_id) from ".$wpdb->prefix."formmaker_submits";
|
215 |
+
$sub_count = (int)$wpdb->get_var($query_sub_count);
|
216 |
+
|
217 |
+
$limit1 = (int)$total < $sub_count && !$pagination_clicked ? 0 : $limit;
|
218 |
+
|
219 |
+
$query = $join . ' ' . $orderby . ' limit ' . $limit1 . ', 20 ';
|
220 |
$results = $wpdb->get_results($query);
|
221 |
for ($i = 0; $i < count($results); $i++) {
|
222 |
array_push($rows_ord, $results[$i]->group_id);
|
231 |
$rows = $wpdb->get_results($query);
|
232 |
$group_ids = $rows_ord;
|
233 |
$lists['total'] = $total;
|
234 |
+
$lists['limit'] = (int) ($limit1 / 20 + 1);
|
235 |
$where_choices = $where;
|
236 |
array_push($labels_parameters, $sorted_labels_id);
|
237 |
array_push($labels_parameters, $sorted_label_types);
|
333 |
}
|
334 |
}
|
335 |
|
336 |
+
public function statistic_for_radio($where_choices, $sorted_label_id) {
|
337 |
+
global $wpdb;
|
338 |
+
$choices_params = array();
|
339 |
+
$query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits WHERE " . $where_choices . " AND element_label='" . $sorted_label_id . "'";
|
340 |
+
$choices = $wpdb->get_results($query);
|
341 |
+
$colors=array('#5FE2FF','#F9E89C');
|
342 |
+
$choices_colors=array('#4EC0D9','#DDCC7F');
|
343 |
+
$choices_labels = array();
|
344 |
+
$choices_count = array();
|
345 |
+
$all = count($choices);
|
346 |
+
$unanswered = 0;
|
347 |
+
foreach ($choices as $key => $choice) {
|
348 |
+
if ($choice->element_value == '') {
|
349 |
+
$unanswered++;
|
350 |
+
}
|
351 |
+
else {
|
352 |
+
if (!in_array($choice->element_value, $choices_labels)) {
|
353 |
+
array_push($choices_labels, $choice->element_value);
|
354 |
+
array_push($choices_count, 0);
|
355 |
+
}
|
356 |
+
$choices_count[array_search($choice->element_value, $choices_labels)]++;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
array_multisort($choices_count, SORT_DESC, $choices_labels);
|
360 |
+
array_push($choices_params, $choices_count);
|
361 |
+
array_push($choices_params, $choices_labels);
|
362 |
+
array_push($choices_params, $unanswered);
|
363 |
+
array_push($choices_params, $all);
|
364 |
+
array_push($choices_params, $colors);
|
365 |
+
array_push($choices_params, $choices_colors);
|
366 |
+
return $choices_params;
|
367 |
+
}
|
|
|
368 |
|
369 |
public function get_data_of_group_id($id) {
|
370 |
global $wpdb;
|
430 |
$stars = "";
|
431 |
$new_filename=explode('***', $new_filename);
|
432 |
for ($j = 0; $j < $new_filename[1]; $j++) {
|
433 |
+
$stars .= '<img id="' . $element_label . '_star_' . $j . '" src="' . WD_FMC_URL . '/images/star_' . $new_filename[2] . '.png?ver='. get_option("wd_form_maker_version").'" /> ';
|
434 |
}
|
435 |
for ($k = $new_filename[1]; $k < $new_filename[0]; $k++) {
|
436 |
+
$stars .= '<img id="' . $element_label . '_star_' . $k . '" src="' . WD_FMC_URL . '/images/star.png?ver='. get_option("wd_form_maker_version").'" /> ';
|
437 |
}
|
438 |
array_push($view_star_rating_array, $stars);
|
439 |
return $view_star_rating_array;
|
461 |
$element_value1 = str_replace("***star_rating***", '', $element_value);
|
462 |
$stars_value = explode('***', $element_value1);
|
463 |
for ($j = 0; $j < $stars_value[1]; $j++) {
|
464 |
+
$edit_stars .= '<img id="'.$label_id.'_star_'.$j.'" onclick="edit_star_rating('.$j.','.$label_id.')" src="' . WD_FMC_URL . '/images/star_'.$stars_value[2].'.png?ver='. get_option("wd_form_maker_version").'" /> ';
|
465 |
}
|
466 |
for( $k=$stars_value[1];$k<$stars_value[0];$k++) {
|
467 |
+
$edit_stars .= '<img id="'.$label_id.'_star_'.$k.'" onclick="edit_star_rating('.$k.','.$label_id.')" src="' . WD_FMC_URL . '/images/star.png?ver='. get_option("wd_form_maker_version").'" /> ';
|
468 |
}
|
469 |
array_push($star_rating_array, $edit_stars);
|
470 |
array_push($star_rating_array, $stars_value);
|
617 |
array_push($type_matrix_array, $new_filename);
|
618 |
return $type_matrix_array;
|
619 |
}
|
620 |
+
|
621 |
+
public function select_data_from_db_for_labels($db_info,$label_column, $table, $where, $order_by) {
|
622 |
+
global $wpdb;
|
623 |
+
|
624 |
+
$query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
625 |
+
if($db_info) {
|
626 |
+
$temp = explode('@@@wdfhostwdf@@@',$db_info);
|
627 |
+
$host = $temp[0];
|
628 |
+
$temp = explode('@@@wdfportwdf@@@',$temp[1]);
|
629 |
+
$port = $temp[0];
|
630 |
+
$temp = explode('@@@wdfusernamewdf@@@',$temp[1]);
|
631 |
+
$username = $temp[0];
|
632 |
+
$temp = explode('@@@wdfpasswordwdf@@@',$temp[1]);
|
633 |
+
$password = $temp[0];
|
634 |
+
$temp = explode('@@@wdfdatabasewdf@@@',$temp[1]);
|
635 |
+
$database = $temp[0];
|
636 |
+
|
637 |
+
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
638 |
+
$choices_labels = $wpdb_temp->get_col($query);
|
639 |
+
}
|
640 |
+
else {
|
641 |
+
$choices_labels = $wpdb->get_col($query);
|
642 |
+
}
|
643 |
+
return $choices_labels;
|
644 |
+
}
|
645 |
+
public function select_data_from_db_for_values($db_info,$value_column, $table, $where, $order_by) {
|
646 |
+
global $wpdb;
|
647 |
+
$query = "SELECT `" . $value_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
648 |
+
if($db_info) {
|
649 |
+
$temp = explode('@@@wdfhostwdf@@@',$db_info);
|
650 |
+
$host = $temp[0];
|
651 |
+
$temp = explode('@@@wdfportwdf@@@',$temp[1]);
|
652 |
+
$port = $temp[0];
|
653 |
+
$temp = explode('@@@wdfusernamewdf@@@',$temp[1]);
|
654 |
+
$username = $temp[0];
|
655 |
+
$temp = explode('@@@wdfpasswordwdf@@@',$temp[1]);
|
656 |
+
$password = $temp[0];
|
657 |
+
$temp = explode('@@@wdfdatabasewdf@@@',$temp[1]);
|
658 |
+
$database = $temp[0];
|
659 |
+
|
660 |
+
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
661 |
+
$choices_values = $wpdb_temp->get_col($query);
|
662 |
+
}
|
663 |
+
else {
|
664 |
+
$choices_values = $wpdb->get_col($query);
|
665 |
+
}
|
666 |
+
return $choices_values;
|
667 |
+
}
|
668 |
+
public function get_subs_count($form_id) {
|
669 |
+
global $wpdb;
|
670 |
+
$query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d", $form_id);
|
671 |
+
$group_id_s = $wpdb->get_col($query);
|
672 |
+
return count($group_id_s);
|
673 |
+
}
|
674 |
}
|
675 |
|
676 |
?>
|
admin/models/FMModelThemes_fmc.php
CHANGED
@@ -21,10 +21,9 @@ class FMModelThemes_fmc {
|
|
21 |
public function get_rows_data() {
|
22 |
global $wpdb;
|
23 |
$where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
|
24 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc']) &&
|
25 |
-
$
|
26 |
-
$
|
27 |
-
$order_by = in_array($order_by, $order_by_array) ? $order_by : 'id';
|
28 |
$order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
|
29 |
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
30 |
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
21 |
public function get_rows_data() {
|
22 |
global $wpdb;
|
23 |
$where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
|
24 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == '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']) {
|
29 |
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
admin/models/FMModelUninstall_fmc.php
CHANGED
@@ -20,12 +20,12 @@ class FMModelUninstall_fmc {
|
|
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`
|
24 |
if ($true_or_false_forms) {
|
25 |
-
$wpdb->query("DELETE FROM " . $wpdb->prefix . "formmaker WHERE `id` IN (" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ")");
|
26 |
-
$wpdb->query("DELETE FROM " . $wpdb->prefix . "formmaker_submits WHERE `form_id` IN (" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ")");
|
27 |
-
$wpdb->query("DELETE FROM " . $wpdb->prefix . "formmaker_views WHERE `form_id` IN (" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ")");
|
28 |
-
|
29 |
}
|
30 |
else {
|
31 |
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker");
|
@@ -35,11 +35,15 @@ class FMModelUninstall_fmc {
|
|
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 |
delete_option("wd_form_maker_version");
|
40 |
delete_option('formmaker_cureent_version');
|
|
|
41 |
delete_option('form_maker_pro_active');
|
|
|
42 |
}
|
|
|
43 |
}
|
44 |
////////////////////////////////////////////////////////////////////////////////////////
|
45 |
// Getters & Setters //
|
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) . ")");
|
24 |
if ($true_or_false_forms) {
|
25 |
+
$wpdb->query("DELETE FROM " . $wpdb->prefix . "formmaker WHERE `id` NOT IN (" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ")");
|
26 |
+
$wpdb->query("DELETE FROM " . $wpdb->prefix . "formmaker_submits WHERE `form_id` NOT IN (" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ")");
|
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 |
+
delete_option('contact_form_forms');
|
29 |
}
|
30 |
else {
|
31 |
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker");
|
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 |
+
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_backup");
|
39 |
+
delete_option('contact_form_forms');
|
40 |
delete_option("wd_form_maker_version");
|
41 |
delete_option('formmaker_cureent_version');
|
42 |
+
delete_option('fm_emailverification');
|
43 |
delete_option('form_maker_pro_active');
|
44 |
+
|
45 |
}
|
46 |
+
delete_option('fmc_settings');
|
47 |
}
|
48 |
////////////////////////////////////////////////////////////////////////////////////////
|
49 |
// Getters & Setters //
|
admin/views/FMViewBlocked_ips_fmc.php
CHANGED
@@ -1,141 +1,155 @@
|
|
1 |
<?php
|
2 |
|
3 |
class FMViewBlocked_ips_fmc {
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
</form>
|
137 |
<?php
|
138 |
-
|
139 |
|
140 |
////////////////////////////////////////////////////////////////////////////////////////
|
141 |
// Getters & Setters //
|
1 |
<?php
|
2 |
|
3 |
class FMViewBlocked_ips_fmc {
|
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();
|
28 |
+
$search_value = ((isset($_POST['search_value'])) ? esc_html(stripslashes($_POST['search_value'])) : '');
|
29 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
|
30 |
+
$order_by_array = array('id', 'ip');
|
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 id="fm_blocked_ips_message" style="width: 99%; display: none;"></div>
|
36 |
+
<div class="fm-user-manual">
|
37 |
+
This section allows you to block IPs.
|
38 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-6.html">Read More in User Manual</a>
|
39 |
+
</div>
|
40 |
+
<div class="fm-upgrade-pro">
|
41 |
+
<a target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
42 |
+
<div class="fm-upgrade-img">
|
43 |
+
UPGRADE TO PRO VERSION
|
44 |
+
<span></span>
|
45 |
+
</div>
|
46 |
+
</a>
|
47 |
+
</div>
|
48 |
+
<div class="fm-clear"></div>
|
49 |
+
<form onkeypress="fm_doNothing(event)" class="wrap" id="blocked_ips" method="post" action="admin.php?page=blocked_ips_fmc" style="width:99%;">
|
50 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
51 |
+
<div class="fm-page-banner blocked-ips-banner">
|
52 |
+
<div class="block_icon">
|
53 |
+
</div>
|
54 |
+
<div class="fm-logo-title">Blocked IPs</div>
|
55 |
+
<div class="fm-page-actions">
|
56 |
+
<button class="fm-button save-button small" onclick="fm_set_input_value('task', 'save_all');">
|
57 |
+
<span></span>
|
58 |
+
Save
|
59 |
+
</button>
|
60 |
+
<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; }">
|
61 |
+
<span></span>
|
62 |
+
Delete
|
63 |
+
</button>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<div class="fm-clear"></div>
|
67 |
+
<div class="tablenav top">
|
68 |
+
<?php
|
69 |
+
WDW_FMC_Library::search('IP', $search_value, 'blocked_ips');
|
70 |
+
WDW_FMC_Library::html_page_nav($page_nav['total'], $page_nav['limit'], 'blocked_ips');
|
71 |
+
?>
|
72 |
+
</div>
|
73 |
+
<table class="wp-list-table widefat fixed pages fm-block-ip">
|
74 |
+
<thead>
|
75 |
+
<tr>
|
76 |
+
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin: 0;" /></th>
|
77 |
+
<th class="table_small_col <?php if ($order_by == 'id') {echo $order_class;} ?>">
|
78 |
+
<a onclick="fm_set_input_value('task', '');
|
79 |
+
fm_set_input_value('order_by', 'id');
|
80 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
81 |
+
fm_form_submit(event, 'blocked_ips')" href="">
|
82 |
+
<span>ID</span><span class="sorting-indicator"></span></th>
|
83 |
+
</a>
|
84 |
+
<th class="<?php if ($order_by == 'ip') {echo $order_class;} ?>">
|
85 |
+
<a onclick="fm_set_input_value('task', '');
|
86 |
+
fm_set_input_value('order_by', 'ip');
|
87 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'ip' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
88 |
+
fm_form_submit(event, 'blocked_ips')" href="">
|
89 |
+
<span>IP</span><span class="sorting-indicator"></span>
|
90 |
+
</a>
|
91 |
+
</th>
|
92 |
+
<th class="table_small_col">Edit</th>
|
93 |
+
<th class="table_small_col">Delete</th>
|
94 |
+
</tr>
|
95 |
+
<tr id="tr" style="background-color: #f9f9f9;">
|
96 |
+
<th></th>
|
97 |
+
<th></th>
|
98 |
+
<th>
|
99 |
+
<input type="text" class="input_th" id="ip" name="ip" onkeypress="return fm_check_isnum(event)">
|
100 |
+
<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');">
|
101 |
+
Add IP
|
102 |
+
<span></span>
|
103 |
+
</button>
|
104 |
+
</th>
|
105 |
+
<th>
|
106 |
+
|
107 |
+
</th>
|
108 |
+
<th></th>
|
109 |
+
</tr>
|
110 |
+
</thead>
|
111 |
+
<tbody id="tbody_arr">
|
112 |
+
<?php
|
113 |
+
if ($rows_data) {
|
114 |
+
foreach ($rows_data as $row_data) {
|
115 |
+
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
116 |
+
?>
|
117 |
+
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
118 |
+
<td class="table_small_col check-column" id="td_check_<?php echo $row_data->id; ?>" >
|
119 |
+
<input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" type="checkbox" />
|
120 |
+
</td>
|
121 |
+
<td class="table_small_col" id="td_id_<?php echo $row_data->id; ?>" ><?php echo $row_data->id; ?></td>
|
122 |
+
<td id="td_ip_<?php echo $row_data->id; ?>" >
|
123 |
+
<a class="pointer" id="ip<?php echo $row_data->id; ?>"
|
124 |
+
onclick="fm_edit_ip(<?php echo $row_data->id; ?>)"
|
125 |
+
title="Edit"><?php echo $row_data->ip; ?></a>
|
126 |
+
</td>
|
127 |
+
<td class="table_small_col" id="td_edit_<?php echo $row_data->id; ?>">
|
128 |
+
<button class="fm-icon edit-icon" onclick="fm_edit_ip(<?php echo $row_data->id; ?>);">
|
129 |
+
<span></span>
|
130 |
+
</button>
|
131 |
+
</td>
|
132 |
+
<td class="table_small_col" id="td_delete_<?php echo $row_data->id; ?>">
|
133 |
+
<button class="fm-icon delete-icon" onclick="if (confirm('Do you want to unblock selected IP?')) { fm_set_input_value('task', 'delete'); fm_set_input_value('current_id', <?php echo $row_data->id; ?>); fm_form_submit(event, 'blocked_ips'); } else {return false;}">
|
134 |
+
<span></span>
|
135 |
+
</button>
|
136 |
+
</td>
|
137 |
+
</tr>
|
138 |
+
<?php
|
139 |
+
$ids_string .= $row_data->id . ',';
|
140 |
+
}
|
141 |
+
}
|
142 |
+
?>
|
143 |
+
</tbody>
|
144 |
+
</table>
|
145 |
+
<input id="task" name="task" type="hidden" value="" />
|
146 |
+
<input id="current_id" name="current_id" type="hidden" value="" />
|
147 |
+
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>" />
|
148 |
+
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="<?php echo $asc_or_desc; ?>" />
|
149 |
+
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>" />
|
150 |
</form>
|
151 |
<?php
|
152 |
+
}
|
153 |
|
154 |
////////////////////////////////////////////////////////////////////////////////////////
|
155 |
// Getters & Setters //
|
admin/views/FMViewFeatured_plugins_fmc.php
DELETED
@@ -1,171 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class FMViewFeatured_plugins_fmc {
|
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 |
-
?>
|
27 |
-
<div id="main_featured_plugins_page">
|
28 |
-
<table align="center" width="90%" style="margin-top: 0px;border-bottom: rgb(111, 111, 111) solid 2px;">
|
29 |
-
<tr>
|
30 |
-
<td colspan="2" style="height: 70px;"><h3 style="margin: 0px;font-family:Segoe UI;padding-bottom: 15px;color: rgb(111, 111, 111); font-size:18pt;">Featured Plugins</h3></td>
|
31 |
-
<td></td>
|
32 |
-
</tr>
|
33 |
-
</table>
|
34 |
-
<form method="post">
|
35 |
-
<ul id="featured-plugins-list">
|
36 |
-
<li class="photo-gallery">
|
37 |
-
<div class="product">
|
38 |
-
<div class="title">
|
39 |
-
<strong class="heading">Photo Gallery</strong>
|
40 |
-
<p>WordPress Photo Gallery plugin</p>
|
41 |
-
</div>
|
42 |
-
</div>
|
43 |
-
<div class="description">
|
44 |
-
<p>Photo Gallery is a fully responsive WordPress Gallery plugin with advanced functionality.
|
45 |
-
It allows having different image galleries for your posts and pages, as well as different widgets.</p>
|
46 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html" class="download">Download</a>
|
47 |
-
</div>
|
48 |
-
</li>
|
49 |
-
<li class="spider-calendar">
|
50 |
-
<div class="product">
|
51 |
-
<div class="title">
|
52 |
-
<strong class="heading">Spider Calendar</strong>
|
53 |
-
<p>WordPress event calendar plugin</p>
|
54 |
-
</div>
|
55 |
-
</div>
|
56 |
-
<div class="description">
|
57 |
-
<p>Spider Event Calendar is a highly configurable product which allows you to have multiple organized events.</p>
|
58 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-calendar.html" class="download">Download</a>
|
59 |
-
</div>
|
60 |
-
</li>
|
61 |
-
<li class="catalog">
|
62 |
-
<div class="product">
|
63 |
-
<div class="title">
|
64 |
-
<strong class="heading">Spider Catalog</strong>
|
65 |
-
<p>WordPress product catalog plugin</p>
|
66 |
-
</div>
|
67 |
-
</div>
|
68 |
-
<div class="description">
|
69 |
-
<p>Spider Catalog for WordPress is a convenient tool for organizing the products represented on your website into catalogs.</p>
|
70 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-catalog.html" class="download">Download</a>
|
71 |
-
</div>
|
72 |
-
</li>
|
73 |
-
<li class="player">
|
74 |
-
<div class="product">
|
75 |
-
<div class="title">
|
76 |
-
<strong class="heading">Video Player</strong>
|
77 |
-
<p>WordPress Video player plugin</p>
|
78 |
-
</div>
|
79 |
-
</div>
|
80 |
-
<div class="description">
|
81 |
-
<p>Spider Video Player for WordPress is a Flash & HTML5 video player plugin that allows you to easily add videos to your website with the possibility</p>
|
82 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-player.html" class="download">Download</a>
|
83 |
-
</div>
|
84 |
-
</li>
|
85 |
-
<li class="contacts">
|
86 |
-
<div class="product">
|
87 |
-
<div class="title">
|
88 |
-
<strong class="heading">Spider Contacts</strong>
|
89 |
-
<p>Wordpress staff list plugin</p>
|
90 |
-
</div>
|
91 |
-
</div>
|
92 |
-
<div class="description">
|
93 |
-
<p>Spider Contacts helps you to display information about the group of people more intelligible, effective and convenient.</p>
|
94 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-contacts-plugin.html" class="download">Download</a>
|
95 |
-
</div>
|
96 |
-
</li>
|
97 |
-
<li class="facebook">
|
98 |
-
<div class="product">
|
99 |
-
<div class="title">
|
100 |
-
<strong class="heading">Spider Facebook</strong>
|
101 |
-
<p>WordPress Facebook plugin</p>
|
102 |
-
</div>
|
103 |
-
</div>
|
104 |
-
<div class="description">
|
105 |
-
<p>Spider Facebook is a WordPress integration tool for Facebook.It includes all the available Facebook social plugins and widgets to be added to your web</p>
|
106 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-facebook.html" class="download">Download</a>
|
107 |
-
</div>
|
108 |
-
</li>
|
109 |
-
<li class="twitter-widget">
|
110 |
-
<div class="product">
|
111 |
-
<div class="title">
|
112 |
-
<strong class="heading">Widget Twitter</strong>
|
113 |
-
<p>WordPress Widget Twitter plugin</p>
|
114 |
-
</div>
|
115 |
-
</div>
|
116 |
-
<div class="description">
|
117 |
-
<p>The Widget Twitter plugin lets you to fully integrate your WordPress site with your Twitter account.</p>
|
118 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-twitter-integration-plugin.html" class="download">Download</a>
|
119 |
-
</div>
|
120 |
-
</li>
|
121 |
-
<li class="faq">
|
122 |
-
<div class="product">
|
123 |
-
<div class="title">
|
124 |
-
<strong class="heading">Spider FAQ</strong>
|
125 |
-
<p>WordPress FAQ Plugin</p>
|
126 |
-
</div>
|
127 |
-
</div>
|
128 |
-
<div class="description">
|
129 |
-
<p>The Spider FAQ WordPress plugin is for creating an FAQ (Frequently Asked Questions) section for your website.</p>
|
130 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-faq-plugin.html" class="download">Download</a>
|
131 |
-
</div>
|
132 |
-
</li>
|
133 |
-
<li class="zoom">
|
134 |
-
<div class="product">
|
135 |
-
<div class="title">
|
136 |
-
<strong class="heading">Zoom</strong>
|
137 |
-
<p>WordPress text zoom plugin</p>
|
138 |
-
</div>
|
139 |
-
</div>
|
140 |
-
<div class="description">
|
141 |
-
<p>Zoom enables site users to resize the predefined areas of the web site.</p>
|
142 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-zoom.html" class="download">Download</a>
|
143 |
-
</div>
|
144 |
-
</li>
|
145 |
-
<li class="flash-calendar">
|
146 |
-
<div class="product">
|
147 |
-
<div class="title">
|
148 |
-
<strong class="heading">Flash Calendar</strong>
|
149 |
-
<p>WordPress flash calendar plugin</p>
|
150 |
-
</div>
|
151 |
-
</div>
|
152 |
-
<div class="description">
|
153 |
-
<p>Spider Flash Calendar is a highly configurable Flash calendar plugin which allows you to have multiple organized events.</p>
|
154 |
-
<a target="_blank" href="http://web-dorado.com/products/wordpress-events-calendar.html" class="download">Download</a>
|
155 |
-
</div>
|
156 |
-
</li>
|
157 |
-
</ul>
|
158 |
-
</form>
|
159 |
-
</div >
|
160 |
-
<?php
|
161 |
-
}
|
162 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
163 |
-
// Getters & Setters //
|
164 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
165 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
166 |
-
// Private Methods //
|
167 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
168 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
169 |
-
// Listeners //
|
170 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
171 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/views/FMViewFormMakerEditCSS_fmc.php
CHANGED
@@ -27,6 +27,7 @@ class FMViewFormMakerEditCSS_fmc {
|
|
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 |
<link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&dir=ltr&load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
|
32 |
<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">
|
@@ -43,59 +44,80 @@ class FMViewFormMakerEditCSS_fmc {
|
|
43 |
<link media="all" type="text/css" href="<?php echo WD_FMC_URL . '/css/codemirror.css'; ?>" rel="stylesheet">
|
44 |
|
45 |
<style>
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
</style>
|
53 |
|
54 |
-
<form id="fm_theme" class="wrap wp-core-ui" method="post" action="#" style="width: 99%;
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
</form>
|
88 |
<script>
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
</script>
|
100 |
<?php
|
101 |
die();
|
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&dir=ltr&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">
|
44 |
<link media="all" type="text/css" href="<?php echo WD_FMC_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();
|
admin/views/FMViewFormMakerPreview_fmc.php
CHANGED
@@ -66,7 +66,7 @@ class FMViewFormMakerPreview_fmc {
|
|
66 |
?>
|
67 |
<input type="hidden" id="counter<?php echo $id; ?>" value="" name="counter<?php echo $id; ?>" />
|
68 |
<script>
|
69 |
-
var
|
70 |
/*JURI_ROOT = '<?php echo WD_FMC_URL . '/js' ?>';*/
|
71 |
document.getElementById('form_preview').innerHTML = window.parent.document.getElementById('take').innerHTML;
|
72 |
document.getElementById('form_id_temppages').setAttribute('show_title', window.parent.document.getElementById('pages').getAttribute('show_title'));
|
66 |
?>
|
67 |
<input type="hidden" id="counter<?php echo $id; ?>" value="" name="counter<?php echo $id; ?>" />
|
68 |
<script>
|
69 |
+
var plugin_url = "<?php echo WD_FMC_URL; ?>";
|
70 |
/*JURI_ROOT = '<?php echo WD_FMC_URL . '/js' ?>';*/
|
71 |
document.getElementById('form_preview').innerHTML = window.parent.document.getElementById('take').innerHTML;
|
72 |
document.getElementById('form_id_temppages').setAttribute('show_title', window.parent.document.getElementById('pages').getAttribute('show_title'));
|
admin/views/FMViewFormcontactwdcaptcha.php
CHANGED
@@ -23,6 +23,7 @@ class FMViewFormcontactwdcaptcha {
|
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display() {
|
|
|
26 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formcontactwdcaptcha') {
|
27 |
$i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
|
28 |
$r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
|
@@ -55,7 +56,8 @@ class FMViewFormcontactwdcaptcha {
|
|
55 |
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
56 |
@session_start();
|
57 |
}
|
58 |
-
|
|
|
59 |
$canvas = imagecreatetruecolor($cap_width, $cap_height);
|
60 |
$c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
|
61 |
imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display() {
|
26 |
+
|
27 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formcontactwdcaptcha') {
|
28 |
$i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
|
29 |
$r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
|
56 |
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
57 |
@session_start();
|
58 |
}
|
59 |
+
|
60 |
+
$_SESSION[$i . '_wd_captcha_code'] = md5($code);
|
61 |
$canvas = imagecreatetruecolor($cap_width, $cap_height);
|
62 |
$c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
|
63 |
imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
|
admin/views/FMViewFormcontactwdmathcaptcha.php
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMViewFormcontactwdmathcaptcha {
|
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 |
+
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formcontactwdmathcaptcha') {
|
27 |
+
$i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
|
28 |
+
$r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
|
29 |
+
$rrr = (isset($_GET["rrr"]) ? (int) $_GET["rrr"] : 0);
|
30 |
+
$randNum = 0 + $r2 + $rrr;
|
31 |
+
$operations_count = ((isset($_GET["operations_count"]) && (int)$_GET["operations_count"]) ? ((int)$_GET["operations_count"] > 5 ? 5 : (int)$_GET["operations_count"]) : 1);
|
32 |
+
$operations = (isset($_GET["operations"]) ? str_replace('@', '+', $_GET["operations"]) : '+,-');
|
33 |
+
$operations = preg_replace('/\s+/', '', $operations);
|
34 |
+
$cap_width = 2*($operations_count+1) * 20 + 10;
|
35 |
+
$cap_height = 26;
|
36 |
+
$cap_quality = 100;
|
37 |
+
|
38 |
+
$code = $this->code_generic($operations_count, $operations);
|
39 |
+
if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
|
40 |
+
@session_start();
|
41 |
+
}
|
42 |
+
|
43 |
+
$_SESSION[$i . '_wd_arithmetic_captcha_code'] = md5($code[1]);
|
44 |
+
$canvas = imagecreatetruecolor($cap_width, $cap_height);
|
45 |
+
|
46 |
+
$c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
|
47 |
+
imagefilledrectangle($canvas, 0, 0, $cap_width, $cap_height, $c);
|
48 |
+
$code = $code[0];
|
49 |
+
$count = strlen($code);
|
50 |
+
$color_text = imagecolorallocate($canvas, 0, 0, 0);
|
51 |
+
for ($it = 0; $it < $count; $it++) {
|
52 |
+
$letter = $code[$it];
|
53 |
+
imagestring($canvas, 6, (10 * $it + 10), $cap_height / 4, $letter, $color_text);
|
54 |
+
}
|
55 |
+
for ($c = 0; $c < 150; $c++) {
|
56 |
+
$x = rand(0, $cap_width - 1);
|
57 |
+
$y = rand(0, 29);
|
58 |
+
$col = '0x' . rand(0, 9) . '0' . rand(0, 9) . '0' . rand(0, 9) . '0';
|
59 |
+
imagesetpixel($canvas, $x, $y, $col);
|
60 |
+
}
|
61 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
62 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
63 |
+
header('Cache-Control: post-check=0, pre-check=0', FALSE);
|
64 |
+
header('Pragma: no-cache');
|
65 |
+
header('Content-Type: image/jpeg');
|
66 |
+
imagejpeg($canvas, NULL, $cap_quality);
|
67 |
+
}
|
68 |
+
die('');
|
69 |
+
}
|
70 |
+
|
71 |
+
private function code_generic($_length, $_operations) {
|
72 |
+
$cap = '';
|
73 |
+
$dig = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
|
74 |
+
$valid_oprations = array('+', '-', '*', '/');
|
75 |
+
$operations_array = array_filter(explode(',', $_operations));
|
76 |
+
foreach($operations_array as $key => $operation) {
|
77 |
+
if(!in_array($operation, $valid_oprations))
|
78 |
+
unset($operations_array[$key]);
|
79 |
+
}
|
80 |
+
|
81 |
+
for($k=0; $k <= $_length; $k++) {
|
82 |
+
if(substr($cap, -1) == '/' ) {
|
83 |
+
$operations_array = array_diff($operations_array, array('/'));
|
84 |
+
$num_divisors = $this->arrayOfNumberDivisors(substr($cap, -2, 1));
|
85 |
+
$cap .= $num_divisors[array_rand($num_divisors)];
|
86 |
+
}
|
87 |
+
else
|
88 |
+
$cap .= $dig[array_rand($dig)];
|
89 |
+
|
90 |
+
if($k != $_length)
|
91 |
+
$cap .= $operations_array[array_rand($operations_array)];
|
92 |
+
}
|
93 |
+
$pass = eval('return '.$cap.';');
|
94 |
+
if($pass < 0)
|
95 |
+
return $this->code_generic($_length, $_operations);
|
96 |
+
$cap .= '=';
|
97 |
+
$cap = implode(' ',str_split($cap));
|
98 |
+
|
99 |
+
return array($cap, $pass);
|
100 |
+
}
|
101 |
+
|
102 |
+
public function arrayOfNumberDivisors($x) {
|
103 |
+
$divisors = array ();
|
104 |
+
if($x == 0)
|
105 |
+
$divisors[] = rand(1, 9);
|
106 |
+
|
107 |
+
for($i = 1; $i <= $x; $i ++) {
|
108 |
+
if ($x % $i == 0) {
|
109 |
+
$divisors [] = $i;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
return $divisors;
|
113 |
+
}
|
114 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
115 |
+
// Getters & Setters //
|
116 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
117 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
118 |
+
// Private Methods //
|
119 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
120 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
121 |
+
// Listeners //
|
122 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
123 |
+
}
|
admin/views/FMViewFromeditcountryinpopup_fmc.php
CHANGED
@@ -1,141 +1,185 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class
|
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 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class FMViewFromeditcountryinpopup_fmc {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $model;
|
14 |
+
|
15 |
+
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
// Constructor & Destructor //
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
public function __construct($model) {
|
20 |
+
$this->model = $model;
|
21 |
+
}
|
22 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
+
// Public Methods //
|
24 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function display() {
|
26 |
+
$id = ((isset($_GET['field_id'])) ? esc_html(stripslashes($_GET['field_id'])) : 0);
|
27 |
+
wp_print_scripts('jquery');
|
28 |
+
wp_print_scripts('jquery-ui-core');
|
29 |
+
wp_print_scripts('jquery-ui-widget');
|
30 |
+
wp_print_scripts('jquery-ui-mouse');
|
31 |
+
wp_print_scripts('jquery-ui-slider');
|
32 |
+
wp_print_scripts('jquery-ui-sortable');
|
33 |
+
|
34 |
+
?>
|
35 |
+
<style>
|
36 |
+
.country-list {
|
37 |
+
padding:10px 0;
|
38 |
+
}
|
39 |
+
|
40 |
+
.country-list ul {
|
41 |
+
font-family: Segoe UI !important;
|
42 |
+
font-size:13px;
|
43 |
+
}
|
44 |
+
.country-list > div {
|
45 |
+
display:inline-block;
|
46 |
+
}
|
47 |
+
|
48 |
+
.save-cancel {
|
49 |
+
float:right;
|
50 |
+
}
|
51 |
+
|
52 |
+
.fm-select-remove {
|
53 |
+
background: #4EC0D9;
|
54 |
+
width: 78px;
|
55 |
+
height: 32px;
|
56 |
+
border: 1px solid #4EC0D9;
|
57 |
+
border-radius: 6px;
|
58 |
+
color: #fff;
|
59 |
+
cursor:pointer;
|
60 |
+
}
|
61 |
+
|
62 |
+
.fm-select-remove.large {
|
63 |
+
width: 90px;
|
64 |
+
}
|
65 |
+
</style>
|
66 |
+
<div class="country-list">
|
67 |
+
<div class="select-remove">
|
68 |
+
<button class="fm-select-remove large" onclick="select_all(); return false;">
|
69 |
+
Select all
|
70 |
+
<span></span>
|
71 |
+
</button>
|
72 |
+
<button class="fm-select-remove large" onclick="remove_all(); return false;">
|
73 |
+
Remove all
|
74 |
+
<span></span>
|
75 |
+
</button>
|
76 |
+
</div>
|
77 |
+
<div class="save-cancel">
|
78 |
+
<button class="fm-select-remove" onclick="save_list(); return false;">
|
79 |
+
Save
|
80 |
+
<span></span>
|
81 |
+
</button>
|
82 |
+
</div>
|
83 |
+
<ul id="countries_list" style="list-style: none; padding: 0px;"></ul>
|
84 |
+
</div>
|
85 |
+
<script>
|
86 |
+
selec_coutries = [];
|
87 |
+
coutries = ["", "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "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"];
|
88 |
+
select_ = window.parent.document.getElementById('<?php echo $id ?>_elementform_id_temp');
|
89 |
+
n = select_.childNodes.length;
|
90 |
+
for (i = 0; i < n; i++) {
|
91 |
+
selec_coutries.push(select_.childNodes[i].value);
|
92 |
+
var ch = document.createElement('input');
|
93 |
+
ch.setAttribute("type", "checkbox");
|
94 |
+
ch.setAttribute("checked", "checked");
|
95 |
+
ch.value = select_.childNodes[i].value;
|
96 |
+
ch.id = i + "ch";
|
97 |
+
|
98 |
+
var p = document.createElement('span');
|
99 |
+
p.style.cssText = "color:#000000; font-size: 13px; cursor:move";
|
100 |
+
p.innerHTML = select_.childNodes[i].value;
|
101 |
+
var li = document.createElement('li');
|
102 |
+
li.style.cssText = "margin:3px; vertical-align:middle";
|
103 |
+
li.id = i;
|
104 |
+
li.appendChild(ch);
|
105 |
+
li.appendChild(p);
|
106 |
+
document.getElementById('countries_list').appendChild(li);
|
107 |
+
}
|
108 |
+
cur = i;
|
109 |
+
m = coutries.length;
|
110 |
+
for (i = 0; i < m; i++) {
|
111 |
+
isin = isValueInArray(selec_coutries, coutries[i]);
|
112 |
+
if (!isin) {
|
113 |
+
var ch = document.createElement('input');
|
114 |
+
ch.setAttribute("type", "checkbox");
|
115 |
+
ch.value = coutries[i];
|
116 |
+
ch.id = cur + "ch";
|
117 |
+
|
118 |
+
var p = document.createElement('span');
|
119 |
+
p.style.cssText = "color:#000000; font-size: 13px; cursor:move";
|
120 |
+
p.innerHTML = coutries[i];
|
121 |
+
var li = document.createElement('li');
|
122 |
+
li.style.cssText = "margin:3px; vertical-align:middle";
|
123 |
+
li.id = cur;
|
124 |
+
li.appendChild(ch);
|
125 |
+
li.appendChild(p);
|
126 |
+
document.getElementById('countries_list').appendChild(li);
|
127 |
+
cur++;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
jQuery(function () {
|
131 |
+
jQuery("#countries_list").sortable();
|
132 |
+
jQuery("#countries_list").disableSelection();
|
133 |
+
});
|
134 |
+
|
135 |
+
function isValueInArray(arr, val) {
|
136 |
+
inArray = false;
|
137 |
+
for (x = 0; x < arr.length; x++) {
|
138 |
+
if (val == arr[x]) {
|
139 |
+
inArray = true;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
return inArray;
|
143 |
+
}
|
144 |
+
function save_list() {
|
145 |
+
select_.innerHTML = ""
|
146 |
+
ul = document.getElementById('countries_list');
|
147 |
+
n = ul.childNodes.length;
|
148 |
+
for (i = 0; i < n; i++) {
|
149 |
+
if (ul.childNodes[i].tagName == "LI") {
|
150 |
+
id = ul.childNodes[i].id;
|
151 |
+
if (document.getElementById(id + 'ch').checked) {
|
152 |
+
var option_ = document.createElement('option');
|
153 |
+
option_.setAttribute("value", document.getElementById(id + 'ch').value);
|
154 |
+
option_.innerHTML = document.getElementById(id + 'ch').value;
|
155 |
+
select_.appendChild(option_);
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
window.parent.tb_remove();
|
160 |
+
}
|
161 |
+
function select_all() {
|
162 |
+
for (i = 0; i < 194; i++) {
|
163 |
+
document.getElementById(i + 'ch').checked = true;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
function remove_all() {
|
167 |
+
for (i = 0; i < 194; i++) {
|
168 |
+
document.getElementById(i + 'ch').checked = false;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
</script>
|
172 |
+
<?php
|
173 |
+
die();
|
174 |
+
}
|
175 |
+
|
176 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
177 |
+
// Getters & Setters //
|
178 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
179 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
180 |
+
// Private Methods //
|
181 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
182 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
183 |
+
// Listeners //
|
184 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
185 |
}
|
admin/views/FMViewFromipinfoinpopup_fmc.php
CHANGED
@@ -89,7 +89,6 @@ class FMViewFromipinfoinpopup_fmc {
|
|
89 |
die();
|
90 |
}
|
91 |
|
92 |
-
|
93 |
////////////////////////////////////////////////////////////////////////////////////////
|
94 |
// Getters & Setters //
|
95 |
////////////////////////////////////////////////////////////////////////////////////////
|
89 |
die();
|
90 |
}
|
91 |
|
|
|
92 |
////////////////////////////////////////////////////////////////////////////////////////
|
93 |
// Getters & Setters //
|
94 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/views/FMViewGenerete_csv_fmc.php
CHANGED
@@ -22,38 +22,66 @@ class FMViewGenerete_csv_fmc {
|
|
22 |
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
// Getters & Setters //
|
22 |
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function display() {
|
26 |
+
$fmc_settings = get_option('fmc_settings');
|
27 |
+
$csv_delimiter = isset($fmc_settings['csv_delimiter']) ? $fmc_settings['csv_delimiter'] : ',';
|
28 |
+
$form_id = (int)$_REQUEST['form_id'];
|
29 |
+
$params = $this->model->get_data();
|
30 |
+
$limitstart = (int)$_REQUEST['limitstart'];
|
31 |
+
$send_header = (int)$_REQUEST['send_header'];
|
32 |
+
$data = $params[0];
|
33 |
+
$title = $params[1];
|
34 |
+
$is_paypal_info = $params[2];
|
35 |
+
|
36 |
+
$all_keys = array();
|
37 |
+
foreach ($data as $row) {
|
38 |
+
$all_keys = array_merge($all_keys, $row);
|
39 |
+
}
|
40 |
+
|
41 |
+
$keys_array = array_keys($all_keys);
|
42 |
+
foreach ($data as $key => $row) {
|
43 |
+
foreach ($keys_array as $key1 => $value) {
|
44 |
+
if(!array_key_exists ( $value , $row ))
|
45 |
+
array_splice($row, $key1, 0, '');
|
46 |
+
}
|
47 |
+
$data[$key] = $row;
|
48 |
+
}
|
49 |
+
|
50 |
+
$upload_dir = wp_upload_dir();
|
51 |
+
$file_path = $upload_dir['basedir'] . '/form-maker';
|
52 |
+
if (!is_dir($file_path)) {
|
53 |
+
mkdir($file_path, 0777);
|
54 |
+
}
|
55 |
+
$tempfile = $file_path.'/export'.$form_id.'.txt';
|
56 |
+
if($limitstart == 0 && file_exists ($tempfile))
|
57 |
+
unlink($tempfile);
|
58 |
+
|
59 |
+
$output = fopen($tempfile, "a");
|
60 |
+
if($limitstart == 0) {
|
61 |
+
fputcsv($output, str_replace('PAYPAL_', '', $keys_array), $csv_delimiter);
|
62 |
+
}
|
63 |
+
|
64 |
+
foreach ($data as $record) {
|
65 |
+
fputcsv($output, $record, $csv_delimiter);
|
66 |
+
}
|
67 |
+
fclose($output);
|
68 |
+
|
69 |
+
if($send_header == 1){
|
70 |
+
$txtfile = fopen($tempfile, "r");
|
71 |
+
$txtfilecontent = fread($txtfile, filesize($tempfile));
|
72 |
+
fclose($txtfile);
|
73 |
+
|
74 |
+
$filename = $title . "_" . date('Ymd') . ".csv";
|
75 |
+
header('Content-Encoding: Windows-1252');
|
76 |
+
header('Content-type: text/csv; charset=Windows-1252');
|
77 |
+
header("Content-Disposition: attachment; filename=\"$filename\"");
|
78 |
+
|
79 |
+
echo $txtfilecontent;
|
80 |
+
unlink($tempfile);
|
81 |
+
die();
|
82 |
+
}
|
83 |
+
|
84 |
+
}
|
85 |
|
86 |
////////////////////////////////////////////////////////////////////////////////////////
|
87 |
// Getters & Setters //
|
admin/views/FMViewGenerete_xml_fmc.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class FMViewGenerete_xml_fmc{
|
4 |
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
// Events //
|
6 |
////////////////////////////////////////////////////////////////////////////////////////
|
@@ -23,36 +23,55 @@ class FMViewGenerete_xml_fmc{
|
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display() {
|
26 |
-
|
|
|
|
|
|
|
27 |
$data = $params[0];
|
28 |
$title = $params[1];
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
////////////////////////////////////////////////////////////////////////////////////////
|
1 |
<?php
|
2 |
|
3 |
+
class FMViewGenerete_xml_fmc {
|
4 |
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
// Events //
|
6 |
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display() {
|
26 |
+
$form_id = (int)$_REQUEST['form_id'];
|
27 |
+
$params = $this->model->get_data();
|
28 |
+
$limitstart = (int)$_REQUEST['limitstart'];
|
29 |
+
$send_header = (int)$_REQUEST['send_header'];
|
30 |
$data = $params[0];
|
31 |
$title = $params[1];
|
32 |
+
define('PHP_TAB', "\t");
|
33 |
+
|
34 |
+
$upload_dir = wp_upload_dir();
|
35 |
+
$file_path = $upload_dir['basedir'] . '/form-maker';
|
36 |
+
if (!is_dir($file_path)) {
|
37 |
+
mkdir($file_path, 0777);
|
38 |
+
}
|
39 |
+
$tempfile = $file_path.'/export'.$form_id.'.txt';
|
40 |
+
if($limitstart == 0 && file_exists ($tempfile))
|
41 |
+
unlink($tempfile);
|
42 |
+
$output = fopen($tempfile, "a");
|
43 |
+
if($limitstart == 0) {
|
44 |
+
fwrite($output, '<?xml version="1.0" encoding="utf-8" ?>'.PHP_EOL);
|
45 |
+
fwrite($output, '<form title="'.$title.'">'.PHP_EOL);
|
46 |
+
}
|
47 |
+
|
48 |
+
foreach ($data as $key1 => $value1) {
|
49 |
+
fwrite($output, PHP_TAB.'<submission id="'.$key1.'">'.PHP_EOL);
|
50 |
+
foreach ($value1 as $key => $value) {
|
51 |
+
fwrite($output, PHP_TAB.PHP_TAB.'<field title="'.$key.'">'.PHP_EOL);
|
52 |
+
fwrite($output, PHP_TAB.PHP_TAB.PHP_TAB.'<![CDATA['.$value.']]>'.PHP_EOL);
|
53 |
+
fwrite($output, PHP_TAB.PHP_TAB.'</field>'.PHP_EOL);
|
54 |
+
}
|
55 |
+
fwrite($output, PHP_TAB.'</submission>'.PHP_EOL);
|
56 |
+
}
|
57 |
+
|
58 |
+
if($send_header == 1){
|
59 |
+
fwrite($output, '</form>');
|
60 |
+
fclose($output);
|
61 |
+
|
62 |
+
$txtfile = fopen($tempfile, "r");
|
63 |
+
$txtfilecontent = fread($txtfile, filesize($tempfile));
|
64 |
+
fclose($txtfile);
|
65 |
+
$filename = $title . "_" . date('Ymd') . ".xml";
|
66 |
+
header('Content-Encoding: Windows-1252');
|
67 |
+
header('Content-type: text/xml; charset=utf-8');
|
68 |
+
header("Content-Disposition: attachment; filename=\"$filename\"");
|
69 |
+
|
70 |
+
echo $txtfilecontent;
|
71 |
+
unlink($tempfile);
|
72 |
+
die();
|
73 |
+
}
|
74 |
+
|
75 |
}
|
76 |
|
77 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/views/FMViewGoptions_fmc.php
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class FMViewGoptions_fmc {
|
3 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
4 |
+
// Events //
|
5 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
// Constants //
|
8 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
// Variables //
|
11 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
12 |
+
private $model;
|
13 |
+
|
14 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
15 |
+
// Constructor & Destructor //
|
16 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
+
public function __construct($model) {
|
18 |
+
$this->model = $model;
|
19 |
+
}
|
20 |
+
|
21 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
22 |
+
// Public Methods //
|
23 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
+
public function display() {
|
25 |
+
$fmc_settings = get_option('fmc_settings');
|
26 |
+
$public_key = isset($fmc_settings['public_key']) ? $fmc_settings['public_key'] : '';
|
27 |
+
$private_key = isset($fmc_settings['private_key']) ? $fmc_settings['private_key'] : '';
|
28 |
+
$csv_delimiter = isset($fmc_settings['csv_delimiter']) ? $fmc_settings['csv_delimiter'] : ',';
|
29 |
+
?>
|
30 |
+
<div class="fm-user-manual">
|
31 |
+
This section allows you to edit form settings.
|
32 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
33 |
+
</div>
|
34 |
+
<div class="fm-upgrade-pro">
|
35 |
+
<a target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
36 |
+
<div class="fm-upgrade-img">
|
37 |
+
UPGRADE TO PRO VERSION
|
38 |
+
<span></span>
|
39 |
+
</div>
|
40 |
+
</a>
|
41 |
+
</div>
|
42 |
+
<div class="fm-clear"></div>
|
43 |
+
<form class="wrap" method="post" action="admin.php?page=goptions_fmc" style="width:99%;">
|
44 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
45 |
+
<div class="fm-page-header">
|
46 |
+
<div class="fm-page-title">
|
47 |
+
Form Settings
|
48 |
+
</div>
|
49 |
+
<div class="fm-page-actions">
|
50 |
+
<button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Title')) {return false;}; fm_set_input_value('task', 'save');">
|
51 |
+
<span></span>
|
52 |
+
Save
|
53 |
+
</button>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<table style="clear:both;">
|
58 |
+
<tbody>
|
59 |
+
<tr>
|
60 |
+
<td>
|
61 |
+
<label for="public_key">Recaptcha Public Key:</label>
|
62 |
+
</td>
|
63 |
+
<td>
|
64 |
+
<input type="text" id="public_key" name="public_key" value="<?php echo $public_key; ?>" style="width:250px;" />
|
65 |
+
</td>
|
66 |
+
</tr>
|
67 |
+
<tr>
|
68 |
+
<td>
|
69 |
+
<label for="private_key">Recaptcha Private Key:</label>
|
70 |
+
</td>
|
71 |
+
<td>
|
72 |
+
<input type="text" id="private_key" name="private_key" value="<?php echo $private_key; ?>" style="width:250px;" />
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
+
<tr>
|
76 |
+
<td>
|
77 |
+
<label for="csv_delimiter">CSV Delimiter:</label>
|
78 |
+
</td>
|
79 |
+
<td>
|
80 |
+
<input type="text" id="csv_delimiter" name="csv_delimiter" value="<?php echo $csv_delimiter; ?>" style="width:50px;" />
|
81 |
+
</td>
|
82 |
+
</tr>
|
83 |
+
</tbody>
|
84 |
+
</table>
|
85 |
+
<input type="hidden" id="task" name="task" value=""/>
|
86 |
+
</form>
|
87 |
+
<?php
|
88 |
+
}
|
89 |
+
|
90 |
+
|
91 |
+
|
92 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
93 |
+
// Getters & Setters //
|
94 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
95 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
96 |
+
// Private Methods //
|
97 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
98 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
99 |
+
// Listeners //
|
100 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
101 |
+
}
|
admin/views/FMViewLicensing_fmc.php
CHANGED
@@ -23,13 +23,47 @@ class FMViewLicensing_fmc {
|
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display() {
|
|
|
|
|
26 |
?>
|
27 |
<div style="width:99%">
|
28 |
-
<
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
<br/><br/>
|
32 |
-
<p>After
|
33 |
<ol>
|
34 |
<li>Deactivate Contact Form Maker Plugin.</li>
|
35 |
<li>Delete Contact Form Maker Plugin.</li>
|
@@ -38,7 +72,9 @@ class FMViewLicensing_fmc {
|
|
38 |
<br/>
|
39 |
<p>If you enjoy using Contact 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>
|
40 |
<br/>
|
41 |
-
<a href="
|
|
|
|
|
42 |
</div>
|
43 |
<?php
|
44 |
}
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
public function display() {
|
26 |
+
wp_register_style('fm_license', WD_FMC_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: right; text-align: right;">
|
59 |
+
<a style="text-decoration: none;" target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
60 |
+
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FMC_URL . '/images/wd_logo.png'; ?>" />
|
61 |
+
</a>
|
62 |
+
</div>
|
63 |
+
<div style="float: left; clear: both;">
|
64 |
+
<a href="https://web-dorado.com/files/fromContactForm.php" class="button-primary" target="_blank">Purchase a License</a>
|
65 |
<br/><br/>
|
66 |
+
<p>After purchasing the commercial version follow these steps:</p>
|
67 |
<ol>
|
68 |
<li>Deactivate Contact Form Maker Plugin.</li>
|
69 |
<li>Delete Contact Form Maker Plugin.</li>
|
72 |
<br/>
|
73 |
<p>If you enjoy using Contact 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>
|
74 |
<br/>
|
75 |
+
<a href="https://web-dorado.com/files/donate_redirect.php" target="_blank">
|
76 |
+
<div class="fm-get-pro"></div>
|
77 |
+
</a>
|
78 |
</div>
|
79 |
<?php
|
80 |
}
|
admin/views/FMViewManage_fmc.php
CHANGED
@@ -22,133 +22,1242 @@ class FMViewManage_fmc {
|
|
22 |
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
-
public function
|
149 |
// header("X-XSS-Protection: 0");
|
150 |
-
$row = $this->model->
|
151 |
-
$themes = $this->model->get_theme_rows_data();
|
152 |
$labels = array();
|
153 |
$label_id = array();
|
154 |
$label_order_original = array();
|
@@ -165,92 +1274,65 @@ class FMViewManage_fmc {
|
|
165 |
$labels['id'] = '"' . implode('","', $label_id) . '"';
|
166 |
$labels['label'] = '"' . implode('","', $label_order_original) . '"';
|
167 |
$labels['type'] = '"' . implode('","', $label_type) . '"';
|
|
|
168 |
$page_title = (($id != 0) ? 'Edit form ' . $row->title : 'Create new form');
|
169 |
?>
|
170 |
<script type="text/javascript">
|
171 |
-
var
|
172 |
</script>
|
173 |
-
<script src="<?php echo WD_FMC_URL . '/js/
|
174 |
<script type="text/javascript">
|
175 |
-
form_view = 1;
|
176 |
-
form_view_count = 1;
|
177 |
-
form_view_max = 1;
|
178 |
function submitbutton() {
|
179 |
-
<?php
|
180 |
-
if ($id) {
|
181 |
-
?>
|
182 |
if (!document.getElementById('araqel') || (document.getElementById('araqel').value == '0')) {
|
183 |
alert('Please wait while page loading.');
|
184 |
return false;
|
185 |
}
|
186 |
-
<?php
|
187 |
-
}
|
188 |
-
?>
|
189 |
tox = '';
|
190 |
-
form_fields = '';
|
191 |
-
document.getElementById('take').style.display = "none";
|
192 |
-
document.getElementById('page_bar').style.display = "none";
|
193 |
-
document.getElementById('saving').style.display = "block";
|
194 |
-
jQuery('.wdform_section').each(function() {
|
195 |
-
var this2 = this;
|
196 |
-
jQuery(this2).find('.wdform_column').each(function() {
|
197 |
-
if(!jQuery(this).html() && jQuery(this2).children().length>1)
|
198 |
-
jQuery(this).remove();
|
199 |
-
});
|
200 |
-
});
|
201 |
-
remove_whitespace(document.getElementById('take'));
|
202 |
l_id_array = [<?php echo $labels['id']?>];
|
203 |
l_label_array = [<?php echo $labels['label']?>];
|
204 |
l_type_array = [<?php echo $labels['type']?>];
|
205 |
l_id_removed = [];
|
206 |
-
for (x
|
207 |
-
l_id_removed[l_id_array[x]]
|
208 |
}
|
209 |
-
for (t
|
210 |
-
if (document.getElementById('form_id_tempform_view'
|
211 |
-
|
212 |
-
|
213 |
-
n
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
for (y=0; y <
|
221 |
-
is_in_old
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
}
|
226 |
-
wdid = wdform_row.getAttribute("wdid");
|
227 |
-
if (!wdid) {
|
228 |
-
continue;
|
229 |
-
}
|
230 |
-
l_id = wdid;
|
231 |
-
l_label = document.getElementById(wdid + '_element_labelform_id_temp').innerHTML;
|
232 |
l_label = l_label.replace(/(\r\n|\n|\r)/gm," ");
|
233 |
-
|
234 |
for (z = 0; z < l_id_array.length; z++) {
|
235 |
-
if (l_id_array[z] ==
|
236 |
if (l_type_array[z] == "type_address") {
|
237 |
if (document.getElementById(l_id + "_mini_label_street1")) {
|
238 |
l_id_removed[l_id_array[z]] = false;
|
239 |
}
|
240 |
-
if (document.getElementById(l_id
|
241 |
l_id_removed[parseInt(l_id_array[z]) + 1] = false;
|
242 |
}
|
243 |
-
if (document.getElementById(l_id
|
244 |
l_id_removed[parseInt(l_id_array[z]) + 2] = false;
|
245 |
}
|
246 |
-
if (document.getElementById(l_id
|
247 |
l_id_removed[parseInt(l_id_array[z]) + 3] = false;
|
248 |
}
|
249 |
if (document.getElementById(l_id+"_mini_label_postal")) {
|
250 |
l_id_removed[parseInt(l_id_array[z]) + 4] = false;
|
251 |
}
|
252 |
if (document.getElementById(l_id+"_mini_label_country")) {
|
253 |
-
l_id_removed[parseInt(l_id_array[z]) + 5] = false;
|
254 |
}
|
255 |
z = z + 5;
|
256 |
}
|
@@ -259,92 +1341,29 @@ class FMViewManage_fmc {
|
|
259 |
}
|
260 |
}
|
261 |
}
|
262 |
-
if (
|
263 |
-
addr_id
|
264 |
-
id_for_country
|
265 |
-
if
|
266 |
-
tox
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
if
|
272 |
-
tox
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
if (document.getElementById(id_for_country + "_mini_label_postal"))
|
278 |
-
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_postal").innerHTML + '#**label**#type_address#****#';
|
279 |
-
addr_id++;
|
280 |
-
if (document.getElementById(id_for_country+"_mini_label_country")) {
|
281 |
-
tox=tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_country").innerHTML + '#**label**#type_address#****#';
|
282 |
-
}
|
283 |
-
}
|
284 |
-
else {
|
285 |
-
tox = tox + wdid + '#**id**#' + l_label + '#**label**#' + wdtype + '#****#';
|
286 |
-
}
|
287 |
-
id = wdid;
|
288 |
-
form_fields += wdid + "*:*id*:*";
|
289 |
-
form_fields += wdtype + "*:*type*:*";
|
290 |
-
w_choices = new Array();
|
291 |
-
w_choices_checked = new Array();
|
292 |
-
w_choices_disabled = new Array();
|
293 |
-
w_allow_other_num = 0;
|
294 |
-
w_property = new Array();
|
295 |
-
w_property_type = new Array();
|
296 |
-
w_property_values = new Array();
|
297 |
-
w_choices_price = new Array();
|
298 |
-
if (document.getElementById(id+'_element_labelform_id_temp').innerHTML) {
|
299 |
-
w_field_label = document.getElementById(id + '_element_labelform_id_temp').innerHTML.replace(/(\r\n|\n|\r)/gm," ");
|
300 |
}
|
301 |
else {
|
302 |
-
|
303 |
-
}
|
304 |
-
if (document.getElementById(id + '_label_sectionform_id_temp')) {
|
305 |
-
if (document.getElementById(id + '_label_sectionform_id_temp').style.display == "block") {
|
306 |
-
w_field_label_pos = "top";
|
307 |
-
}
|
308 |
-
else {
|
309 |
-
w_field_label_pos = "left";
|
310 |
-
}
|
311 |
-
}
|
312 |
-
if (document.getElementById(id + "_elementform_id_temp")) {
|
313 |
-
s = document.getElementById(id + "_elementform_id_temp").style.width;
|
314 |
-
w_size=s.substring(0,s.length - 2);
|
315 |
-
}
|
316 |
-
if (document.getElementById(id + "_label_sectionform_id_temp")) {
|
317 |
-
s = document.getElementById(id + "_label_sectionform_id_temp").style.width;
|
318 |
-
w_field_label_size = s.substring(0, s.length - 2);
|
319 |
-
}
|
320 |
-
if (document.getElementById(id + "_requiredform_id_temp")) {
|
321 |
-
w_required = document.getElementById(id + "_requiredform_id_temp").value;
|
322 |
-
}
|
323 |
-
if (document.getElementById(id + "_uniqueform_id_temp")) {
|
324 |
-
w_unique = document.getElementById(id + "_uniqueform_id_temp").value;
|
325 |
-
}
|
326 |
-
if (document.getElementById(id + '_label_sectionform_id_temp')) {
|
327 |
-
w_class = document.getElementById(id + '_label_sectionform_id_temp').getAttribute("class");
|
328 |
-
if (!w_class) {
|
329 |
-
w_class = "";
|
330 |
-
}
|
331 |
}
|
332 |
-
gen_form_fields();
|
333 |
-
wdform_row.innerHTML = "%" + id + " - " + l_label + "%";
|
334 |
}
|
335 |
}
|
336 |
}
|
337 |
}
|
338 |
-
else {
|
339 |
-
id = wdform_page.childNodes[q].getAttribute("wdid");
|
340 |
-
w_editor = document.getElementById(id + "_element_sectionform_id_temp").innerHTML;
|
341 |
-
form_fields += id + "*:*id*:*";
|
342 |
-
form_fields += "type_section_break" + "*:*type*:*";
|
343 |
-
form_fields += "custom_" + id + "*:*w_field_label*:*";
|
344 |
-
form_fields += w_editor + "*:*w_editor*:*";
|
345 |
-
form_fields += "*:*new_field*:*";
|
346 |
-
wdform_page.childNodes[q].innerHTML = "%" + id + " - " + "custom_" + id + "%";
|
347 |
-
}
|
348 |
}
|
349 |
}
|
350 |
}
|
@@ -355,8 +1374,7 @@ class FMViewManage_fmc {
|
|
355 |
}
|
356 |
}
|
357 |
document.getElementById('label_order').value = tox;
|
358 |
-
|
359 |
-
refresh_();
|
360 |
document.getElementById('pagination').value=document.getElementById('pages').getAttribute("type");
|
361 |
document.getElementById('show_title').value=document.getElementById('pages').getAttribute("show_title");
|
362 |
document.getElementById('show_numbers').value=document.getElementById('pages').getAttribute("show_numbers");
|
@@ -368,7 +1386,7 @@ class FMViewManage_fmc {
|
|
368 |
function enable() {
|
369 |
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
370 |
for (x = 0; x < 14; x++) {
|
371 |
-
document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FMC_URL . '/images/'; ?>" + alltypes[x] + ".png";
|
372 |
}
|
373 |
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
374 |
jQuery('#formMakerDiv').slideToggle(200);
|
@@ -376,9 +1394,7 @@ class FMViewManage_fmc {
|
|
376 |
else {
|
377 |
jQuery('#formMakerDiv').slideToggle(400);
|
378 |
}
|
379 |
-
|
380 |
-
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
381 |
-
}
|
382 |
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
383 |
jQuery('#formMakerDiv1').slideToggle(200);
|
384 |
}
|
@@ -391,7 +1407,7 @@ class FMViewManage_fmc {
|
|
391 |
function enable2() {
|
392 |
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
393 |
for (x = 0; x < 14; x++) {
|
394 |
-
document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FMC_URL . '/images/'; ?>" + alltypes[x] + ".png";
|
395 |
}
|
396 |
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
397 |
jQuery('#formMakerDiv').slideToggle(200);
|
@@ -399,9 +1415,7 @@ class FMViewManage_fmc {
|
|
399 |
else {
|
400 |
jQuery('#formMakerDiv').slideToggle(400);
|
401 |
}
|
402 |
-
|
403 |
-
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
404 |
-
}
|
405 |
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
406 |
jQuery('#formMakerDiv1').slideToggle(200);
|
407 |
}
|
@@ -417,58 +1431,51 @@ class FMViewManage_fmc {
|
|
417 |
}
|
418 |
}
|
419 |
</script>
|
420 |
-
|
421 |
-
<div style="float:left; font-size: 14px; font-weight: bold;">
|
422 |
This section allows you to add fields to your form.
|
423 |
-
<a style="color: blue; text-decoration: none;" target="_blank" href="
|
424 |
-
</div>
|
425 |
-
<div style="float: right; text-align: right;">
|
426 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromContactForm.php">
|
427 |
-
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FMC_URL . '/images/wd_logo.png'; ?>" />
|
428 |
-
</a>
|
429 |
</div>
|
430 |
-
|
431 |
-
<form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fmc" style="float: left; width: 99%;">
|
432 |
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
433 |
<h2><?php echo $page_title; ?></h2>
|
434 |
<div style="float: right; margin: 0 5px 0 0;">
|
435 |
-
<
|
436 |
-
|
|
|
|
|
437 |
<?php
|
438 |
if ($id) {
|
439 |
?>
|
440 |
-
<input class="button-secondary" type="submit" onclick="if (
|
441 |
<?php
|
442 |
}
|
443 |
?>
|
444 |
-
<input class="button-secondary" type="submit" onclick="if (
|
445 |
-
<input class="button-secondary" type="submit" onclick="if (
|
446 |
-
<input class="button-secondary" type="submit" onclick="
|
447 |
</div>
|
448 |
|
449 |
<div class="formmaker_table" width="100%">
|
450 |
-
<div style="float: left; text-align:
|
451 |
-
<
|
452 |
-
<
|
453 |
-
<span class="cfm_logo cfm_black">Maker</span><br /><br />
|
454 |
-
<img src="<?php echo WD_FMC_URL . '/images/logo.png'; ?>" />
|
455 |
</div>
|
456 |
<div style="float:right">
|
457 |
<span style="font-size: 16.76pt; font-family: tahoma; color: #FFFFFF; vertical-align: middle;">Form title: </span>
|
458 |
<input id="title" name="title" class="form_maker_title" value="<?php echo $row->title; ?>"/>
|
459 |
<br />
|
460 |
-
<img src="<?php echo WD_FMC_URL . '/images/formoptions.png'; ?>" onclick="if (
|
461 |
<br /><br /><br />
|
462 |
-
<img src="<?php echo WD_FMC_URL . '/images/addanewfield.png'; ?>" onclick="
|
463 |
</div>
|
464 |
</div>
|
465 |
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
<tr valign="top">
|
473 |
<td width="15%" height="100%" style="border-right: dotted black 1px;" id="field_types">
|
474 |
<div id="when_edit" style="display: none;"></div>
|
@@ -482,50 +1489,48 @@ class FMViewManage_fmc {
|
|
482 |
</td>
|
483 |
</tr>
|
484 |
<tr>
|
485 |
-
<td align="center" onClick="
|
486 |
-
<img src="<?php echo WD_FMC_URL . '/images/
|
487 |
</td>
|
488 |
-
<td align="center" onClick="
|
489 |
-
<img src="<?php echo WD_FMC_URL . '/images/
|
490 |
</td>
|
491 |
</tr>
|
492 |
<tr>
|
493 |
-
<td align="center" onClick="
|
494 |
-
<img src="<?php echo WD_FMC_URL . '/images/
|
495 |
</td>
|
496 |
-
<td align="center" onClick="
|
497 |
-
<img src="<?php echo WD_FMC_URL . '/images/
|
498 |
</td>
|
499 |
</tr>
|
500 |
<tr>
|
501 |
-
<td align="center" onClick="
|
502 |
-
<img src="<?php echo WD_FMC_URL . '/images/
|
503 |
</td>
|
504 |
-
<td align="center" style="cursor:
|
505 |
-
|
506 |
-
<img src="<?php echo WD_FMC_URL . '/images/file_upload.png'; ?>" style="margin:5px" id="img_file_upload" />
|
507 |
</td>
|
508 |
</tr>
|
509 |
<tr>
|
510 |
-
<td align="center" onClick="addRow('section_break')" style="cursor:pointer" id="table_section_break" class="field_buttons">
|
511 |
-
<img src="<?php echo WD_FMC_URL . '/images/section_break.png'; ?>" style="margin:5px" id="img_section_break"/>
|
512 |
-
</td>
|
513 |
<td align="center" onClick="addRow('page_break')" style="cursor:pointer" id="table_page_break" class="field_buttons">
|
514 |
<img src="<?php echo WD_FMC_URL . '/images/page_break.png'; ?>" style="margin:5px" id="img_page_break"/>
|
515 |
</td>
|
|
|
|
|
|
|
516 |
</tr>
|
517 |
<tr>
|
518 |
-
<td align="center" id="table_map" class="field_buttons"
|
519 |
-
<img src="<?php echo WD_FMC_URL . '/images/map.png'; ?>" style="margin:5px" id="img_map"
|
520 |
</td>
|
521 |
-
<td align="center"
|
522 |
-
|
523 |
-
<img src="<?php echo WD_FMC_URL . '/images/paypal.png'; ?>" style="margin:5px" id="img_paypal" />
|
524 |
</td>
|
525 |
</tr>
|
526 |
<tr>
|
527 |
-
<td align="center" onClick="addRow('
|
528 |
-
<img src="<?php echo WD_FMC_URL . '/images/
|
529 |
</td>
|
530 |
<td align="center" onClick="addRow('button')" id="table_button" class="field_buttons">
|
531 |
<img src="<?php echo WD_FMC_URL . '/images/button.png'; ?>" style="margin:5px" id="img_button"/>
|
@@ -547,7 +1552,7 @@ class FMViewManage_fmc {
|
|
547 |
At The Beginning
|
548 |
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
549 |
Before
|
550 |
-
<select style="width: 100px; margin-left: 5px;" id="sel_el_pos"
|
551 |
<img alt="ADD" title="add" style="cursor:pointer; vertical-align:middle; margin:5px" src="<?php echo WD_FMC_URL . '/images/save.png'; ?>" onClick="add(0, false)"/>
|
552 |
<img alt="CANCEL" title="cancel" style="cursor: pointer; vertical-align:middle; margin:5px" src="<?php echo WD_FMC_URL . '/images/cancel_but.png'; ?>" onClick="close_window()"/>
|
553 |
<hr style=" margin-bottom:10px" />
|
@@ -568,14 +1573,14 @@ class FMViewManage_fmc {
|
|
568 |
<input type="hidden" id="element_type" />
|
569 |
<input type="hidden" id="editing_id" />
|
570 |
<input type="hidden" value="<?php echo WD_FMC_URL; ?>" id="form_plugins_url" />
|
571 |
-
<div id="main_editor" style="position:
|
572 |
<?php
|
573 |
if (user_can_richedit()) {
|
574 |
wp_editor('', 'form_maker_editor', array('teeny' => FALSE, 'textarea_name' => 'form_maker_editor', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
575 |
}
|
576 |
else {
|
577 |
?>
|
578 |
-
<textarea
|
579 |
<?php
|
580 |
}
|
581 |
?>
|
@@ -588,82 +1593,67 @@ class FMViewManage_fmc {
|
|
588 |
<?php
|
589 |
}
|
590 |
?>
|
591 |
-
<br />
|
592 |
-
<div style="margin-left:5px;">
|
593 |
-
<label for="enable_sortable" style="font-size: 14px; font-weight: bold;">Enable Drag & Drop</label>
|
594 |
-
<input type="checkbox" name="sortable" id="enable_sortable" value="<?php echo $row->sortable; ?>" onclick="enable_drag(this)" <?php if($row->sortable==1) echo 'checked="checked"'; ?> />
|
595 |
-
<div>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.</div>
|
596 |
-
</div>
|
597 |
<br />
|
598 |
<fieldset>
|
599 |
<legend><h2 style="color: #00aeef;">Form</h2></legend>
|
600 |
-
<
|
601 |
-
<
|
602 |
-
|
603 |
-
<
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
<div id="fadingBarsG_5" class="fadingBarsG"></div>
|
608 |
-
<div id="fadingBarsG_6" class="fadingBarsG"></div>
|
609 |
-
<div id="fadingBarsG_7" class="fadingBarsG"></div>
|
610 |
-
<div id="fadingBarsG_8" class="fadingBarsG"></div>
|
611 |
-
</div>
|
612 |
-
</div>
|
613 |
<?php
|
614 |
-
if ($
|
615 |
-
|
616 |
-
<div style="margin: 8px; display: table; width: 100%;" id="page_bar">
|
617 |
-
<div id="page_navigation" style="display: table-row;">
|
618 |
-
<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>
|
619 |
-
<div align="left" id="edit_page_navigation" style="display: table-cell; vertical-align: middle;"></div>
|
620 |
-
</div>
|
621 |
-
</div>
|
622 |
-
<div id="take" class="main">
|
623 |
-
<?php
|
624 |
-
echo $row->form_front;
|
625 |
-
?>
|
626 |
-
</div>
|
627 |
-
<?php
|
628 |
}
|
629 |
else {
|
630 |
?>
|
631 |
-
<
|
632 |
-
<
|
633 |
-
<
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
<
|
654 |
-
|
655 |
-
|
656 |
-
<
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
661 |
<?php
|
662 |
}
|
663 |
?>
|
|
|
664 |
</fieldset>
|
|
|
665 |
<input type="hidden" name="form_front" id="form_front" />
|
666 |
-
<input type="hidden" name="form_fields" id="form_fields" />
|
667 |
<input type="hidden" name="pagination" id="pagination" />
|
668 |
<input type="hidden" name="show_title" id="show_title" />
|
669 |
<input type="hidden" name="show_numbers" id="show_numbers" />
|
@@ -674,1213 +1664,264 @@ class FMViewManage_fmc {
|
|
674 |
<input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current; ?>" />
|
675 |
<input type="hidden" name="counter" id="counter" value="<?php echo $row->counter; ?>" />
|
676 |
<input type="hidden" id="araqel" value="0" />
|
677 |
-
<?php
|
678 |
-
if ($id) {
|
679 |
-
?>
|
680 |
<script type="text/javascript">
|
|
|
|
|
|
|
681 |
function formOnload() {
|
682 |
// Enable maps.
|
683 |
-
for (t = 0; t < <?php echo $row->counter
|
684 |
-
if (document.getElementById(t
|
685 |
-
if (document.getElementById(t
|
686 |
-
if_gmap_init(t);
|
687 |
for (q = 0; q < 20; q++) {
|
688 |
-
if (document.getElementById(t
|
689 |
-
w_long
|
690 |
-
w_lat
|
691 |
-
w_info
|
692 |
-
add_marker_on_map(t,
|
693 |
}
|
694 |
}
|
695 |
}
|
696 |
-
else
|
697 |
-
|
698 |
-
//
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
}
|
732 |
-
|
733 |
-
|
734 |
-
if (jQuery(this).children('input').length == 0) {
|
735 |
-
var title_ = "<input type='text' id='title_' class='title_' style='outline:none; border:none; background:none; width:50px;' value=\"" + jQuery(this).text() + "\">";
|
736 |
-
jQuery(this).html(title_);
|
737 |
-
jQuery("input.title_").focus();
|
738 |
-
jQuery("input.title_").blur(function () {
|
739 |
-
var id_for_blur = document.getElementById('title_').parentNode.id.split('_');
|
740 |
-
var value = jQuery(this).val();
|
741 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_title").text(value);
|
742 |
-
});
|
743 |
-
}
|
744 |
-
});
|
745 |
-
jQuery("label#" + myu + "_mini_label_middle").click(function () {
|
746 |
-
if (jQuery(this).children('input').length == 0) {
|
747 |
-
var middle = "<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
748 |
-
jQuery(this).html(middle);
|
749 |
-
jQuery("input.middle").focus();
|
750 |
-
jQuery("input.middle").blur(function () {
|
751 |
-
var id_for_blur = document.getElementById('middle').parentNode.id.split('_');
|
752 |
-
var value = jQuery(this).val();
|
753 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_middle").text(value);
|
754 |
-
});
|
755 |
-
}
|
756 |
-
});
|
757 |
-
});
|
758 |
-
}
|
759 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_phone") {
|
760 |
-
var myu = t;
|
761 |
-
jQuery(document).ready(function () {
|
762 |
-
jQuery("label#" + myu + "_mini_label_area_code").click(function () {
|
763 |
-
if (jQuery(this).children('input').length == 0) {
|
764 |
-
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() + "\">";
|
765 |
-
jQuery(this).html(area_code);
|
766 |
-
jQuery("input.area_code").focus();
|
767 |
-
jQuery("input.area_code").blur(function () {
|
768 |
-
var id_for_blur = document.getElementById('area_code').parentNode.id.split('_');
|
769 |
-
var value = jQuery(this).val();
|
770 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_area_code").text(value);
|
771 |
-
});
|
772 |
-
}
|
773 |
-
});
|
774 |
-
jQuery("label#" + myu + "_mini_label_phone_number").click(function () {
|
775 |
-
if (jQuery(this).children('input').length == 0) {
|
776 |
-
var phone_number = "<input type='text' id='phone_number' class='phone_number' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
777 |
-
jQuery(this).html(phone_number);
|
778 |
-
jQuery("input.phone_number").focus();
|
779 |
-
jQuery("input.phone_number").blur(function () {
|
780 |
-
var id_for_blur = document.getElementById('phone_number').parentNode.id.split('_');
|
781 |
-
var value = jQuery(this).val();
|
782 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_phone_number").text(value);
|
783 |
-
});
|
784 |
-
}
|
785 |
-
});
|
786 |
-
});
|
787 |
-
}
|
788 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_fields") {
|
789 |
-
var myu = t;
|
790 |
-
jQuery(document).ready(function () {
|
791 |
-
jQuery("label#" + myu + "_day_label").click(function () {
|
792 |
-
if (jQuery(this).children('input').length == 0) {
|
793 |
-
var day = "<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
794 |
-
jQuery(this).html(day);
|
795 |
-
jQuery("input.day").focus();
|
796 |
-
jQuery("input.day").blur(function () {
|
797 |
-
var id_for_blur = document.getElementById('day').parentNode.id.split('_');
|
798 |
-
var value = jQuery(this).val();
|
799 |
-
jQuery("#" + id_for_blur[0] + "_day_label").text(value);
|
800 |
-
});
|
801 |
-
}
|
802 |
-
});
|
803 |
-
jQuery("label#" + myu + "_month_label").click(function () {
|
804 |
-
if (jQuery(this).children('input').length == 0) {
|
805 |
-
var month = "<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
806 |
-
jQuery(this).html(month);
|
807 |
-
jQuery("input.month").focus();
|
808 |
-
jQuery("input.month").blur(function () {
|
809 |
-
var id_for_blur = document.getElementById('month').parentNode.id.split('_');
|
810 |
-
var value = jQuery(this).val();
|
811 |
-
jQuery("#" + id_for_blur[0] + "_month_label").text(value);
|
812 |
-
});
|
813 |
-
}
|
814 |
-
});
|
815 |
-
jQuery("label#" + myu + "_year_label").click(function () {
|
816 |
-
if (jQuery(this).children('input').length == 0) {
|
817 |
-
var year = "<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
818 |
-
jQuery(this).html(year);
|
819 |
-
jQuery("input.year").focus();
|
820 |
-
jQuery("input.year").blur(function () {
|
821 |
-
var id_for_blur = document.getElementById('year').parentNode.id.split('_');
|
822 |
-
var value = jQuery(this).val();
|
823 |
-
jQuery("#" + id_for_blur[0] + "_year_label").text(value);
|
824 |
-
});
|
825 |
-
}
|
826 |
-
});
|
827 |
-
});
|
828 |
-
}
|
829 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_time") {
|
830 |
-
var myu = t;
|
831 |
-
jQuery(document).ready(function () {
|
832 |
-
jQuery("label#" + myu + "_mini_label_hh").click(function () {
|
833 |
-
if (jQuery(this).children('input').length == 0) {
|
834 |
-
var hh = "<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
835 |
-
jQuery(this).html(hh);
|
836 |
-
jQuery("input.hh").focus();
|
837 |
-
jQuery("input.hh").blur(function () {
|
838 |
-
var id_for_blur = document.getElementById('hh').parentNode.id.split('_');
|
839 |
-
var value = jQuery(this).val();
|
840 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_hh").text(value);
|
841 |
-
});
|
842 |
-
}
|
843 |
-
});
|
844 |
-
jQuery("label#" + myu + "_mini_label_mm").click(function () {
|
845 |
-
if (jQuery(this).children('input').length == 0) {
|
846 |
-
var mm = "<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
847 |
-
jQuery(this).html(mm);
|
848 |
-
jQuery("input.mm").focus();
|
849 |
-
jQuery("input.mm").blur(function () {
|
850 |
-
var id_for_blur = document.getElementById('mm').parentNode.id.split('_');
|
851 |
-
var value = jQuery(this).val();
|
852 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_mm").text(value);
|
853 |
-
});
|
854 |
-
}
|
855 |
-
});
|
856 |
-
jQuery("label#" + myu + "_mini_label_ss").click(function () {
|
857 |
-
if (jQuery(this).children('input').length == 0) {
|
858 |
-
var ss = "<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
859 |
-
jQuery(this).html(ss);
|
860 |
-
jQuery("input.ss").focus();
|
861 |
-
jQuery("input.ss").blur(function () {
|
862 |
-
var id_for_blur = document.getElementById('ss').parentNode.id.split('_');
|
863 |
-
var value = jQuery(this).val();
|
864 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_ss").text(value);
|
865 |
-
});
|
866 |
-
}
|
867 |
-
});
|
868 |
-
jQuery("label#" + myu + "_mini_label_am_pm").click(function () {
|
869 |
-
if (jQuery(this).children('input').length == 0) {
|
870 |
-
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() + "\">";
|
871 |
-
jQuery(this).html(am_pm);
|
872 |
-
jQuery("input.am_pm").focus();
|
873 |
-
jQuery("input.am_pm").blur(function () {
|
874 |
-
var id_for_blur = document.getElementById('am_pm').parentNode.id.split('_');
|
875 |
-
var value = jQuery(this).val();
|
876 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_am_pm").text(value);
|
877 |
-
});
|
878 |
-
}
|
879 |
-
});
|
880 |
-
});
|
881 |
-
}
|
882 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_paypal_price") {
|
883 |
-
var myu = t;
|
884 |
-
jQuery(document).ready(function () {
|
885 |
-
jQuery("#" + myu + "_mini_label_dollars").click(function () {
|
886 |
-
if (jQuery(this).children('input').length == 0) {
|
887 |
-
var dollars = "<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
888 |
-
jQuery(this).html(dollars);
|
889 |
-
jQuery("input.dollars").focus();
|
890 |
-
jQuery("input.dollars").blur(function () {
|
891 |
-
var id_for_blur = document.getElementById('dollars').parentNode.id.split('_');
|
892 |
-
var value = jQuery(this).val();
|
893 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_dollars").text(value);
|
894 |
-
});
|
895 |
-
}
|
896 |
-
});
|
897 |
-
jQuery("label#" + myu + "_mini_label_cents").click(function () {
|
898 |
-
if (jQuery(this).children('input').length == 0) {
|
899 |
-
var cents = "<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
900 |
-
jQuery(this).html(cents);
|
901 |
-
jQuery("input.cents").focus();
|
902 |
-
jQuery("input.cents").blur(function () {
|
903 |
-
var id_for_blur = document.getElementById('cents').parentNode.id.split('_');
|
904 |
-
var value = jQuery(this).val();
|
905 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_cents").text(value);
|
906 |
-
});
|
907 |
-
}
|
908 |
-
});
|
909 |
-
});
|
910 |
-
}
|
911 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_address") {
|
912 |
-
var myu = t;
|
913 |
-
jQuery(document).ready(function () {
|
914 |
-
jQuery("label#" + myu + "_mini_label_street1").click(function () {
|
915 |
-
if (jQuery(this).children('input').length == 0) {
|
916 |
-
var street1 = "<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
917 |
-
jQuery(this).html(street1);
|
918 |
-
jQuery("input.street1").focus();
|
919 |
-
jQuery("input.street1").blur(function () {
|
920 |
-
var id_for_blur = document.getElementById('street1').parentNode.id.split('_');
|
921 |
-
var value = jQuery(this).val();
|
922 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_street1").text(value);
|
923 |
-
});
|
924 |
-
}
|
925 |
-
});
|
926 |
-
jQuery("label#" + myu + "_mini_label_street2").click(function () {
|
927 |
-
if (jQuery(this).children('input').length == 0) {
|
928 |
-
var street2 = "<input type='text' id='street2' class='street2' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
929 |
-
jQuery(this).html(street2);
|
930 |
-
jQuery("input.street2").focus();
|
931 |
-
jQuery("input.street2").blur(function () {
|
932 |
-
var id_for_blur = document.getElementById('street2').parentNode.id.split('_');
|
933 |
-
var value = jQuery(this).val();
|
934 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_street2").text(value);
|
935 |
-
});
|
936 |
-
}
|
937 |
-
});
|
938 |
-
jQuery("label#" + myu + "_mini_label_city").click(function () {
|
939 |
-
if (jQuery(this).children('input').length == 0) {
|
940 |
-
var city = "<input type='text' id='city' class='city' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
941 |
-
jQuery(this).html(city);
|
942 |
-
jQuery("input.city").focus();
|
943 |
-
jQuery("input.city").blur(function () {
|
944 |
-
var id_for_blur = document.getElementById('city').parentNode.id.split('_');
|
945 |
-
var value = jQuery(this).val();
|
946 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_city").text(value);
|
947 |
-
});
|
948 |
-
}
|
949 |
-
});
|
950 |
-
jQuery("label#" + myu + "_mini_label_state").click(function () {
|
951 |
-
if (jQuery(this).children('input').length == 0) {
|
952 |
-
var state = "<input type='text' id='state' class='state' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
953 |
-
jQuery(this).html(state);
|
954 |
-
jQuery("input.state").focus();
|
955 |
-
jQuery("input.state").blur(function () {
|
956 |
-
var id_for_blur = document.getElementById('state').parentNode.id.split('_');
|
957 |
-
var value = jQuery(this).val();
|
958 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_state").text(value);
|
959 |
-
});
|
960 |
-
}
|
961 |
-
});
|
962 |
-
jQuery("label#" + myu + "_mini_label_postal").click(function () {
|
963 |
-
if (jQuery(this).children('input').length == 0) {
|
964 |
-
var postal = "<input type='text' id='postal' class='postal' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
965 |
-
jQuery(this).html(postal);
|
966 |
-
jQuery("input.postal").focus();
|
967 |
-
jQuery("input.postal").blur(function () {
|
968 |
-
var id_for_blur = document.getElementById('postal').parentNode.id.split('_');
|
969 |
-
var value = jQuery(this).val();
|
970 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_postal").text(value);
|
971 |
-
});
|
972 |
-
}
|
973 |
-
});
|
974 |
-
jQuery("label#" + myu + "_mini_label_country").click(function () {
|
975 |
-
if (jQuery(this).children('input').length == 0) {
|
976 |
-
var country = "<input type='country' id='country' class='country' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
977 |
-
jQuery(this).html(country);
|
978 |
-
jQuery("input.country").focus();
|
979 |
-
jQuery("input.country").blur(function () {
|
980 |
-
var id_for_blur = document.getElementById('country').parentNode.id.split('_');
|
981 |
-
var value = jQuery(this).val();
|
982 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_country").text(value);
|
983 |
-
});
|
984 |
-
}
|
985 |
-
});
|
986 |
-
});
|
987 |
-
}
|
988 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_scale_rating") {
|
989 |
-
var myu = t;
|
990 |
-
jQuery(document).ready(function () {
|
991 |
-
jQuery("#" + myu + "_mini_label_worst").click(function () {
|
992 |
-
if (jQuery(this).children('input').length == 0) {
|
993 |
-
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() + "\">";
|
994 |
-
jQuery(this).html(worst);
|
995 |
-
jQuery("input.worst").focus();
|
996 |
-
jQuery("input.worst").blur(function () {
|
997 |
-
var id_for_blur = document.getElementById('worst').parentNode.id.split('_');
|
998 |
-
var value = jQuery(this).val();
|
999 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_worst").text(value);
|
1000 |
-
});
|
1001 |
-
}
|
1002 |
-
});
|
1003 |
-
jQuery("label#" + myu + "_mini_label_best").click(function () {
|
1004 |
-
if (jQuery(this).children('input').length == 0) {
|
1005 |
-
|
1006 |
-
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() + "\">";
|
1007 |
-
jQuery(this).html(best);
|
1008 |
-
jQuery("input.best").focus();
|
1009 |
-
jQuery("input.best").blur(function () {
|
1010 |
-
var id_for_blur = document.getElementById('best').parentNode.id.split('_');
|
1011 |
-
var value = jQuery(this).val();
|
1012 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_best").text(value);
|
1013 |
-
});
|
1014 |
-
}
|
1015 |
-
});
|
1016 |
-
});
|
1017 |
-
}
|
1018 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_spinner") {
|
1019 |
-
var spinner_value = document.getElementById(t + "_elementform_id_temp").value;
|
1020 |
-
var spinner_min_value = document.getElementById(t + "_min_valueform_id_temp").value;
|
1021 |
-
var spinner_max_value = document.getElementById(t + "_max_valueform_id_temp").value;
|
1022 |
-
var spinner_step = document.getElementById(t + "_stepform_id_temp").value;
|
1023 |
-
jQuery("#" + t + "_elementform_id_temp")[0].spin = null;
|
1024 |
-
spinner = jQuery("#" + t + "_elementform_id_temp").spinner();
|
1025 |
-
spinner.spinner("value", spinner_value);
|
1026 |
-
jQuery("#" + t + "_elementform_id_temp").spinner({ min:spinner_min_value});
|
1027 |
-
jQuery("#" + t + "_elementform_id_temp").spinner({ max:spinner_max_value});
|
1028 |
-
jQuery("#" + t + "_elementform_id_temp").spinner({ step:spinner_step});
|
1029 |
-
}
|
1030 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_slider") {
|
1031 |
-
var slider_value = document.getElementById(t + "_slider_valueform_id_temp").value;
|
1032 |
-
var slider_min_value = document.getElementById(t + "_slider_min_valueform_id_temp").value;
|
1033 |
-
var slider_max_value = document.getElementById(t + "_slider_max_valueform_id_temp").value;
|
1034 |
-
var slider_element_value = document.getElementById(t + "_element_valueform_id_temp");
|
1035 |
-
var slider_value_save = document.getElementById(t + "_slider_valueform_id_temp");
|
1036 |
-
jQuery("#" + t + "_elementform_id_temp")[0].slide = null;
|
1037 |
-
jQuery(function () {
|
1038 |
-
jQuery("#" + t + "_elementform_id_temp").slider({
|
1039 |
-
range:"min",
|
1040 |
-
value:eval(slider_value),
|
1041 |
-
min:eval(slider_min_value),
|
1042 |
-
max:eval(slider_max_value),
|
1043 |
-
slide:function (event, ui) {
|
1044 |
-
slider_element_value.innerHTML = "" + ui.value;
|
1045 |
-
slider_value_save.value = "" + ui.value;
|
1046 |
-
}
|
1047 |
-
});
|
1048 |
-
});
|
1049 |
-
}
|
1050 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_range") {
|
1051 |
-
var spinner_value0 = document.getElementById(t + "_elementform_id_temp0").value;
|
1052 |
-
var spinner_step = document.getElementById(t + "_range_stepform_id_temp").value;
|
1053 |
-
jQuery("#" + t + "_elementform_id_temp0")[0].spin = null;
|
1054 |
-
jQuery("#" + t + "_elementform_id_temp1")[0].spin = null;
|
1055 |
-
spinner0 = jQuery("#" + t + "_elementform_id_temp0").spinner();
|
1056 |
-
spinner0.spinner("value", spinner_value0);
|
1057 |
-
jQuery("#" + t + "_elementform_id_temp0").spinner({ step:spinner_step});
|
1058 |
-
var spinner_value1 = document.getElementById(t + "_elementform_id_temp1").value;
|
1059 |
-
spinner1 = jQuery("#" + t + "_elementform_id_temp1").spinner();
|
1060 |
-
spinner1.spinner("value", spinner_value1);
|
1061 |
-
jQuery("#" + t + "_elementform_id_temp1").spinner({ step:spinner_step});
|
1062 |
-
var myu = t;
|
1063 |
-
jQuery(document).ready(function () {
|
1064 |
-
jQuery("#" + myu + "_mini_label_from").click(function () {
|
1065 |
-
if (jQuery(this).children('input').length == 0) {
|
1066 |
-
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() + "\">";
|
1067 |
-
jQuery(this).html(from);
|
1068 |
-
jQuery("input.from").focus();
|
1069 |
-
jQuery("input.from").blur(function () {
|
1070 |
-
var id_for_blur = document.getElementById('from').parentNode.id.split('_');
|
1071 |
-
var value = jQuery(this).val();
|
1072 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_from").text(value);
|
1073 |
-
});
|
1074 |
-
}
|
1075 |
-
});
|
1076 |
-
jQuery("label#" + myu + "_mini_label_to").click(function () {
|
1077 |
-
if (jQuery(this).children('input').length == 0) {
|
1078 |
-
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() + "\">";
|
1079 |
-
jQuery(this).html(to);
|
1080 |
-
jQuery("input.to").focus();
|
1081 |
-
jQuery("input.to").blur(function () {
|
1082 |
-
var id_for_blur = document.getElementById('to').parentNode.id.split('_');
|
1083 |
-
var value = jQuery(this).val();
|
1084 |
-
jQuery("#" + id_for_blur[0] + "_mini_label_to").text(value);
|
1085 |
-
});
|
1086 |
-
}
|
1087 |
-
});
|
1088 |
-
});
|
1089 |
-
}
|
1090 |
-
}
|
1091 |
-
}
|
1092 |
-
remove_whitespace(document.getElementById('take'));
|
1093 |
-
form_view = 1;
|
1094 |
-
form_view_count = 0;
|
1095 |
-
for (i = 1; i <= 30; i++) {
|
1096 |
-
if (document.getElementById('form_id_tempform_view' + i)) {
|
1097 |
-
form_view_count++;
|
1098 |
-
form_view_max = i;
|
1099 |
-
tbody_img = document.createElement('div');
|
1100 |
-
tbody_img.setAttribute('id', 'form_id_tempform_view_img' + i);
|
1101 |
-
tbody_img.style.cssText = "float:right";
|
1102 |
-
tr_img = document.createElement('div');
|
1103 |
-
var img = document.createElement('img');
|
1104 |
-
img.setAttribute('src', '<?php echo WD_FMC_URL; ?>/images/minus.png');
|
1105 |
-
img.setAttribute('title', 'Show or hide the page');
|
1106 |
-
img.setAttribute("class", "page_toolbar");
|
1107 |
-
img.setAttribute('id', 'show_page_img_' + i);
|
1108 |
-
img.setAttribute('onClick', 'show_or_hide("' + i + '")');
|
1109 |
-
img.setAttribute("onmouseover", 'chnage_icons_src(this,"minus")');
|
1110 |
-
img.setAttribute("onmouseout", 'chnage_icons_src(this,"minus")');
|
1111 |
-
var img_X = document.createElement("img");
|
1112 |
-
img_X.setAttribute("src", "<?php echo WD_FMC_URL; ?>/images/page_delete.png");
|
1113 |
-
img_X.setAttribute('title', 'Delete the page');
|
1114 |
-
img_X.setAttribute("class", "page_toolbar");
|
1115 |
-
img_X.setAttribute("onclick", 'remove_page("' + i + '")');
|
1116 |
-
img_X.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete")');
|
1117 |
-
img_X.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete")');
|
1118 |
-
var img_X_all = document.createElement("img");
|
1119 |
-
img_X_all.setAttribute("src", "<?php echo WD_FMC_URL; ?>/images/page_delete_all.png");
|
1120 |
-
img_X_all.setAttribute('title', 'Delete the page with fields');
|
1121 |
-
img_X_all.setAttribute("class", "page_toolbar");
|
1122 |
-
img_X_all.setAttribute("onclick", 'remove_page_all("' + i + '")');
|
1123 |
-
img_X_all.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete_all")');
|
1124 |
-
img_X_all.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete_all")');
|
1125 |
-
var img_EDIT = document.createElement("img");
|
1126 |
-
img_EDIT.setAttribute("src", "<?php echo WD_FMC_URL; ?>/images/page_edit.png");
|
1127 |
-
img_EDIT.setAttribute('title', 'Edit the page');
|
1128 |
-
img_EDIT.setAttribute("class", "page_toolbar");
|
1129 |
-
img_EDIT.setAttribute("onclick", 'edit_page_break("' + i + '")');
|
1130 |
-
img_EDIT.setAttribute("onmouseover", 'chnage_icons_src(this,"page_edit")');
|
1131 |
-
img_EDIT.setAttribute("onmouseout", 'chnage_icons_src(this,"page_edit")');
|
1132 |
-
tr_img.appendChild(img);
|
1133 |
-
tr_img.appendChild(img_X);
|
1134 |
-
tr_img.appendChild(img_X_all);
|
1135 |
-
tr_img.appendChild(img_EDIT);
|
1136 |
-
tbody_img.appendChild(tr_img);
|
1137 |
-
document.getElementById('form_id_tempform_view' + i).parentNode.appendChild(tbody_img);
|
1138 |
-
}
|
1139 |
-
}
|
1140 |
-
if (form_view_count > 1) {
|
1141 |
-
for (i = 1; i <= form_view_max; i++) {
|
1142 |
-
if (document.getElementById('form_id_tempform_view' + i)) {
|
1143 |
-
first_form_view = i;
|
1144 |
-
break;
|
1145 |
-
}
|
1146 |
-
}
|
1147 |
-
form_view = form_view_max;
|
1148 |
-
need_enable = false;
|
1149 |
-
generate_page_nav(first_form_view);
|
1150 |
-
var img_EDIT = document.createElement("img");
|
1151 |
-
img_EDIT.setAttribute("src", "<?php echo WD_FMC_URL . '/images/edit.png'; ?>");
|
1152 |
-
img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
|
1153 |
-
img_EDIT.setAttribute("onclick", 'el_page_navigation()');
|
1154 |
-
var td_EDIT = document.getElementById("edit_page_navigation");
|
1155 |
-
td_EDIT.appendChild(img_EDIT);
|
1156 |
-
document.getElementById('page_navigation').appendChild(td_EDIT);
|
1157 |
-
}
|
1158 |
-
document.getElementById('araqel').value = 1;
|
1159 |
}
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1164 |
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
|
|
|
|
|
|
1168 |
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1178 |
});
|
1179 |
-
</script>
|
1180 |
-
<?php
|
1181 |
}
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1198 |
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
}
|
1204 |
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
$themes = $this->model->get_theme_rows_data('old');
|
1209 |
-
$labels = array();
|
1210 |
-
$label_id = array();
|
1211 |
-
$label_order_original = array();
|
1212 |
-
$label_type = array();
|
1213 |
-
$label_all = explode('#****#', $row->label_order);
|
1214 |
-
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
1215 |
-
foreach ($label_all as $key => $label_each) {
|
1216 |
-
$label_id_each = explode('#**id**#', $label_each);
|
1217 |
-
array_push($label_id, $label_id_each[0]);
|
1218 |
-
$label_oder_each = explode('#**label**#', $label_id_each[1]);
|
1219 |
-
array_push($label_order_original, addslashes($label_oder_each[0]));
|
1220 |
-
array_push($label_type, $label_oder_each[1]);
|
1221 |
-
}
|
1222 |
-
$labels['id'] = '"' . implode('","', $label_id) . '"';
|
1223 |
-
$labels['label'] = '"' . implode('","', $label_order_original) . '"';
|
1224 |
-
$labels['type'] = '"' . implode('","', $label_type) . '"';
|
1225 |
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
l_label = l_label.replace(/(\r\n|\n|\r)/gm," ");
|
1263 |
-
l_type=tr.getAttribute('type');
|
1264 |
-
for (z = 0; z < l_id_array.length; z++) {
|
1265 |
-
if (l_id_array[z] == l_id) {
|
1266 |
-
if (l_type_array[z] == "type_address") {
|
1267 |
-
if (document.getElementById(l_id + "_mini_label_street1")) {
|
1268 |
-
l_id_removed[l_id_array[z]] = false;
|
1269 |
-
}
|
1270 |
-
if (document.getElementById(l_id+"_mini_label_street2")) {
|
1271 |
-
l_id_removed[parseInt(l_id_array[z]) + 1] = false;
|
1272 |
-
}
|
1273 |
-
if (document.getElementById(l_id+"_mini_label_city")) {
|
1274 |
-
l_id_removed[parseInt(l_id_array[z]) + 2] = false;
|
1275 |
-
}
|
1276 |
-
if (document.getElementById(l_id+"_mini_label_state")) {
|
1277 |
-
l_id_removed[parseInt(l_id_array[z]) + 3] = false;
|
1278 |
-
}
|
1279 |
-
if (document.getElementById(l_id+"_mini_label_postal")) {
|
1280 |
-
l_id_removed[parseInt(l_id_array[z]) + 4] = false;
|
1281 |
-
}
|
1282 |
-
if (document.getElementById(l_id+"_mini_label_country")) {
|
1283 |
-
l_id_removed[parseInt(l_id_array[z]) + 5] = false;
|
1284 |
-
}
|
1285 |
-
z = z + 5;
|
1286 |
-
}
|
1287 |
-
else {
|
1288 |
-
l_id_removed[l_id] = false;
|
1289 |
-
}
|
1290 |
-
}
|
1291 |
-
}
|
1292 |
-
if (tr.getAttribute('type')=="type_address") {
|
1293 |
-
addr_id=parseInt(tr.id);
|
1294 |
-
id_for_country= addr_id;
|
1295 |
-
if(document.getElementById(id_for_country+"_mini_label_street1"))
|
1296 |
-
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street1").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
|
1297 |
-
if(document.getElementById(id_for_country+"_mini_label_street2"))
|
1298 |
-
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street2").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
|
1299 |
-
if(document.getElementById(id_for_country+"_mini_label_city"))
|
1300 |
-
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_city").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
1301 |
-
if(document.getElementById(id_for_country+"_mini_label_state"))
|
1302 |
-
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_state").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
1303 |
-
if(document.getElementById(id_for_country+"_mini_label_postal"))
|
1304 |
-
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_postal").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
1305 |
-
if(document.getElementById(id_for_country+"_mini_label_country"))
|
1306 |
-
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_country").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';
|
1307 |
-
}
|
1308 |
-
else {
|
1309 |
-
tox = tox+l_id+'#**id**#'+l_label+'#**label**#'+l_type+'#****#';
|
1310 |
-
}
|
1311 |
-
}
|
1312 |
-
}
|
1313 |
-
}
|
1314 |
-
}
|
1315 |
-
}
|
1316 |
-
}
|
1317 |
-
}
|
1318 |
-
document.getElementById('label_order_current').value = tox;
|
1319 |
-
for (x = 0; x < l_id_array.length; x++) {
|
1320 |
-
if (l_id_removed[l_id_array[x]]) {
|
1321 |
-
tox = tox + l_id_array[x] + '#**id**#' + l_label_array[x] + '#**label**#' + l_type_array[x] + '#****#';
|
1322 |
-
}
|
1323 |
-
}
|
1324 |
-
document.getElementById('label_order').value = tox;
|
1325 |
-
refresh_old();
|
1326 |
-
document.getElementById('pagination').value=document.getElementById('pages').getAttribute("type");
|
1327 |
-
document.getElementById('show_title').value=document.getElementById('pages').getAttribute("show_title");
|
1328 |
-
document.getElementById('show_numbers').value=document.getElementById('pages').getAttribute("show_numbers");
|
1329 |
-
return true;
|
1330 |
-
}
|
1331 |
|
1332 |
-
gen = <?php echo (($id != 0) ? $row->counter : 1); ?>;
|
1333 |
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
1340 |
-
jQuery('#formMakerDiv').slideToggle(200);
|
1341 |
-
}
|
1342 |
-
else {
|
1343 |
-
jQuery('#formMakerDiv').slideToggle(400);
|
1344 |
-
}
|
1345 |
-
if (document.getElementById('formMakerDiv').offsetWidth) {
|
1346 |
-
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
1347 |
-
}
|
1348 |
-
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
1349 |
-
jQuery('#formMakerDiv1').slideToggle(200);
|
1350 |
-
}
|
1351 |
-
else {
|
1352 |
-
jQuery('#formMakerDiv1').slideToggle(400);
|
1353 |
-
}
|
1354 |
-
document.getElementById('when_edit').style.display = 'none';
|
1355 |
-
}
|
1356 |
|
1357 |
-
function enable2() {
|
1358 |
-
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
1359 |
-
for (x = 0; x < 14; x++) {
|
1360 |
-
document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FMC_URL . '/images/'; ?>" + alltypes[x] + ".png";
|
1361 |
-
}
|
1362 |
-
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
1363 |
-
jQuery('#formMakerDiv').slideToggle(200);
|
1364 |
-
}
|
1365 |
-
else {
|
1366 |
-
jQuery('#formMakerDiv').slideToggle(400);
|
1367 |
-
}
|
1368 |
-
if (document.getElementById('formMakerDiv').offsetWidth) {
|
1369 |
-
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
1370 |
-
}
|
1371 |
-
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
1372 |
-
jQuery('#formMakerDiv1').slideToggle(200);
|
1373 |
-
}
|
1374 |
-
else {
|
1375 |
-
jQuery('#formMakerDiv1').slideToggle(400);
|
1376 |
-
}
|
1377 |
-
document.getElementById('when_edit').style.display = 'block';
|
1378 |
-
if (document.getElementById('field_types').offsetWidth) {
|
1379 |
-
document.getElementById('when_edit').style.width = document.getElementById('field_types').offsetWidth + 'px';
|
1380 |
-
}
|
1381 |
-
if (document.getElementById('field_types').offsetHeight) {
|
1382 |
-
document.getElementById('when_edit').style.height = document.getElementById('field_types').offsetHeight + 'px';
|
1383 |
-
}
|
1384 |
-
}
|
1385 |
-
</script>
|
1386 |
-
<div style="clear: both; float: left; width: 99%;">
|
1387 |
-
<div style="float:left; font-size: 14px; font-weight: bold;">
|
1388 |
-
This section allows you to add fields to your form.
|
1389 |
-
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-4.html">Read More in User Manual</a>
|
1390 |
-
</div>
|
1391 |
-
<div style="float: right; text-align: right;">
|
1392 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromContactForm.php">
|
1393 |
-
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FMC_URL . '/images/wd_logo.png'; ?>" />
|
1394 |
-
</a>
|
1395 |
-
</div>
|
1396 |
-
</div>
|
1397 |
-
<form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fmc" style="float: left; width: 99%;">
|
1398 |
-
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
1399 |
-
<h2><?php echo $page_title; ?></h2>
|
1400 |
-
<div style="float: right; margin: 0 5px 0 0;">
|
1401 |
-
<a href="<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', 'id' => $row->theme, '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;">
|
1402 |
-
Preview
|
1403 |
-
</a>
|
1404 |
-
<input class="button-primary" type="submit" onclick="if (spider_check_required('title', 'Form title') || !submitbutton()) {return false;}; spider_set_input_value('task', 'form_options_old');" value="Form options"/>
|
1405 |
-
<?php
|
1406 |
-
if ($id) {
|
1407 |
-
?>
|
1408 |
-
<input class="button-secondary" type="submit" onclick="if (spider_check_required('title', 'Form title') || !submitbutton()) {return false;}; spider_set_input_value('task', 'save_as_copy_old')" value="Save as Copy"/>
|
1409 |
-
<?php
|
1410 |
-
}
|
1411 |
-
?>
|
1412 |
-
<input class="button-secondary" type="submit" onclick="if (spider_check_required('title', 'Form title') || !submitbutton()) {return false;}; spider_set_input_value('task', 'save_old')" value="Save"/>
|
1413 |
-
<input class="button-secondary" type="submit" onclick="if (spider_check_required('title', 'Form title') || !submitbutton()) {return false;}; spider_set_input_value('task', 'apply_old')" value="Apply"/>
|
1414 |
-
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="Cancel"/>
|
1415 |
-
</div>
|
1416 |
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1433 |
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
<td align="center" onClick="addRow('customHTML')" style="cursor:pointer" id="table_editor" class="field_buttons">
|
1446 |
-
<img src="<?php echo WD_FMC_URL . '/images/customHTML.png'; ?>" style="margin:5px" id="img_customHTML"/>
|
1447 |
-
</td>
|
1448 |
-
<td align="center" onClick="addRow('text')" style="cursor:pointer" id="table_text" class="field_buttons">
|
1449 |
-
<img src="<?php echo WD_FMC_URL . '/images/text.png'; ?>" style="margin:5px" id="img_text"/>
|
1450 |
-
</td>
|
1451 |
-
</tr>
|
1452 |
-
<tr>
|
1453 |
-
<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.')" style="cursor: pointer; background-color: rgb(114, 113, 113) !important;" id="table_time_and_date" class="field_buttons">
|
1454 |
-
<img src="<?php echo WD_FMC_URL . '/images/time_and_date.png'; ?>" style="margin:5px" id="img_time_and_date"/>
|
1455 |
-
</td>
|
1456 |
-
<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.')" style="cursor: pointer; background-color: rgb(114, 113, 113) !important;" id="table_select" class="field_buttons">
|
1457 |
-
<img src="<?php echo WD_FMC_URL . '/images/select.png'; ?>" style="margin:5px" id="img_select"/>
|
1458 |
-
</td>
|
1459 |
-
</tr>
|
1460 |
-
<tr>
|
1461 |
-
<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.')" style="cursor: pointer; background-color: rgb(114, 113, 113) !important;" id="table_checkbox" class="field_buttons">
|
1462 |
-
<img src="<?php echo WD_FMC_URL . '/images/checkbox.png'; ?>" style="margin:5px" id="img_checkbox"/>
|
1463 |
-
</td>
|
1464 |
-
<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.')" style="cursor: pointer; background-color: rgb(114, 113, 113) !important;" id="table_radio" class="field_buttons">
|
1465 |
-
<img src="<?php echo WD_FMC_URL . '/images/radio.png'; ?>" style="margin:5px" id="img_radio"/>
|
1466 |
-
</td>
|
1467 |
-
</tr>
|
1468 |
-
<tr>
|
1469 |
-
<td align="center" style="cursor: pointer; background-color: rgb(114, 113, 113) !important;" id="table_file_upload" class="field_buttons"
|
1470 |
-
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')">
|
1471 |
-
<img src="<?php echo WD_FMC_URL . '/images/file_upload.png'; ?>" style="margin:5px" id="img_file_upload" />
|
1472 |
-
</td>
|
1473 |
-
<td align="center" onClick="addRow('captcha')" style="cursor:pointer" id="table_captcha" class="field_buttons">
|
1474 |
-
<img src="<?php echo WD_FMC_URL . '/images/captcha.png'; ?>" style="margin:5px" id="img_captcha"/>
|
1475 |
-
</td>
|
1476 |
-
</tr>
|
1477 |
-
<tr>
|
1478 |
-
<td align="center" onClick="addRow('page_break')" style="cursor:pointer" id="table_page_break" class="field_buttons">
|
1479 |
-
<img src="<?php echo WD_FMC_URL . '/images/page_break.png'; ?>" style="margin:5px" id="img_page_break"/>
|
1480 |
-
</td>
|
1481 |
-
<td align="center" onClick="addRow('section_break')" style="cursor:pointer" id="table_section_break" class="field_buttons">
|
1482 |
-
<img src="<?php echo WD_FMC_URL . '/images/section_break.png'; ?>" style="margin:5px" id="img_section_break"/>
|
1483 |
-
</td>
|
1484 |
-
</tr>
|
1485 |
-
<tr>
|
1486 |
-
<td align="center" id="table_map" class="field_buttons" onClick="addRow('map')">
|
1487 |
-
<img src="<?php echo WD_FMC_URL . '/images/map.png'; ?>" style="margin:5px" id="img_map" />
|
1488 |
-
</td>
|
1489 |
-
<td align="center" style="cursor: pointer; background-color: rgb(114, 113, 113) !important;" id="table_paypal" class="field_buttons"
|
1490 |
-
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')">
|
1491 |
-
<img src="<?php echo WD_FMC_URL . '/images/paypal.png'; ?>" style="margin:5px" id="img_paypal" />
|
1492 |
-
</td>
|
1493 |
-
</tr>
|
1494 |
-
<tr>
|
1495 |
-
<td align="center" style="cursor: pointer; background-color: rgb(114, 113, 113) !important;" class="field_buttons" id="table_survey"
|
1496 |
-
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')">
|
1497 |
-
<img src="<?php echo WD_FMC_URL . '/images/survey.png'; ?>" style="margin:5px" id="img_survey"/>
|
1498 |
-
</td>
|
1499 |
-
<td align="center" onClick="addRow('button')" id="table_button" class="field_buttons">
|
1500 |
-
<img src="<?php echo WD_FMC_URL . '/images/button.png'; ?>" style="margin:5px" id="img_button"/>
|
1501 |
-
</td>
|
1502 |
-
</tr>
|
1503 |
-
</table>
|
1504 |
-
</td>
|
1505 |
-
<td width="35%" height="100%" align="left">
|
1506 |
-
<div id="edit_table" style="padding:0px; overflow-y:scroll; height:575px"></div>
|
1507 |
-
</td>
|
1508 |
-
<td align="center" valign="top" style="background: url("<?php echo WD_FMC_URL . '/images/border2.png'; ?>") repeat-y;"> </td>
|
1509 |
-
<td style="padding:15px">
|
1510 |
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
1511 |
-
<tr>
|
1512 |
-
<td align="right">
|
1513 |
-
<input type="radio" value="end" name="el_pos" checked="checked" id="pos_end" onclick="Disable()"/>
|
1514 |
-
At The End
|
1515 |
-
<input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
|
1516 |
-
At The Beginning
|
1517 |
-
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
1518 |
-
Before
|
1519 |
-
<select style="width: 100px; margin-left: 5px;" id="sel_el_pos" disabled="disabled"></select>
|
1520 |
-
<img alt="ADD" title="add" style="cursor:pointer; vertical-align:middle; margin:5px" src="<?php echo WD_FMC_URL . '/images/save.png'; ?>" onClick="add(0, false)"/>
|
1521 |
-
<img alt="CANCEL" title="cancel" style="cursor: pointer; vertical-align:middle; margin:5px" src="<?php echo WD_FMC_URL . '/images/cancel_but.png'; ?>" onClick="close_window()"/>
|
1522 |
-
<hr style=" margin-bottom:10px" />
|
1523 |
-
</td>
|
1524 |
-
</tr>
|
1525 |
-
<tr height="100%" valign="top">
|
1526 |
-
<td id="show_table"></td>
|
1527 |
-
</tr>
|
1528 |
-
</table>
|
1529 |
-
</td>
|
1530 |
-
</tr>
|
1531 |
-
</table>
|
1532 |
-
</td>
|
1533 |
-
</tr>
|
1534 |
-
</table>
|
1535 |
-
<input type="hidden" id="old" />
|
1536 |
-
<input type="hidden" id="old_selected" />
|
1537 |
-
<input type="hidden" id="element_type" />
|
1538 |
-
<input type="hidden" id="editing_id" />
|
1539 |
-
<input type="hidden" value="<?php echo WD_FMC_URL; ?>" id="form_plugins_url" />
|
1540 |
-
<div id="main_editor" style="position: absolute; display: none; z-index: 140;">
|
1541 |
-
<?php
|
1542 |
-
if (user_can_richedit()) {
|
1543 |
-
wp_editor('', 'form_maker_editor', array('teeny' => FALSE, 'textarea_name' => 'form_maker_editor', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
1544 |
-
}
|
1545 |
-
else {
|
1546 |
-
?>
|
1547 |
-
<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>
|
1548 |
-
<?php
|
1549 |
-
}
|
1550 |
-
?>
|
1551 |
-
</div>
|
1552 |
-
</div>
|
1553 |
-
<?php
|
1554 |
-
if (!function_exists('the_editor')) {
|
1555 |
-
?>
|
1556 |
-
<iframe id="tinymce" style="display: none;"></iframe>
|
1557 |
-
<?php
|
1558 |
-
}
|
1559 |
-
?>
|
1560 |
-
<br />
|
1561 |
-
<br />
|
1562 |
-
<fieldset>
|
1563 |
-
<legend><h2 style="color: #00aeef;">Form</h2></legend>
|
1564 |
-
<table width="100%" style="margin:8px">
|
1565 |
-
<tr id="page_navigation">
|
1566 |
-
<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>
|
1567 |
-
<td align="left" id="edit_page_navigation"></td>
|
1568 |
-
</tr>
|
1569 |
-
</table>
|
1570 |
-
<div id="take">
|
1571 |
-
<?php
|
1572 |
-
if ($row->form) {
|
1573 |
-
echo $row->form;
|
1574 |
-
}
|
1575 |
-
else {
|
1576 |
-
?>
|
1577 |
-
<table border="0" cellpadding="4" cellspacing="0" class="wdform_table1" style="width: 100%;">
|
1578 |
-
<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">
|
1579 |
-
<tr class="wdform_tr1">
|
1580 |
-
<td class="wdform_td1" >
|
1581 |
-
<table class="wdform_table2">
|
1582 |
-
<tbody class="wdform_tbody2"></tbody>
|
1583 |
-
</table>
|
1584 |
-
</td>
|
1585 |
-
</tr>
|
1586 |
-
<tr class="wdform_footer">
|
1587 |
-
<td colspan="100" valign="top">
|
1588 |
-
<table width="100%" style="padding-right:170px"><tbody><tr id="form_id_temppage_nav1"></tr></tbody></table>
|
1589 |
-
</td>
|
1590 |
-
</tr>
|
1591 |
-
<tbody id="form_id_tempform_view_img1" style="float: right !important;" >
|
1592 |
-
<tr>
|
1593 |
-
<td width="0%"></td>
|
1594 |
-
<td align="right">
|
1595 |
-
<img src="<?php echo WD_FMC_URL . '/images/minus.png'; ?>" 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" />
|
1596 |
-
</td>
|
1597 |
-
<td>
|
1598 |
-
<img src="<?php echo WD_FMC_URL . '/images/page_delete.png'; ?>" 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')" />
|
1599 |
-
</td>
|
1600 |
-
<td>
|
1601 |
-
<img src="<?php echo WD_FMC_URL . '/images/page_delete_all.png'; ?>" 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')" />
|
1602 |
-
</td>
|
1603 |
-
<td>
|
1604 |
-
<img src="<?php echo WD_FMC_URL . '/images/page_edit.png'; ?>" 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')" />
|
1605 |
-
</td>
|
1606 |
-
</tr>
|
1607 |
-
</tbody>
|
1608 |
-
</table>
|
1609 |
-
<?php
|
1610 |
-
}
|
1611 |
-
?>
|
1612 |
-
</div>
|
1613 |
-
</fieldset>
|
1614 |
-
<input type="hidden" name="form" id="form" />
|
1615 |
-
<input type="hidden" name="form_front" id="form_front" />
|
1616 |
-
<input type="hidden" name="pagination" id="pagination" />
|
1617 |
-
<input type="hidden" name="show_title" id="show_title" />
|
1618 |
-
<input type="hidden" name="show_numbers" id="show_numbers" />
|
1619 |
-
<input type="hidden" name="public_key" id="public_key" />
|
1620 |
-
<input type="hidden" name="private_key" id="private_key" />
|
1621 |
-
<input type="hidden" name="recaptcha_theme" id="recaptcha_theme" />
|
1622 |
-
<input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order; ?>" />
|
1623 |
-
<input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current; ?>" />
|
1624 |
-
<input type="hidden" name="counter" id="counter" value="<?php echo $row->counter; ?>" />
|
1625 |
-
<input type="hidden" id="araqel" value="0" />
|
1626 |
-
<script type="text/javascript">
|
1627 |
-
form_view = 1;
|
1628 |
-
form_view_count = 1;
|
1629 |
-
form_view_max = 1;
|
1630 |
-
function formOnload() {
|
1631 |
-
// Enable maps.
|
1632 |
-
for (t = 0; t < <?php echo $row->counter;?>; t++)
|
1633 |
-
if (document.getElementById(t+"_typeform_id_temp")) {
|
1634 |
-
if (document.getElementById(t+"_typeform_id_temp").value=="type_map" || document.getElementById(t+"_typeform_id_temp").value=="type_mark_map") {
|
1635 |
-
if_gmap_init(t);
|
1636 |
-
for (q = 0; q < 20; q++) {
|
1637 |
-
if (document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q)) {
|
1638 |
-
w_long=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q));
|
1639 |
-
w_lat=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("lat"+q));
|
1640 |
-
w_info=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("info"+q));
|
1641 |
-
add_marker_on_map(t,q, w_long, w_lat, w_info, false);
|
1642 |
-
}
|
1643 |
-
}
|
1644 |
-
}
|
1645 |
-
else
|
1646 |
-
if (document.getElementById(t+"_typeform_id_temp").value == "type_date") {
|
1647 |
-
// Calendar.setup({
|
1648 |
-
// inputField: t+"_elementform_id_temp",
|
1649 |
-
// ifFormat: document.getElementById(t+"_buttonform_id_temp").getAttribute('format'),
|
1650 |
-
// button: t+"_buttonform_id_temp",
|
1651 |
-
// align: "Tl",
|
1652 |
-
// singleClick: true,
|
1653 |
-
// firstDay: 0
|
1654 |
-
// });
|
1655 |
-
}
|
1656 |
-
else
|
1657 |
-
if(document.getElementById(t+"_typeform_id_temp").value=="type_spinner") {
|
1658 |
-
var spinner_value = jQuery("#" + t + "_elementform_id_temp").get( "aria-valuenow" );
|
1659 |
-
var spinner_min_value = document.getElementById(t+"_min_valueform_id_temp").value;
|
1660 |
-
var spinner_max_value = document.getElementById(t+"_max_valueform_id_temp").value;
|
1661 |
-
var spinner_step = document.getElementById(t+"_stepform_id_temp").value;
|
1662 |
-
|
1663 |
-
jQuery( "#"+t+"_elementform_id_temp" ).removeClass( "ui-spinner-input" )
|
1664 |
-
.prop( "disabled", false )
|
1665 |
-
.removeAttr( "autocomplete" )
|
1666 |
-
.removeAttr( "role" )
|
1667 |
-
.removeAttr( "aria-valuemin" )
|
1668 |
-
.removeAttr( "aria-valuemax" )
|
1669 |
-
.removeAttr( "aria-valuenow" );
|
1670 |
-
|
1671 |
-
span_ui= document.getElementById(t+"_elementform_id_temp").parentNode;
|
1672 |
-
span_ui.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp"));
|
1673 |
-
span_ui.parentNode.removeChild(span_ui);
|
1674 |
-
|
1675 |
-
jQuery("#"+t+"_elementform_id_temp")[0].spin = null;
|
1676 |
-
|
1677 |
-
spinner = jQuery( "#"+t+"_elementform_id_temp" ).spinner();
|
1678 |
-
spinner.spinner( "value", spinner_value );
|
1679 |
-
jQuery( "#"+t+"_elementform_id_temp" ).spinner({ min: spinner_min_value});
|
1680 |
-
jQuery( "#"+t+"_elementform_id_temp" ).spinner({ max: spinner_max_value});
|
1681 |
-
jQuery( "#"+t+"_elementform_id_temp" ).spinner({ step: spinner_step});
|
1682 |
-
|
1683 |
-
}
|
1684 |
-
else
|
1685 |
-
if(document.getElementById(t+"_typeform_id_temp").value=="type_slider") {
|
1686 |
-
|
1687 |
-
var slider_value = document.getElementById(t+"_slider_valueform_id_temp").value;
|
1688 |
-
var slider_min_value = document.getElementById(t+"_slider_min_valueform_id_temp").value;
|
1689 |
-
var slider_max_value = document.getElementById(t+"_slider_max_valueform_id_temp").value;
|
1690 |
-
|
1691 |
-
var slider_element_value = document.getElementById( t+"_element_valueform_id_temp" );
|
1692 |
-
var slider_value_save = document.getElementById( t+"_slider_valueform_id_temp" );
|
1693 |
-
|
1694 |
-
document.getElementById(t+"_elementform_id_temp").innerHTML = "";
|
1695 |
-
document.getElementById(t+"_elementform_id_temp").removeAttribute( "class" );
|
1696 |
-
document.getElementById(t+"_elementform_id_temp").removeAttribute( "aria-disabled" );
|
1697 |
-
|
1698 |
-
jQuery("#"+t+"_elementform_id_temp")[0].slide = null;
|
1699 |
-
|
1700 |
-
jQuery(function() {
|
1701 |
-
jQuery( "#"+t+"_elementform_id_temp").slider({
|
1702 |
-
range: "min",
|
1703 |
-
value: eval(slider_value),
|
1704 |
-
min: eval(slider_min_value),
|
1705 |
-
max: eval(slider_max_value),
|
1706 |
-
slide: function( event, ui ) {
|
1707 |
-
slider_element_value.innerHTML = "" + ui.value ;
|
1708 |
-
slider_value_save.value = "" + ui.value;
|
1709 |
-
|
1710 |
-
}
|
1711 |
-
});
|
1712 |
-
|
1713 |
-
|
1714 |
-
});
|
1715 |
-
|
1716 |
-
|
1717 |
-
}
|
1718 |
-
else
|
1719 |
-
if(document.getElementById(t+"_typeform_id_temp").value=="type_range"){
|
1720 |
-
var spinner_value0 = jQuery("#" + t+"_elementform_id_temp0").get( "aria-valuenow" );
|
1721 |
-
var spinner_step = document.getElementById(t+"_range_stepform_id_temp").value;
|
1722 |
-
|
1723 |
-
jQuery( "#"+t+"_elementform_id_temp0" ).removeClass( "ui-spinner-input" )
|
1724 |
-
.prop( "disabled", false )
|
1725 |
-
.removeAttr( "autocomplete" )
|
1726 |
-
.removeAttr( "role" )
|
1727 |
-
.removeAttr( "aria-valuenow" );
|
1728 |
-
|
1729 |
-
span_ui= document.getElementById(t+"_elementform_id_temp0").parentNode;
|
1730 |
-
span_ui.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp0"));
|
1731 |
-
span_ui.parentNode.removeChild(span_ui);
|
1732 |
-
|
1733 |
-
|
1734 |
-
jQuery("#"+t+"_elementform_id_temp0")[0].spin = null;
|
1735 |
-
jQuery("#"+t+"_elementform_id_temp1")[0].spin = null;
|
1736 |
-
|
1737 |
-
spinner0 = jQuery( "#"+t+"_elementform_id_temp0" ).spinner();
|
1738 |
-
spinner0.spinner( "value", spinner_value0 );
|
1739 |
-
jQuery( "#"+t+"_elementform_id_temp0" ).spinner({ step: spinner_step});
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
var spinner_value1 = jQuery("#" + t+"_elementform_id_temp1").get( "aria-valuenow" );
|
1744 |
-
|
1745 |
-
jQuery( "#"+t+"_elementform_id_temp1" ).removeClass( "ui-spinner-input" )
|
1746 |
-
.prop( "disabled", false )
|
1747 |
-
.removeAttr( "autocomplete" )
|
1748 |
-
.removeAttr( "role" )
|
1749 |
-
.removeAttr( "aria-valuenow" );
|
1750 |
-
|
1751 |
-
span_ui1= document.getElementById(t+"_elementform_id_temp1").parentNode;
|
1752 |
-
span_ui1.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp1"));
|
1753 |
-
span_ui1.parentNode.removeChild(span_ui1);
|
1754 |
-
|
1755 |
-
spinner1 = jQuery( "#"+t+"_elementform_id_temp1" ).spinner();
|
1756 |
-
spinner1.spinner( "value", spinner_value1 );
|
1757 |
-
jQuery( "#"+t+"_elementform_id_temp1" ).spinner({ step: spinner_step});
|
1758 |
-
|
1759 |
-
var myu = t;
|
1760 |
-
jQuery(document).ready(function() {
|
1761 |
-
|
1762 |
-
jQuery("#"+myu+"_mini_label_from").click(function() {
|
1763 |
-
if (jQuery(this).children('input').length == 0) {
|
1764 |
-
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()+"\">";
|
1765 |
-
jQuery(this).html(from);
|
1766 |
-
jQuery("input.from").focus();
|
1767 |
-
jQuery("input.from").blur(function() {
|
1768 |
-
var id_for_blur = document.getElementById('from').parentNode.id.split('_');
|
1769 |
-
var value = jQuery(this).val();
|
1770 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_from").text(value);
|
1771 |
-
});
|
1772 |
-
}
|
1773 |
-
});
|
1774 |
-
|
1775 |
-
jQuery("label#"+myu+"_mini_label_to").click(function() {
|
1776 |
-
if (jQuery(this).children('input').length == 0) {
|
1777 |
-
|
1778 |
-
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()+"\">";
|
1779 |
-
jQuery(this).html(to);
|
1780 |
-
jQuery("input.to").focus();
|
1781 |
-
jQuery("input.to").blur(function() {
|
1782 |
-
var id_for_blur = document.getElementById('to').parentNode.id.split('_');
|
1783 |
-
var value = jQuery(this).val();
|
1784 |
-
|
1785 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_to").text(value);
|
1786 |
-
});
|
1787 |
-
|
1788 |
-
}
|
1789 |
-
});
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
});
|
1794 |
-
}
|
1795 |
-
|
1796 |
-
else
|
1797 |
-
if(document.getElementById(t+"_typeform_id_temp").value=="type_name"){
|
1798 |
-
var myu = t;
|
1799 |
-
jQuery(document).ready(function() {
|
1800 |
-
|
1801 |
-
jQuery("#"+myu+"_mini_label_first").click(function() {
|
1802 |
-
|
1803 |
-
if (jQuery(this).children('input').length == 0) {
|
1804 |
-
|
1805 |
-
var first = "<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1806 |
-
jQuery(this).html(first);
|
1807 |
-
jQuery("input.first").focus();
|
1808 |
-
jQuery("input.first").blur(function() {
|
1809 |
-
|
1810 |
-
var id_for_blur = document.getElementById('first').parentNode.id.split('_');
|
1811 |
-
var value = jQuery(this).val();
|
1812 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_first").text(value);
|
1813 |
-
});
|
1814 |
-
}
|
1815 |
-
});
|
1816 |
-
|
1817 |
-
jQuery("label#"+myu+"_mini_label_last").click(function() {
|
1818 |
-
if (jQuery(this).children('input').length == 0) {
|
1819 |
-
|
1820 |
-
var last = "<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1821 |
-
jQuery(this).html(last);
|
1822 |
-
jQuery("input.last").focus();
|
1823 |
-
jQuery("input.last").blur(function() {
|
1824 |
-
var id_for_blur = document.getElementById('last').parentNode.id.split('_');
|
1825 |
-
var value = jQuery(this).val();
|
1826 |
-
|
1827 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_last").text(value);
|
1828 |
-
});
|
1829 |
-
|
1830 |
-
}
|
1831 |
-
});
|
1832 |
-
|
1833 |
-
jQuery("label#"+myu+"_mini_label_title").click(function() {
|
1834 |
-
if (jQuery(this).children('input').length == 0) {
|
1835 |
-
var title = "<input type='text' id='title' class='title' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1836 |
-
jQuery(this).html(title);
|
1837 |
-
jQuery("input.title").focus();
|
1838 |
-
jQuery("input.title").blur(function() {
|
1839 |
-
var id_for_blur = document.getElementById('title').parentNode.id.split('_');
|
1840 |
-
var value = jQuery(this).val();
|
1841 |
-
|
1842 |
-
|
1843 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_title").text(value);
|
1844 |
-
});
|
1845 |
-
}
|
1846 |
-
|
1847 |
-
});
|
1848 |
-
|
1849 |
-
|
1850 |
-
jQuery("label#"+myu+"_mini_label_middle").click(function() {
|
1851 |
-
if (jQuery(this).children('input').length == 0) {
|
1852 |
-
var middle = "<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1853 |
-
jQuery(this).html(middle);
|
1854 |
-
jQuery("input.middle").focus();
|
1855 |
-
jQuery("input.middle").blur(function() {
|
1856 |
-
var id_for_blur = document.getElementById('middle').parentNode.id.split('_');
|
1857 |
-
var value = jQuery(this).val();
|
1858 |
-
|
1859 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_middle").text(value);
|
1860 |
-
});
|
1861 |
-
}
|
1862 |
-
});
|
1863 |
-
|
1864 |
-
});
|
1865 |
-
}
|
1866 |
-
else
|
1867 |
-
if(document.getElementById(t+"_typeform_id_temp").value=="type_address"){
|
1868 |
-
var myu = t;
|
1869 |
-
|
1870 |
-
jQuery(document).ready(function() {
|
1871 |
-
jQuery("label#"+myu+"_mini_label_street1").click(function() {
|
1872 |
-
|
1873 |
-
if (jQuery(this).children('input').length == 0) {
|
1874 |
-
var street1 = "<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1875 |
-
jQuery(this).html(street1);
|
1876 |
-
jQuery("input.street1").focus();
|
1877 |
-
jQuery("input.street1").blur(function() {
|
1878 |
-
var id_for_blur = document.getElementById('street1').parentNode.id.split('_');
|
1879 |
-
var value = jQuery(this).val();
|
1880 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_street1").text(value);
|
1881 |
-
});
|
1882 |
-
}
|
1883 |
-
});
|
1884 |
|
1885 |
jQuery("label#"+myu+"_mini_label_street2").click(function() {
|
1886 |
if (jQuery(this).children('input').length == 0) {
|
@@ -1989,1470 +2030,318 @@ class FMViewManage_fmc {
|
|
1989 |
});
|
1990 |
|
1991 |
});
|
1992 |
-
}
|
1993 |
-
else
|
1994 |
-
if(document.getElementById(t+"_typeform_id_temp").value=="type_date_fields"){
|
1995 |
-
var myu = t;
|
1996 |
-
|
1997 |
-
jQuery(document).ready(function() {
|
1998 |
-
jQuery("label#"+myu+"_day_label").click(function() {
|
1999 |
-
if (jQuery(this).children('input').length == 0) {
|
2000 |
-
var day = "<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2001 |
-
jQuery(this).html(day);
|
2002 |
-
jQuery("input.day").focus();
|
2003 |
-
jQuery("input.day").blur(function() {
|
2004 |
-
var id_for_blur = document.getElementById('day').parentNode.id.split('_');
|
2005 |
-
var value = jQuery(this).val();
|
2006 |
-
|
2007 |
-
jQuery("#"+id_for_blur[0]+"_day_label").text(value);
|
2008 |
-
});
|
2009 |
-
}
|
2010 |
-
});
|
2011 |
-
|
2012 |
-
|
2013 |
-
jQuery("label#"+myu+"_month_label").click(function() {
|
2014 |
-
if (jQuery(this).children('input').length == 0) {
|
2015 |
-
var month = "<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2016 |
-
jQuery(this).html(month);
|
2017 |
-
jQuery("input.month").focus();
|
2018 |
-
jQuery("input.month").blur(function() {
|
2019 |
-
var id_for_blur = document.getElementById('month').parentNode.id.split('_');
|
2020 |
-
var value = jQuery(this).val();
|
2021 |
-
|
2022 |
-
jQuery("#"+id_for_blur[0]+"_month_label").text(value);
|
2023 |
-
});
|
2024 |
-
}
|
2025 |
-
});
|
2026 |
-
|
2027 |
-
jQuery("label#"+myu+"_year_label").click(function() {
|
2028 |
-
if (jQuery(this).children('input').length == 0) {
|
2029 |
-
var year = "<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2030 |
-
jQuery(this).html(year);
|
2031 |
-
jQuery("input.year").focus();
|
2032 |
-
jQuery("input.year").blur(function() {
|
2033 |
-
var id_for_blur = document.getElementById('year').parentNode.id.split('_');
|
2034 |
-
var value = jQuery(this).val();
|
2035 |
-
|
2036 |
-
jQuery("#"+id_for_blur[0]+"_year_label").text(value);
|
2037 |
-
});
|
2038 |
-
}
|
2039 |
-
});
|
2040 |
-
|
2041 |
-
});
|
2042 |
-
|
2043 |
-
|
2044 |
-
}
|
2045 |
-
else
|
2046 |
-
if(document.getElementById(t+"_typeform_id_temp").value=="type_time"){
|
2047 |
-
var myu = t;
|
2048 |
-
|
2049 |
-
jQuery(document).ready(function() {
|
2050 |
-
jQuery("label#"+myu+"_mini_label_hh").click(function() {
|
2051 |
-
if (jQuery(this).children('input').length == 0) {
|
2052 |
-
var hh = "<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2053 |
-
jQuery(this).html(hh);
|
2054 |
-
jQuery("input.hh").focus();
|
2055 |
-
jQuery("input.hh").blur(function() {
|
2056 |
-
var id_for_blur = document.getElementById('hh').parentNode.id.split('_');
|
2057 |
-
var value = jQuery(this).val();
|
2058 |
-
|
2059 |
-
|
2060 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_hh").text(value);
|
2061 |
-
});
|
2062 |
-
}
|
2063 |
-
});
|
2064 |
-
|
2065 |
-
|
2066 |
-
jQuery("label#"+myu+"_mini_label_mm").click(function() {
|
2067 |
-
if (jQuery(this).children('input').length == 0) {
|
2068 |
-
var mm = "<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2069 |
-
jQuery(this).html(mm);
|
2070 |
-
jQuery("input.mm").focus();
|
2071 |
-
jQuery("input.mm").blur(function() {
|
2072 |
-
var id_for_blur = document.getElementById('mm').parentNode.id.split('_');
|
2073 |
-
var value = jQuery(this).val();
|
2074 |
-
|
2075 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_mm").text(value);
|
2076 |
-
});
|
2077 |
-
}
|
2078 |
-
});
|
2079 |
-
|
2080 |
-
jQuery("label#"+myu+"_mini_label_ss").click(function() {
|
2081 |
-
if (jQuery(this).children('input').length == 0) {
|
2082 |
-
var ss = "<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2083 |
-
jQuery(this).html(ss);
|
2084 |
-
jQuery("input.ss").focus();
|
2085 |
-
jQuery("input.ss").blur(function() {
|
2086 |
-
var id_for_blur = document.getElementById('ss').parentNode.id.split('_');
|
2087 |
-
var value = jQuery(this).val();
|
2088 |
-
|
2089 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_ss").text(value);
|
2090 |
-
});
|
2091 |
-
}
|
2092 |
-
});
|
2093 |
-
|
2094 |
-
jQuery("label#"+myu+"_mini_label_am_pm").click(function() {
|
2095 |
-
if (jQuery(this).children('input').length == 0) {
|
2096 |
-
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()+"\">";
|
2097 |
-
jQuery(this).html(am_pm);
|
2098 |
-
jQuery("input.am_pm").focus();
|
2099 |
-
jQuery("input.am_pm").blur(function() {
|
2100 |
-
var id_for_blur = document.getElementById('am_pm').parentNode.id.split('_');
|
2101 |
-
var value = jQuery(this).val();
|
2102 |
-
|
2103 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_am_pm").text(value);
|
2104 |
-
});
|
2105 |
-
}
|
2106 |
-
});
|
2107 |
-
});
|
2108 |
-
|
2109 |
-
}
|
2110 |
-
|
2111 |
-
else
|
2112 |
-
if(document.getElementById(t+"_typeform_id_temp").value=="type_paypal_price"){
|
2113 |
-
var myu = t;
|
2114 |
-
jQuery(document).ready(function() {
|
2115 |
-
|
2116 |
-
jQuery("#"+myu+"_mini_label_dollars").click(function() {
|
2117 |
-
|
2118 |
-
if (jQuery(this).children('input').length == 0) {
|
2119 |
-
|
2120 |
-
var dollars = "<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2121 |
-
jQuery(this).html(dollars);
|
2122 |
-
jQuery("input.dollars").focus();
|
2123 |
-
jQuery("input.dollars").blur(function() {
|
2124 |
-
|
2125 |
-
var id_for_blur = document.getElementById('dollars').parentNode.id.split('_');
|
2126 |
-
var value = jQuery(this).val();
|
2127 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_dollars").text(value);
|
2128 |
-
});
|
2129 |
-
}
|
2130 |
-
});
|
2131 |
-
|
2132 |
-
jQuery("label#"+myu+"_mini_label_cents").click(function() {
|
2133 |
-
if (jQuery(this).children('input').length == 0) {
|
2134 |
-
|
2135 |
-
var cents = "<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2136 |
-
jQuery(this).html(cents);
|
2137 |
-
jQuery("input.cents").focus();
|
2138 |
-
jQuery("input.cents").blur(function() {
|
2139 |
-
var id_for_blur = document.getElementById('cents').parentNode.id.split('_');
|
2140 |
-
var value = jQuery(this).val();
|
2141 |
-
|
2142 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_cents").text(value);
|
2143 |
-
});
|
2144 |
-
|
2145 |
-
}
|
2146 |
-
});
|
2147 |
-
});
|
2148 |
-
}
|
2149 |
-
else
|
2150 |
-
if(document.getElementById(t+"_typeform_id_temp").value=="type_scale_rating"){
|
2151 |
-
var myu = t;
|
2152 |
-
jQuery(document).ready(function() {
|
2153 |
-
|
2154 |
-
jQuery("#"+myu+"_mini_label_worst").click(function() {
|
2155 |
-
|
2156 |
-
if (jQuery(this).children('input').length == 0) {
|
2157 |
-
|
2158 |
-
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()+"\">";
|
2159 |
-
jQuery(this).html(worst);
|
2160 |
-
jQuery("input.worst").focus();
|
2161 |
-
jQuery("input.worst").blur(function() {
|
2162 |
-
|
2163 |
-
var id_for_blur = document.getElementById('worst').parentNode.id.split('_');
|
2164 |
-
var value = jQuery(this).val();
|
2165 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_worst").text(value);
|
2166 |
-
});
|
2167 |
-
}
|
2168 |
-
});
|
2169 |
-
|
2170 |
-
jQuery("label#"+myu+"_mini_label_best").click(function() {
|
2171 |
-
if (jQuery(this).children('input').length == 0) {
|
2172 |
-
|
2173 |
-
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()+"\">";
|
2174 |
-
jQuery(this).html(best);
|
2175 |
-
jQuery("input.best").focus();
|
2176 |
-
jQuery("input.best").blur(function() {
|
2177 |
-
var id_for_blur = document.getElementById('best').parentNode.id.split('_');
|
2178 |
-
var value = jQuery(this).val();
|
2179 |
-
|
2180 |
-
jQuery("#"+id_for_blur[0]+"_mini_label_best").text(value);
|
2181 |
-
});
|
2182 |
-
|
2183 |
-
}
|
2184 |
-
});
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
});
|
2189 |
-
}
|
2190 |
-
}
|
2191 |
-
form_view = 1;
|
2192 |
-
form_view_count = 0;
|
2193 |
-
for (i = 1; i <= 30; i++) {
|
2194 |
-
if (document.getElementById('form_id_tempform_view'+i)) {
|
2195 |
-
form_view_count++;
|
2196 |
-
form_view_max=i;
|
2197 |
-
}
|
2198 |
-
}
|
2199 |
-
if (form_view_count > 1) {
|
2200 |
-
for (i=1; i<=form_view_max; i++) {
|
2201 |
-
if (document.getElementById('form_id_tempform_view'+i)) {
|
2202 |
-
first_form_view=i;
|
2203 |
-
break;
|
2204 |
-
}
|
2205 |
-
}
|
2206 |
-
form_view=form_view_max;
|
2207 |
-
generate_page_nav(first_form_view);
|
2208 |
-
var img_EDIT = document.createElement("img");
|
2209 |
-
img_EDIT.setAttribute("src", "<?php echo WD_FMC_URL . '/images/edit.png'; ?>");
|
2210 |
-
img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
|
2211 |
-
img_EDIT.setAttribute("onclick", 'el_page_navigation()');
|
2212 |
-
var td_EDIT = document.getElementById("edit_page_navigation");
|
2213 |
-
td_EDIT.appendChild(img_EDIT);
|
2214 |
-
document.getElementById('page_navigation').appendChild(td_EDIT);
|
2215 |
-
}
|
2216 |
-
//if(document.getElementById('take').innerHTML.indexOf('up_row(')==-1) location.reload(true);
|
2217 |
-
//else
|
2218 |
-
|
2219 |
-
document.getElementById('form').value=document.getElementById('take').innerHTML;
|
2220 |
-
document.getElementById('araqel').value = 1;
|
2221 |
-
}
|
2222 |
-
jQuery(window).load(function () {
|
2223 |
-
formOnload();
|
2224 |
-
});
|
2225 |
-
</script>
|
2226 |
-
|
2227 |
-
<input type="hidden" name="option" value="com_formmaker" />
|
2228 |
-
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
|
2229 |
-
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
|
2230 |
-
|
2231 |
-
<input type="hidden" id="task" name="task" value=""/>
|
2232 |
-
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
2233 |
-
</form>
|
2234 |
-
<script>
|
2235 |
-
jQuery(window).load(function() {
|
2236 |
-
spider_popup();
|
2237 |
-
});
|
2238 |
-
</script>
|
2239 |
-
<?php
|
2240 |
-
}
|
2241 |
-
|
2242 |
-
public function form_options_old($id) {
|
2243 |
-
$row = $this->model->get_row_data($id);
|
2244 |
-
$themes = $this->model->get_theme_rows_data('_old');
|
2245 |
-
$page_title = $row->title . ' form options';
|
2246 |
-
$label_id = array();
|
2247 |
-
$label_label = array();
|
2248 |
-
$label_type = array();
|
2249 |
-
$label_all = explode('#****#', $row->label_order_current);
|
2250 |
-
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
2251 |
-
foreach ($label_all as $key => $label_each) {
|
2252 |
-
$label_id_each = explode('#**id**#', $label_each);
|
2253 |
-
array_push($label_id, $label_id_each[0]);
|
2254 |
-
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
2255 |
-
array_push($label_label, $label_order_each[0]);
|
2256 |
-
array_push($label_type, $label_order_each[1]);
|
2257 |
-
}
|
2258 |
-
?>
|
2259 |
-
<script>
|
2260 |
-
gen = "<?php echo $row->counter; ?>";
|
2261 |
-
form_view_max = 20;
|
2262 |
-
function set_preview() {
|
2263 |
-
document.getElementById('preview_form').href = '<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&id='+document.getElementById('theme').value+'&width=1000&height=500&TB_iframe=1';
|
2264 |
-
}
|
2265 |
-
</script>
|
2266 |
-
<div style="clear: both; float: left; width: 99%;">
|
2267 |
-
<div style="float:left; font-size: 14px; font-weight: bold;">
|
2268 |
-
This section allows you to edit form options.
|
2269 |
-
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-3.html">Read More in User Manual</a>
|
2270 |
-
</div>
|
2271 |
-
<div style="float: right; text-align: right;">
|
2272 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromContactForm.php">
|
2273 |
-
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FMC_URL . '/images/wd_logo.png'; ?>" />
|
2274 |
-
</a>
|
2275 |
-
</div>
|
2276 |
-
</div>
|
2277 |
-
<form class="wrap" method="post" action="admin.php?page=manage_fmc" style="float: left; width: 99%;" name="adminForm" id="adminForm">
|
2278 |
-
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
2279 |
-
<h2><?php echo $page_title; ?></h2>
|
2280 |
-
<div style="float: right; margin: 0 5px 0 0;">
|
2281 |
-
<input class="button-secondary" type="submit" onclick="if (spider_check_email('mail') ||
|
2282 |
-
spider_check_email('from_mail') ||
|
2283 |
-
spider_check_email('paypal_email')) {return false;}; spider_set_input_value('task', 'save_options_old')" value="Save"/>
|
2284 |
-
<input class="button-secondary" type="submit" onclick="if (spider_check_email('mail') ||
|
2285 |
-
spider_check_email('from_mail') ||
|
2286 |
-
spider_check_email('paypal_email')) {return false;}; spider_set_input_value('task', 'apply_options_old')" value="Apply"/>
|
2287 |
-
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel_options_old')" value="Cancel"/>
|
2288 |
-
</div>
|
2289 |
-
<input type="hidden" name="take" id="take" value="<?php $row->form ?>">
|
2290 |
-
<div class="submenu-box" style="width: 99%; float: left; margin: 15px 0 0 0;">
|
2291 |
-
<div class="submenu-pad">
|
2292 |
-
<ul id="submenu" class="configuration">
|
2293 |
-
<li>
|
2294 |
-
<a id="general" class="fm_fieldset_tab" onclick="form_maker_options_tabs('general')" href="#">General Options</a>
|
2295 |
-
</li>
|
2296 |
-
<li>
|
2297 |
-
<a id="actions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('actions')" href="#">Actions after Submission</a>
|
2298 |
-
</li>
|
2299 |
-
<li>
|
2300 |
-
<a id="payment" class="fm_fieldset_tab" onclick="form_maker_options_tabs('payment')" href="#">Payment Options</a>
|
2301 |
-
</li>
|
2302 |
-
<li>
|
2303 |
-
<a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript')" href="#">JavaScript</a>
|
2304 |
-
</li>
|
2305 |
-
<li>
|
2306 |
-
<a id="custom" class="fm_fieldset_tab" onclick="form_maker_options_tabs('custom')" href="#">Custom Text in Email</a>
|
2307 |
-
</li>
|
2308 |
-
</ul>
|
2309 |
-
</div>
|
2310 |
-
</div>
|
2311 |
-
<fieldset id="actions_fieldset" class="adminform fm_fieldset_deactive">
|
2312 |
-
<legend style="color:#0B55C4;font-weight: bold;">Actions after submission</legend>
|
2313 |
-
<table class="admintable">
|
2314 |
-
<tr valign="top">
|
2315 |
-
<td class="fm_options_label">
|
2316 |
-
<label>Action type</label>
|
2317 |
-
</td>
|
2318 |
-
<td class="fm_options_value">
|
2319 |
-
<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>
|
2320 |
-
<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>
|
2321 |
-
<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>
|
2322 |
-
<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>
|
2323 |
-
<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>
|
2324 |
-
</td>
|
2325 |
-
</tr>
|
2326 |
-
<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"' : ''); ?>>
|
2327 |
-
<td class="fm_options_label">
|
2328 |
-
<label>Stay on Form</label>
|
2329 |
-
</td>
|
2330 |
-
<td class="fm_options_value">
|
2331 |
-
<img src="<?php echo WD_FMC_URL . '/images/tick.png'; ?>" border="0">
|
2332 |
-
</td>
|
2333 |
-
</tr>
|
2334 |
-
<tr id="post" <?php echo (($row->submit_text_type != 2) ? 'style="display:none"' : ''); ?>>
|
2335 |
-
<td class="fm_options_label">
|
2336 |
-
<label for="post_name">Post</label>
|
2337 |
-
</td>
|
2338 |
-
<td class="fm_options_value">
|
2339 |
-
<select id="post_name" name="post_name" style="width: 153px; font-size: 11px;">
|
2340 |
-
<option value="0">- Select Post -</option>
|
2341 |
-
<?php
|
2342 |
-
// The Query.
|
2343 |
-
$args = array('posts_per_page' => 10000);
|
2344 |
-
query_posts($args);
|
2345 |
-
// The Loop.
|
2346 |
-
while (have_posts()) : the_post(); ?>
|
2347 |
-
<option value="<?php $x = get_permalink(get_the_ID()); echo $x; ?>" <?php echo (($row->article_id == $x) ? 'selected="selected"' : ''); ?>><?php the_title(); ?></option>
|
2348 |
-
<?php
|
2349 |
-
endwhile;
|
2350 |
-
// Reset Query.
|
2351 |
-
wp_reset_query();
|
2352 |
-
?>
|
2353 |
-
</select>
|
2354 |
-
</td>
|
2355 |
-
</tr>
|
2356 |
-
<tr id="page" <?php echo (($row->submit_text_type != 5) ? 'style="display:none"' : ''); ?>>
|
2357 |
-
<td class="fm_options_label">
|
2358 |
-
<label for="page_name">Page</label>
|
2359 |
-
</td>
|
2360 |
-
<td class="fm_options_value">
|
2361 |
-
<select id="page_name" name="page_name" style="width:153px; font-size:11px;">
|
2362 |
-
<option value="0">- Select Page -</option>
|
2363 |
-
<?php
|
2364 |
-
// The Query.
|
2365 |
-
$pages = get_pages();
|
2366 |
-
// The Loop.
|
2367 |
-
foreach ($pages as $page) {
|
2368 |
-
$page_id = get_page_link($page->ID);
|
2369 |
-
?>
|
2370 |
-
<option value="<?php echo $page_id; ?>" <?php echo (($row->article_id == $page_id) ? 'selected="selected"' : ''); ?>><?php echo $page->post_title; ?></option>
|
2371 |
-
<?php
|
2372 |
-
}
|
2373 |
-
// Reset Query.
|
2374 |
-
wp_reset_query();
|
2375 |
-
?>
|
2376 |
-
</select>
|
2377 |
-
</td>
|
2378 |
-
</tr>
|
2379 |
-
<tr id="custom_text" <?php echo (($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
|
2380 |
-
<td class="fm_options_label">
|
2381 |
-
<label for="submit_text">Text</label>
|
2382 |
-
</td>
|
2383 |
-
<td class="fm_options_value">
|
2384 |
-
<?php
|
2385 |
-
if (user_can_richedit()) {
|
2386 |
-
wp_editor($row->submit_text, 'submit_text', array('teeny' => FALSE, 'textarea_name' => 'submit_text', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
2387 |
-
}
|
2388 |
-
else {
|
2389 |
-
?>
|
2390 |
-
<textarea cols="36" rows="5" id="submit_text" name="submit_text" style="resize: vertical;">
|
2391 |
-
<?php echo $row->submit_text; ?>
|
2392 |
-
</textarea>
|
2393 |
-
<?php
|
2394 |
-
}
|
2395 |
-
?>
|
2396 |
-
</td>
|
2397 |
-
</tr>
|
2398 |
-
<tr id="url" <?php echo (($row->submit_text_type != 4 ) ? 'style="display:none"' : ''); ?>>
|
2399 |
-
<td class="fm_options_label">
|
2400 |
-
<label for="url">URL</label>
|
2401 |
-
</td>
|
2402 |
-
<td class="fm_options_value">
|
2403 |
-
<input type="text" id="url" name="url" style="width:300px" value="<?php echo $row->url; ?>" />
|
2404 |
-
</td>
|
2405 |
-
</tr>
|
2406 |
-
</table>
|
2407 |
-
</fieldset>
|
2408 |
-
<fieldset id="custom_fieldset" class="adminform fm_fieldset_deactive">
|
2409 |
-
<legend style="color:#0B55C4;font-weight: bold;">Custom text in email</legend>
|
2410 |
-
<table class="admintable">
|
2411 |
-
<tr>
|
2412 |
-
<td class="fm_options_label" valign="top">
|
2413 |
-
<label>For Administrator</label>
|
2414 |
-
</td>
|
2415 |
-
<td class="fm_options_value">
|
2416 |
-
<div style="margin-bottom:5px">
|
2417 |
-
<?php
|
2418 |
-
$choise = "document.getElementById('script_mail')";
|
2419 |
-
for ($i = 0; $i < count($label_label); $i++) {
|
2420 |
-
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") {
|
2421 |
-
continue;
|
2422 |
-
}
|
2423 |
-
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2424 |
-
?>
|
2425 |
-
<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; ?>')" />
|
2426 |
-
<?php
|
2427 |
-
}
|
2428 |
-
?>
|
2429 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
|
2430 |
-
</div>
|
2431 |
-
<?php
|
2432 |
-
if (user_can_richedit()) {
|
2433 |
-
wp_editor($row->script_mail, 'script_mail', array('teeny' => FALSE, 'textarea_name' => 'script_mail', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
2434 |
-
}
|
2435 |
-
else {
|
2436 |
-
?>
|
2437 |
-
<textarea name="script_mail" id="script_mail" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail; ?></textarea>
|
2438 |
-
<?php
|
2439 |
-
}
|
2440 |
-
?>
|
2441 |
-
</td>
|
2442 |
-
</tr>
|
2443 |
-
<tr>
|
2444 |
-
<td valign="top" height="30"></td>
|
2445 |
-
<td valign="top"></td>
|
2446 |
-
</tr>
|
2447 |
-
<tr>
|
2448 |
-
<td class="fm_options_label" valign="top">
|
2449 |
-
<label>For User</label>
|
2450 |
-
</td>
|
2451 |
-
<td class="fm_options_value">
|
2452 |
-
<div style="margin-bottom:5px">
|
2453 |
-
<?php
|
2454 |
-
$choise = "document.getElementById('script_mail_user')";
|
2455 |
-
for ($i = 0; $i < count($label_label); $i++) {
|
2456 |
-
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") {
|
2457 |
-
continue;
|
2458 |
-
}
|
2459 |
-
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2460 |
-
?>
|
2461 |
-
<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; ?>')" />
|
2462 |
-
<?php
|
2463 |
-
}
|
2464 |
-
?>
|
2465 |
-
<input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
|
2466 |
-
</div>
|
2467 |
-
<?php
|
2468 |
-
if (user_can_richedit()) {
|
2469 |
-
wp_editor($row->script_mail_user, 'script_mail_user', array('teeny' => FALSE, 'textarea_name' => 'script_mail_user', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
2470 |
-
}
|
2471 |
-
else {
|
2472 |
-
?>
|
2473 |
-
<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>
|
2474 |
-
<?php
|
2475 |
-
}
|
2476 |
-
?>
|
2477 |
-
</td>
|
2478 |
-
</tr>
|
2479 |
-
</table>
|
2480 |
-
</fieldset>
|
2481 |
-
<fieldset id="general_fieldset" class="adminform fm_fieldset_deactive">
|
2482 |
-
<legend style="color:#0B55C4;font-weight: bold;">General Options</legend>
|
2483 |
-
<table class="admintable" style="float:left">
|
2484 |
-
<tr valign="top">
|
2485 |
-
<td class="fm_options_label">
|
2486 |
-
<label for="mail">Email to send submissions to</label>
|
2487 |
-
</td>
|
2488 |
-
<td class="fm_options_value">
|
2489 |
-
<input id="mail" name="mail" value="<?php echo $row->mail; ?>" style="width:250px;" />
|
2490 |
-
</td>
|
2491 |
-
</tr>
|
2492 |
-
<tr valign="top">
|
2493 |
-
<td class="fm_options_label">
|
2494 |
-
<label for="from_mail">From Email</label>
|
2495 |
-
</td>
|
2496 |
-
<td class="fm_options_value">
|
2497 |
-
<input id="from_mail" name="from_mail" value="<?php echo $row->from_mail; ?>" style="width:250px;" />
|
2498 |
-
</td>
|
2499 |
-
</tr>
|
2500 |
-
<tr valign="top">
|
2501 |
-
<td class="fm_options_label">
|
2502 |
-
<label for="from_name">From Name</label>
|
2503 |
-
</td>
|
2504 |
-
<td class="fm_options_value">
|
2505 |
-
<input id="from_name" name="from_name" value="<?php echo $row->from_name; ?>" style="width:250px;"/>
|
2506 |
-
</td>
|
2507 |
-
</tr>
|
2508 |
-
<tr valign="top">
|
2509 |
-
<td class="fm_options_label">
|
2510 |
-
<label for="theme">Theme</label>
|
2511 |
-
</td>
|
2512 |
-
<td class="fm_options_value">
|
2513 |
-
<select id="theme" name="theme" style="width:260px;" onChange="set_preview()">
|
2514 |
-
<?php
|
2515 |
-
foreach ($themes as $theme) {
|
2516 |
-
?>
|
2517 |
-
<option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?>><?php echo $theme->title; ?></option>
|
2518 |
-
<?php
|
2519 |
-
}
|
2520 |
-
?>
|
2521 |
-
</select>
|
2522 |
-
<a href="<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', '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;">
|
2523 |
-
Preview
|
2524 |
-
</a>
|
2525 |
-
</td>
|
2526 |
-
</tr>
|
2527 |
-
</table>
|
2528 |
-
</fieldset>
|
2529 |
-
<fieldset id="payment_fieldset" class="adminform fm_fieldset_deactive">
|
2530 |
-
<legend style="color:#0B55C4;font-weight: bold;">Payment Options</legend>
|
2531 |
-
<table class="admintable">
|
2532 |
-
<tr>
|
2533 |
-
<td colspan="2">
|
2534 |
-
<div class="error_cfm" style="padding: 5px; font-size: 14px;">Paypal Options are disabled in free version.</div>
|
2535 |
-
</td>
|
2536 |
-
</tr>
|
2537 |
-
<tr valign="top">
|
2538 |
-
<td class="fm_options_label">
|
2539 |
-
<label>Turn Paypal On</label>
|
2540 |
-
</td>
|
2541 |
-
<td class="fm_options_value">
|
2542 |
-
<div><input disabled="disabled" type="radio" name="paypal_mode" id="paypal_mode1" value="1" <?php echo ($row->paypal_mode == "1") ? "checked" : ""; ?> /><label for="paypal_mode1">On</label></div>
|
2543 |
-
<div><input disabled="disabled" type="radio" name="paypal_mode" id="paypal_mode2" value="0" <?php echo ($row->paypal_mode != "1") ? "checked" : ""; ?> /><label for="paypal_mode2">Off</label></div>
|
2544 |
-
</td>
|
2545 |
-
</tr>
|
2546 |
-
<tr valign="top">
|
2547 |
-
<td class="fm_options_label">
|
2548 |
-
<label>Checkout Mode</label>
|
2549 |
-
</td>
|
2550 |
-
<td class="fm_options_value">
|
2551 |
-
<div><input disabled="disabled" type="radio" name="checkout_mode" id="checkout_mode1" value="production" <?php echo ($row->checkout_mode == "production") ? "checked" : ""; ?> /><label for="checkout_mode1">Production</label></div>
|
2552 |
-
<div><input disabled="disabled" type="radio" name="checkout_mode" id="checkout_mode2" value="testmode" <?php echo ($row->checkout_mode != "production") ? "checked" : ""; ?> /><label for="checkout_mode2">Testmode</label></div>
|
2553 |
-
</td>
|
2554 |
-
</tr>
|
2555 |
-
<tr valign="top">
|
2556 |
-
<td class="fm_options_label">
|
2557 |
-
<label for="paypal_email">Paypal email</label>
|
2558 |
-
</td>
|
2559 |
-
<td class="fm_options_value">
|
2560 |
-
<input disabled="disabled" type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area" style="width:250px">
|
2561 |
-
</td>
|
2562 |
-
</tr>
|
2563 |
-
<tr valign="top">
|
2564 |
-
<td class="fm_options_label">
|
2565 |
-
<label for="payment_currency">Payment Currency</label>
|
2566 |
-
</td>
|
2567 |
-
<td class="fm_options_value">
|
2568 |
-
<select disabled="disabled" id="payment_currency" name="payment_currency" style="width:253px">
|
2569 |
-
<option value="USD" <?php echo (($row->payment_currency == 'USD') ? 'selected' : ''); ?>>$ • U.S. Dollar</option>
|
2570 |
-
<option value="EUR" <?php echo (($row->payment_currency == 'EUR') ? 'selected' : ''); ?>>€ • Euro</option>
|
2571 |
-
<option value="GBP" <?php echo (($row->payment_currency == 'GBP') ? 'selected' : ''); ?>>£ • Pound Sterling</option>
|
2572 |
-
<option value="JPY" <?php echo (($row->payment_currency == 'JPY') ? 'selected' : ''); ?>>¥ • Japanese Yen</option>
|
2573 |
-
<option value="CAD" <?php echo (($row->payment_currency == 'CAD') ? 'selected' : ''); ?>>C$ • Canadian Dollar</option>
|
2574 |
-
<option value="MXN" <?php echo (($row->payment_currency == 'MXN') ? 'selected' : ''); ?>>Mex$ • Mexican Peso</option>
|
2575 |
-
<option value="HKD" <?php echo (($row->payment_currency == 'HKD') ? 'selected' : ''); ?>>HK$ • Hong Kong Dollar</option>
|
2576 |
-
<option value="HUF" <?php echo (($row->payment_currency == 'HUF') ? 'selected' : ''); ?>>Ft • Hungarian Forint</option>
|
2577 |
-
<option value="NOK" <?php echo (($row->payment_currency == 'NOK') ? 'selected' : ''); ?>>kr • Norwegian Kroner</option>
|
2578 |
-
<option value="NZD" <?php echo (($row->payment_currency == 'NZD') ? 'selected' : ''); ?>>NZ$ • New Zealand Dollar</option>
|
2579 |
-
<option value="SGD" <?php echo (($row->payment_currency == 'SGD') ? 'selected' : ''); ?>>S$ • Singapore Dollar</option>
|
2580 |
-
<option value="SEK" <?php echo (($row->payment_currency == 'SEK') ? 'selected' : ''); ?>>kr • Swedish Kronor</option>
|
2581 |
-
<option value="PLN" <?php echo (($row->payment_currency == 'PLN') ? 'selected' : ''); ?>>zl • Polish Zloty</option>
|
2582 |
-
<option value="AUD" <?php echo (($row->payment_currency == 'AUD') ? 'selected' : ''); ?>>A$ • Australian Dollar</option>
|
2583 |
-
<option value="DKK" <?php echo (($row->payment_currency == 'DKK') ? 'selected' : ''); ?>>kr • Danish Kroner</option>
|
2584 |
-
<option value="CHF" <?php echo (($row->payment_currency == 'CHF') ? 'selected' : ''); ?>>CHF • Swiss Francs</option>
|
2585 |
-
<option value="CZK" <?php echo (($row->payment_currency == 'CZK') ? 'selected' : ''); ?>>Kc • Czech Koruny</option>
|
2586 |
-
<option value="ILS" <?php echo (($row->payment_currency == 'ILS') ? 'selected' : ''); ?>>₪ • Israeli Sheqel</option>
|
2587 |
-
<option value="BRL" <?php echo (($row->payment_currency == 'BRL') ? 'selected' : ''); ?>>R$ • Brazilian Real</option>
|
2588 |
-
<option value="TWD" <?php echo (($row->payment_currency == 'TWD') ? 'selected' : ''); ?>>NT$ • Taiwan New Dollars</option>
|
2589 |
-
<option value="MYR" <?php echo (($row->payment_currency == 'MYR') ? 'selected' : ''); ?>>RM • Malaysian Ringgit</option>
|
2590 |
-
<option value="PHP" <?php echo (($row->payment_currency == 'PHP') ? 'selected' : ''); ?>>₱ • Philippine Peso</option>
|
2591 |
-
<option value="THB" <?php echo (($row->payment_currency == 'THB') ? 'selected' : ''); ?>>฿ • Thai Bahtv</option>
|
2592 |
-
</select>
|
2593 |
-
</td>
|
2594 |
-
</tr>
|
2595 |
-
<tr valign="top">
|
2596 |
-
<td class="fm_options_label">
|
2597 |
-
<label for="tax">Tax</label>
|
2598 |
-
</td>
|
2599 |
-
<td class="fm_options_value">
|
2600 |
-
<input disabled="disabled" type="text" name="tax" id="tax" value="<?php echo $row->tax; ?>" class="text_area" style="width:30px" onKeyPress="return check_isnum(event)"> %
|
2601 |
-
</td>
|
2602 |
-
</tr>
|
2603 |
-
</table>
|
2604 |
-
</fieldset>
|
2605 |
-
<fieldset id="javascript_fieldset" class="adminform fm_fieldset_deactive">
|
2606 |
-
<legend style="color:#0B55C4;font-weight: bold;">JavaScript</legend>
|
2607 |
-
<table class="admintable">
|
2608 |
-
<tr valign="top">
|
2609 |
-
<td class="fm_options_label">
|
2610 |
-
<label for="javascript">Javascript</label>
|
2611 |
-
</td>
|
2612 |
-
<td class="fm_options_value">
|
2613 |
-
<textarea style="margin: 0px;" cols="60" rows="30" name="javascript" id="javascript"><?php echo $row->javascript; ?></textarea>
|
2614 |
-
</td>
|
2615 |
-
</tr>
|
2616 |
-
</table>
|
2617 |
-
</fieldset>
|
2618 |
-
<input type="hidden" name="fieldset_id" id="fieldset_id" value="<?php echo WDW_FMC_Library::get('fieldset_id', 'general'); ?>" />
|
2619 |
-
<input type="hidden" id="task" name="task" value=""/>
|
2620 |
-
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
2621 |
-
</form>
|
2622 |
-
<script>
|
2623 |
-
jQuery(window).load(function () {
|
2624 |
-
form_maker_options_tabs(jQuery("#fieldset_id").val());
|
2625 |
-
spider_popup();
|
2626 |
});
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2630 |
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
spider_check_email('reply_to') ||
|
2730 |
-
spider_check_email('mail_from_user') ||
|
2731 |
-
spider_check_email('reply_to_user') ||
|
2732 |
-
spider_check_email('mail_from_other') ||
|
2733 |
-
spider_check_email('reply_to_other') ||
|
2734 |
-
spider_check_email('paypal_email')) {return false;}; set_condition(); spider_set_input_value('task', 'save_options')" value="Save"/>
|
2735 |
-
<input class="button-secondary" type="submit" onclick="if (spider_check_email('mailToAdd') ||
|
2736 |
-
spider_check_email('from_mail') ||
|
2737 |
-
spider_check_email('reply_to') ||
|
2738 |
-
spider_check_email('mail_from_user') ||
|
2739 |
-
spider_check_email('reply_to_user') ||
|
2740 |
-
spider_check_email('mail_from_other') ||
|
2741 |
-
spider_check_email('reply_to_other') ||
|
2742 |
-
spider_check_email('paypal_email')) {return false;}; set_condition(); spider_set_input_value('task', 'apply_options')" value="Apply"/>
|
2743 |
-
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel_options')" value="Cancel"/>
|
2744 |
-
</div>
|
2745 |
-
<div class="submenu-box" style="width: 99%; float: left; margin: 15px 0 0 0;">
|
2746 |
-
<div class="submenu-pad">
|
2747 |
-
<ul id="submenu" class="configuration">
|
2748 |
-
<li>
|
2749 |
-
<a id="general" class="fm_fieldset_tab" onclick="form_maker_options_tabs('general')" href="#">General Options</a>
|
2750 |
-
</li>
|
2751 |
-
<li>
|
2752 |
-
<a id="custom" class="fm_fieldset_tab" onclick="form_maker_options_tabs('custom')" href="#">Email Options</a>
|
2753 |
-
</li>
|
2754 |
-
<li>
|
2755 |
-
<a id="actions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('actions')" href="#">Actions after Submission</a>
|
2756 |
-
</li>
|
2757 |
-
<li>
|
2758 |
-
<a id="payment" class="fm_fieldset_tab" onclick="form_maker_options_tabs('payment')" href="#">Payment Options</a>
|
2759 |
-
</li>
|
2760 |
-
<li>
|
2761 |
-
<a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript'); codemirror_for_javascript();" href="#">JavaScript</a>
|
2762 |
-
</li>
|
2763 |
-
<li>
|
2764 |
-
<a id="conditions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('conditions')" href="#">Conditional Fields</a>
|
2765 |
-
</li>
|
2766 |
-
</ul>
|
2767 |
-
</div>
|
2768 |
-
</div>
|
2769 |
-
<fieldset id="general_fieldset" class="adminform fm_fieldset_deactive">
|
2770 |
-
<legend style="color:#0B55C4;font-weight: bold;">General Options</legend>
|
2771 |
-
<table class="admintable">
|
2772 |
-
<tr valign="top">
|
2773 |
-
<td class="fm_options_label">
|
2774 |
-
<label>Published</label>
|
2775 |
-
</td>
|
2776 |
-
<td class="fm_options_value">
|
2777 |
-
<input type="radio" name="published" id="published_yes" value="1" <?php echo ($row->published) ? "checked" : ""; ?> /><label for="published_yes">Yes</label>
|
2778 |
-
<input type="radio" name="published" id="published_no" value="0" <?php echo (!$row->published) ? "checked" : ""; ?> /><label for="published_no">No</label>
|
2779 |
-
</td>
|
2780 |
-
</tr>
|
2781 |
-
<tr valign="top">
|
2782 |
-
<td class="fm_options_label">
|
2783 |
-
<label>Save data(to database)</label>
|
2784 |
-
</td>
|
2785 |
-
<td class="fm_options_value">
|
2786 |
-
<input type="radio" name="savedb" id="savedb_yes" value="1" <?php echo ($row->savedb) ? "checked" : ""; ?> /><label for="savedb_yes">Yes</label>
|
2787 |
-
<input type="radio" name="savedb" id="savedb_no" value="0" <?php echo (!$row->savedb) ? "checked" : ""; ?> /><label for="savedb_no">No</label>
|
2788 |
-
</td>
|
2789 |
-
</tr>
|
2790 |
-
<tr valign="top">
|
2791 |
-
<td class="fm_options_label">
|
2792 |
-
<label for="theme">Theme</label>
|
2793 |
-
</td>
|
2794 |
-
<td class="fm_options_value">
|
2795 |
-
<select id="theme" name="theme" style="width:260px;" onChange="set_preview()">
|
2796 |
-
<?php
|
2797 |
-
foreach ($themes as $theme) {
|
2798 |
-
?>
|
2799 |
-
<option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?>><?php echo $theme->title; ?></option>
|
2800 |
-
<?php
|
2801 |
-
}
|
2802 |
-
?>
|
2803 |
-
</select>
|
2804 |
-
<a href="<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', 'form_id' => $row->id, 'test_theme' => $row->theme, '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;">
|
2805 |
-
Preview
|
2806 |
-
</a>
|
2807 |
-
<a href="<?php echo add_query_arg(array('action' => 'FormMakerEditCSS_fmc', 'id' => $row->theme, 'form_id' => $row->id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" class="button-secondary thickbox thickbox-preview" id="edit_css" title="Edit CSS" onclick="return false;">
|
2808 |
-
Edit CSS
|
2809 |
-
</a>
|
2810 |
-
</td>
|
2811 |
-
</tr>
|
2812 |
-
<tr valign="top">
|
2813 |
-
<td class="fm_options_label">
|
2814 |
-
<label for="requiredmark">Required fields mark</label>
|
2815 |
-
</td>
|
2816 |
-
<td class="fm_options_value">
|
2817 |
-
<input type="text" id="requiredmark" name="requiredmark" value="<?php echo $row->requiredmark; ?>" style="width:250px;" />
|
2818 |
-
</td>
|
2819 |
-
</tr>
|
2820 |
-
</table>
|
2821 |
-
<div class="error_cfm" style="padding: 5px; font-size: 14px;">Front end submissions are disabled in free version.</div>
|
2822 |
-
<fieldset class="adminform">
|
2823 |
-
<legend style="color:#0B55C4;font-weight: bold;">Front end submissions access level</legend>
|
2824 |
-
<table>
|
2825 |
-
<tr>
|
2826 |
-
<td class="key">
|
2827 |
-
<label for="name">
|
2828 |
-
Allow User to see submissions:
|
2829 |
-
</label>
|
2830 |
-
</td>
|
2831 |
-
<td>
|
2832 |
-
<?php
|
2833 |
-
$checked_UserGroup=explode(',',$row->user_id_wd);
|
2834 |
-
$i = 0;
|
2835 |
-
foreach($userGroups as $val => $uG) {
|
2836 |
-
echo '<input disabled="disabled" type="checkbox" value="'.$val .'" id="user_'.$i.'"';
|
2837 |
-
if(in_array($val ,$checked_UserGroup))
|
2838 |
-
echo 'checked="checked"';
|
2839 |
-
echo 'onchange="acces_level('.count($userGroups).')"/><label for="user_'.$i.'">'.$uG["name"].'</label><br>';
|
2840 |
-
$i++;
|
2841 |
-
}
|
2842 |
-
?>
|
2843 |
-
<input disabled="disabled" type="checkbox" value="guest" id="user_<?php echo $i; ?>" onchange="acces_level(<?php echo count($userGroups); ?>)"<?php echo (in_array('guest', $checked_UserGroup) ? 'checked="checked"' : '') ?>/><label for="user_<?php echo $i; ?>">Guest</label>
|
2844 |
-
<input disabled="disabled" type="hidden" name="user_id_wd" value="<?php echo $row->user_id_wd ?>" id="user_id_wd" />
|
2845 |
-
</td>
|
2846 |
-
</tr>
|
2847 |
-
</table>
|
2848 |
-
</fieldset>
|
2849 |
-
<?php
|
2850 |
-
$labels_for_submissions = $this->model->get_labels($id);
|
2851 |
-
$payment_info = $this->model->is_paypal($id);
|
2852 |
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
{
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
|
|
2900 |
}
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
}
|
2908 |
-
return false;
|
2909 |
}
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
checked_ids += this.value+',';
|
2916 |
}
|
2917 |
-
});
|
2918 |
-
if(class_name == 'filed_label') {
|
2919 |
-
document.getElementById("frontend_submit_fields").value = checked_ids ;
|
2920 |
-
if(checked_ids == document.getElementById("all_fields").value)
|
2921 |
-
document.getElementById("all_fields").checked = true;
|
2922 |
-
else
|
2923 |
-
document.getElementById("all_fields").checked = false;
|
2924 |
-
}
|
2925 |
-
else {
|
2926 |
-
document.getElementById("frontend_submit_stat_fields").value = checked_ids ;
|
2927 |
-
if(checked_ids == document.getElementById("all_stats_fields").value)
|
2928 |
-
document.getElementById("all_stats_fields").checked = true;
|
2929 |
-
else
|
2930 |
-
document.getElementById("all_stats_fields").checked = false;
|
2931 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2932 |
}
|
|
|
|
|
2933 |
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
});
|
2942 |
-
|
2943 |
-
jQuery('.stats_filed_label').each(function() {
|
2944 |
-
if(document.getElementById("frontend_submit_stat_fields").value == document.getElementById("all_stats_fields").value)
|
2945 |
-
document.getElementById("all_stats_fields").checked = true;
|
2946 |
-
if(inArray(this.value, document.getElementById("frontend_submit_stat_fields").value.split(","))) {
|
2947 |
-
this.checked = true;
|
2948 |
-
}
|
2949 |
-
});
|
2950 |
-
|
2951 |
-
jQuery(document).on('change','input[name="all_fields"]',function() {
|
2952 |
-
jQuery('.filed_label').prop("checked" , this.checked);
|
2953 |
-
});
|
2954 |
-
|
2955 |
-
jQuery(document).on('change','input[name="all_stats_fields"]',function() {
|
2956 |
-
jQuery('.stats_filed_label').prop("checked" , this.checked);
|
2957 |
-
});
|
2958 |
-
});
|
2959 |
-
</script>
|
2960 |
-
|
2961 |
-
<style>
|
2962 |
-
li{
|
2963 |
-
list-style-type: none;
|
2964 |
-
}
|
2965 |
-
|
2966 |
-
.simple_table
|
2967 |
-
{
|
2968 |
-
padding-left: 0px !important;
|
2969 |
-
}
|
2970 |
-
|
2971 |
-
.simple_table input, .simple_table label, .simple_table img
|
2972 |
-
{
|
2973 |
-
display:inline-block !important;
|
2974 |
-
float:none !important;
|
2975 |
-
}
|
2976 |
-
</style>
|
2977 |
-
<fieldset class="adminform">
|
2978 |
-
<legend style="color:#0B55C4;font-weight: bold;">Fields to hide in frontend submissions</legend>
|
2979 |
-
<?php if(count($label_titles_for_submissions)): ?>
|
2980 |
-
<table style="margin-left:-3px;">
|
2981 |
-
<tr>
|
2982 |
-
<td>
|
2983 |
-
<label>Select fields:</label>
|
2984 |
-
</td>
|
2985 |
-
<td class="simple_table">
|
2986 |
-
<ul id="form_fields">
|
2987 |
-
<li>
|
2988 |
-
<input disabled="disabled" type="checkbox" name="all_fields" id="all_fields" value="submit_id,<?php echo implode(',',$labels_id_for_submissions)."," . ($payment_info ? "payment_info" : ""); ?>" onclick="checked_labels('filed_label')"/>
|
2989 |
-
<label for="all_fields">Select All</label>
|
2990 |
-
</li>
|
2991 |
-
<?php
|
2992 |
-
echo "<li><input disabled=\"disabled\" type=\"checkbox\" id=\"submit_id\" name=\"submit_id\" value=\"submit_id\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\"><label for=\"submit_id\">ID</label></li>";
|
2993 |
-
|
2994 |
-
for($i=0, $n=count($label_titles_for_submissions); $i < $n ; $i++)
|
2995 |
-
{
|
2996 |
-
$field_label = $label_titles_for_submissions[$i];
|
2997 |
-
|
2998 |
-
echo "<li><input disabled=\"disabled\" type=\"checkbox\" id=\"filed_label".$i."\" name=\"filed_label".$i."\" value=\"".$labels_id_for_submissions[$i]."\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\"><label for=\"filed_label".$i."\">".(strlen($field_label) > 80 ? substr ($field_label ,0, 80).'...' : $field_label)."</label></li>";
|
2999 |
-
|
3000 |
-
}
|
3001 |
-
if($payment_info)
|
3002 |
-
echo "<li><input disabled=\"disabled\" type=\"checkbox\" id=\"payment_info\" name=\"payment_info\" value=\"payment_info\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\"><label for=\"payment_info\">Payment Info</label></li>";
|
3003 |
-
?>
|
3004 |
-
</ul>
|
3005 |
-
<input type="hidden" name="frontend_submit_fields" value="<?php echo $row->frontend_submit_fields ?>" id="frontend_submit_fields" />
|
3006 |
-
</td>
|
3007 |
-
</tr>
|
3008 |
-
<?php if($stats_labels): ?>
|
3009 |
-
<tr id="stats">
|
3010 |
-
<td>
|
3011 |
-
<label>Stats fields:</label>
|
3012 |
-
</td>
|
3013 |
-
<td class="simple_table">
|
3014 |
-
<ul id="stats_fields">
|
3015 |
-
<li>
|
3016 |
-
<input disabled="disabled" type="checkbox" name="all_stats_fields" id="all_stats_fields" value="<?php echo implode(',',$stats_labels_ids).","; ?>" onclick="checked_labels('stats_filed_label')">
|
3017 |
-
<label for="all_stats_fields">Select All</label>
|
3018 |
-
</li>
|
3019 |
-
<?php
|
3020 |
-
for($i=0, $n=count($stats_labels); $i < $n ; $i++)
|
3021 |
-
{
|
3022 |
-
$field_label = $stats_labels[$i];
|
3023 |
-
echo "<li><input disabled=\"disabled\" type=\"checkbox\" id=\"stats_filed_label".$i."\" name=\"stats_filed_label".$i."\" value=\"".$stats_labels_ids[$i]."\" class=\"stats_filed_label\" onclick=\"checked_labels('stats_filed_label')\" ><label for=\"stats_filed_label".$i."\">".(strlen($field_label) > 80 ? substr ($field_label ,0, 80).'...' : $field_label)."</label></li>";
|
3024 |
-
}
|
3025 |
-
?>
|
3026 |
-
</ul>
|
3027 |
-
<input type="hidden" name="frontend_submit_stat_fields" value="<?php echo $row->frontend_submit_stat_fields ?>" id="frontend_submit_stat_fields" />
|
3028 |
-
</td>
|
3029 |
-
</tr>
|
3030 |
-
<?php endif; ?>
|
3031 |
-
</table>
|
3032 |
-
<?php endif; ?>
|
3033 |
-
</fieldset>
|
3034 |
-
</fieldset>
|
3035 |
-
<fieldset id="custom_fieldset" class="adminform fm_fieldset_deactive">
|
3036 |
-
<legend style="color: #0B55C4; font-weight: bold;">Email Options</legend>
|
3037 |
-
<table class="admintable">
|
3038 |
-
<tr valign="top">
|
3039 |
-
<td style="padding: 15px; width: 75px;">
|
3040 |
-
<label>Send E-mail</label>
|
3041 |
-
</td>
|
3042 |
-
<td style="padding: 15px;">
|
3043 |
-
<input type="radio" name="sendemail" id="sendemail_yes" value="1" <?php echo ($row->sendemail) ? "checked" : ""; ?> /><label for="sendemail_yes">Yes</label>
|
3044 |
-
<input type="radio" name="sendemail" id="sendemail_no" value="0" <?php echo (!$row->sendemail) ? "checked" : ""; ?> /><label for="sendemail_no">No</label>
|
3045 |
-
</td>
|
3046 |
-
</tr>
|
3047 |
-
</table>
|
3048 |
-
<fieldset class="fm_mail_options">
|
3049 |
-
<legend style="color:#0B55C4;font-weight: bold;">Email to Administrator</legend>
|
3050 |
-
<table class="admintable">
|
3051 |
-
<tr valign="top">
|
3052 |
-
<td class="fm_options_label">
|
3053 |
-
<label for="mailToAdd">Email to send submissions to</label>
|
3054 |
-
</td>
|
3055 |
-
<td class="fm_options_value">
|
3056 |
-
<input type="text" id="mailToAdd" name="mailToAdd" style="width: 250px;" />
|
3057 |
-
<input type="hidden" id="mail" name="mail" value="<?php echo $row->mail . ($row->mail && (substr($row->mail, -1) != ',') ? ',' : ''); ?>" />
|
3058 |
-
<img src="<?php echo WD_FMC_URL . '/images/add.png'; ?>"
|
3059 |
-
style="vertical-align: middle; cursor: pointer;"
|
3060 |
-
title="Add more emails"
|
3061 |
-
onclick="if (spider_check_email('mailToAdd')) {return false;};cfm_create_input('mail', 'mailToAdd', 'cfm_mail_div', '<?php echo WD_FMC_URL; ?>')" />
|
3062 |
-
<div id="cfm_mail_div">
|
3063 |
-
<?php
|
3064 |
-
$mail_array = explode(',', $row->mail);
|
3065 |
-
foreach ($mail_array as $mail) {
|
3066 |
-
if ($mail && $mail != ',') {
|
3067 |
-
?>
|
3068 |
-
<div class="fm_mail_input">
|
3069 |
-
<?php echo $mail; ?>
|
3070 |
-
<img src="<?php echo WD_FMC_URL; ?>/images/delete.png" class="fm_delete_img" onclick="fm_delete_mail(this, '<?php echo $mail; ?>')" title="Delete Email" />
|
3071 |
-
</div>
|
3072 |
-
<?php
|
3073 |
-
}
|
3074 |
-
}
|
3075 |
-
?>
|
3076 |
-
</div>
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
</td>
|
3082 |
-
</tr>
|
3083 |
-
<tr valign="top">
|
3084 |
-
<td class="fm_options_label">
|
3085 |
-
<label for="from_mail">Email From</label>
|
3086 |
-
</td>
|
3087 |
-
<td class="fm_options_value">
|
3088 |
-
<!--<input id="from_mail" name="from_mail" value="<?php echo $row->from_mail; ?>" style="width:250px;" />-->
|
3089 |
-
<?php
|
3090 |
-
$is_other = TRUE;
|
3091 |
-
for ($i = 0; $i < $fields_count - 1; $i++) {
|
3092 |
-
?>
|
3093 |
-
<div>
|
3094 |
-
<input type="radio" name="from_mail" id="from_mail<?php echo $i; ?>" value="<?php echo substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])); ?>" <?php echo (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) == $row->from_mail ? 'checked="checked"' : '' ); ?> onclick="wdhide('mail_from_other')" />
|
3095 |
-
<label for="from_mail<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
3096 |
-
</div>
|
3097 |
-
<?php
|
3098 |
-
if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->from_mail) {
|
3099 |
-
$is_other = FALSE;
|
3100 |
-
}
|
3101 |
-
}
|
3102 |
-
?>
|
3103 |
-
<div style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>">
|
3104 |
-
<input type="radio" id="other" name="from_mail" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('mail_from_other')" />
|
3105 |
-
<label for="other">Other</label>
|
3106 |
-
</div>
|
3107 |
-
<input type="text" style="width: <?php echo ($fields_count == 1) ? '250px' : '235px; margin-left: 15px' ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other" name="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
|
3108 |
-
</td>
|
3109 |
-
</tr>
|
3110 |
-
<tr valign="top">
|
3111 |
-
<td class="fm_options_label">
|
3112 |
-
<label for="from_name">From Name</label>
|
3113 |
-
</td>
|
3114 |
-
<td class="fm_options_value">
|
3115 |
-
<input type="text" id="from_name" name="from_name" value="<?php echo $row->from_name; ?>" style="width: 250px;" />
|
3116 |
-
<img src="<?php echo WD_FMC_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_from_labels').style.display='block';" style="vertical-align: middle; cursor: pointer;display:inline-block; margin:0px; float:none;">
|
3117 |
-
<?php
|
3118 |
-
$choise = "document.getElementById('from_name')";
|
3119 |
-
echo '<div style="position:relative; top:-3px;"><div id="mail_from_labels" class="email_labels" style="display:none;">';
|
3120 |
-
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
3121 |
-
for($i=0; $i<count($label_label); $i++)
|
3122 |
-
{
|
3123 |
-
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_matrix")
|
3124 |
-
continue;
|
3125 |
-
|
3126 |
-
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3127 |
-
|
3128 |
-
$fld_label = $param;
|
3129 |
-
if(strlen($fld_label)>30)
|
3130 |
-
{
|
3131 |
-
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3132 |
-
$fld_label = explode("\n", $fld_label);
|
3133 |
-
$fld_label = $fld_label[0] . ' ...';
|
3134 |
-
}
|
3135 |
-
|
3136 |
-
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_from_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3137 |
-
|
3138 |
-
}
|
3139 |
-
echo '</div></div>';
|
3140 |
-
?>
|
3141 |
-
</td>
|
3142 |
-
</tr>
|
3143 |
-
<tr valign="top">
|
3144 |
-
<td class="fm_options_label">
|
3145 |
-
<label for="reply_to">Reply to<br/>(if different from "Email From") </label>
|
3146 |
-
</td>
|
3147 |
-
<td class="fm_options_value">
|
3148 |
-
<!--<input id="reply_to" name="reply_to" value="<?php echo $row->reply_to; ?>" style="width:250px;"/>-->
|
3149 |
-
<?php
|
3150 |
-
$is_other = TRUE;
|
3151 |
-
for ($i = 0; $i < $fields_count - 1; $i++) {
|
3152 |
-
?>
|
3153 |
-
<div>
|
3154 |
-
<input type="radio" name="reply_to" id="reply_to<?php echo $i; ?>" value="<?php echo substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])); ?>" <?php echo (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->reply_to ? 'checked="checked"' : ''); ?> onclick="wdhide('reply_to_other')" />
|
3155 |
-
<label for="reply_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
3156 |
-
</div>
|
3157 |
-
<?php
|
3158 |
-
if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->reply_to) {
|
3159 |
-
$is_other = FALSE;
|
3160 |
-
}
|
3161 |
-
}
|
3162 |
-
?>
|
3163 |
-
<div style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>">
|
3164 |
-
<input type="radio" id="other1" name="reply_to" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('reply_to_other')" />
|
3165 |
-
<label for="other1">Other</label>
|
3166 |
-
</div>
|
3167 |
-
<input type="text" style="width: <?php echo ($fields_count == 1) ? '250px' : '235px; margin-left: 15px'; ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" />
|
3168 |
-
</td>
|
3169 |
-
</tr>
|
3170 |
-
<tr valign="top">
|
3171 |
-
<td class="fm_options_label">
|
3172 |
-
<label> CC: </label>
|
3173 |
-
</td>
|
3174 |
-
<td class="fm_options_value">
|
3175 |
-
<input type="text" id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" style="width:250px;" />
|
3176 |
-
</td>
|
3177 |
-
</tr>
|
3178 |
-
<tr valign="top">
|
3179 |
-
<td class="fm_options_label">
|
3180 |
-
<label> BCC: </label>
|
3181 |
-
</td>
|
3182 |
-
<td class="fm_options_value">
|
3183 |
-
<input type="text" id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" style="width:250px;" />
|
3184 |
-
</td>
|
3185 |
-
</tr>
|
3186 |
-
<tr valign="top">
|
3187 |
-
<td class="fm_options_label">
|
3188 |
-
<label> Subject: </label>
|
3189 |
-
</td>
|
3190 |
-
<td class="fm_options_value">
|
3191 |
-
<input type="text" id="mail_subject" name="mail_subject" value="<?php echo $row->mail_subject ?>" style="width:250px;" />
|
3192 |
-
<img src="<?php echo WD_FMC_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_subject_labels').style.display='block';" style="vertical-align: middle;cursor: pointer; display:inline-block; margin:0px; float:none;">
|
3193 |
-
<?php
|
3194 |
-
$choise = "document.getElementById('mail_subject')";
|
3195 |
-
echo '<div style="position:relative; top:-3px;"><div id="mail_subject_labels" class="email_labels" style="display:none;">';
|
3196 |
-
for($i=0; $i<count($label_label); $i++)
|
3197 |
-
{
|
3198 |
-
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_matrix")
|
3199 |
-
continue;
|
3200 |
-
|
3201 |
-
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3202 |
-
|
3203 |
-
$fld_label = $param;
|
3204 |
-
if(strlen($fld_label)>30)
|
3205 |
-
{
|
3206 |
-
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3207 |
-
$fld_label = explode("\n", $fld_label);
|
3208 |
-
$fld_label = $fld_label[0] . ' ...';
|
3209 |
-
}
|
3210 |
-
|
3211 |
-
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_subject_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3212 |
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
</td>
|
3217 |
-
</tr>
|
3218 |
-
<tr valign="top">
|
3219 |
-
<td class="fm_options_label" style="vertical-align: middle;">
|
3220 |
-
<label> Mode: </label>
|
3221 |
-
</td>
|
3222 |
-
<td class="fm_options_value">
|
3223 |
-
<input type="radio" name="mail_mode" id="htmlmode" value="1" <?php if($row->mail_mode==1 ) echo "checked" ?> /> <label for="htmlmode">HTML</label>
|
3224 |
-
<input type="radio" name="mail_mode" id="textmode" value="0" <?php if($row->mail_mode==0 ) echo "checked" ?> /> <label for="textmode">Text</label>
|
3225 |
-
</td>
|
3226 |
-
</tr>
|
3227 |
-
<tr valign="top">
|
3228 |
-
<td class="fm_options_label" style="vertical-align: middle;">
|
3229 |
-
<label> Attach File: </label>
|
3230 |
-
</td>
|
3231 |
-
<td class="fm_options_value">
|
3232 |
-
<input type="radio" disabled="disabled" name="mail_attachment" value="1" id="en_attach" <?php if($row->mail_attachment==1 ) echo "checked" ?> /> <label for="en_attach">Yes</label>
|
3233 |
-
<input type="radio" disabled="disabled" name="mail_attachment" id="dis_attach" value="0" <?php if($row->mail_attachment==0 ) echo "checked" ?> /> <label for="dis_attach">No</label>
|
3234 |
-
<div class="error_cfm" style="padding: 5px; font-size: 14px;">File attach is disabled in free version.</div>
|
3235 |
-
</td>
|
3236 |
-
</tr>
|
3237 |
-
<tr>
|
3238 |
-
<td class="fm_options_label" valign="top">
|
3239 |
-
<label>Custom Text in Email For Administrator</label>
|
3240 |
-
</td>
|
3241 |
-
<td class="fm_options_value">
|
3242 |
-
<div style="margin-bottom:5px">
|
3243 |
-
<?php
|
3244 |
-
$choise = "document.getElementById('script_mail')";
|
3245 |
-
for ($i = 0; $i < count($label_label); $i++) {
|
3246 |
-
if ($label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_file_upload" || $label_type[$i] == "type_send_copy") {
|
3247 |
-
continue;
|
3248 |
-
}
|
3249 |
-
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3250 |
-
?>
|
3251 |
-
<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; ?>')" />
|
3252 |
-
<?php
|
3253 |
-
}
|
3254 |
-
?>
|
3255 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
|
3256 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
|
3257 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
|
3258 |
-
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
|
3259 |
-
</div>
|
3260 |
-
<?php
|
3261 |
-
if (user_can_richedit()) {
|
3262 |
-
wp_editor($row->script_mail, 'script_mail', array('teeny' => FALSE, 'textarea_name' => 'script_mail', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
3263 |
-
}
|
3264 |
-
else {
|
3265 |
-
?>
|
3266 |
-
<textarea name="script_mail" id="script_mail" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail; ?></textarea>
|
3267 |
-
<?php
|
3268 |
-
}
|
3269 |
-
?>
|
3270 |
-
</td>
|
3271 |
-
</tr>
|
3272 |
-
</table>
|
3273 |
-
</fieldset>
|
3274 |
-
<fieldset class="fm_mail_options">
|
3275 |
-
<legend style="color: #0B55C4; font-weight: bold;">Email to User</legend>
|
3276 |
-
<table class="admintable">
|
3277 |
-
<tr valign="top">
|
3278 |
-
<td class="fm_options_label">
|
3279 |
-
<label for="mail">Send to</label>
|
3280 |
-
</td>
|
3281 |
-
<td class="fm_options_value">
|
3282 |
-
<?php
|
3283 |
-
$fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
|
3284 |
-
$fields_count = count($fields);
|
3285 |
-
if ($fields_count == 1) {
|
3286 |
-
?>
|
3287 |
-
There is no email field
|
3288 |
-
<?php
|
3289 |
-
}
|
3290 |
-
else {
|
3291 |
-
for ($i = 0; $i < $fields_count - 1; $i++) {
|
3292 |
-
?>
|
3293 |
-
<div>
|
3294 |
-
<input type="checkbox" name="send_to<?php echo $i; ?>" id="send_to<?php echo $i; ?>" value="<?php echo (strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo (is_numeric(strpos($row->send_to, '*'.(strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]).'*')) ? 'checked="checked"' : '' ); ?> style="margin: 0px 5px 0px 0px;" />
|
3295 |
-
<label for="send_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
3296 |
-
</div>
|
3297 |
-
<?php
|
3298 |
-
}
|
3299 |
-
}
|
3300 |
-
?>
|
3301 |
-
</td>
|
3302 |
-
</tr>
|
3303 |
-
<tr valign="top">
|
3304 |
-
<td class="fm_options_label">
|
3305 |
-
<label for="mail_from_user">Email From</label>
|
3306 |
-
</td>
|
3307 |
-
<td class="fm_options_value">
|
3308 |
-
<input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" style="width: 250px;" />
|
3309 |
-
</td>
|
3310 |
-
</tr>
|
3311 |
-
<tr valign="top">
|
3312 |
-
<td class="fm_options_label">
|
3313 |
-
<label for="mail_from_name_user">From Name</label>
|
3314 |
-
</td>
|
3315 |
-
<td class="fm_options_value">
|
3316 |
-
<input type="text" id="mail_from_name_user" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" style="width: 250px;"/>
|
3317 |
-
<img src="<?php echo WD_FMC_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_from_name_user_labels').style.display='block';" style="vertical-align: middle;cursor: pointer; display:inline-block; margin:0px; float:none;">
|
3318 |
-
<?php
|
3319 |
-
$choise = "document.getElementById('mail_from_name_user')";
|
3320 |
-
echo '<div style="position:relative; top:-3px;"><div id="mail_from_name_user_labels" class="email_labels" style="display:none;">';
|
3321 |
-
for($i=0; $i<count($label_label); $i++)
|
3322 |
-
{
|
3323 |
-
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy")
|
3324 |
-
continue;
|
3325 |
-
|
3326 |
-
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3327 |
-
|
3328 |
-
$fld_label = $param;
|
3329 |
-
if(strlen($fld_label)>30)
|
3330 |
-
{
|
3331 |
-
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3332 |
-
$fld_label = explode("\n", $fld_label);
|
3333 |
-
$fld_label = $fld_label[0] . ' ...';
|
3334 |
-
}
|
3335 |
-
|
3336 |
-
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3337 |
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
<input type="text" id="reply_to_user" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" style="width:250px;"/>
|
3349 |
-
</td>
|
3350 |
-
</tr>
|
3351 |
-
<tr valign="top">
|
3352 |
-
<td class="fm_options_label">
|
3353 |
-
<label> CC: </label>
|
3354 |
-
</td>
|
3355 |
-
<td class="fm_options_value">
|
3356 |
-
<input type="text" id="mail_cc_user" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" style="width:250px;" />
|
3357 |
-
</td>
|
3358 |
-
</tr>
|
3359 |
-
<tr valign="top">
|
3360 |
-
<td class="fm_options_label">
|
3361 |
-
<label> BCC: </label>
|
3362 |
-
</td>
|
3363 |
-
<td class="fm_options_value">
|
3364 |
-
<input type="text" id="mail_bcc_user" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" style="width:250px;" />
|
3365 |
-
</td>
|
3366 |
-
</tr>
|
3367 |
-
<tr valign="top">
|
3368 |
-
<td class="fm_options_label">
|
3369 |
-
<label> Subject: </label>
|
3370 |
-
</td>
|
3371 |
-
<td class="fm_options_value">
|
3372 |
-
<input type="text" id="mail_subject_user" name="mail_subject_user" value="<?php echo $row->mail_subject_user ?>" style="width:250px;" />
|
3373 |
-
<img src="<?php echo WD_FMC_URL . '/images/add.png'; ?>" onclick="document.getElementById('mail_subject_user_labels').style.display='block';" style="vertical-align: middle; cursor: pointer; display:inline-block; margin:0px; float:none;">
|
3374 |
-
<?php
|
3375 |
-
$choise = "document.getElementById('mail_subject_user')";
|
3376 |
-
echo '<div style="position:relative; top:-3px;"><div id="mail_subject_user_labels" class="email_labels" style="display:none;">';
|
3377 |
-
for($i=0; $i<count($label_label); $i++)
|
3378 |
-
{
|
3379 |
-
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy")
|
3380 |
-
continue;
|
3381 |
-
|
3382 |
-
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3383 |
-
|
3384 |
-
$fld_label = $param;
|
3385 |
-
if(strlen($fld_label)>30)
|
3386 |
-
{
|
3387 |
-
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3388 |
-
$fld_label = explode("\n", $fld_label);
|
3389 |
-
$fld_label = $fld_label[0] . ' ...';
|
3390 |
-
}
|
3391 |
-
|
3392 |
-
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_subject_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3393 |
|
3394 |
-
|
3395 |
-
|
3396 |
-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
3403 |
-
|
3404 |
-
|
3405 |
-
|
3406 |
-
|
3407 |
-
|
3408 |
-
|
3409 |
-
|
3410 |
-
|
3411 |
-
|
3412 |
-
|
3413 |
-
|
3414 |
-
|
3415 |
-
|
3416 |
-
|
3417 |
-
|
3418 |
-
|
3419 |
-
|
3420 |
-
|
3421 |
-
|
3422 |
-
|
3423 |
-
|
3424 |
-
|
3425 |
-
|
3426 |
-
|
3427 |
-
|
3428 |
-
|
3429 |
-
|
3430 |
-
|
3431 |
-
|
3432 |
-
|
3433 |
-
|
3434 |
-
|
3435 |
-
|
3436 |
-
|
3437 |
-
|
3438 |
-
|
3439 |
-
|
3440 |
-
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
|
3448 |
-
|
3449 |
-
|
3450 |
-
|
3451 |
-
</
|
3452 |
-
</
|
3453 |
-
</
|
3454 |
-
</
|
3455 |
-
</
|
3456 |
<fieldset id="actions_fieldset" class="adminform fm_fieldset_deactive">
|
3457 |
<legend style="color:#0B55C4;font-weight: bold;">Actions after submission</legend>
|
3458 |
<table class="admintable">
|
@@ -3468,84 +2357,205 @@ class FMViewManage_fmc {
|
|
3468 |
<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>
|
3469 |
</td>
|
3470 |
</tr>
|
3471 |
-
|
3472 |
-
|
3473 |
-
|
3474 |
-
|
3475 |
-
|
3476 |
-
|
3477 |
-
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3482 |
</td>
|
3483 |
<td class="fm_options_value">
|
3484 |
-
<
|
3485 |
-
<option value="0">- Select Post -</option>
|
3486 |
-
<?php
|
3487 |
-
// The Query.
|
3488 |
-
$args = array('posts_per_page' => 10000);
|
3489 |
-
query_posts($args);
|
3490 |
-
// The Loop.
|
3491 |
-
while (have_posts()) : the_post(); ?>
|
3492 |
-
<option value="<?php $x = get_permalink(get_the_ID()); echo $x; ?>" <?php echo (($row->article_id == $x) ? 'selected="selected"' : ''); ?>><?php the_title(); ?></option>
|
3493 |
<?php
|
3494 |
-
|
3495 |
-
|
3496 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3497 |
?>
|
3498 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3499 |
</td>
|
3500 |
</tr>
|
3501 |
-
<tr
|
3502 |
-
<td
|
3503 |
-
|
|
|
|
|
|
|
|
|
3504 |
</td>
|
3505 |
<td class="fm_options_value">
|
3506 |
-
<
|
3507 |
-
<option value="0">- Select Page -</option>
|
3508 |
<?php
|
3509 |
-
|
3510 |
-
$
|
3511 |
-
|
3512 |
-
|
3513 |
-
|
|
|
3514 |
?>
|
3515 |
-
|
3516 |
<?php
|
3517 |
}
|
3518 |
-
// Reset Query.
|
3519 |
-
wp_reset_query();
|
3520 |
?>
|
3521 |
-
|
3522 |
-
|
3523 |
-
</tr>
|
3524 |
-
<tr id="custom_text" <?php echo (($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
|
3525 |
-
<td class="fm_options_label">
|
3526 |
-
<label for="submit_text">Text</label>
|
3527 |
-
</td>
|
3528 |
-
<td class="fm_options_value">
|
3529 |
<?php
|
3530 |
if (user_can_richedit()) {
|
3531 |
-
wp_editor($row->
|
3532 |
}
|
3533 |
else {
|
3534 |
?>
|
3535 |
-
<textarea
|
3536 |
-
<?php echo $row->submit_text; ?>
|
3537 |
-
</textarea>
|
3538 |
<?php
|
3539 |
}
|
3540 |
?>
|
3541 |
</td>
|
3542 |
</tr>
|
3543 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3544 |
<td class="fm_options_label">
|
3545 |
-
<label for="
|
3546 |
</td>
|
3547 |
<td class="fm_options_value">
|
3548 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3549 |
</td>
|
3550 |
</tr>
|
3551 |
</table>
|
@@ -3553,18 +2563,13 @@ class FMViewManage_fmc {
|
|
3553 |
<fieldset id="payment_fieldset" class="adminform fm_fieldset_deactive">
|
3554 |
<legend style="color:#0B55C4;font-weight: bold;">Payment Options</legend>
|
3555 |
<table class="admintable">
|
3556 |
-
<tr>
|
3557 |
-
<td colspan="2">
|
3558 |
-
<div class="error_cfm" style="padding: 5px; font-size: 14px;">Paypal Options are disabled in free version.</div>
|
3559 |
-
</td>
|
3560 |
-
</tr>
|
3561 |
<tr valign="top">
|
3562 |
<td class="fm_options_label">
|
3563 |
<label>Turn Paypal On</label>
|
3564 |
</td>
|
3565 |
<td class="fm_options_value">
|
3566 |
-
<div><input
|
3567 |
-
<div><input
|
3568 |
</td>
|
3569 |
</tr>
|
3570 |
<tr valign="top">
|
@@ -3572,8 +2577,8 @@ class FMViewManage_fmc {
|
|
3572 |
<label>Checkout Mode</label>
|
3573 |
</td>
|
3574 |
<td class="fm_options_value">
|
3575 |
-
<div><input
|
3576 |
-
<div><input
|
3577 |
</td>
|
3578 |
</tr>
|
3579 |
<tr valign="top">
|
@@ -3581,7 +2586,7 @@ class FMViewManage_fmc {
|
|
3581 |
<label for="paypal_email">Paypal email</label>
|
3582 |
</td>
|
3583 |
<td class="fm_options_value">
|
3584 |
-
<input
|
3585 |
</td>
|
3586 |
</tr>
|
3587 |
<tr valign="top">
|
@@ -3589,7 +2594,7 @@ class FMViewManage_fmc {
|
|
3589 |
<label for="payment_currency">Payment Currency</label>
|
3590 |
</td>
|
3591 |
<td class="fm_options_value">
|
3592 |
-
<select
|
3593 |
<option value="USD" <?php echo (($row->payment_currency == 'USD') ? 'selected' : ''); ?>>$ • U.S. Dollar</option>
|
3594 |
<option value="EUR" <?php echo (($row->payment_currency == 'EUR') ? 'selected' : ''); ?>>€ • Euro</option>
|
3595 |
<option value="GBP" <?php echo (($row->payment_currency == 'GBP') ? 'selected' : ''); ?>>£ • Pound Sterling</option>
|
@@ -3633,29 +2638,1193 @@ class FMViewManage_fmc {
|
|
3633 |
<td class="fm_options_label">
|
3634 |
<label for="javascript">Javascript</label>
|
3635 |
</td>
|
3636 |
-
<td class="fm_options_value"
|
3637 |
-
<textarea style="margin: 0px;
|
3638 |
</td>
|
3639 |
</tr>
|
3640 |
</table>
|
3641 |
</fieldset>
|
3642 |
-
<
|
3643 |
-
|
3644 |
-
|
3645 |
-
|
3646 |
-
|
3647 |
-
|
3648 |
-
|
3649 |
-
|
3650 |
-
|
3651 |
-
|
3652 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3653 |
$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");
|
3654 |
|
3655 |
$fields=explode('*:*new_field*:*',$row->form_fields);
|
3656 |
$fields = array_slice($fields,0, count($fields)-1);
|
3657 |
-
foreach($fields as $field)
|
3658 |
-
{
|
3659 |
$temp=explode('*:*id*:*',$field);
|
3660 |
array_push($ids, $temp[0]);
|
3661 |
array_push($all_ids, $temp[0]);
|
@@ -3668,10 +3837,8 @@ class FMViewManage_fmc {
|
|
3668 |
|
3669 |
}
|
3670 |
|
3671 |
-
foreach($types as $key=>$value)
|
3672 |
-
|
3673 |
-
if(!in_array($types[$key],$select_and_input))
|
3674 |
-
{
|
3675 |
unset($ids[$key]);
|
3676 |
unset($labels[$key]);
|
3677 |
unset($types[$key]);
|
@@ -3684,12 +3851,11 @@ class FMViewManage_fmc {
|
|
3684 |
$types = array_values($types);
|
3685 |
$paramss = array_values($paramss);
|
3686 |
|
3687 |
-
|
3688 |
$chose_ids = implode('@@**@@',$ids);
|
3689 |
$chose_labels = implode('@@**@@',$labels);
|
3690 |
$chose_types = implode('@@**@@',$types);
|
3691 |
$chose_paramss = implode('@@**@@',$paramss);
|
3692 |
-
|
3693 |
$all_ids_cond = implode('@@**@@',$all_ids);
|
3694 |
$all_labels_cond = implode('@@**@@',$all_labels);
|
3695 |
|
@@ -3699,14 +3865,12 @@ class FMViewManage_fmc {
|
|
3699 |
$condition_params = array();
|
3700 |
|
3701 |
$count_of_conditions=0;
|
3702 |
-
if($row->condition!="")
|
3703 |
-
{
|
3704 |
$conditions=explode('*:*new_condition*:*',$row->condition);
|
3705 |
$conditions = array_slice($conditions,0, count($conditions)-1);
|
3706 |
$count_of_conditions = count($conditions);
|
3707 |
|
3708 |
-
foreach($conditions as $condition)
|
3709 |
-
{
|
3710 |
$temp=explode('*:*show_hide*:*',$condition);
|
3711 |
array_push($show_hide, $temp[0]);
|
3712 |
$temp=explode('*:*field_label*:*',$temp[1]);
|
@@ -3715,10 +3879,8 @@ class FMViewManage_fmc {
|
|
3715 |
array_push($all_any, $temp[0]);
|
3716 |
array_push($condition_params, $temp[1]);
|
3717 |
}
|
3718 |
-
|
3719 |
}
|
3720 |
-
else
|
3721 |
-
{
|
3722 |
$show_hide[0]=1;
|
3723 |
$all_any[0]='and';
|
3724 |
$condition_params[0]='';
|
@@ -3727,341 +3889,365 @@ class FMViewManage_fmc {
|
|
3727 |
}
|
3728 |
?>
|
3729 |
<div>
|
3730 |
-
|
3731 |
-
|
|
|
|
|
3732 |
</div>
|
3733 |
-
|
3734 |
-
|
3735 |
-
|
3736 |
-
|
3737 |
-
|
3738 |
-
|
3739 |
-
|
3740 |
-
|
3741 |
-
|
3742 |
-
|
3743 |
-
|
3744 |
-
|
3745 |
-
|
3746 |
-
|
3747 |
-
|
3748 |
-
|
3749 |
-
|
3750 |
-
|
3751 |
-
|
3752 |
-
|
3753 |
-
|
3754 |
-
|
3755 |
-
|
3756 |
-
|
3757 |
-
|
3758 |
-
|
3759 |
-
|
3760 |
-
|
3761 |
-
|
3762 |
-
|
3763 |
-
|
3764 |
-
|
3765 |
-
|
3766 |
-
<span>of the following match:</span>
|
3767 |
-
<img src="<?php echo WD_FMC_URL . '/images/add.png'; ?>" title="add" onclick="add_condition_fields(<?php echo $k; ?>,'<?php echo $chose_ids; ?>', '<?php echo htmlspecialchars(addslashes($chose_labels)); ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>')" style="cursor: pointer; vertical-align: middle;">
|
3768 |
-
|
3769 |
-
<img src="<?php echo WD_FMC_URL . '/images/page_delete.png'; ?>" onclick="delete_condition('<?php echo $k; ?>')" style="cursor: pointer; vertical-align: middle;">
|
3770 |
-
</div>
|
3771 |
-
|
3772 |
-
<?php
|
3773 |
-
|
3774 |
-
if($condition_params[$k])
|
3775 |
-
{
|
3776 |
-
$_params =explode('*:*next_condition*:*',$condition_params[$k]);
|
3777 |
-
$_params = array_slice($_params,0, count($_params)-1);
|
3778 |
-
|
3779 |
-
foreach($_params as $key=>$_param)
|
3780 |
-
{
|
3781 |
-
$key_select_or_input ='';
|
3782 |
-
$param_values = explode('***',$_param);
|
3783 |
-
$multiselect = explode('@@@',$param_values[2]);
|
3784 |
-
|
3785 |
-
if(in_array($param_values[0],$ids)): ?>
|
3786 |
-
<div id="condition_div<?php echo $k; ?>_<?php echo $key; ?>">
|
3787 |
-
<select id="field_labels<?php echo $k; ?>_<?php echo $key; ?>" onchange="change_choices(this.options[this.selectedIndex].id+'_<?php echo $key; ?>','<?php echo $chose_ids; ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>')" style="width:350px;"/>
|
3788 |
-
<?php
|
3789 |
-
foreach($labels as $key1 => $value)
|
3790 |
-
{
|
3791 |
-
if($param_values[0]==$ids[$key1])
|
3792 |
-
{
|
3793 |
-
$selected = 'selected="selected"';
|
3794 |
-
if ($types[$key1]=="type_checkbox" || $types[$key1]=="type_paypal_checkbox")
|
3795 |
-
$multiple = 'multiple="multiple" class="multiple_select"';
|
3796 |
-
else
|
3797 |
-
$multiple ='';
|
3798 |
-
|
3799 |
-
$key_select_or_input = $key1;
|
3800 |
-
}
|
3801 |
-
else
|
3802 |
-
$selected ='';
|
3803 |
-
if($field_label[$k]!=$ids[$key1])
|
3804 |
-
echo '<option id="'.$k.'_'.$key1.'" value="'.$ids[$key1].'" '.$selected.'>'.$value.'</option>';
|
3805 |
-
|
3806 |
-
}
|
3807 |
-
|
3808 |
-
?>
|
3809 |
-
</select>
|
3810 |
-
|
3811 |
-
<select id="is_select<?php echo $k; ?>_<?php echo $key; ?>" style="vertical-align: top;">
|
3812 |
-
<option value="==" <?php if($param_values[1]=="==") echo 'selected="selected"'; ?>>is</option>
|
3813 |
-
<option value="!=" <?php if($param_values[1]=="!=") echo 'selected="selected"'; ?>>is not</option>
|
3814 |
-
</select>
|
3815 |
-
|
3816 |
-
<?php if ($key_select_or_input != '' && in_array($types[$key_select_or_input],$select_type_fields)) : ?>
|
3817 |
-
<select id="field_value<?php echo $k; ?>_<?php echo $key; ?>" <?php echo $multiple; ?> style="vertical-align: top; width: 200px;">
|
3818 |
-
<?php
|
3819 |
-
switch($types[$key_select_or_input])
|
3820 |
-
{
|
3821 |
-
case "type_own_select":
|
3822 |
-
case "type_paypal_select":
|
3823 |
-
$w_size = explode('*:*w_size*:*',$paramss[$key_select_or_input]);
|
3824 |
-
break;
|
3825 |
-
|
3826 |
-
case "type_radio":
|
3827 |
-
case "type_checkbox":
|
3828 |
-
case "type_paypal_radio":
|
3829 |
-
case "type_paypal_checkbox":
|
3830 |
-
case "type_paypal_shipping":
|
3831 |
-
$w_size = explode('*:*w_flow*:*',$paramss[$key_select_or_input]);
|
3832 |
-
break;
|
3833 |
-
}
|
3834 |
|
3835 |
-
|
3836 |
-
|
3837 |
-
|
3838 |
-
|
3839 |
-
$w_choices_price_array = explode('***',$w_choices_price[0]);
|
3840 |
|
3841 |
-
|
3842 |
-
|
3843 |
-
|
3844 |
-
|
3845 |
-
|
3846 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3847 |
|
3848 |
-
|
3849 |
-
{
|
3850 |
-
$selected = 'selected="selected"';
|
3851 |
-
}
|
3852 |
-
else
|
3853 |
-
$selected ='';
|
3854 |
-
|
3855 |
-
echo '<option id="choise_'.$k.'_'.$m.'" value="'.$w_choice.'" '.$selected.'>'.$w_choices_array[$m].'</option>';
|
3856 |
-
}
|
3857 |
|
3858 |
-
|
3859 |
-
|
3860 |
-
|
3861 |
-
|
3862 |
-
|
3863 |
-
|
3864 |
-
if(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3865 |
{
|
3866 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3867 |
}
|
3868 |
-
|
3869 |
-
$
|
3870 |
-
|
3871 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3872 |
}
|
3873 |
-
|
3874 |
-
|
3875 |
-
|
3876 |
-
|
3877 |
-
|
3878 |
-
|
3879 |
-
|
3880 |
-
|
3881 |
-
|
3882 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3883 |
else
|
3884 |
-
$
|
3885 |
-
|
3886 |
-
|
3887 |
-
|
3888 |
-
|
3889 |
-
|
3890 |
-
|
|
|
|
|
|
|
|
|
3891 |
}
|
3892 |
-
}
|
3893 |
|
3894 |
-
|
3895 |
-
|
3896 |
-
|
3897 |
-
|
3898 |
-
|
3899 |
-
|
|
|
3900 |
|
3901 |
-
|
3902 |
-
|
3903 |
-
|
3904 |
-
|
3905 |
-
|
3906 |
-
|
3907 |
-
|
3908 |
-
|
3909 |
-
|
3910 |
-
|
3911 |
-
|
3912 |
-
|
3913 |
-
|
3914 |
-
|
3915 |
-
|
3916 |
-
|
3917 |
-
|
3918 |
-
|
3919 |
-
|
3920 |
-
|
3921 |
-
|
3922 |
-
|
3923 |
-
|
3924 |
-
|
3925 |
-
|
3926 |
-
|
3927 |
-
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
-
|
3932 |
-
|
3933 |
-
|
3934 |
-
|
3935 |
-
|
3936 |
-
|
3937 |
-
|
3938 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3939 |
|
3940 |
-
|
3941 |
-
|
3942 |
-
|
3943 |
-
|
3944 |
-
|
3945 |
-
|
3946 |
-
|
3947 |
-
|
3948 |
-
|
3949 |
-
|
3950 |
-
|
3951 |
-
|
3952 |
-
|
3953 |
-
|
3954 |
-
|
3955 |
?>
|
3956 |
-
|
3957 |
-
|
3958 |
-
|
3959 |
-
|
3960 |
-
|
3961 |
-
|
3962 |
-
|
3963 |
-
|
3964 |
-
|
3965 |
-
|
3966 |
-
|
3967 |
-
|
3968 |
-
|
3969 |
-
|
3970 |
-
|
3971 |
-
|
3972 |
-
|
3973 |
-
|
3974 |
-
|
3975 |
-
|
3976 |
-
|
3977 |
-
|
3978 |
-
|
3979 |
-
|
3980 |
-
|
3981 |
-
|
3982 |
-
|
3983 |
-
|
3984 |
-
|
3985 |
-
|
3986 |
-
|
3987 |
-
|
3988 |
-
|
3989 |
-
|
3990 |
-
|
3991 |
-
|
3992 |
-
|
3993 |
-
|
3994 |
-
|
3995 |
-
|
3996 |
-
|
3997 |
-
|
3998 |
-
|
3999 |
-
|
4000 |
-
|
4001 |
-
|
4002 |
-
|
4003 |
-
|
4004 |
|
4005 |
-
|
4006 |
-
|
4007 |
-
|
4008 |
-
|
4009 |
-
|
4010 |
-
|
4011 |
-
|
4012 |
-
|
4013 |
-
|
4014 |
-
|
4015 |
-
|
4016 |
-
|
4017 |
-
|
4018 |
-
|
4019 |
-
|
4020 |
-
|
4021 |
-
|
4022 |
-
|
4023 |
-
|
4024 |
-
|
4025 |
-
|
4026 |
-
|
4027 |
-
|
4028 |
-
|
4029 |
-
|
4030 |
-
|
4031 |
-
|
4032 |
-
|
4033 |
-
|
4034 |
-
|
4035 |
-
|
4036 |
-
|
4037 |
-
|
4038 |
-
|
4039 |
-
|
4040 |
-
|
4041 |
-
|
4042 |
-
|
4043 |
-
|
4044 |
-
|
4045 |
-
|
4046 |
-
|
4047 |
-
|
4048 |
-
|
4049 |
-
|
4050 |
-
|
4051 |
-
|
4052 |
-
|
4053 |
-
|
4054 |
-
|
4055 |
-
|
4056 |
-
|
4057 |
-
|
4058 |
-
|
4059 |
-
|
4060 |
-
|
4061 |
-
|
4062 |
-
|
4063 |
-
|
4064 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4065 |
|
4066 |
////////////////////////////////////////////////////////////////////////////////////////
|
4067 |
// Getters & Setters //
|
22 |
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
// Public Methods //
|
24 |
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
+
public function display() {
|
26 |
+
$rows_data = $this->model->get_rows_data();
|
27 |
+
$page_nav = $this->model->page_nav();
|
28 |
+
$search_value = ((isset($_POST['search_value'])) ? esc_html($_POST['search_value']) : '');
|
29 |
+
$search_select_value = ((isset($_POST['search_select_value'])) ? (int) $_POST['search_select_value'] : 0);
|
30 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
|
31 |
+
$order_by_array = array('id', 'title', 'mail');
|
32 |
+
$order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
|
33 |
+
$order_class = 'manage-column column-title sorted ' . $asc_or_desc;
|
34 |
+
$ids_string = '';
|
35 |
+
?>
|
36 |
+
<div class="fm-user-manual">
|
37 |
+
This section allows you to create, edit forms.
|
38 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-2.html">Read More in User Manual</a>
|
39 |
+
</div>
|
40 |
+
<div class="fm-upgrade-pro">
|
41 |
+
<a target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
42 |
+
<div class="fm-upgrade-img">
|
43 |
+
UPGRADE TO PRO VERSION
|
44 |
+
<span></span>
|
45 |
+
</div>
|
46 |
+
</a>
|
47 |
+
</div>
|
48 |
+
<div class="fm-clear"></div>
|
49 |
+
<form onkeypress="fm_doNothing(event)" class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fmc" style="width:99%;">
|
50 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
51 |
+
<div class="fm-page-banner">
|
52 |
+
<div class="fm-logo">
|
53 |
+
</div>
|
54 |
+
<div class="fm-logo-title">Contact Form</br>Maker</div>
|
55 |
+
<button class="fm-button add-button medium" onclick="fm_set_input_value('task', 'add'); fm_form_submit(event, 'manage_form')">
|
56 |
+
<span></span>
|
57 |
+
Add New
|
58 |
+
</button>
|
59 |
+
</div>
|
60 |
+
<div class="tablenav top">
|
61 |
+
<?php
|
62 |
+
WDW_FMC_Library::search('Title', $search_value, 'manage_form');
|
63 |
+
WDW_FMC_Library::html_page_nav($page_nav['total'], $page_nav['limit'], 'manage_form');
|
64 |
+
?>
|
65 |
+
</div>
|
66 |
+
<table class="wp-list-table widefat fixed pages">
|
67 |
+
<thead>
|
68 |
+
<th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" style="margin:0;"/></th>
|
69 |
+
<th class="table_small_col <?php if ($order_by == 'id') { echo $order_class; } ?>">
|
70 |
+
<a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'id'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
|
71 |
+
<span>ID</span><span class="sorting-indicator"></span></a>
|
72 |
+
</th>
|
73 |
+
<th class="<?php if ($order_by == 'title') { echo $order_class; } ?>">
|
74 |
+
<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="">
|
75 |
+
<span>Title</span><span class="sorting-indicator"></span></a>
|
76 |
+
</th>
|
77 |
+
<th class="<?php if ($order_by == 'mail') { echo $order_class; } ?>">
|
78 |
+
<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="">
|
79 |
+
<span>Email to send submissions to</span><span class="sorting-indicator"></span></a>
|
80 |
+
</th>
|
81 |
+
<th class="table_big_col">Shortcode</th>
|
82 |
+
<th class="table_large_col">PHP function</th>
|
83 |
+
<th class="table_small_col">Edit</th>
|
84 |
+
<th class="table_small_col">
|
85 |
+
<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>
|
86 |
+
</th>
|
87 |
+
</thead>
|
88 |
+
<tbody id="tbody_arr">
|
89 |
+
<?php
|
90 |
+
if ($rows_data) {
|
91 |
+
foreach ($rows_data as $row_data) {
|
92 |
+
$alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
|
93 |
+
$old = '';
|
94 |
+
if (isset($row_data->form) && ($row_data->form != '')) {
|
95 |
+
$old = '_old';
|
96 |
+
}
|
97 |
+
?>
|
98 |
+
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
99 |
+
<td class="table_small_col check-column">
|
100 |
+
<input id="check_<?php echo $row_data->id; ?>" name="check_<?php echo $row_data->id; ?>" type="checkbox"/>
|
101 |
+
</td>
|
102 |
+
<td class="table_small_col"><?php echo $row_data->id; ?></td>
|
103 |
+
<td>
|
104 |
+
<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>
|
105 |
+
</td>
|
106 |
+
<td><?php echo $row_data->mail; ?></td>
|
107 |
+
<td class="table_big_col" style="padding-left: 0; padding-right: 0;">
|
108 |
+
<input type="text" value='[wd_contact_form id="<?php echo $row_data->id; ?>"]' onclick="fm_select_value(this)" size="12" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
|
109 |
+
</td>
|
110 |
+
<td class="table_large_col" style="padding-left: 0; padding-right: 0;">
|
111 |
+
<input type="text" value='<?php wd_contact_form_maker(<?php echo $row_data->id; ?>); ?>' onclick="fm_select_value(this)" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
|
112 |
+
</td>
|
113 |
+
<td class="table_small_col">
|
114 |
+
<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')">
|
115 |
+
<span></span>
|
116 |
+
</button>
|
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; }">
|
120 |
+
<span></span>
|
121 |
+
</button>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<?php
|
125 |
+
$ids_string .= $row_data->id . ',';
|
126 |
+
}
|
127 |
+
}
|
128 |
+
?>
|
129 |
+
</tbody>
|
130 |
+
</table>
|
131 |
+
<input id="task" name="task" type="hidden" value=""/>
|
132 |
+
<input id="current_id" name="current_id" type="hidden" value=""/>
|
133 |
+
<input id="ids_string" name="ids_string" type="hidden" value="<?php echo $ids_string; ?>"/>
|
134 |
+
<input id="asc_or_desc" name="asc_or_desc" type="hidden" value="asc"/>
|
135 |
+
<input id="order_by" name="order_by" type="hidden" value="<?php echo $order_by; ?>"/>
|
136 |
+
</form>
|
137 |
+
<?php
|
138 |
+
}
|
139 |
+
|
140 |
+
public function edit($id) {
|
141 |
+
?>
|
142 |
+
<img src="<?php echo WD_FMC_URL . '/images/buttons.png'; ?>" style="display:none;"/>
|
143 |
+
<?php
|
144 |
+
$row = $this->model->get_row_data_new($id);
|
145 |
+
$themes = $this->model->get_theme_rows_data();
|
146 |
+
$labels = array();
|
147 |
+
$label_id = array();
|
148 |
+
$label_order_original = array();
|
149 |
+
$label_type = array();
|
150 |
+
$label_all = explode('#****#', $row->label_order);
|
151 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
152 |
+
foreach ($label_all as $key => $label_each) {
|
153 |
+
$label_id_each = explode('#**id**#', $label_each);
|
154 |
+
array_push($label_id, $label_id_each[0]);
|
155 |
+
$label_oder_each = explode('#**label**#', $label_id_each[1]);
|
156 |
+
array_push($label_order_original, addslashes($label_oder_each[0]));
|
157 |
+
array_push($label_type, $label_oder_each[1]);
|
158 |
+
}
|
159 |
+
$labels['id'] = '"' . implode('","', $label_id) . '"';
|
160 |
+
$labels['label'] = '"' . implode('","', $label_order_original) . '"';
|
161 |
+
$labels['type'] = '"' . implode('","', $label_type) . '"';
|
162 |
+
$page_title = (($id != 0) ? 'Edit form ' . $row->title : 'Create new form');
|
163 |
+
?>
|
164 |
+
<script type="text/javascript">
|
165 |
+
var plugin_url = "<?php echo WD_FMC_URL; ?>";
|
166 |
+
</script>
|
167 |
+
<script src="<?php echo WD_FMC_URL . '/js/formmaker_div_free.js'; ?>?ver=<?php echo get_option("wd_form_maker_version"); ?>" type="text/javascript"></script>
|
168 |
+
<script type="text/javascript">
|
169 |
+
form_view = 1;
|
170 |
+
form_view_count = 1;
|
171 |
+
form_view_max = 1;
|
172 |
+
function submitbutton() {
|
173 |
+
<?php if ($id) { ?>
|
174 |
+
if (!document.getElementById('araqel') || (document.getElementById('araqel').value == '0')) {
|
175 |
+
alert('Please wait while page loading.');
|
176 |
+
return false;
|
177 |
+
}
|
178 |
+
<?php } ?>
|
179 |
+
tox = '';
|
180 |
+
form_fields = '';
|
181 |
+
document.getElementById('take').style.display = "none";
|
182 |
+
document.getElementById('page_bar').style.display = "none";
|
183 |
+
jQuery('#saving').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
184 |
+
jQuery('.wdform_section').each(function() {
|
185 |
+
var this2 = this;
|
186 |
+
jQuery(this2).find('.wdform_column').each(function() {
|
187 |
+
if(!jQuery(this).html() && jQuery(this2).children().length>1)
|
188 |
+
jQuery(this).remove();
|
189 |
+
});
|
190 |
+
});
|
191 |
+
remove_whitespace(document.getElementById('take'));
|
192 |
+
l_id_array = [<?php echo $labels['id']?>];
|
193 |
+
l_label_array = [<?php echo $labels['label']?>];
|
194 |
+
l_type_array = [<?php echo $labels['type']?>];
|
195 |
+
l_id_removed = [];
|
196 |
+
for (x = 0; x < l_id_array.length; x++) {
|
197 |
+
l_id_removed[l_id_array[x]] = true;
|
198 |
+
}
|
199 |
+
for (t = 1; t <= form_view_max; t++) {
|
200 |
+
if (document.getElementById('form_id_tempform_view' + t)) {
|
201 |
+
wdform_page = document.getElementById('form_id_tempform_view' + t);
|
202 |
+
remove_whitespace(wdform_page);
|
203 |
+
n = wdform_page.childNodes.length - 2;
|
204 |
+
for (q = 0; q <= n; q++) {
|
205 |
+
if (!wdform_page.childNodes[q].getAttribute("wdid")) {
|
206 |
+
wdform_section = wdform_page.childNodes[q];
|
207 |
+
for (x = 0; x < wdform_section.childNodes.length; x++) {
|
208 |
+
wdform_column = wdform_section.childNodes[x];
|
209 |
+
if (wdform_column.firstChild) {
|
210 |
+
for (y=0; y < wdform_column.childNodes.length; y++) {
|
211 |
+
is_in_old = false;
|
212 |
+
wdform_row = wdform_column.childNodes[y];
|
213 |
+
if (wdform_row.nodeType == 3) {
|
214 |
+
continue;
|
215 |
+
}
|
216 |
+
wdid = wdform_row.getAttribute("wdid");
|
217 |
+
if (!wdid) {
|
218 |
+
continue;
|
219 |
+
}
|
220 |
+
l_id = wdid;
|
221 |
+
l_label = document.getElementById(wdid + '_element_labelform_id_temp').innerHTML;
|
222 |
+
l_label = l_label.replace(/(\r\n|\n|\r)/gm," ");
|
223 |
+
wdtype = wdform_row.firstChild.getAttribute('type');
|
224 |
+
|
225 |
+
for (var z = 0; z < l_id_array.length; z++) {
|
226 |
+
if (l_type_array[z] == "type_address") {
|
227 |
+
if (document.getElementById(l_id + "_mini_label_street1") || document.getElementById(l_id + "_mini_label_street2") || document.getElementById(l_id + "_mini_label_city") || document.getElementById(l_id + "_mini_label_state") || document.getElementById(l_id+"_mini_label_postal") || document.getElementById(l_id+"_mini_label_country")) {
|
228 |
+
l_id_removed[l_id_array[z]] = false;
|
229 |
+
}
|
230 |
+
}
|
231 |
+
else {
|
232 |
+
if (l_id_array[z] == wdid) {
|
233 |
+
l_id_removed[l_id] = false;
|
234 |
+
}
|
235 |
+
}
|
236 |
+
|
237 |
+
}
|
238 |
+
|
239 |
+
if (wdtype == "type_address") {
|
240 |
+
addr_id = parseInt(wdid);
|
241 |
+
id_for_country = addr_id;
|
242 |
+
if (document.getElementById(id_for_country + "_mini_label_street1"))
|
243 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_street1").innerHTML + '#**label**#type_address#****#';
|
244 |
+
addr_id++;
|
245 |
+
if (document.getElementById(id_for_country + "_mini_label_street2"))
|
246 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_street2").innerHTML + '#**label**#type_address#****#';
|
247 |
+
addr_id++;
|
248 |
+
if (document.getElementById(id_for_country+"_mini_label_city"))
|
249 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_city").innerHTML + '#**label**#type_address#****#';
|
250 |
+
addr_id++;
|
251 |
+
if (document.getElementById(id_for_country + "_mini_label_state"))
|
252 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_state").innerHTML + '#**label**#type_address#****#';
|
253 |
+
addr_id++;
|
254 |
+
if (document.getElementById(id_for_country + "_mini_label_postal"))
|
255 |
+
tox = tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_postal").innerHTML + '#**label**#type_address#****#';
|
256 |
+
addr_id++;
|
257 |
+
if (document.getElementById(id_for_country+"_mini_label_country")) {
|
258 |
+
tox=tox + addr_id + '#**id**#' + document.getElementById(id_for_country + "_mini_label_country").innerHTML + '#**label**#type_address#****#';
|
259 |
+
}
|
260 |
+
|
261 |
+
}
|
262 |
+
else {
|
263 |
+
tox = tox + wdid + '#**id**#' + l_label + '#**label**#' + wdtype + '#****#';
|
264 |
+
}
|
265 |
+
|
266 |
+
id = wdid;
|
267 |
+
form_fields += wdid + "*:*id*:*";
|
268 |
+
form_fields += wdtype + "*:*type*:*";
|
269 |
+
w_choices = new Array();
|
270 |
+
w_choices_value=new Array();
|
271 |
+
w_choices_checked = new Array();
|
272 |
+
w_choices_disabled = new Array();
|
273 |
+
w_choices_params =new Array();
|
274 |
+
w_allow_other_num = 0;
|
275 |
+
w_property = new Array();
|
276 |
+
w_property_type = new Array();
|
277 |
+
w_property_values = new Array();
|
278 |
+
w_choices_price = new Array();
|
279 |
+
if (document.getElementById(id+'_element_labelform_id_temp').innerHTML) {
|
280 |
+
w_field_label = document.getElementById(id + '_element_labelform_id_temp').innerHTML.replace(/(\r\n|\n|\r)/gm," ");
|
281 |
+
}
|
282 |
+
else {
|
283 |
+
w_field_label = " ";
|
284 |
+
}
|
285 |
+
if (document.getElementById(id + '_label_sectionform_id_temp')) {
|
286 |
+
if (document.getElementById(id + '_label_sectionform_id_temp').style.display == "block") {
|
287 |
+
w_field_label_pos = "top";
|
288 |
+
}
|
289 |
+
else {
|
290 |
+
w_field_label_pos = "left";
|
291 |
+
}
|
292 |
+
}
|
293 |
+
if (document.getElementById(id + "_elementform_id_temp")) {
|
294 |
+
s = document.getElementById(id + "_elementform_id_temp").style.width;
|
295 |
+
w_size=s.substring(0,s.length - 2);
|
296 |
+
}
|
297 |
+
if (document.getElementById(id + "_label_sectionform_id_temp")) {
|
298 |
+
s = document.getElementById(id + "_label_sectionform_id_temp").style.width;
|
299 |
+
w_field_label_size = s.substring(0, s.length - 2);
|
300 |
+
}
|
301 |
+
if (document.getElementById(id + "_requiredform_id_temp")) {
|
302 |
+
w_required = document.getElementById(id + "_requiredform_id_temp").value;
|
303 |
+
}
|
304 |
+
if (document.getElementById(id + "_uniqueform_id_temp")) {
|
305 |
+
w_unique = document.getElementById(id + "_uniqueform_id_temp").value;
|
306 |
+
}
|
307 |
+
if (document.getElementById(id + '_label_sectionform_id_temp')) {
|
308 |
+
w_class = document.getElementById(id + '_label_sectionform_id_temp').getAttribute("class");
|
309 |
+
if (!w_class) {
|
310 |
+
w_class = "";
|
311 |
+
}
|
312 |
+
}
|
313 |
+
gen_form_fields();
|
314 |
+
wdform_row.innerHTML = "%" + id + " - " + l_label + "%";
|
315 |
+
}
|
316 |
+
}
|
317 |
+
}
|
318 |
+
}
|
319 |
+
else {
|
320 |
+
id = wdform_page.childNodes[q].getAttribute("wdid");
|
321 |
+
w_editor = document.getElementById(id + "_element_sectionform_id_temp").innerHTML;
|
322 |
+
form_fields += id + "*:*id*:*";
|
323 |
+
form_fields += "type_section_break" + "*:*type*:*";
|
324 |
+
form_fields += "custom_" + id + "*:*w_field_label*:*";
|
325 |
+
form_fields += w_editor + "*:*w_editor*:*";
|
326 |
+
form_fields += "*:*new_field*:*";
|
327 |
+
wdform_page.childNodes[q].innerHTML = "%" + id + " - " + "custom_" + id + "%";
|
328 |
+
}
|
329 |
+
}
|
330 |
+
}
|
331 |
+
}
|
332 |
+
document.getElementById('label_order_current').value = tox;
|
333 |
+
|
334 |
+
for (x = 0; x < l_id_array.length; x++) {
|
335 |
+
if (l_id_removed[l_id_array[x]]) {
|
336 |
+
tox = tox + l_id_array[x] + '#**id**#' + l_label_array[x] + '#**label**#' + l_type_array[x] + '#****#';
|
337 |
+
}
|
338 |
+
}
|
339 |
+
|
340 |
+
document.getElementById('label_order').value = tox;
|
341 |
+
document.getElementById('form_fields').value = form_fields;
|
342 |
+
refresh_();
|
343 |
+
document.getElementById('pagination').value=document.getElementById('pages').getAttribute("type");
|
344 |
+
document.getElementById('show_title').value=document.getElementById('pages').getAttribute("show_title");
|
345 |
+
document.getElementById('show_numbers').value=document.getElementById('pages').getAttribute("show_numbers");
|
346 |
+
return true;
|
347 |
+
}
|
348 |
+
|
349 |
+
gen = <?php echo (($id != 0) ? $row->counter : 1); ?>;
|
350 |
+
|
351 |
+
function enable() {
|
352 |
+
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
353 |
+
for (x = 0; x < 14; x++) {
|
354 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FMC_URL . '/images/'; ?>" + alltypes[x] + ".png?ver=<?php echo get_option("wd_form_maker_version"); ?>";
|
355 |
+
}
|
356 |
+
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
357 |
+
jQuery('#formMakerDiv').slideToggle(200);
|
358 |
+
}
|
359 |
+
else {
|
360 |
+
jQuery('#formMakerDiv').slideToggle(400);
|
361 |
+
}
|
362 |
+
|
363 |
+
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
364 |
+
jQuery('#formMakerDiv1').slideToggle(200);
|
365 |
+
}
|
366 |
+
else {
|
367 |
+
jQuery('#formMakerDiv1').slideToggle(400);
|
368 |
+
}
|
369 |
+
document.getElementById('when_edit').style.display = 'none';
|
370 |
+
}
|
371 |
+
|
372 |
+
function enable2() {
|
373 |
+
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
374 |
+
for (x = 0; x < 14; x++) {
|
375 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FMC_URL . '/images/'; ?>" + alltypes[x] + ".png?ver=<?php echo get_option("wd_form_maker_version"); ?>";
|
376 |
+
}
|
377 |
+
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
378 |
+
jQuery('#formMakerDiv').slideToggle(200);
|
379 |
+
}
|
380 |
+
else {
|
381 |
+
jQuery('#formMakerDiv').slideToggle(400);
|
382 |
+
}
|
383 |
+
|
384 |
+
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
385 |
+
jQuery('#formMakerDiv1').slideToggle(200);
|
386 |
+
}
|
387 |
+
else {
|
388 |
+
jQuery('#formMakerDiv1').slideToggle(400);
|
389 |
+
}
|
390 |
+
document.getElementById('when_edit').style.display = 'block';
|
391 |
+
if (document.getElementById('field_types').offsetWidth) {
|
392 |
+
document.getElementById('when_edit').style.width = document.getElementById('field_types').offsetWidth + 'px';
|
393 |
+
}
|
394 |
+
if (document.getElementById('field_types').offsetHeight) {
|
395 |
+
document.getElementById('when_edit').style.height = document.getElementById('field_types').offsetHeight + 'px';
|
396 |
+
}
|
397 |
+
}
|
398 |
+
</script>
|
399 |
+
<div class="fm-user-manual">
|
400 |
+
This section allows you to add fields to your form.
|
401 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-4.html">Read More in User Manual</a>
|
402 |
+
</div>
|
403 |
+
<div class="fm-upgrade-pro">
|
404 |
+
<a target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
405 |
+
<div class="fm-upgrade-img">
|
406 |
+
UPGRADE TO PRO VERSION
|
407 |
+
<span></span>
|
408 |
+
</div>
|
409 |
+
</a>
|
410 |
+
</div>
|
411 |
+
<div class="fm-clear"></div>
|
412 |
+
<form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fmc" style="width:99%;">
|
413 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
414 |
+
<h2 class="fm-h2-message"></h2>
|
415 |
+
<div class="fm-page-header">
|
416 |
+
<!-- <div class="fm-page-title">
|
417 |
+
<?php echo $page_title; ?>
|
418 |
+
</div> -->
|
419 |
+
<div style="float:left;">
|
420 |
+
<div class="fm-logo-edit-page"></div>
|
421 |
+
<div class="fm-title-edit-page">Contact Form</br>Maker</div>
|
422 |
+
</div>
|
423 |
+
<div class="fm-page-actions">
|
424 |
+
<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');">
|
425 |
+
<span></span>
|
426 |
+
Form Options
|
427 |
+
</button>
|
428 |
+
<button class="fm-button form-layout-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'form_layout');">
|
429 |
+
<span></span>
|
430 |
+
Form Layout
|
431 |
+
</button>
|
432 |
+
<div style="height:40px; border-right: 1px solid #848484; display: inline-block; width: 5px; vertical-align: bottom; margin-right: 5px;"></div>
|
433 |
+
<?php
|
434 |
+
if(isset($row->backup_id) )
|
435 |
+
if($row->backup_id!="") {
|
436 |
+
global $wpdb;
|
437 |
+
$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 ";
|
438 |
+
$backup_id = $wpdb->get_var($query);
|
439 |
+
if($backup_id) { ?>
|
440 |
+
<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');">
|
441 |
+
<span></span>
|
442 |
+
Redo
|
443 |
+
</button>
|
444 |
+
<?php
|
445 |
+
}
|
446 |
+
$query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id < ".$row->backup_id." AND id = ".$row->id." ORDER BY backup_id DESC LIMIT 0 , 1 ";
|
447 |
+
$backup_id = $wpdb->get_var($query);
|
448 |
+
|
449 |
+
if($backup_id) { ?>
|
450 |
+
<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');">
|
451 |
+
<span></span>
|
452 |
+
Undo
|
453 |
+
</button>
|
454 |
+
<?php
|
455 |
+
}
|
456 |
+
}
|
457 |
+
?>
|
458 |
+
|
459 |
+
<?php if ($id) { ?>
|
460 |
+
<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');">
|
461 |
+
<span></span>
|
462 |
+
Save as Copy
|
463 |
+
</button>
|
464 |
+
<?php } ?>
|
465 |
+
<button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save');">
|
466 |
+
<span></span>
|
467 |
+
Save
|
468 |
+
</button>
|
469 |
+
<button class="fm-button apply-button small" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'apply');">
|
470 |
+
<span></span>
|
471 |
+
Apply
|
472 |
+
</button>
|
473 |
+
<button class="fm-button cancel-button small" onclick="fm_set_input_value('task', 'cancel');">
|
474 |
+
<span></span>
|
475 |
+
Cancel
|
476 |
+
</button>
|
477 |
+
</div>
|
478 |
+
<div class="fm-clear"></div>
|
479 |
+
</div>
|
480 |
+
<div class="fm-title">
|
481 |
+
<span style="">Form title: </span>
|
482 |
+
<input id="title" name="title" value="<?php echo $row->title; ?>"/>
|
483 |
+
</div>
|
484 |
+
<div class="fm-clear"></div>
|
485 |
+
<br/>
|
486 |
+
<div class="fm-theme-banner">
|
487 |
+
<div class="fm-theme" style="float:left;">
|
488 |
+
|
489 |
+
<span style="">Theme: </span>
|
490 |
+
<select id="theme" name="theme" onChange="set_preview()">
|
491 |
+
<?php
|
492 |
+
foreach ($themes as $theme) {
|
493 |
+
?>
|
494 |
+
<option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?>><?php echo $theme->title; ?></option>
|
495 |
+
<?php
|
496 |
+
}
|
497 |
+
?>
|
498 |
+
</select>
|
499 |
+
<button id="preview_form" class="fm-button preview-button small" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', 'form_id' => $row->id, 'test_theme' => $row->theme, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
|
500 |
+
<span></span>
|
501 |
+
Preview
|
502 |
+
</button>
|
503 |
+
<button id="edit_css" class="fm-button options-edit-button small" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS_fmc', 'id' => $row->theme, 'form_id' => $row->id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
|
504 |
+
<span></span>
|
505 |
+
Edit CSS
|
506 |
+
</button>
|
507 |
+
</div>
|
508 |
+
<div style="float:right;">
|
509 |
+
<button class="fm-button add-new-button large" onclick="enable(); Enable(); return false;">
|
510 |
+
Add a New Field
|
511 |
+
<span></span>
|
512 |
+
</button>
|
513 |
+
</div>
|
514 |
+
</div>
|
515 |
+
<div class="fm-clear"></div>
|
516 |
+
<div id="formMakerDiv" onclick="close_window()"></div>
|
517 |
+
<div id="formMakerDiv1">
|
518 |
+
<table class="formMakerDiv1_table" border="0" width="100%" cellpadding="0" cellspacing="0" height="100%">
|
519 |
+
<tr>
|
520 |
+
<td style="padding:0px">
|
521 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
|
522 |
+
<tr valign="top">
|
523 |
+
<td width="20%" height="100%" id="field_types">
|
524 |
+
<div id="when_edit" style="display: none;"></div>
|
525 |
+
<table border="0" cellpadding="0" cellspacing="3" width="100%" style="border-collapse: separate; border-spacing: 3px;">
|
526 |
+
<tbody>
|
527 |
+
<tr>
|
528 |
+
<td align="center" onclick="addRow('customHTML')" class="field_buttons" id="table_editor">
|
529 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/customHTML.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_customHTML">
|
530 |
+
<div>Custom HTML</div>
|
531 |
+
</td>
|
532 |
+
<td align="center" onclick="addRow('text')" class="field_buttons" id="table_text">
|
533 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/text.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_text">
|
534 |
+
<div>Text input</div>
|
535 |
+
</td>
|
536 |
+
</tr>
|
537 |
+
<tr>
|
538 |
+
<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_checkbox">
|
539 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/checkbox.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_checkbox">
|
540 |
+
<div>Multiple Choice</div>
|
541 |
+
</td>
|
542 |
+
<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_radio">
|
543 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/radio.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_radio">
|
544 |
+
<div>Single Choice</div>
|
545 |
+
</td>
|
546 |
+
</tr>
|
547 |
+
<tr>
|
548 |
+
<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_survey">
|
549 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/survey.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_survey">
|
550 |
+
<div>Survey Tools</div>
|
551 |
+
</td>
|
552 |
+
<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_time_and_date">
|
553 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/time_and_date.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_time_and_date">
|
554 |
+
<div>Time and Date</div>
|
555 |
+
</td>
|
556 |
+
</tr>
|
557 |
+
<tr>
|
558 |
+
<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_select">
|
559 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/select.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_select">
|
560 |
+
<div>Select Box</div>
|
561 |
+
</td>
|
562 |
+
<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">
|
563 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/file_upload.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_file_upload">
|
564 |
+
<div>File Upload</div>
|
565 |
+
</td>
|
566 |
+
</tr>
|
567 |
+
<tr>
|
568 |
+
<td align="center" onclick="addRow('section_break')" class="field_buttons" id="table_section_break">
|
569 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/section_break.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_section_break">
|
570 |
+
<div>Section Break</div>
|
571 |
+
</td>
|
572 |
+
<td align="center" onclick="addRow('page_break')" class="field_buttons" id="table_page_break">
|
573 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/page_break.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_page_break">
|
574 |
+
<div>Page Break</div>
|
575 |
+
</td>
|
576 |
+
</tr>
|
577 |
+
<tr>
|
578 |
+
<td align="center" onclick="addRow('map')" class="field_buttons" id="table_map">
|
579 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/map.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_map">
|
580 |
+
<div>Map</div>
|
581 |
+
</td>
|
582 |
+
<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">
|
583 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/paypal.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_paypal">
|
584 |
+
<div>PayPal</div>
|
585 |
+
</td>
|
586 |
+
</tr>
|
587 |
+
<tr>
|
588 |
+
<td align="center" onclick="addRow('captcha')" class="field_buttons" id="table_captcha">
|
589 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/captcha.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_captcha">
|
590 |
+
<div>Captcha</div>
|
591 |
+
</td>
|
592 |
+
<td align="center" onclick="addRow('button')" id="table_button" class="field_buttons">
|
593 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/button.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_button">
|
594 |
+
<div>Button</div>
|
595 |
+
</td>
|
596 |
+
</tr>
|
597 |
+
</tbody>
|
598 |
+
</table>
|
599 |
+
</td>
|
600 |
+
<td width="40%" height="100%" align="left">
|
601 |
+
<div id="edit_table"></div>
|
602 |
+
</td>
|
603 |
+
<td align="center" valign="top" style="background: url("<?php echo WD_FMC_URL . '/images/border2.png'; ?>") repeat-y;"> </td>
|
604 |
+
<td style="padding:15px;">
|
605 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
|
606 |
+
<tr>
|
607 |
+
<td align="right">
|
608 |
+
<input type="radio" value="end" name="el_pos" checked="checked" id="pos_end" onclick="Disable()"/>
|
609 |
+
At The End
|
610 |
+
<input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
|
611 |
+
At The Beginning
|
612 |
+
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
613 |
+
Before
|
614 |
+
<select style="width: 100px; margin-left: 5px;" id="sel_el_pos" onclick="change_before()" disabled="disabled"></select>
|
615 |
+
<br>
|
616 |
+
<button class="fm-button field-save-button small" onclick="add(0, false); return false;">
|
617 |
+
Save
|
618 |
+
<span></span>
|
619 |
+
</button>
|
620 |
+
<button class="fm-button cancel-button small" onclick="close_window(); return false;">
|
621 |
+
Cancel
|
622 |
+
<span></span>
|
623 |
+
</button>
|
624 |
+
<hr style="margin-bottom:10px" />
|
625 |
+
</td>
|
626 |
+
</tr>
|
627 |
+
<tr height="100%" valign="top">
|
628 |
+
<td id="show_table"></td>
|
629 |
+
</tr>
|
630 |
+
</table>
|
631 |
+
</td>
|
632 |
+
</tr>
|
633 |
+
</table>
|
634 |
+
</td>
|
635 |
+
</tr>
|
636 |
+
</table>
|
637 |
+
<input type="hidden" id="old" />
|
638 |
+
<input type="hidden" id="old_selected" />
|
639 |
+
<input type="hidden" id="element_type" />
|
640 |
+
<input type="hidden" id="editing_id" />
|
641 |
+
<input type="hidden" value="<?php echo WD_FMC_URL; ?>" id="form_plugins_url" />
|
642 |
+
<div id="main_editor" style="position: fixed; display: none; z-index: 140;">
|
643 |
+
<?php if (user_can_richedit()) {
|
644 |
+
wp_editor('', 'form_maker_editor', array('teeny' => FALSE, 'textarea_name' => 'form_maker_editor', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
645 |
+
}
|
646 |
+
else { ?>
|
647 |
+
<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>
|
648 |
+
<?php
|
649 |
+
}
|
650 |
+
?>
|
651 |
+
</div>
|
652 |
+
</div>
|
653 |
+
<?php if (!function_exists('the_editor')) { ?>
|
654 |
+
<iframe id="tinymce" style="display: none;"></iframe>
|
655 |
+
<?php } ?>
|
656 |
+
|
657 |
+
<div class="fm-edit-content">
|
658 |
+
<div class="fm-drag-and-drop">
|
659 |
+
<div>
|
660 |
+
<label for="enable_sortable">Enable Drag & Drop</label>
|
661 |
+
<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; ?>">
|
662 |
+
<span></span>
|
663 |
+
</button>
|
664 |
+
<input type="hidden" name="sortable" id="sortable_hidden" value="<?php echo $row->sortable; ?>"/>
|
665 |
+
</div>
|
666 |
+
<div>
|
667 |
+
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.
|
668 |
+
</div>
|
669 |
+
</div>
|
670 |
+
<fieldset>
|
671 |
+
<legend></legend>
|
672 |
+
<?php if ($id) { ?>
|
673 |
+
<div style="margin: 8px; display: table; width: 100%;" id="page_bar">
|
674 |
+
<div id="page_navigation" style="display: table-row;">
|
675 |
+
<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>
|
676 |
+
<div align="left" id="edit_page_navigation" style="display: table-cell; vertical-align: middle;"></div>
|
677 |
+
</div>
|
678 |
+
</div>
|
679 |
+
<div id="take" class="main">
|
680 |
+
<?php echo $row->form_front; ?>
|
681 |
+
</div>
|
682 |
+
<?php } else { ?>
|
683 |
+
<div style="margin:8px; display:table; width:100%" id="page_bar">
|
684 |
+
<div id="page_navigation" style="display:table-row">
|
685 |
+
<div align="center" id="pages" show_title="false" show_numbers="true" type="none" style="display:table-cell; width:90%"></div>
|
686 |
+
<div align="left" id="edit_page_navigation" style="display:table-cell; vertical-align: middle;"></div>
|
687 |
+
</div>
|
688 |
+
</div>
|
689 |
+
<div id="take" class="main">
|
690 |
+
<div class="wdform-page-and-images" style="display:table; border-top:0px solid black;">
|
691 |
+
<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">
|
692 |
+
<div class="wdform_section">
|
693 |
+
<div class="wdform_column"></div>
|
694 |
+
</div>
|
695 |
+
<div valign="top" class="wdform_footer" style="width: 100%;">
|
696 |
+
<div style="width: 100%;">
|
697 |
+
<div style="width: 100%; display: table; padding-top:10px;">
|
698 |
+
<div style="display: table-row-group;">
|
699 |
+
<div id="form_id_temppage_nav1" style="display: table-row;"></div>
|
700 |
+
</div>
|
701 |
+
</div>
|
702 |
+
</div>
|
703 |
+
</div>
|
704 |
+
</div>
|
705 |
+
<div id="form_id_tempform_view_img1" style="float: right;">
|
706 |
+
<div>
|
707 |
+
<img src="<?php echo WD_FMC_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"/>
|
708 |
+
<img src="<?php echo WD_FMC_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')"/>
|
709 |
+
<img src="<?php echo WD_FMC_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')"/>
|
710 |
+
<img src="<?php echo WD_FMC_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')"/>
|
711 |
+
</div>
|
712 |
+
</div>
|
713 |
+
</div>
|
714 |
+
</div>
|
715 |
+
<?php } ?>
|
716 |
+
</fieldset>
|
717 |
+
</div>
|
718 |
+
<input type="hidden" name="form_front" id="form_front" />
|
719 |
+
<input type="hidden" name="form_fields" id="form_fields" />
|
720 |
+
<input type="hidden" name="pagination" id="pagination" />
|
721 |
+
<input type="hidden" name="show_title" id="show_title" />
|
722 |
+
<input type="hidden" name="show_numbers" id="show_numbers" />
|
723 |
+
<input type="hidden" name="public_key" id="public_key" />
|
724 |
+
<input type="hidden" name="private_key" id="private_key" />
|
725 |
+
<input type="hidden" name="recaptcha_theme" id="recaptcha_theme" />
|
726 |
+
<input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order; ?>" />
|
727 |
+
<input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current; ?>" />
|
728 |
+
<input type="hidden" name="counter" id="counter" value="<?php echo $row->counter; ?>" />
|
729 |
+
<input type="hidden" id="araqel" value="0" />
|
730 |
+
<input type="hidden" name="backup_id" id="backup_id" value="<?php echo $row->backup_id;?>">
|
731 |
+
|
732 |
+
<?php if ($id) { ?>
|
733 |
+
<script type="text/javascript">
|
734 |
+
function set_preview() {
|
735 |
+
jQuery("#preview_form").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&test_theme=" + jQuery('#theme').val() + "&width=1000&height=500&TB_iframe=1'); return false;");
|
736 |
+
jQuery("#edit_css").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS_fmc', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&id=" + jQuery('#theme').val() + "&width=800&height=500&TB_iframe=1'); return false;");
|
737 |
+
}
|
738 |
+
function formOnload() {
|
739 |
+
for (t = 0; t < <?php echo $row->counter; ?>; t++) {
|
740 |
+
if (document.getElementById(t + "_typeform_id_temp")) {
|
741 |
+
if (document.getElementById(t + "_typeform_id_temp").value == "type_map" || document.getElementById(t + "_typeform_id_temp").value == "type_mark_map") {
|
742 |
+
if_gmap_init(t);
|
743 |
+
for (q = 0; q < 20; q++) {
|
744 |
+
if (document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q)) {
|
745 |
+
w_long = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q));
|
746 |
+
w_lat = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("lat" + q));
|
747 |
+
w_info = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("info" + q));
|
748 |
+
add_marker_on_map(t, q, w_long, w_lat, w_info, false);
|
749 |
+
}
|
750 |
+
}
|
751 |
+
}
|
752 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_date") {
|
753 |
+
// Calendar.setup({
|
754 |
+
// inputField:t + "_elementform_id_temp",
|
755 |
+
// ifFormat:document.getElementById(t + "_buttonform_id_temp").getAttribute('format'),
|
756 |
+
// button:t + "_buttonform_id_temp",
|
757 |
+
// align:"Tl",
|
758 |
+
// singleClick:true,
|
759 |
+
// firstDay:0
|
760 |
+
// });
|
761 |
+
}
|
762 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_name") {
|
763 |
+
var myu = t;
|
764 |
+
jQuery(document).ready(function () {
|
765 |
+
jQuery("#" + myu + "_mini_label_first").click(function () {
|
766 |
+
if (jQuery(this).children('input').length == 0) {
|
767 |
+
var first = "<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
768 |
+
jQuery(this).html(first);
|
769 |
+
jQuery("input.first").focus();
|
770 |
+
jQuery("input.first").blur(function () {
|
771 |
+
var id_for_blur = document.getElementById('first').parentNode.id.split('_');
|
772 |
+
var value = jQuery(this).val();
|
773 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_first").text(value);
|
774 |
+
});
|
775 |
+
}
|
776 |
+
});
|
777 |
+
jQuery("label#" + myu + "_mini_label_last").click(function () {
|
778 |
+
if (jQuery(this).children('input').length == 0) {
|
779 |
+
var last = "<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
780 |
+
jQuery(this).html(last);
|
781 |
+
jQuery("input.last").focus();
|
782 |
+
jQuery("input.last").blur(function () {
|
783 |
+
var id_for_blur = document.getElementById('last').parentNode.id.split('_');
|
784 |
+
var value = jQuery(this).val();
|
785 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_last").text(value);
|
786 |
+
});
|
787 |
+
}
|
788 |
+
});
|
789 |
+
jQuery("label#" + myu + "_mini_label_title").click(function () {
|
790 |
+
if (jQuery(this).children('input').length == 0) {
|
791 |
+
var title_ = "<input type='text' id='title_' class='title_' style='outline:none; border:none; background:none; width:50px;' value=\"" + jQuery(this).text() + "\">";
|
792 |
+
jQuery(this).html(title_);
|
793 |
+
jQuery("input.title_").focus();
|
794 |
+
jQuery("input.title_").blur(function () {
|
795 |
+
var id_for_blur = document.getElementById('title_').parentNode.id.split('_');
|
796 |
+
var value = jQuery(this).val();
|
797 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_title").text(value);
|
798 |
+
});
|
799 |
+
}
|
800 |
+
});
|
801 |
+
jQuery("label#" + myu + "_mini_label_middle").click(function () {
|
802 |
+
if (jQuery(this).children('input').length == 0) {
|
803 |
+
var middle = "<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
804 |
+
jQuery(this).html(middle);
|
805 |
+
jQuery("input.middle").focus();
|
806 |
+
jQuery("input.middle").blur(function () {
|
807 |
+
var id_for_blur = document.getElementById('middle').parentNode.id.split('_');
|
808 |
+
var value = jQuery(this).val();
|
809 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_middle").text(value);
|
810 |
+
});
|
811 |
+
}
|
812 |
+
});
|
813 |
+
});
|
814 |
+
}
|
815 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_phone") {
|
816 |
+
var myu = t;
|
817 |
+
jQuery(document).ready(function () {
|
818 |
+
jQuery("label#" + myu + "_mini_label_area_code").click(function () {
|
819 |
+
if (jQuery(this).children('input').length == 0) {
|
820 |
+
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() + "\">";
|
821 |
+
jQuery(this).html(area_code);
|
822 |
+
jQuery("input.area_code").focus();
|
823 |
+
jQuery("input.area_code").blur(function () {
|
824 |
+
var id_for_blur = document.getElementById('area_code').parentNode.id.split('_');
|
825 |
+
var value = jQuery(this).val();
|
826 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_area_code").text(value);
|
827 |
+
});
|
828 |
+
}
|
829 |
+
});
|
830 |
+
jQuery("label#" + myu + "_mini_label_phone_number").click(function () {
|
831 |
+
if (jQuery(this).children('input').length == 0) {
|
832 |
+
var phone_number = "<input type='text' id='phone_number' class='phone_number' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
833 |
+
jQuery(this).html(phone_number);
|
834 |
+
jQuery("input.phone_number").focus();
|
835 |
+
jQuery("input.phone_number").blur(function () {
|
836 |
+
var id_for_blur = document.getElementById('phone_number').parentNode.id.split('_');
|
837 |
+
var value = jQuery(this).val();
|
838 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_phone_number").text(value);
|
839 |
+
});
|
840 |
+
}
|
841 |
+
});
|
842 |
+
});
|
843 |
+
}
|
844 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_fields") {
|
845 |
+
var myu = t;
|
846 |
+
jQuery(document).ready(function () {
|
847 |
+
jQuery("label#" + myu + "_day_label").click(function () {
|
848 |
+
if (jQuery(this).children('input').length == 0) {
|
849 |
+
var day = "<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
850 |
+
jQuery(this).html(day);
|
851 |
+
jQuery("input.day").focus();
|
852 |
+
jQuery("input.day").blur(function () {
|
853 |
+
var id_for_blur = document.getElementById('day').parentNode.id.split('_');
|
854 |
+
var value = jQuery(this).val();
|
855 |
+
jQuery("#" + id_for_blur[0] + "_day_label").text(value);
|
856 |
+
});
|
857 |
+
}
|
858 |
+
});
|
859 |
+
jQuery("label#" + myu + "_month_label").click(function () {
|
860 |
+
if (jQuery(this).children('input').length == 0) {
|
861 |
+
var month = "<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
862 |
+
jQuery(this).html(month);
|
863 |
+
jQuery("input.month").focus();
|
864 |
+
jQuery("input.month").blur(function () {
|
865 |
+
var id_for_blur = document.getElementById('month').parentNode.id.split('_');
|
866 |
+
var value = jQuery(this).val();
|
867 |
+
jQuery("#" + id_for_blur[0] + "_month_label").text(value);
|
868 |
+
});
|
869 |
+
}
|
870 |
+
});
|
871 |
+
jQuery("label#" + myu + "_year_label").click(function () {
|
872 |
+
if (jQuery(this).children('input').length == 0) {
|
873 |
+
var year = "<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
874 |
+
jQuery(this).html(year);
|
875 |
+
jQuery("input.year").focus();
|
876 |
+
jQuery("input.year").blur(function () {
|
877 |
+
var id_for_blur = document.getElementById('year').parentNode.id.split('_');
|
878 |
+
var value = jQuery(this).val();
|
879 |
+
jQuery("#" + id_for_blur[0] + "_year_label").text(value);
|
880 |
+
});
|
881 |
+
}
|
882 |
+
});
|
883 |
+
});
|
884 |
+
}
|
885 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_time") {
|
886 |
+
var myu = t;
|
887 |
+
jQuery(document).ready(function () {
|
888 |
+
jQuery("label#" + myu + "_mini_label_hh").click(function () {
|
889 |
+
if (jQuery(this).children('input').length == 0) {
|
890 |
+
var hh = "<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
891 |
+
jQuery(this).html(hh);
|
892 |
+
jQuery("input.hh").focus();
|
893 |
+
jQuery("input.hh").blur(function () {
|
894 |
+
var id_for_blur = document.getElementById('hh').parentNode.id.split('_');
|
895 |
+
var value = jQuery(this).val();
|
896 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_hh").text(value);
|
897 |
+
});
|
898 |
+
}
|
899 |
+
});
|
900 |
+
jQuery("label#" + myu + "_mini_label_mm").click(function () {
|
901 |
+
if (jQuery(this).children('input').length == 0) {
|
902 |
+
var mm = "<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
903 |
+
jQuery(this).html(mm);
|
904 |
+
jQuery("input.mm").focus();
|
905 |
+
jQuery("input.mm").blur(function () {
|
906 |
+
var id_for_blur = document.getElementById('mm').parentNode.id.split('_');
|
907 |
+
var value = jQuery(this).val();
|
908 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_mm").text(value);
|
909 |
+
});
|
910 |
+
}
|
911 |
+
});
|
912 |
+
jQuery("label#" + myu + "_mini_label_ss").click(function () {
|
913 |
+
if (jQuery(this).children('input').length == 0) {
|
914 |
+
var ss = "<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
915 |
+
jQuery(this).html(ss);
|
916 |
+
jQuery("input.ss").focus();
|
917 |
+
jQuery("input.ss").blur(function () {
|
918 |
+
var id_for_blur = document.getElementById('ss').parentNode.id.split('_');
|
919 |
+
var value = jQuery(this).val();
|
920 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_ss").text(value);
|
921 |
+
});
|
922 |
+
}
|
923 |
+
});
|
924 |
+
jQuery("label#" + myu + "_mini_label_am_pm").click(function () {
|
925 |
+
if (jQuery(this).children('input').length == 0) {
|
926 |
+
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() + "\">";
|
927 |
+
jQuery(this).html(am_pm);
|
928 |
+
jQuery("input.am_pm").focus();
|
929 |
+
jQuery("input.am_pm").blur(function () {
|
930 |
+
var id_for_blur = document.getElementById('am_pm').parentNode.id.split('_');
|
931 |
+
var value = jQuery(this).val();
|
932 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_am_pm").text(value);
|
933 |
+
});
|
934 |
+
}
|
935 |
+
});
|
936 |
+
});
|
937 |
+
}
|
938 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_paypal_price") {
|
939 |
+
var myu = t;
|
940 |
+
jQuery(document).ready(function () {
|
941 |
+
jQuery("#" + myu + "_mini_label_dollars").click(function () {
|
942 |
+
if (jQuery(this).children('input').length == 0) {
|
943 |
+
var dollars = "<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
944 |
+
jQuery(this).html(dollars);
|
945 |
+
jQuery("input.dollars").focus();
|
946 |
+
jQuery("input.dollars").blur(function () {
|
947 |
+
var id_for_blur = document.getElementById('dollars').parentNode.id.split('_');
|
948 |
+
var value = jQuery(this).val();
|
949 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_dollars").text(value);
|
950 |
+
});
|
951 |
+
}
|
952 |
+
});
|
953 |
+
jQuery("label#" + myu + "_mini_label_cents").click(function () {
|
954 |
+
if (jQuery(this).children('input').length == 0) {
|
955 |
+
var cents = "<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
956 |
+
jQuery(this).html(cents);
|
957 |
+
jQuery("input.cents").focus();
|
958 |
+
jQuery("input.cents").blur(function () {
|
959 |
+
var id_for_blur = document.getElementById('cents').parentNode.id.split('_');
|
960 |
+
var value = jQuery(this).val();
|
961 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_cents").text(value);
|
962 |
+
});
|
963 |
+
}
|
964 |
+
});
|
965 |
+
});
|
966 |
+
}
|
967 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_address") {
|
968 |
+
var myu = t;
|
969 |
+
jQuery(document).ready(function () {
|
970 |
+
jQuery("label#" + myu + "_mini_label_street1").click(function () {
|
971 |
+
if (jQuery(this).children('input').length == 0) {
|
972 |
+
var street1 = "<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
973 |
+
jQuery(this).html(street1);
|
974 |
+
jQuery("input.street1").focus();
|
975 |
+
jQuery("input.street1").blur(function () {
|
976 |
+
var id_for_blur = document.getElementById('street1').parentNode.id.split('_');
|
977 |
+
var value = jQuery(this).val();
|
978 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_street1").text(value);
|
979 |
+
});
|
980 |
+
}
|
981 |
+
});
|
982 |
+
jQuery("label#" + myu + "_mini_label_street2").click(function () {
|
983 |
+
if (jQuery(this).children('input').length == 0) {
|
984 |
+
var street2 = "<input type='text' id='street2' class='street2' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
985 |
+
jQuery(this).html(street2);
|
986 |
+
jQuery("input.street2").focus();
|
987 |
+
jQuery("input.street2").blur(function () {
|
988 |
+
var id_for_blur = document.getElementById('street2').parentNode.id.split('_');
|
989 |
+
var value = jQuery(this).val();
|
990 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_street2").text(value);
|
991 |
+
});
|
992 |
+
}
|
993 |
+
});
|
994 |
+
jQuery("label#" + myu + "_mini_label_city").click(function () {
|
995 |
+
if (jQuery(this).children('input').length == 0) {
|
996 |
+
var city = "<input type='text' id='city' class='city' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
997 |
+
jQuery(this).html(city);
|
998 |
+
jQuery("input.city").focus();
|
999 |
+
jQuery("input.city").blur(function () {
|
1000 |
+
var id_for_blur = document.getElementById('city').parentNode.id.split('_');
|
1001 |
+
var value = jQuery(this).val();
|
1002 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_city").text(value);
|
1003 |
+
});
|
1004 |
+
}
|
1005 |
+
});
|
1006 |
+
jQuery("label#" + myu + "_mini_label_state").click(function () {
|
1007 |
+
if (jQuery(this).children('input').length == 0) {
|
1008 |
+
var state = "<input type='text' id='state' class='state' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1009 |
+
jQuery(this).html(state);
|
1010 |
+
jQuery("input.state").focus();
|
1011 |
+
jQuery("input.state").blur(function () {
|
1012 |
+
var id_for_blur = document.getElementById('state').parentNode.id.split('_');
|
1013 |
+
var value = jQuery(this).val();
|
1014 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_state").text(value);
|
1015 |
+
});
|
1016 |
+
}
|
1017 |
+
});
|
1018 |
+
jQuery("label#" + myu + "_mini_label_postal").click(function () {
|
1019 |
+
if (jQuery(this).children('input').length == 0) {
|
1020 |
+
var postal = "<input type='text' id='postal' class='postal' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1021 |
+
jQuery(this).html(postal);
|
1022 |
+
jQuery("input.postal").focus();
|
1023 |
+
jQuery("input.postal").blur(function () {
|
1024 |
+
var id_for_blur = document.getElementById('postal').parentNode.id.split('_');
|
1025 |
+
var value = jQuery(this).val();
|
1026 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_postal").text(value);
|
1027 |
+
});
|
1028 |
+
}
|
1029 |
+
});
|
1030 |
+
jQuery("label#" + myu + "_mini_label_country").click(function () {
|
1031 |
+
if (jQuery(this).children('input').length == 0) {
|
1032 |
+
var country = "<input type='country' id='country' class='country' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
|
1033 |
+
jQuery(this).html(country);
|
1034 |
+
jQuery("input.country").focus();
|
1035 |
+
jQuery("input.country").blur(function () {
|
1036 |
+
var id_for_blur = document.getElementById('country').parentNode.id.split('_');
|
1037 |
+
var value = jQuery(this).val();
|
1038 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_country").text(value);
|
1039 |
+
});
|
1040 |
+
}
|
1041 |
+
});
|
1042 |
+
});
|
1043 |
+
}
|
1044 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_scale_rating") {
|
1045 |
+
var myu = t;
|
1046 |
+
jQuery(document).ready(function () {
|
1047 |
+
jQuery("#" + myu + "_mini_label_worst").click(function () {
|
1048 |
+
if (jQuery(this).children('input').length == 0) {
|
1049 |
+
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() + "\">";
|
1050 |
+
jQuery(this).html(worst);
|
1051 |
+
jQuery("input.worst").focus();
|
1052 |
+
jQuery("input.worst").blur(function () {
|
1053 |
+
var id_for_blur = document.getElementById('worst').parentNode.id.split('_');
|
1054 |
+
var value = jQuery(this).val();
|
1055 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_worst").text(value);
|
1056 |
+
});
|
1057 |
+
}
|
1058 |
+
});
|
1059 |
+
jQuery("label#" + myu + "_mini_label_best").click(function () {
|
1060 |
+
if (jQuery(this).children('input').length == 0) {
|
1061 |
+
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() + "\">";
|
1062 |
+
jQuery(this).html(best);
|
1063 |
+
jQuery("input.best").focus();
|
1064 |
+
jQuery("input.best").blur(function () {
|
1065 |
+
var id_for_blur = document.getElementById('best').parentNode.id.split('_');
|
1066 |
+
var value = jQuery(this).val();
|
1067 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_best").text(value);
|
1068 |
+
});
|
1069 |
+
}
|
1070 |
+
});
|
1071 |
+
});
|
1072 |
+
}
|
1073 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_spinner") {
|
1074 |
+
var spinner_value = document.getElementById(t + "_elementform_id_temp").value;
|
1075 |
+
var spinner_min_value = document.getElementById(t + "_min_valueform_id_temp").value;
|
1076 |
+
var spinner_max_value = document.getElementById(t + "_max_valueform_id_temp").value;
|
1077 |
+
var spinner_step = document.getElementById(t + "_stepform_id_temp").value;
|
1078 |
+
jQuery("#" + t + "_elementform_id_temp")[0].spin = null;
|
1079 |
+
spinner = jQuery("#" + t + "_elementform_id_temp").spinner();
|
1080 |
+
spinner.spinner("value", spinner_value);
|
1081 |
+
jQuery("#" + t + "_elementform_id_temp").spinner({ min:spinner_min_value});
|
1082 |
+
jQuery("#" + t + "_elementform_id_temp").spinner({ max:spinner_max_value});
|
1083 |
+
jQuery("#" + t + "_elementform_id_temp").spinner({ step:spinner_step});
|
1084 |
+
}
|
1085 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_slider") {
|
1086 |
+
var slider_value = document.getElementById(t + "_slider_valueform_id_temp").value;
|
1087 |
+
var slider_min_value = document.getElementById(t + "_slider_min_valueform_id_temp").value;
|
1088 |
+
var slider_max_value = document.getElementById(t + "_slider_max_valueform_id_temp").value;
|
1089 |
+
var slider_element_value = document.getElementById(t + "_element_valueform_id_temp");
|
1090 |
+
var slider_value_save = document.getElementById(t + "_slider_valueform_id_temp");
|
1091 |
+
jQuery("#" + t + "_elementform_id_temp")[0].slide = null;
|
1092 |
+
jQuery(function () {
|
1093 |
+
jQuery("#" + t + "_elementform_id_temp").slider({
|
1094 |
+
range:"min",
|
1095 |
+
value:eval(slider_value),
|
1096 |
+
min:eval(slider_min_value),
|
1097 |
+
max:eval(slider_max_value),
|
1098 |
+
slide:function (event, ui) {
|
1099 |
+
slider_element_value.innerHTML = "" + ui.value;
|
1100 |
+
slider_value_save.value = "" + ui.value;
|
1101 |
+
}
|
1102 |
+
});
|
1103 |
+
});
|
1104 |
+
}
|
1105 |
+
else if (document.getElementById(t + "_typeform_id_temp").value == "type_range") {
|
1106 |
+
var spinner_value0 = document.getElementById(t + "_elementform_id_temp0").value;
|
1107 |
+
var spinner_step = document.getElementById(t + "_range_stepform_id_temp").value;
|
1108 |
+
jQuery("#" + t + "_elementform_id_temp0")[0].spin = null;
|
1109 |
+
jQuery("#" + t + "_elementform_id_temp1")[0].spin = null;
|
1110 |
+
spinner0 = jQuery("#" + t + "_elementform_id_temp0").spinner();
|
1111 |
+
spinner0.spinner("value", spinner_value0);
|
1112 |
+
jQuery("#" + t + "_elementform_id_temp0").spinner({ step:spinner_step});
|
1113 |
+
var spinner_value1 = document.getElementById(t + "_elementform_id_temp1").value;
|
1114 |
+
spinner1 = jQuery("#" + t + "_elementform_id_temp1").spinner();
|
1115 |
+
spinner1.spinner("value", spinner_value1);
|
1116 |
+
jQuery("#" + t + "_elementform_id_temp1").spinner({ step:spinner_step});
|
1117 |
+
var myu = t;
|
1118 |
+
jQuery(document).ready(function () {
|
1119 |
+
jQuery("#" + myu + "_mini_label_from").click(function () {
|
1120 |
+
if (jQuery(this).children('input').length == 0) {
|
1121 |
+
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() + "\">";
|
1122 |
+
jQuery(this).html(from);
|
1123 |
+
jQuery("input.from").focus();
|
1124 |
+
jQuery("input.from").blur(function () {
|
1125 |
+
var id_for_blur = document.getElementById('from').parentNode.id.split('_');
|
1126 |
+
var value = jQuery(this).val();
|
1127 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_from").text(value);
|
1128 |
+
});
|
1129 |
+
}
|
1130 |
+
});
|
1131 |
+
jQuery("label#" + myu + "_mini_label_to").click(function () {
|
1132 |
+
if (jQuery(this).children('input').length == 0) {
|
1133 |
+
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() + "\">";
|
1134 |
+
jQuery(this).html(to);
|
1135 |
+
jQuery("input.to").focus();
|
1136 |
+
jQuery("input.to").blur(function () {
|
1137 |
+
var id_for_blur = document.getElementById('to').parentNode.id.split('_');
|
1138 |
+
var value = jQuery(this).val();
|
1139 |
+
jQuery("#" + id_for_blur[0] + "_mini_label_to").text(value);
|
1140 |
+
});
|
1141 |
+
}
|
1142 |
+
});
|
1143 |
+
});
|
1144 |
+
}
|
1145 |
+
}
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
remove_whitespace(document.getElementById('take'));
|
1149 |
+
form_view = 1;
|
1150 |
+
form_view_count = 0;
|
1151 |
+
|
1152 |
+
for (i = 1; i <= 30; i++) {
|
1153 |
+
if (document.getElementById('form_id_tempform_view' + i)) {
|
1154 |
+
form_view_count++;
|
1155 |
+
form_view_max = i;
|
1156 |
+
tbody_img = document.createElement('div');
|
1157 |
+
tbody_img.setAttribute('id', 'form_id_tempform_view_img' + i);
|
1158 |
+
tbody_img.style.cssText = "float:right";
|
1159 |
+
tr_img = document.createElement('div');
|
1160 |
+
var img = document.createElement('img');
|
1161 |
+
img.setAttribute('src', '<?php echo WD_FMC_URL; ?>/images/minus.png?ver=<?php echo get_option("wd_form_maker_version"); ?>');
|
1162 |
+
img.setAttribute('title', 'Show or hide the page');
|
1163 |
+
img.setAttribute("class", "page_toolbar");
|
1164 |
+
img.setAttribute('id', 'show_page_img_' + i);
|
1165 |
+
img.setAttribute('onClick', 'show_or_hide("' + i + '")');
|
1166 |
+
img.setAttribute("onmouseover", 'chnage_icons_src(this,"minus")');
|
1167 |
+
img.setAttribute("onmouseout", 'chnage_icons_src(this,"minus")');
|
1168 |
+
var img_X = document.createElement("img");
|
1169 |
+
img_X.setAttribute("src", "<?php echo WD_FMC_URL; ?>/images/page_delete.png?ver=<?php echo get_option("wd_form_maker_version"); ?>");
|
1170 |
+
img_X.setAttribute('title', 'Delete the page');
|
1171 |
+
img_X.setAttribute("class", "page_toolbar");
|
1172 |
+
img_X.setAttribute("onclick", 'remove_page("' + i + '")');
|
1173 |
+
img_X.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete")');
|
1174 |
+
img_X.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete")');
|
1175 |
+
var img_X_all = document.createElement("img");
|
1176 |
+
img_X_all.setAttribute("src", "<?php echo WD_FMC_URL; ?>/images/page_delete_all.png?ver=<?php echo get_option("wd_form_maker_version"); ?>");
|
1177 |
+
img_X_all.setAttribute('title', 'Delete the page with fields');
|
1178 |
+
img_X_all.setAttribute("class", "page_toolbar");
|
1179 |
+
img_X_all.setAttribute("onclick", 'remove_page_all("' + i + '")');
|
1180 |
+
img_X_all.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete_all")');
|
1181 |
+
img_X_all.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete_all")');
|
1182 |
+
var img_EDIT = document.createElement("img");
|
1183 |
+
img_EDIT.setAttribute("src", "<?php echo WD_FMC_URL; ?>/images/page_edit.png?ver=<?php echo get_option("wd_form_maker_version"); ?>");
|
1184 |
+
img_EDIT.setAttribute('title', 'Edit the page');
|
1185 |
+
img_EDIT.setAttribute("class", "page_toolbar");
|
1186 |
+
img_EDIT.setAttribute("onclick", 'edit_page_break("' + i + '")');
|
1187 |
+
img_EDIT.setAttribute("onmouseover", 'chnage_icons_src(this,"page_edit")');
|
1188 |
+
img_EDIT.setAttribute("onmouseout", 'chnage_icons_src(this,"page_edit")');
|
1189 |
+
tr_img.appendChild(img);
|
1190 |
+
tr_img.appendChild(img_X);
|
1191 |
+
tr_img.appendChild(img_X_all);
|
1192 |
+
tr_img.appendChild(img_EDIT);
|
1193 |
+
tbody_img.appendChild(tr_img);
|
1194 |
+
document.getElementById('form_id_tempform_view' + i).parentNode.appendChild(tbody_img);
|
1195 |
+
}
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
if (form_view_count > 1) {
|
1199 |
+
for (i = 1; i <= form_view_max; i++) {
|
1200 |
+
if (document.getElementById('form_id_tempform_view' + i)) {
|
1201 |
+
first_form_view = i;
|
1202 |
+
break;
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
form_view = form_view_max;
|
1206 |
+
need_enable = false;
|
1207 |
+
generate_page_nav(first_form_view);
|
1208 |
+
var img_EDIT = document.createElement("img");
|
1209 |
+
img_EDIT.setAttribute("src", "<?php echo WD_FMC_URL . '/images/edit.png?ver='.get_option("wd_form_maker_version"); ?>");
|
1210 |
+
img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
|
1211 |
+
img_EDIT.setAttribute("onclick", 'el_page_navigation()');
|
1212 |
+
var td_EDIT = document.getElementById("edit_page_navigation");
|
1213 |
+
td_EDIT.appendChild(img_EDIT);
|
1214 |
+
document.getElementById('page_navigation').appendChild(td_EDIT);
|
1215 |
+
}
|
1216 |
+
document.getElementById('araqel').value = 1;
|
1217 |
+
}
|
1218 |
+
jQuery(window).load(function () {
|
1219 |
+
formOnload();
|
1220 |
+
});
|
1221 |
+
jQuery(function() {
|
1222 |
+
jQuery('.wdform_section .wdform_column:last-child').each(function() {
|
1223 |
+
jQuery(this).parent().append(jQuery('<div></div>').addClass("wdform_column"));
|
1224 |
+
});
|
1225 |
+
|
1226 |
+
sortable_columns();
|
1227 |
+
if(<?php echo $row->sortable ?>==1) {
|
1228 |
+
jQuery( ".wdform_arrows" ).hide();
|
1229 |
+
all_sortable_events();
|
1230 |
+
}
|
1231 |
+
else
|
1232 |
+
jQuery('.wdform_column').sortable( "disable" );
|
1233 |
+
|
1234 |
+
});
|
1235 |
+
</script>
|
1236 |
+
<?php
|
1237 |
+
} else { ?>
|
1238 |
+
<script type="text/javascript">
|
1239 |
+
jQuery(function() {
|
1240 |
+
jQuery('.wdform_section .wdform_column:last-child').each(function() {
|
1241 |
+
jQuery(this).parent().append(jQuery('<div></div>').addClass("wdform_column"));
|
1242 |
+
});
|
1243 |
+
sortable_columns();
|
1244 |
+
all_sortable_events();
|
1245 |
+
});
|
1246 |
+
</script>
|
1247 |
+
<?php } ?>
|
1248 |
+
<input type="hidden" name="option" value="com_formmaker" />
|
1249 |
+
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
|
1250 |
+
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
|
1251 |
+
<input type="hidden" id="task" name="task" value=""/>
|
1252 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
1253 |
+
</form>
|
1254 |
+
<?php
|
1255 |
+
}
|
1256 |
|
1257 |
+
public function edit_old($id) {
|
1258 |
// header("X-XSS-Protection: 0");
|
1259 |
+
$row = $this->model->get_row_data($id);
|
1260 |
+
$themes = $this->model->get_theme_rows_data('old');
|
1261 |
$labels = array();
|
1262 |
$label_id = array();
|
1263 |
$label_order_original = array();
|
1274 |
$labels['id'] = '"' . implode('","', $label_id) . '"';
|
1275 |
$labels['label'] = '"' . implode('","', $label_order_original) . '"';
|
1276 |
$labels['type'] = '"' . implode('","', $label_type) . '"';
|
1277 |
+
|
1278 |
$page_title = (($id != 0) ? 'Edit form ' . $row->title : 'Create new form');
|
1279 |
?>
|
1280 |
<script type="text/javascript">
|
1281 |
+
var plugin_url = "<?php echo WD_FMC_URL; ?>";
|
1282 |
</script>
|
1283 |
+
<script src="<?php echo WD_FMC_URL . '/js/formmaker_free.js'; ?>?ver=<?php echo get_option("wd_form_maker_version"); ?>" type="text/javascript"></script>
|
1284 |
<script type="text/javascript">
|
|
|
|
|
|
|
1285 |
function submitbutton() {
|
|
|
|
|
|
|
1286 |
if (!document.getElementById('araqel') || (document.getElementById('araqel').value == '0')) {
|
1287 |
alert('Please wait while page loading.');
|
1288 |
return false;
|
1289 |
}
|
|
|
|
|
|
|
1290 |
tox = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1291 |
l_id_array = [<?php echo $labels['id']?>];
|
1292 |
l_label_array = [<?php echo $labels['label']?>];
|
1293 |
l_type_array = [<?php echo $labels['type']?>];
|
1294 |
l_id_removed = [];
|
1295 |
+
for (x=0; x< l_id_array.length; x++) {
|
1296 |
+
l_id_removed[l_id_array[x]]=true;
|
1297 |
}
|
1298 |
+
for (t=1;t<=form_view_max;t++) {
|
1299 |
+
if (document.getElementById('form_id_tempform_view'+t)) {
|
1300 |
+
form_view_element=document.getElementById('form_id_tempform_view'+t);
|
1301 |
+
n=form_view_element.childNodes.length-2;
|
1302 |
+
for(q=0;q<=n;q++) {
|
1303 |
+
if (form_view_element.childNodes[q].nodeType!=3) {
|
1304 |
+
if (!form_view_element.childNodes[q].id) {
|
1305 |
+
GLOBAL_tr=form_view_element.childNodes[q];
|
1306 |
+
for (x=0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
|
1307 |
+
table=GLOBAL_tr.firstChild.childNodes[x];
|
1308 |
+
tbody=table.firstChild;
|
1309 |
+
for (y=0; y < tbody.childNodes.length; y++) {
|
1310 |
+
is_in_old=false;
|
1311 |
+
tr=tbody.childNodes[y];
|
1312 |
+
l_id=tr.id;
|
1313 |
+
l_label=document.getElementById( tr.id+'_element_labelform_id_temp').innerHTML;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1314 |
l_label = l_label.replace(/(\r\n|\n|\r)/gm," ");
|
1315 |
+
l_type=tr.getAttribute('type');
|
1316 |
for (z = 0; z < l_id_array.length; z++) {
|
1317 |
+
if (l_id_array[z] == l_id) {
|
1318 |
if (l_type_array[z] == "type_address") {
|
1319 |
if (document.getElementById(l_id + "_mini_label_street1")) {
|
1320 |
l_id_removed[l_id_array[z]] = false;
|
1321 |
}
|
1322 |
+
if (document.getElementById(l_id+"_mini_label_street2")) {
|
1323 |
l_id_removed[parseInt(l_id_array[z]) + 1] = false;
|
1324 |
}
|
1325 |
+
if (document.getElementById(l_id+"_mini_label_city")) {
|
1326 |
l_id_removed[parseInt(l_id_array[z]) + 2] = false;
|
1327 |
}
|
1328 |
+
if (document.getElementById(l_id+"_mini_label_state")) {
|
1329 |
l_id_removed[parseInt(l_id_array[z]) + 3] = false;
|
1330 |
}
|
1331 |
if (document.getElementById(l_id+"_mini_label_postal")) {
|
1332 |
l_id_removed[parseInt(l_id_array[z]) + 4] = false;
|
1333 |
}
|
1334 |
if (document.getElementById(l_id+"_mini_label_country")) {
|
1335 |
+
l_id_removed[parseInt(l_id_array[z]) + 5] = false;
|
1336 |
}
|
1337 |
z = z + 5;
|
1338 |
}
|
1341 |
}
|
1342 |
}
|
1343 |
}
|
1344 |
+
if (tr.getAttribute('type')=="type_address") {
|
1345 |
+
addr_id=parseInt(tr.id);
|
1346 |
+
id_for_country= addr_id;
|
1347 |
+
if(document.getElementById(id_for_country+"_mini_label_street1"))
|
1348 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street1").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
|
1349 |
+
if(document.getElementById(id_for_country+"_mini_label_street2"))
|
1350 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street2").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
|
1351 |
+
if(document.getElementById(id_for_country+"_mini_label_city"))
|
1352 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_city").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
1353 |
+
if(document.getElementById(id_for_country+"_mini_label_state"))
|
1354 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_state").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
1355 |
+
if(document.getElementById(id_for_country+"_mini_label_postal"))
|
1356 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_postal").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
1357 |
+
if(document.getElementById(id_for_country+"_mini_label_country"))
|
1358 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_country").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1359 |
}
|
1360 |
else {
|
1361 |
+
tox = tox+l_id+'#**id**#'+l_label+'#**label**#'+l_type+'#****#';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1362 |
}
|
|
|
|
|
1363 |
}
|
1364 |
}
|
1365 |
}
|
1366 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1367 |
}
|
1368 |
}
|
1369 |
}
|
1374 |
}
|
1375 |
}
|
1376 |
document.getElementById('label_order').value = tox;
|
1377 |
+
refresh_old();
|
|
|
1378 |
document.getElementById('pagination').value=document.getElementById('pages').getAttribute("type");
|
1379 |
document.getElementById('show_title').value=document.getElementById('pages').getAttribute("show_title");
|
1380 |
document.getElementById('show_numbers').value=document.getElementById('pages').getAttribute("show_numbers");
|
1386 |
function enable() {
|
1387 |
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
1388 |
for (x = 0; x < 14; x++) {
|
1389 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FMC_URL . '/images/'; ?>" + alltypes[x] + ".png?ver=<?php echo get_option("wd_form_maker_version"); ?>";
|
1390 |
}
|
1391 |
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
1392 |
jQuery('#formMakerDiv').slideToggle(200);
|
1394 |
else {
|
1395 |
jQuery('#formMakerDiv').slideToggle(400);
|
1396 |
}
|
1397 |
+
|
|
|
|
|
1398 |
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
1399 |
jQuery('#formMakerDiv1').slideToggle(200);
|
1400 |
}
|
1407 |
function enable2() {
|
1408 |
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
1409 |
for (x = 0; x < 14; x++) {
|
1410 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FMC_URL . '/images/'; ?>" + alltypes[x] + ".png?ver=<?php echo get_option("wd_form_maker_version"); ?>";
|
1411 |
}
|
1412 |
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
1413 |
jQuery('#formMakerDiv').slideToggle(200);
|
1415 |
else {
|
1416 |
jQuery('#formMakerDiv').slideToggle(400);
|
1417 |
}
|
1418 |
+
|
|
|
|
|
1419 |
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
1420 |
jQuery('#formMakerDiv1').slideToggle(200);
|
1421 |
}
|
1431 |
}
|
1432 |
}
|
1433 |
</script>
|
1434 |
+
<div style="font-size: 14px; font-weight: bold;">
|
|
|
1435 |
This section allows you to add fields to your form.
|
1436 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-4.html">Read More in User Manual</a>
|
|
|
|
|
|
|
|
|
|
|
1437 |
</div>
|
1438 |
+
<form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fmc" style="width:99%;">
|
|
|
1439 |
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
1440 |
<h2><?php echo $page_title; ?></h2>
|
1441 |
<div style="float: right; margin: 0 5px 0 0;">
|
1442 |
+
<a href="<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', 'id' => $row->theme, '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;">
|
1443 |
+
Preview
|
1444 |
+
</a>
|
1445 |
+
<input class="button-primary" type="submit" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'form_options_old');" value="Form options"/>
|
1446 |
<?php
|
1447 |
if ($id) {
|
1448 |
?>
|
1449 |
+
<input class="button-secondary" type="submit" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save_as_copy_old')" value="Save as Copy"/>
|
1450 |
<?php
|
1451 |
}
|
1452 |
?>
|
1453 |
+
<input class="button-secondary" type="submit" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save_old')" value="Save"/>
|
1454 |
+
<input class="button-secondary" type="submit" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'apply_old')" value="Apply"/>
|
1455 |
+
<input class="button-secondary" type="submit" onclick="fm_set_input_value('task', 'cancel')" value="Cancel"/>
|
1456 |
</div>
|
1457 |
|
1458 |
<div class="formmaker_table" width="100%">
|
1459 |
+
<div style="float: left; text-align: center;"><br />
|
1460 |
+
<img src="<?php echo WD_FMC_URL . '/images/FormMaker.png?ver='. get_option("wd_form_maker_version"); ?>" /><br /><br />
|
1461 |
+
<img src="<?php echo WD_FMC_URL . '/images/logo.png?ver='. get_option("wd_form_maker_version"); ?>" />
|
|
|
|
|
1462 |
</div>
|
1463 |
<div style="float:right">
|
1464 |
<span style="font-size: 16.76pt; font-family: tahoma; color: #FFFFFF; vertical-align: middle;">Form title: </span>
|
1465 |
<input id="title" name="title" class="form_maker_title" value="<?php echo $row->title; ?>"/>
|
1466 |
<br />
|
1467 |
+
<img src="<?php echo WD_FMC_URL . '/images/formoptions.png'; ?>" onclick="if (fm_check_required('title', 'Form title')) {return false;}; submitbutton(); fm_set_input_value('task', 'form_options_old'); fm_form_submit(event, 'manage_form');" style="cursor: pointer; margin: 10px 0 10px 10px; float: right;"/>
|
1468 |
<br /><br /><br />
|
1469 |
+
<img src="<?php echo WD_FMC_URL . '/images/addanewfield.png'; ?>" onclick="enable(); Enable();" style="cursor: pointer; margin:10px 0 10px 10px; float: right;"/>
|
1470 |
</div>
|
1471 |
</div>
|
1472 |
|
1473 |
+
<div id="formMakerDiv" onclick="close_window()"></div>
|
1474 |
+
<div id="formMakerDiv1" style="padding-top: 20px;" align="center">
|
1475 |
+
<table border="0" width="100%" cellpadding="0" cellspacing="0" height="100%" class="formMakerDiv1_table">
|
1476 |
+
<tr>
|
1477 |
+
<td style="padding:0px">
|
1478 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
1479 |
<tr valign="top">
|
1480 |
<td width="15%" height="100%" style="border-right: dotted black 1px;" id="field_types">
|
1481 |
<div id="when_edit" style="display: none;"></div>
|
1489 |
</td>
|
1490 |
</tr>
|
1491 |
<tr>
|
1492 |
+
<td align="center" onClick="addRow('time_and_date')" style="cursor:pointer" id="table_time_and_date" class="field_buttons">
|
1493 |
+
<img src="<?php echo WD_FMC_URL . '/images/time_and_date.png'; ?>" style="margin:5px" id="img_time_and_date"/>
|
1494 |
</td>
|
1495 |
+
<td align="center" onClick="addRow('select')" style="cursor:pointer" id="table_select" class="field_buttons">
|
1496 |
+
<img src="<?php echo WD_FMC_URL . '/images/select.png'; ?>" style="margin:5px" id="img_select"/>
|
1497 |
</td>
|
1498 |
</tr>
|
1499 |
<tr>
|
1500 |
+
<td align="center" onClick="addRow('checkbox')" style="cursor:pointer" id="table_checkbox" class="field_buttons">
|
1501 |
+
<img src="<?php echo WD_FMC_URL . '/images/checkbox.png'; ?>" style="margin:5px" id="img_checkbox"/>
|
1502 |
</td>
|
1503 |
+
<td align="center" onClick="addRow('radio')" style="cursor:pointer" id="table_radio" class="field_buttons">
|
1504 |
+
<img src="<?php echo WD_FMC_URL . '/images/radio.png'; ?>" style="margin:5px" id="img_radio"/>
|
1505 |
</td>
|
1506 |
</tr>
|
1507 |
<tr>
|
1508 |
+
<td align="center" onClick="addRow('file_upload')" style="cursor:pointer" id="table_file_upload" class="field_buttons">
|
1509 |
+
<img src="<?php echo WD_FMC_URL . '/images/file_upload.png'; ?>" style="margin:5px" id="img_file_upload"/>
|
1510 |
</td>
|
1511 |
+
<td align="center" onClick="addRow('captcha')" style="cursor:pointer" id="table_captcha" class="field_buttons">
|
1512 |
+
<img src="<?php echo WD_FMC_URL . '/images/captcha.png'; ?>" style="margin:5px" id="img_captcha"/>
|
|
|
1513 |
</td>
|
1514 |
</tr>
|
1515 |
<tr>
|
|
|
|
|
|
|
1516 |
<td align="center" onClick="addRow('page_break')" style="cursor:pointer" id="table_page_break" class="field_buttons">
|
1517 |
<img src="<?php echo WD_FMC_URL . '/images/page_break.png'; ?>" style="margin:5px" id="img_page_break"/>
|
1518 |
</td>
|
1519 |
+
<td align="center" onClick="addRow('section_break')" style="cursor:pointer" id="table_section_break" class="field_buttons">
|
1520 |
+
<img src="<?php echo WD_FMC_URL . '/images/section_break.png'; ?>" style="margin:5px" id="img_section_break"/>
|
1521 |
+
</td>
|
1522 |
</tr>
|
1523 |
<tr>
|
1524 |
+
<td align="center" onClick="addRow('map')" style="cursor:pointer" id="table_map" class="field_buttons">
|
1525 |
+
<img src="<?php echo WD_FMC_URL . '/images/map.png'; ?>" style="margin:5px" id="img_map"/>
|
1526 |
</td>
|
1527 |
+
<td align="center" onClick="addRow('paypal')" id="table_paypal" class="field_buttons">
|
1528 |
+
<img src="<?php echo WD_FMC_URL . '/images/paypal.png'; ?>" style="margin:5px" id="img_paypal"/>
|
|
|
1529 |
</td>
|
1530 |
</tr>
|
1531 |
<tr>
|
1532 |
+
<td align="center" onClick="addRow('survey')" class="field_buttons" id="table_survey">
|
1533 |
+
<img src="<?php echo WD_FMC_URL . '/images/survey.png'; ?>" style="margin:5px" id="img_survey"/>
|
1534 |
</td>
|
1535 |
<td align="center" onClick="addRow('button')" id="table_button" class="field_buttons">
|
1536 |
<img src="<?php echo WD_FMC_URL . '/images/button.png'; ?>" style="margin:5px" id="img_button"/>
|
1552 |
At The Beginning
|
1553 |
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
1554 |
Before
|
1555 |
+
<select style="width: 100px; margin-left: 5px;" id="sel_el_pos" disabled="disabled"></select>
|
1556 |
<img alt="ADD" title="add" style="cursor:pointer; vertical-align:middle; margin:5px" src="<?php echo WD_FMC_URL . '/images/save.png'; ?>" onClick="add(0, false)"/>
|
1557 |
<img alt="CANCEL" title="cancel" style="cursor: pointer; vertical-align:middle; margin:5px" src="<?php echo WD_FMC_URL . '/images/cancel_but.png'; ?>" onClick="close_window()"/>
|
1558 |
<hr style=" margin-bottom:10px" />
|
1573 |
<input type="hidden" id="element_type" />
|
1574 |
<input type="hidden" id="editing_id" />
|
1575 |
<input type="hidden" value="<?php echo WD_FMC_URL; ?>" id="form_plugins_url" />
|
1576 |
+
<div id="main_editor" style="position: fixed; display: none; z-index: 140;">
|
1577 |
<?php
|
1578 |
if (user_can_richedit()) {
|
1579 |
wp_editor('', 'form_maker_editor', array('teeny' => FALSE, 'textarea_name' => 'form_maker_editor', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
1580 |
}
|
1581 |
else {
|
1582 |
?>
|
1583 |
+
<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>
|
1584 |
<?php
|
1585 |
}
|
1586 |
?>
|
1593 |
<?php
|
1594 |
}
|
1595 |
?>
|
1596 |
+
<br />
|
|
|
|
|
|
|
|
|
|
|
1597 |
<br />
|
1598 |
<fieldset>
|
1599 |
<legend><h2 style="color: #00aeef;">Form</h2></legend>
|
1600 |
+
<table width="100%" style="margin:8px">
|
1601 |
+
<tr id="page_navigation">
|
1602 |
+
<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>
|
1603 |
+
<td align="left" id="edit_page_navigation"></td>
|
1604 |
+
</tr>
|
1605 |
+
</table>
|
1606 |
+
<div id="take">
|
|
|
|
|
|
|
|
|
|
|
|
|
1607 |
<?php
|
1608 |
+
if ($row->form) {
|
1609 |
+
echo $row->form;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1610 |
}
|
1611 |
else {
|
1612 |
?>
|
1613 |
+
<table border="0" cellpadding="4" cellspacing="0" class="wdform_table1" style="width: 100%;">
|
1614 |
+
<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">
|
1615 |
+
<tr class="wdform_tr1">
|
1616 |
+
<td class="wdform_td1" >
|
1617 |
+
<table class="wdform_table2">
|
1618 |
+
<tbody class="wdform_tbody2"></tbody>
|
1619 |
+
</table>
|
1620 |
+
</td>
|
1621 |
+
</tr>
|
1622 |
+
<tr class="wdform_footer">
|
1623 |
+
<td colspan="100" valign="top">
|
1624 |
+
<table width="100%" style="padding-right:170px">
|
1625 |
+
<tbody>
|
1626 |
+
<tr id="form_id_temppage_nav1">
|
1627 |
+
</tr>
|
1628 |
+
</tbody>
|
1629 |
+
</table>
|
1630 |
+
</td>
|
1631 |
+
</tr>
|
1632 |
+
<tbody id="form_id_tempform_view_img1" style="float: right !important;" >
|
1633 |
+
<tr>
|
1634 |
+
<td width="0%"></td>
|
1635 |
+
<td align="right">
|
1636 |
+
<img src="<?php echo WD_FMC_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" />
|
1637 |
+
</td>
|
1638 |
+
<td>
|
1639 |
+
<img src="<?php echo WD_FMC_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')" />
|
1640 |
+
</td>
|
1641 |
+
<td>
|
1642 |
+
<img src="<?php echo WD_FMC_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')" />
|
1643 |
+
</td>
|
1644 |
+
<td>
|
1645 |
+
<img src="<?php echo WD_FMC_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')" />
|
1646 |
+
</td>
|
1647 |
+
</tr>
|
1648 |
+
</tbody>
|
1649 |
+
</table>
|
1650 |
<?php
|
1651 |
}
|
1652 |
?>
|
1653 |
+
</div>
|
1654 |
</fieldset>
|
1655 |
+
<input type="hidden" name="form" id="form" />
|
1656 |
<input type="hidden" name="form_front" id="form_front" />
|
|
|
1657 |
<input type="hidden" name="pagination" id="pagination" />
|
1658 |
<input type="hidden" name="show_title" id="show_title" />
|
1659 |
<input type="hidden" name="show_numbers" id="show_numbers" />
|
1664 |
<input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current; ?>" />
|
1665 |
<input type="hidden" name="counter" id="counter" value="<?php echo $row->counter; ?>" />
|
1666 |
<input type="hidden" id="araqel" value="0" />
|
|
|
|
|
|
|
1667 |
<script type="text/javascript">
|
1668 |
+
form_view = 1;
|
1669 |
+
form_view_count = 1;
|
1670 |
+
form_view_max = 1;
|
1671 |
function formOnload() {
|
1672 |
// Enable maps.
|
1673 |
+
for (t = 0; t < <?php echo $row->counter;?>; t++)
|
1674 |
+
if (document.getElementById(t+"_typeform_id_temp")) {
|
1675 |
+
if (document.getElementById(t+"_typeform_id_temp").value=="type_map" || document.getElementById(t+"_typeform_id_temp").value=="type_mark_map") {
|
1676 |
+
if_gmap_init(t);
|
1677 |
for (q = 0; q < 20; q++) {
|
1678 |
+
if (document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q)) {
|
1679 |
+
w_long=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q));
|
1680 |
+
w_lat=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("lat"+q));
|
1681 |
+
w_info=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("info"+q));
|
1682 |
+
add_marker_on_map(t,q, w_long, w_lat, w_info, false);
|
1683 |
}
|
1684 |
}
|
1685 |
}
|
1686 |
+
else
|
1687 |
+
if (document.getElementById(t+"_typeform_id_temp").value == "type_date") {
|
1688 |
+
// Calendar.setup({
|
1689 |
+
// inputField: t+"_elementform_id_temp",
|
1690 |
+
// ifFormat: document.getElementById(t+"_buttonform_id_temp").getAttribute('format'),
|
1691 |
+
// button: t+"_buttonform_id_temp",
|
1692 |
+
// align: "Tl",
|
1693 |
+
// singleClick: true,
|
1694 |
+
// firstDay: 0
|
1695 |
+
// });
|
1696 |
+
}
|
1697 |
+
else
|
1698 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_spinner") {
|
1699 |
+
var spinner_value = jQuery("#" + t + "_elementform_id_temp").get( "aria-valuenow" );
|
1700 |
+
var spinner_min_value = document.getElementById(t+"_min_valueform_id_temp").value;
|
1701 |
+
var spinner_max_value = document.getElementById(t+"_max_valueform_id_temp").value;
|
1702 |
+
var spinner_step = document.getElementById(t+"_stepform_id_temp").value;
|
1703 |
+
|
1704 |
+
jQuery( "#"+t+"_elementform_id_temp" ).removeClass( "ui-spinner-input" )
|
1705 |
+
.prop( "disabled", false )
|
1706 |
+
.removeAttr( "autocomplete" )
|
1707 |
+
.removeAttr( "role" )
|
1708 |
+
.removeAttr( "aria-valuemin" )
|
1709 |
+
.removeAttr( "aria-valuemax" )
|
1710 |
+
.removeAttr( "aria-valuenow" );
|
1711 |
+
|
1712 |
+
span_ui= document.getElementById(t+"_elementform_id_temp").parentNode;
|
1713 |
+
span_ui.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp"));
|
1714 |
+
span_ui.parentNode.removeChild(span_ui);
|
1715 |
+
|
1716 |
+
jQuery("#"+t+"_elementform_id_temp")[0].spin = null;
|
1717 |
+
|
1718 |
+
spinner = jQuery( "#"+t+"_elementform_id_temp" ).spinner();
|
1719 |
+
spinner.spinner( "value", spinner_value );
|
1720 |
+
jQuery( "#"+t+"_elementform_id_temp" ).spinner({ min: spinner_min_value});
|
1721 |
+
jQuery( "#"+t+"_elementform_id_temp" ).spinner({ max: spinner_max_value});
|
1722 |
+
jQuery( "#"+t+"_elementform_id_temp" ).spinner({ step: spinner_step});
|
1723 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1724 |
}
|
1725 |
+
else
|
1726 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_slider") {
|
1727 |
+
|
1728 |
+
var slider_value = document.getElementById(t+"_slider_valueform_id_temp").value;
|
1729 |
+
var slider_min_value = document.getElementById(t+"_slider_min_valueform_id_temp").value;
|
1730 |
+
var slider_max_value = document.getElementById(t+"_slider_max_valueform_id_temp").value;
|
1731 |
+
|
1732 |
+
var slider_element_value = document.getElementById( t+"_element_valueform_id_temp" );
|
1733 |
+
var slider_value_save = document.getElementById( t+"_slider_valueform_id_temp" );
|
1734 |
+
|
1735 |
+
document.getElementById(t+"_elementform_id_temp").innerHTML = "";
|
1736 |
+
document.getElementById(t+"_elementform_id_temp").removeAttribute( "class" );
|
1737 |
+
document.getElementById(t+"_elementform_id_temp").removeAttribute( "aria-disabled" );
|
1738 |
+
|
1739 |
+
jQuery("#"+t+"_elementform_id_temp")[0].slide = null;
|
1740 |
+
|
1741 |
+
jQuery(function() {
|
1742 |
+
jQuery( "#"+t+"_elementform_id_temp").slider({
|
1743 |
+
range: "min",
|
1744 |
+
value: eval(slider_value),
|
1745 |
+
min: eval(slider_min_value),
|
1746 |
+
max: eval(slider_max_value),
|
1747 |
+
slide: function( event, ui ) {
|
1748 |
+
slider_element_value.innerHTML = "" + ui.value ;
|
1749 |
+
slider_value_save.value = "" + ui.value;
|
1750 |
|
1751 |
+
}
|
1752 |
+
});
|
1753 |
+
|
1754 |
+
|
1755 |
+
});
|
1756 |
+
|
1757 |
|
1758 |
+
}
|
1759 |
+
else
|
1760 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_range"){
|
1761 |
+
var spinner_value0 = jQuery("#" + t+"_elementform_id_temp0").get( "aria-valuenow" );
|
1762 |
+
var spinner_step = document.getElementById(t+"_range_stepform_id_temp").value;
|
1763 |
+
|
1764 |
+
jQuery( "#"+t+"_elementform_id_temp0" ).removeClass( "ui-spinner-input" )
|
1765 |
+
.prop( "disabled", false )
|
1766 |
+
.removeAttr( "autocomplete" )
|
1767 |
+
.removeAttr( "role" )
|
1768 |
+
.removeAttr( "aria-valuenow" );
|
1769 |
+
|
1770 |
+
span_ui= document.getElementById(t+"_elementform_id_temp0").parentNode;
|
1771 |
+
span_ui.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp0"));
|
1772 |
+
span_ui.parentNode.removeChild(span_ui);
|
1773 |
+
|
1774 |
+
|
1775 |
+
jQuery("#"+t+"_elementform_id_temp0")[0].spin = null;
|
1776 |
+
jQuery("#"+t+"_elementform_id_temp1")[0].spin = null;
|
1777 |
+
|
1778 |
+
spinner0 = jQuery( "#"+t+"_elementform_id_temp0" ).spinner();
|
1779 |
+
spinner0.spinner( "value", spinner_value0 );
|
1780 |
+
jQuery( "#"+t+"_elementform_id_temp0" ).spinner({ step: spinner_step});
|
1781 |
+
|
1782 |
+
|
1783 |
+
|
1784 |
+
var spinner_value1 = jQuery("#" + t+"_elementform_id_temp1").get( "aria-valuenow" );
|
1785 |
+
|
1786 |
+
jQuery( "#"+t+"_elementform_id_temp1" ).removeClass( "ui-spinner-input" )
|
1787 |
+
.prop( "disabled", false )
|
1788 |
+
.removeAttr( "autocomplete" )
|
1789 |
+
.removeAttr( "role" )
|
1790 |
+
.removeAttr( "aria-valuenow" );
|
1791 |
|
1792 |
+
span_ui1= document.getElementById(t+"_elementform_id_temp1").parentNode;
|
1793 |
+
span_ui1.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp1"));
|
1794 |
+
span_ui1.parentNode.removeChild(span_ui1);
|
1795 |
+
|
1796 |
+
spinner1 = jQuery( "#"+t+"_elementform_id_temp1" ).spinner();
|
1797 |
+
spinner1.spinner( "value", spinner_value1 );
|
1798 |
+
jQuery( "#"+t+"_elementform_id_temp1" ).spinner({ step: spinner_step});
|
1799 |
+
|
1800 |
+
var myu = t;
|
1801 |
+
jQuery(document).ready(function() {
|
1802 |
+
|
1803 |
+
jQuery("#"+myu+"_mini_label_from").click(function() {
|
1804 |
+
if (jQuery(this).children('input').length == 0) {
|
1805 |
+
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()+"\">";
|
1806 |
+
jQuery(this).html(from);
|
1807 |
+
jQuery("input.from").focus();
|
1808 |
+
jQuery("input.from").blur(function() {
|
1809 |
+
var id_for_blur = document.getElementById('from').parentNode.id.split('_');
|
1810 |
+
var value = jQuery(this).val();
|
1811 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_from").text(value);
|
1812 |
});
|
|
|
|
|
1813 |
}
|
1814 |
+
});
|
1815 |
+
|
1816 |
+
jQuery("label#"+myu+"_mini_label_to").click(function() {
|
1817 |
+
if (jQuery(this).children('input').length == 0) {
|
1818 |
+
|
1819 |
+
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()+"\">";
|
1820 |
+
jQuery(this).html(to);
|
1821 |
+
jQuery("input.to").focus();
|
1822 |
+
jQuery("input.to").blur(function() {
|
1823 |
+
var id_for_blur = document.getElementById('to').parentNode.id.split('_');
|
1824 |
+
var value = jQuery(this).val();
|
1825 |
+
|
1826 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_to").text(value);
|
1827 |
+
});
|
1828 |
+
|
1829 |
+
}
|
1830 |
+
});
|
1831 |
+
|
1832 |
+
|
1833 |
+
|
1834 |
+
});
|
1835 |
+
}
|
1836 |
|
1837 |
+
else
|
1838 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_name"){
|
1839 |
+
var myu = t;
|
1840 |
+
jQuery(document).ready(function() {
|
|
|
1841 |
|
1842 |
+
jQuery("#"+myu+"_mini_label_first").click(function() {
|
1843 |
+
|
1844 |
+
if (jQuery(this).children('input').length == 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1845 |
|
1846 |
+
var first = "<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1847 |
+
jQuery(this).html(first);
|
1848 |
+
jQuery("input.first").focus();
|
1849 |
+
jQuery("input.first").blur(function() {
|
1850 |
+
|
1851 |
+
var id_for_blur = document.getElementById('first').parentNode.id.split('_');
|
1852 |
+
var value = jQuery(this).val();
|
1853 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_first").text(value);
|
1854 |
+
});
|
1855 |
+
}
|
1856 |
+
});
|
1857 |
+
|
1858 |
+
jQuery("label#"+myu+"_mini_label_last").click(function() {
|
1859 |
+
if (jQuery(this).children('input').length == 0) {
|
1860 |
+
|
1861 |
+
var last = "<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1862 |
+
jQuery(this).html(last);
|
1863 |
+
jQuery("input.last").focus();
|
1864 |
+
jQuery("input.last").blur(function() {
|
1865 |
+
var id_for_blur = document.getElementById('last').parentNode.id.split('_');
|
1866 |
+
var value = jQuery(this).val();
|
1867 |
+
|
1868 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_last").text(value);
|
1869 |
+
});
|
1870 |
+
|
1871 |
+
}
|
1872 |
+
});
|
1873 |
+
|
1874 |
+
jQuery("label#"+myu+"_mini_label_title").click(function() {
|
1875 |
+
if (jQuery(this).children('input').length == 0) {
|
1876 |
+
var title = "<input type='text' id='title' class='title' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1877 |
+
jQuery(this).html(title);
|
1878 |
+
jQuery("input.title").focus();
|
1879 |
+
jQuery("input.title").blur(function() {
|
1880 |
+
var id_for_blur = document.getElementById('title').parentNode.id.split('_');
|
1881 |
+
var value = jQuery(this).val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1882 |
|
|
|
1883 |
|
1884 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_title").text(value);
|
1885 |
+
});
|
1886 |
+
}
|
1887 |
+
|
1888 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1889 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1890 |
|
1891 |
+
jQuery("label#"+myu+"_mini_label_middle").click(function() {
|
1892 |
+
if (jQuery(this).children('input').length == 0) {
|
1893 |
+
var middle = "<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1894 |
+
jQuery(this).html(middle);
|
1895 |
+
jQuery("input.middle").focus();
|
1896 |
+
jQuery("input.middle").blur(function() {
|
1897 |
+
var id_for_blur = document.getElementById('middle').parentNode.id.split('_');
|
1898 |
+
var value = jQuery(this).val();
|
1899 |
+
|
1900 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_middle").text(value);
|
1901 |
+
});
|
1902 |
+
}
|
1903 |
+
});
|
1904 |
+
|
1905 |
+
});
|
1906 |
+
}
|
1907 |
+
else
|
1908 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_address"){
|
1909 |
+
var myu = t;
|
1910 |
+
|
1911 |
+
jQuery(document).ready(function() {
|
1912 |
+
jQuery("label#"+myu+"_mini_label_street1").click(function() {
|
1913 |
|
1914 |
+
if (jQuery(this).children('input').length == 0) {
|
1915 |
+
var street1 = "<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1916 |
+
jQuery(this).html(street1);
|
1917 |
+
jQuery("input.street1").focus();
|
1918 |
+
jQuery("input.street1").blur(function() {
|
1919 |
+
var id_for_blur = document.getElementById('street1').parentNode.id.split('_');
|
1920 |
+
var value = jQuery(this).val();
|
1921 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_street1").text(value);
|
1922 |
+
});
|
1923 |
+
}
|
1924 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1925 |
|
1926 |
jQuery("label#"+myu+"_mini_label_street2").click(function() {
|
1927 |
if (jQuery(this).children('input').length == 0) {
|
2030 |
});
|
2031 |
|
2032 |
});
|
2033 |
+
}
|
2034 |
+
else
|
2035 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_date_fields"){
|
2036 |
+
var myu = t;
|
2037 |
+
|
2038 |
+
jQuery(document).ready(function() {
|
2039 |
+
jQuery("label#"+myu+"_day_label").click(function() {
|
2040 |
+
if (jQuery(this).children('input').length == 0) {
|
2041 |
+
var day = "<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2042 |
+
jQuery(this).html(day);
|
2043 |
+
jQuery("input.day").focus();
|
2044 |
+
jQuery("input.day").blur(function() {
|
2045 |
+
var id_for_blur = document.getElementById('day').parentNode.id.split('_');
|
2046 |
+
var value = jQuery(this).val();
|
2047 |
+
|
2048 |
+
jQuery("#"+id_for_blur[0]+"_day_label").text(value);
|
2049 |
+
});
|
2050 |
+
}
|
2051 |
+
});
|
2052 |
+
|
2053 |
+
|
2054 |
+
jQuery("label#"+myu+"_month_label").click(function() {
|
2055 |
+
if (jQuery(this).children('input').length == 0) {
|
2056 |
+
var month = "<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2057 |
+
jQuery(this).html(month);
|
2058 |
+
jQuery("input.month").focus();
|
2059 |
+
jQuery("input.month").blur(function() {
|
2060 |
+
var id_for_blur = document.getElementById('month').parentNode.id.split('_');
|
2061 |
+
var value = jQuery(this).val();
|
2062 |
+
|
2063 |
+
jQuery("#"+id_for_blur[0]+"_month_label").text(value);
|
2064 |
+
});
|
2065 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2066 |
});
|
2067 |
+
|
2068 |
+
jQuery("label#"+myu+"_year_label").click(function() {
|
2069 |
+
if (jQuery(this).children('input').length == 0) {
|
2070 |
+
var year = "<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2071 |
+
jQuery(this).html(year);
|
2072 |
+
jQuery("input.year").focus();
|
2073 |
+
jQuery("input.year").blur(function() {
|
2074 |
+
var id_for_blur = document.getElementById('year').parentNode.id.split('_');
|
2075 |
+
var value = jQuery(this).val();
|
2076 |
+
|
2077 |
+
jQuery("#"+id_for_blur[0]+"_year_label").text(value);
|
2078 |
+
});
|
2079 |
+
}
|
2080 |
+
});
|
2081 |
+
|
2082 |
+
});
|
2083 |
|
2084 |
+
|
2085 |
+
}
|
2086 |
+
else
|
2087 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_time"){
|
2088 |
+
var myu = t;
|
2089 |
+
|
2090 |
+
jQuery(document).ready(function() {
|
2091 |
+
jQuery("label#"+myu+"_mini_label_hh").click(function() {
|
2092 |
+
if (jQuery(this).children('input').length == 0) {
|
2093 |
+
var hh = "<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2094 |
+
jQuery(this).html(hh);
|
2095 |
+
jQuery("input.hh").focus();
|
2096 |
+
jQuery("input.hh").blur(function() {
|
2097 |
+
var id_for_blur = document.getElementById('hh').parentNode.id.split('_');
|
2098 |
+
var value = jQuery(this).val();
|
2099 |
+
|
2100 |
+
|
2101 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_hh").text(value);
|
2102 |
+
});
|
2103 |
+
}
|
2104 |
+
});
|
2105 |
+
|
2106 |
+
|
2107 |
+
jQuery("label#"+myu+"_mini_label_mm").click(function() {
|
2108 |
+
if (jQuery(this).children('input').length == 0) {
|
2109 |
+
var mm = "<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2110 |
+
jQuery(this).html(mm);
|
2111 |
+
jQuery("input.mm").focus();
|
2112 |
+
jQuery("input.mm").blur(function() {
|
2113 |
+
var id_for_blur = document.getElementById('mm').parentNode.id.split('_');
|
2114 |
+
var value = jQuery(this).val();
|
2115 |
+
|
2116 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_mm").text(value);
|
2117 |
+
});
|
2118 |
+
}
|
2119 |
+
});
|
2120 |
+
|
2121 |
+
jQuery("label#"+myu+"_mini_label_ss").click(function() {
|
2122 |
+
if (jQuery(this).children('input').length == 0) {
|
2123 |
+
var ss = "<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2124 |
+
jQuery(this).html(ss);
|
2125 |
+
jQuery("input.ss").focus();
|
2126 |
+
jQuery("input.ss").blur(function() {
|
2127 |
+
var id_for_blur = document.getElementById('ss').parentNode.id.split('_');
|
2128 |
+
var value = jQuery(this).val();
|
2129 |
+
|
2130 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_ss").text(value);
|
2131 |
+
});
|
2132 |
+
}
|
2133 |
+
});
|
2134 |
+
|
2135 |
+
jQuery("label#"+myu+"_mini_label_am_pm").click(function() {
|
2136 |
+
if (jQuery(this).children('input').length == 0) {
|
2137 |
+
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()+"\">";
|
2138 |
+
jQuery(this).html(am_pm);
|
2139 |
+
jQuery("input.am_pm").focus();
|
2140 |
+
jQuery("input.am_pm").blur(function() {
|
2141 |
+
var id_for_blur = document.getElementById('am_pm').parentNode.id.split('_');
|
2142 |
+
var value = jQuery(this).val();
|
2143 |
+
|
2144 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_am_pm").text(value);
|
2145 |
+
});
|
2146 |
+
}
|
2147 |
+
});
|
2148 |
+
});
|
2149 |
+
|
2150 |
+
}
|
2151 |
+
|
2152 |
+
else
|
2153 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_paypal_price"){
|
2154 |
+
var myu = t;
|
2155 |
+
jQuery(document).ready(function() {
|
2156 |
+
|
2157 |
+
jQuery("#"+myu+"_mini_label_dollars").click(function() {
|
2158 |
+
|
2159 |
+
if (jQuery(this).children('input').length == 0) {
|
2160 |
+
|
2161 |
+
var dollars = "<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2162 |
+
jQuery(this).html(dollars);
|
2163 |
+
jQuery("input.dollars").focus();
|
2164 |
+
jQuery("input.dollars").blur(function() {
|
2165 |
+
|
2166 |
+
var id_for_blur = document.getElementById('dollars').parentNode.id.split('_');
|
2167 |
+
var value = jQuery(this).val();
|
2168 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_dollars").text(value);
|
2169 |
+
});
|
2170 |
+
}
|
2171 |
+
});
|
2172 |
+
|
2173 |
+
jQuery("label#"+myu+"_mini_label_cents").click(function() {
|
2174 |
+
if (jQuery(this).children('input').length == 0) {
|
2175 |
+
|
2176 |
+
var cents = "<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
2177 |
+
jQuery(this).html(cents);
|
2178 |
+
jQuery("input.cents").focus();
|
2179 |
+
jQuery("input.cents").blur(function() {
|
2180 |
+
var id_for_blur = document.getElementById('cents').parentNode.id.split('_');
|
2181 |
+
var value = jQuery(this).val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2182 |
|
2183 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_cents").text(value);
|
2184 |
+
});
|
2185 |
+
|
2186 |
+
}
|
2187 |
+
});
|
2188 |
+
});
|
2189 |
+
}
|
2190 |
+
else
|
2191 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_scale_rating"){
|
2192 |
+
var myu = t;
|
2193 |
+
jQuery(document).ready(function() {
|
2194 |
+
|
2195 |
+
jQuery("#"+myu+"_mini_label_worst").click(function() {
|
2196 |
+
|
2197 |
+
if (jQuery(this).children('input').length == 0) {
|
2198 |
+
|
2199 |
+
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()+"\">";
|
2200 |
+
jQuery(this).html(worst);
|
2201 |
+
jQuery("input.worst").focus();
|
2202 |
+
jQuery("input.worst").blur(function() {
|
2203 |
+
|
2204 |
+
var id_for_blur = document.getElementById('worst').parentNode.id.split('_');
|
2205 |
+
var value = jQuery(this).val();
|
2206 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_worst").text(value);
|
2207 |
+
});
|
2208 |
+
}
|
2209 |
+
});
|
2210 |
+
|
2211 |
+
jQuery("label#"+myu+"_mini_label_best").click(function() {
|
2212 |
+
if (jQuery(this).children('input').length == 0) {
|
2213 |
+
|
2214 |
+
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()+"\">";
|
2215 |
+
jQuery(this).html(best);
|
2216 |
+
jQuery("input.best").focus();
|
2217 |
+
jQuery("input.best").blur(function() {
|
2218 |
+
var id_for_blur = document.getElementById('best').parentNode.id.split('_');
|
2219 |
+
var value = jQuery(this).val();
|
2220 |
+
|
2221 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_best").text(value);
|
2222 |
+
});
|
2223 |
+
|
2224 |
+
}
|
2225 |
+
});
|
2226 |
+
|
2227 |
+
|
2228 |
+
|
2229 |
+
});
|
2230 |
+
}
|
2231 |
}
|
2232 |
+
form_view = 1;
|
2233 |
+
form_view_count = 0;
|
2234 |
+
for (i = 1; i <= 30; i++) {
|
2235 |
+
if (document.getElementById('form_id_tempform_view'+i)) {
|
2236 |
+
form_view_count++;
|
2237 |
+
form_view_max=i;
|
2238 |
}
|
|
|
2239 |
}
|
2240 |
+
if (form_view_count > 1) {
|
2241 |
+
for (i=1; i<=form_view_max; i++) {
|
2242 |
+
if (document.getElementById('form_id_tempform_view'+i)) {
|
2243 |
+
first_form_view=i;
|
2244 |
+
break;
|
|
|
2245 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2246 |
}
|
2247 |
+
form_view=form_view_max;
|
2248 |
+
generate_page_nav(first_form_view);
|
2249 |
+
var img_EDIT = document.createElement("img");
|
2250 |
+
img_EDIT.setAttribute("src", "<?php echo WD_FMC_URL . '/images/edit.png'; ?>");
|
2251 |
+
img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
|
2252 |
+
img_EDIT.setAttribute("onclick", 'el_page_navigation()');
|
2253 |
+
var td_EDIT = document.getElementById("edit_page_navigation");
|
2254 |
+
td_EDIT.appendChild(img_EDIT);
|
2255 |
+
document.getElementById('page_navigation').appendChild(td_EDIT);
|
2256 |
}
|
2257 |
+
//if(document.getElementById('take').innerHTML.indexOf('up_row(')==-1) location.reload(true);
|
2258 |
+
//else
|
2259 |
|
2260 |
+
document.getElementById('form').value=document.getElementById('take').innerHTML;
|
2261 |
+
document.getElementById('araqel').value = 1;
|
2262 |
+
}
|
2263 |
+
jQuery(window).load(function () {
|
2264 |
+
formOnload();
|
2265 |
+
});
|
2266 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2267 |
|
2268 |
+
<input type="hidden" name="option" value="com_formmaker" />
|
2269 |
+
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
|
2270 |
+
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2271 |
|
2272 |
+
<input type="hidden" id="task" name="task" value=""/>
|
2273 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
2274 |
+
</form>
|
2275 |
+
<script>
|
2276 |
+
jQuery(window).load(function() {
|
2277 |
+
fm_popup();
|
2278 |
+
});
|
2279 |
+
</script>
|
2280 |
+
<?php
|
2281 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2282 |
|
2283 |
+
public function form_options_old($id) {
|
2284 |
+
$row = $this->model->get_row_data($id);
|
2285 |
+
$themes = $this->model->get_theme_rows_data('_old');
|
2286 |
+
$page_title = $row->title . ' form options';
|
2287 |
+
$label_id = array();
|
2288 |
+
$label_label = array();
|
2289 |
+
$label_type = array();
|
2290 |
+
$label_all = explode('#****#', $row->label_order_current);
|
2291 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
2292 |
+
foreach ($label_all as $key => $label_each) {
|
2293 |
+
$label_id_each = explode('#**id**#', $label_each);
|
2294 |
+
array_push($label_id, $label_id_each[0]);
|
2295 |
+
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
2296 |
+
array_push($label_label, $label_order_each[0]);
|
2297 |
+
array_push($label_type, $label_order_each[1]);
|
2298 |
+
}
|
2299 |
+
?>
|
2300 |
+
<script>
|
2301 |
+
gen = "<?php echo $row->counter; ?>";
|
2302 |
+
form_view_max = 20;
|
2303 |
+
function set_preview() {
|
2304 |
+
document.getElementById('preview_form').href = '<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&id='+document.getElementById('theme').value+'&width=1000&height=500&TB_iframe=1';
|
2305 |
+
}
|
2306 |
+
</script>
|
2307 |
+
<div style="font-size: 14px; font-weight: bold;">
|
2308 |
+
This section allows you to edit form options.
|
2309 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-3.html">Read More in User Manual</a>
|
2310 |
+
</div>
|
2311 |
+
<form class="wrap" method="post" action="admin.php?page=manage_fmc" style="width:99%;" name="adminForm" id="adminForm">
|
2312 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
2313 |
+
<h2><?php echo $page_title; ?></h2>
|
2314 |
+
<div style="float: right; margin: 0 5px 0 0;">
|
2315 |
+
<input class="button-secondary" type="submit" onclick="if (fm_check_email('mail') ||
|
2316 |
+
fm_check_email('from_mail') ||
|
2317 |
+
fm_check_email('paypal_email')) {return false;}; fm_set_input_value('task', 'save_options_old')" value="Save"/>
|
2318 |
+
<input class="button-secondary" type="submit" onclick="if (fm_check_email('mail') ||
|
2319 |
+
fm_check_email('from_mail') ||
|
2320 |
+
fm_check_email('paypal_email')) {return false;}; fm_set_input_value('task', 'apply_options_old')" value="Apply"/>
|
2321 |
+
<input class="button-secondary" type="submit" onclick="fm_set_input_value('task', 'cancel_options_old')" value="Cancel"/>
|
2322 |
+
</div>
|
2323 |
+
<input type="hidden" name="take" id="take" value="<?php $row->form ?>">
|
2324 |
+
<div class="submenu-box" style="width: 99%; float: left; margin: 15px 0 0 0;">
|
2325 |
+
<div class="submenu-pad">
|
2326 |
+
<ul id="submenu" class="configuration">
|
2327 |
+
<li>
|
2328 |
+
<a id="general" class="fm_fieldset_tab" onclick="form_maker_options_tabs('general')" href="#">General Options</a>
|
2329 |
+
</li>
|
2330 |
+
<li>
|
2331 |
+
<a id="actions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('actions')" href="#">Actions after Submission</a>
|
2332 |
+
</li>
|
2333 |
+
<li>
|
2334 |
+
<a id="payment" class="fm_fieldset_tab" onclick="form_maker_options_tabs('payment')" href="#">Payment Options</a>
|
2335 |
+
</li>
|
2336 |
+
<li>
|
2337 |
+
<a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript')" href="#">JavaScript</a>
|
2338 |
+
</li>
|
2339 |
+
<li>
|
2340 |
+
<a id="custom" class="fm_fieldset_tab" onclick="form_maker_options_tabs('custom')" href="#">Custom Text in Email</a>
|
2341 |
+
</li>
|
2342 |
+
</ul>
|
2343 |
+
</div>
|
2344 |
+
</div>
|
2345 |
<fieldset id="actions_fieldset" class="adminform fm_fieldset_deactive">
|
2346 |
<legend style="color:#0B55C4;font-weight: bold;">Actions after submission</legend>
|
2347 |
<table class="admintable">
|
2357 |
<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>
|
2358 |
</td>
|
2359 |
</tr>
|
2360 |
+
<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"' : ''); ?>>
|
2361 |
+
<td class="fm_options_label">
|
2362 |
+
<label>Stay on Form</label>
|
2363 |
+
</td>
|
2364 |
+
<td class="fm_options_value">
|
2365 |
+
<img src="<?php echo WD_FMC_URL . '/images/tick.png'; ?>" border="0">
|
2366 |
+
</td>
|
2367 |
+
</tr>
|
2368 |
+
<tr id="post" <?php echo (($row->submit_text_type != 2) ? 'style="display:none"' : ''); ?>>
|
2369 |
+
<td class="fm_options_label">
|
2370 |
+
<label for="post_name">Post</label>
|
2371 |
+
</td>
|
2372 |
+
<td class="fm_options_value">
|
2373 |
+
<select id="post_name" name="post_name">
|
2374 |
+
<option value="0">- Select Post -</option>
|
2375 |
+
<?php
|
2376 |
+
// The Query.
|
2377 |
+
$args = array('posts_per_page' => 10000);
|
2378 |
+
query_posts($args);
|
2379 |
+
// The Loop.
|
2380 |
+
while (have_posts()) : the_post(); ?>
|
2381 |
+
<option value="<?php $x = get_permalink(get_the_ID()); echo $x; ?>" <?php echo (($row->article_id == $x) ? 'selected="selected"' : ''); ?>><?php the_title(); ?></option>
|
2382 |
+
<?php
|
2383 |
+
endwhile;
|
2384 |
+
// Reset Query.
|
2385 |
+
wp_reset_query();
|
2386 |
+
?>
|
2387 |
+
</select>
|
2388 |
+
</td>
|
2389 |
+
</tr>
|
2390 |
+
<tr id="page" <?php echo (($row->submit_text_type != 5) ? 'style="display:none"' : ''); ?>>
|
2391 |
+
<td class="fm_options_label">
|
2392 |
+
<label for="page_name">Page</label>
|
2393 |
+
</td>
|
2394 |
+
<td class="fm_options_value">
|
2395 |
+
<select id="page_name" name="page_name" style="width:153px; font-size:11px;">
|
2396 |
+
<option value="0">- Select Page -</option>
|
2397 |
+
<?php
|
2398 |
+
// The Query.
|
2399 |
+
$pages = get_pages();
|
2400 |
+
// The Loop.
|
2401 |
+
foreach ($pages as $page) {
|
2402 |
+
$page_id = get_page_link($page->ID);
|
2403 |
+
?>
|
2404 |
+
<option value="<?php echo $page_id; ?>" <?php echo (($row->article_id == $page_id) ? 'selected="selected"' : ''); ?>><?php echo $page->post_title; ?></option>
|
2405 |
+
<?php
|
2406 |
+
}
|
2407 |
+
// Reset Query.
|
2408 |
+
wp_reset_query();
|
2409 |
+
?>
|
2410 |
+
</select>
|
2411 |
+
</td>
|
2412 |
+
</tr>
|
2413 |
+
<tr id="custom_text" <?php echo (($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
|
2414 |
+
<td class="fm_options_label">
|
2415 |
+
<label for="submit_text">Text</label>
|
2416 |
+
</td>
|
2417 |
+
<td class="fm_options_value">
|
2418 |
+
<?php
|
2419 |
+
if (user_can_richedit()) {
|
2420 |
+
wp_editor($row->submit_text, 'submit_text', array('teeny' => FALSE, 'textarea_name' => 'submit_text', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
2421 |
+
}
|
2422 |
+
else {
|
2423 |
+
?>
|
2424 |
+
<textarea cols="36" rows="5" id="submit_text" name="submit_text" style="resize: vertical;">
|
2425 |
+
<?php echo $row->submit_text; ?>
|
2426 |
+
</textarea>
|
2427 |
+
<?php
|
2428 |
+
}
|
2429 |
+
?>
|
2430 |
+
</td>
|
2431 |
+
</tr>
|
2432 |
+
<tr id="url" <?php echo (($row->submit_text_type != 4 ) ? 'style="display:none"' : ''); ?>>
|
2433 |
+
<td class="fm_options_label">
|
2434 |
+
<label for="url">URL</label>
|
2435 |
+
</td>
|
2436 |
+
<td class="fm_options_value">
|
2437 |
+
<input type="text" id="url" name="url" style="width:300px" value="<?php echo $row->url; ?>" />
|
2438 |
+
</td>
|
2439 |
+
</tr>
|
2440 |
+
</table>
|
2441 |
+
</fieldset>
|
2442 |
+
<fieldset id="custom_fieldset" class="adminform fm_fieldset_deactive">
|
2443 |
+
<legend style="color:#0B55C4;font-weight: bold;">Custom text in email</legend>
|
2444 |
+
<table class="admintable">
|
2445 |
+
<tr>
|
2446 |
+
<td class="fm_options_label" valign="top">
|
2447 |
+
<label>For Administrator</label>
|
2448 |
</td>
|
2449 |
<td class="fm_options_value">
|
2450 |
+
<div style="margin-bottom:5px">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2451 |
<?php
|
2452 |
+
$choise = "document.getElementById('script_mail')";
|
2453 |
+
for ($i = 0; $i < count($label_label); $i++) {
|
2454 |
+
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") {
|
2455 |
+
continue;
|
2456 |
+
}
|
2457 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2458 |
+
?>
|
2459 |
+
<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; ?>')" />
|
2460 |
+
<?php
|
2461 |
+
}
|
2462 |
?>
|
2463 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
|
2464 |
+
</div>
|
2465 |
+
<?php
|
2466 |
+
if (user_can_richedit()) {
|
2467 |
+
wp_editor($row->script_mail, 'script_mail', array('teeny' => FALSE, 'textarea_name' => 'script_mail', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
2468 |
+
}
|
2469 |
+
else {
|
2470 |
+
?>
|
2471 |
+
<textarea name="script_mail" id="script_mail" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail; ?></textarea>
|
2472 |
+
<?php
|
2473 |
+
}
|
2474 |
+
?>
|
2475 |
</td>
|
2476 |
</tr>
|
2477 |
+
<tr>
|
2478 |
+
<td valign="top" height="30"></td>
|
2479 |
+
<td valign="top"></td>
|
2480 |
+
</tr>
|
2481 |
+
<tr>
|
2482 |
+
<td class="fm_options_label" valign="top">
|
2483 |
+
<label>For User</label>
|
2484 |
</td>
|
2485 |
<td class="fm_options_value">
|
2486 |
+
<div style="margin-bottom:5px">
|
|
|
2487 |
<?php
|
2488 |
+
$choise = "document.getElementById('script_mail_user')";
|
2489 |
+
for ($i = 0; $i < count($label_label); $i++) {
|
2490 |
+
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") {
|
2491 |
+
continue;
|
2492 |
+
}
|
2493 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
2494 |
?>
|
2495 |
+
<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; ?>')" />
|
2496 |
<?php
|
2497 |
}
|
|
|
|
|
2498 |
?>
|
2499 |
+
<input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
|
2500 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
2501 |
<?php
|
2502 |
if (user_can_richedit()) {
|
2503 |
+
wp_editor($row->script_mail_user, 'script_mail_user', array('teeny' => FALSE, 'textarea_name' => 'script_mail_user', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
2504 |
}
|
2505 |
else {
|
2506 |
?>
|
2507 |
+
<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>
|
|
|
|
|
2508 |
<?php
|
2509 |
}
|
2510 |
?>
|
2511 |
</td>
|
2512 |
</tr>
|
2513 |
+
</table>
|
2514 |
+
</fieldset>
|
2515 |
+
<fieldset id="general_fieldset" class="adminform fm_fieldset_deactive">
|
2516 |
+
<legend style="color:#0B55C4;font-weight: bold;">General Options</legend>
|
2517 |
+
<table class="admintable" style="float:left">
|
2518 |
+
<tr valign="top">
|
2519 |
+
<td class="fm_options_label">
|
2520 |
+
<label for="mail">Email to send submissions to</label>
|
2521 |
+
</td>
|
2522 |
+
<td class="fm_options_value">
|
2523 |
+
<input id="mail" name="mail" value="<?php echo $row->mail; ?>" style="width:250px;" />
|
2524 |
+
</td>
|
2525 |
+
</tr>
|
2526 |
+
<tr valign="top">
|
2527 |
+
<td class="fm_options_label">
|
2528 |
+
<label for="from_mail">From Email</label>
|
2529 |
+
</td>
|
2530 |
+
<td class="fm_options_value">
|
2531 |
+
<input id="from_mail" name="from_mail" value="<?php echo $row->from_mail; ?>" style="width:250px;" />
|
2532 |
+
</td>
|
2533 |
+
</tr>
|
2534 |
+
<tr valign="top">
|
2535 |
+
<td class="fm_options_label">
|
2536 |
+
<label for="from_name">From Name</label>
|
2537 |
+
</td>
|
2538 |
+
<td class="fm_options_value">
|
2539 |
+
<input id="from_name" name="from_name" value="<?php echo $row->from_name; ?>" style="width:250px;"/>
|
2540 |
+
</td>
|
2541 |
+
</tr>
|
2542 |
+
<tr valign="top">
|
2543 |
<td class="fm_options_label">
|
2544 |
+
<label for="theme">Theme</label>
|
2545 |
</td>
|
2546 |
<td class="fm_options_value">
|
2547 |
+
<select id="theme" name="theme" style="width:260px;" onChange="set_preview()">
|
2548 |
+
<?php
|
2549 |
+
foreach ($themes as $theme) {
|
2550 |
+
?>
|
2551 |
+
<option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?>><?php echo $theme->title; ?></option>
|
2552 |
+
<?php
|
2553 |
+
}
|
2554 |
+
?>
|
2555 |
+
</select>
|
2556 |
+
<a href="<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', '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;">
|
2557 |
+
Preview
|
2558 |
+
</a>
|
2559 |
</td>
|
2560 |
</tr>
|
2561 |
</table>
|
2563 |
<fieldset id="payment_fieldset" class="adminform fm_fieldset_deactive">
|
2564 |
<legend style="color:#0B55C4;font-weight: bold;">Payment Options</legend>
|
2565 |
<table class="admintable">
|
|
|
|
|
|
|
|
|
|
|
2566 |
<tr valign="top">
|
2567 |
<td class="fm_options_label">
|
2568 |
<label>Turn Paypal On</label>
|
2569 |
</td>
|
2570 |
<td class="fm_options_value">
|
2571 |
+
<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>
|
2572 |
+
<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>
|
2573 |
</td>
|
2574 |
</tr>
|
2575 |
<tr valign="top">
|
2577 |
<label>Checkout Mode</label>
|
2578 |
</td>
|
2579 |
<td class="fm_options_value">
|
2580 |
+
<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>
|
2581 |
+
<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>
|
2582 |
</td>
|
2583 |
</tr>
|
2584 |
<tr valign="top">
|
2586 |
<label for="paypal_email">Paypal email</label>
|
2587 |
</td>
|
2588 |
<td class="fm_options_value">
|
2589 |
+
<input type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area" style="width:250px">
|
2590 |
</td>
|
2591 |
</tr>
|
2592 |
<tr valign="top">
|
2594 |
<label for="payment_currency">Payment Currency</label>
|
2595 |
</td>
|
2596 |
<td class="fm_options_value">
|
2597 |
+
<select id="payment_currency" name="payment_currency" style="width:253px">
|
2598 |
<option value="USD" <?php echo (($row->payment_currency == 'USD') ? 'selected' : ''); ?>>$ • U.S. Dollar</option>
|
2599 |
<option value="EUR" <?php echo (($row->payment_currency == 'EUR') ? 'selected' : ''); ?>>€ • Euro</option>
|
2600 |
<option value="GBP" <?php echo (($row->payment_currency == 'GBP') ? 'selected' : ''); ?>>£ • Pound Sterling</option>
|
2638 |
<td class="fm_options_label">
|
2639 |
<label for="javascript">Javascript</label>
|
2640 |
</td>
|
2641 |
+
<td class="fm_options_value">
|
2642 |
+
<textarea style="margin: 0px;" cols="60" rows="30" name="javascript" id="javascript"><?php echo $row->javascript; ?></textarea>
|
2643 |
</td>
|
2644 |
</tr>
|
2645 |
</table>
|
2646 |
</fieldset>
|
2647 |
+
<input type="hidden" name="fieldset_id" id="fieldset_id" value="<?php echo WDW_FMC_Library::get('fieldset_id', 'general'); ?>" />
|
2648 |
+
<input type="hidden" id="task" name="task" value=""/>
|
2649 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
2650 |
+
</form>
|
2651 |
+
<script>
|
2652 |
+
jQuery(window).load(function () {
|
2653 |
+
form_maker_options_tabs(jQuery("#fieldset_id").val());
|
2654 |
+
fm_popup();
|
2655 |
+
});
|
2656 |
+
</script>
|
2657 |
+
<?php
|
2658 |
+
}
|
2659 |
+
|
2660 |
+
public function form_options($id) {
|
2661 |
+
|
2662 |
+
|
2663 |
+
$row = $this->model->get_row_data($id);
|
2664 |
+
$themes = $this->model->get_theme_rows_data();
|
2665 |
+
$queries = $this->model->get_queries_rows_data($id);
|
2666 |
+
$userGroups = get_editable_roles();
|
2667 |
+
$page_title = $row->title . ' form options';
|
2668 |
+
$label_id = array();
|
2669 |
+
$label_label = array();
|
2670 |
+
$label_type = array();
|
2671 |
+
$label_all = explode('#****#', $row->label_order_current);
|
2672 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
2673 |
+
foreach ($label_all as $key => $label_each) {
|
2674 |
+
$label_id_each = explode('#**id**#', $label_each);
|
2675 |
+
array_push($label_id, $label_id_each[0]);
|
2676 |
+
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
2677 |
+
array_push($label_label, $label_order_each[0]);
|
2678 |
+
array_push($label_type, $label_order_each[1]);
|
2679 |
+
}
|
2680 |
+
$fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
|
2681 |
+
$fields_count = count($fields);
|
2682 |
+
?>
|
2683 |
+
<script>
|
2684 |
+
function fm_change_radio_checkbox_text(elem) {
|
2685 |
+
var labels_array = [];
|
2686 |
+
labels_array['paypal_mode'] = ['Off', 'On'];
|
2687 |
+
labels_array['checkout_mode'] = ['Testmode', 'Production'];
|
2688 |
+
labels_array['mail_mode'] = ['Text', 'HTML'];
|
2689 |
+
labels_array['mail_mode_user'] = ['Text', 'HTML'];
|
2690 |
+
labels_array['value'] = ['1', '0'];
|
2691 |
+
|
2692 |
+
jQuery(elem).val(labels_array['value'][jQuery(elem).val()]);
|
2693 |
+
jQuery(elem).next().val(jQuery(elem).val());
|
2694 |
+
|
2695 |
+
var clicked_element = labels_array[jQuery(elem).attr('name')];
|
2696 |
+
jQuery(elem).find('label').html(clicked_element[jQuery(elem).val()]);
|
2697 |
+
if(jQuery( elem ).hasClass( "fm-text-yes" )) {
|
2698 |
+
jQuery( elem ).removeClass('fm-text-yes').addClass('fm-text-no');
|
2699 |
+
jQuery(elem).find("span").animate({
|
2700 |
+
right: parseInt(jQuery( elem ).css( "width")) - 14 + 'px'
|
2701 |
+
}, 400, function() {
|
2702 |
+
});
|
2703 |
+
}
|
2704 |
+
else {
|
2705 |
+
jQuery( elem ).removeClass('fm-text-no').addClass('fm-text-yes');
|
2706 |
+
jQuery(elem).find("span").animate({
|
2707 |
+
right: 0
|
2708 |
+
}, 400, function() {
|
2709 |
+
});
|
2710 |
+
}
|
2711 |
+
}
|
2712 |
+
|
2713 |
+
gen = "<?php echo $row->counter; ?>";
|
2714 |
+
form_view_max = 20;
|
2715 |
+
function set_preview() {
|
2716 |
+
jQuery("#preview_form").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&test_theme=" + jQuery('#theme').val() + "&width=1000&height=500&TB_iframe=1'); return false;");
|
2717 |
+
jQuery("#edit_css").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS_fmc', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&id=" + jQuery('#theme').val() + "&width=800&height=500&TB_iframe=1'); return false;");
|
2718 |
+
}
|
2719 |
+
|
2720 |
+
function set_condition() {
|
2721 |
+
field_condition = '';
|
2722 |
+
for(i=0;i<500;i++) {
|
2723 |
+
conditions = '';
|
2724 |
+
if(document.getElementById("condition"+i)) {
|
2725 |
+
field_condition+=document.getElementById("show_hide"+i).value+"*:*show_hide*:*";
|
2726 |
+
field_condition+=document.getElementById("fields"+i).value+"*:*field_label*:*";
|
2727 |
+
field_condition+=document.getElementById("all_any"+i).value+"*:*all_any*:*";
|
2728 |
+
for(k=0;k<500;k++) {
|
2729 |
+
if(document.getElementById("condition_div"+i+"_"+k)) {
|
2730 |
+
conditions+=document.getElementById("field_labels"+i+"_"+k).value+"***";
|
2731 |
+
conditions+=document.getElementById("is_select"+i+"_"+k).value+"***";
|
2732 |
+
if(document.getElementById("field_value"+i+"_"+k).tagName=="SELECT" ) {
|
2733 |
+
if(document.getElementById("field_value"+i+"_"+k).getAttribute('multiple')) {
|
2734 |
+
var sel = document.getElementById("field_value"+i+"_"+k);
|
2735 |
+
var selValues = '';
|
2736 |
+
for(m=0; m < sel.length; m++) {
|
2737 |
+
if(sel.options[m].selected)
|
2738 |
+
|
2739 |
+
selValues += sel.options[m].value+"@@@";
|
2740 |
+
}
|
2741 |
+
conditions+=selValues;
|
2742 |
+
} else {
|
2743 |
+
conditions+=document.getElementById("field_value"+i+"_"+k).value;
|
2744 |
+
}
|
2745 |
+
}
|
2746 |
+
else
|
2747 |
+
conditions+=document.getElementById("field_value"+i+"_"+k).value;
|
2748 |
+
conditions+="*:*next_condition*:*";
|
2749 |
+
}
|
2750 |
+
}
|
2751 |
+
field_condition+=conditions;
|
2752 |
+
field_condition+="*:*new_condition*:*";
|
2753 |
+
}
|
2754 |
+
}
|
2755 |
+
document.getElementById('condition').value = field_condition;
|
2756 |
+
}
|
2757 |
+
|
2758 |
+
function show_verify_options(s){
|
2759 |
+
if(s){
|
2760 |
+
jQuery(".verification_div").removeAttr( "style" );
|
2761 |
+
jQuery(".expire_link").removeAttr( "style" );
|
2762 |
+
|
2763 |
+
} else{
|
2764 |
+
jQuery(".verification_div").css( 'display', 'none' );
|
2765 |
+
jQuery(".expire_link").css( 'display', 'none' );
|
2766 |
+
}
|
2767 |
+
}
|
2768 |
+
</script>
|
2769 |
+
<style>
|
2770 |
+
.CodeMirror {
|
2771 |
+
border: 1px solid #ccc;
|
2772 |
+
font-size: 12px;
|
2773 |
+
margin-bottom: 6px;
|
2774 |
+
background: white;
|
2775 |
+
}
|
2776 |
+
</style>
|
2777 |
+
<div class="fm-user-manual">
|
2778 |
+
This section allows you to edit form options.
|
2779 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-3.html">Read More in User Manual</a>
|
2780 |
+
</div>
|
2781 |
+
<div class="fm-upgrade-pro">
|
2782 |
+
<a target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
2783 |
+
<div class="fm-upgrade-img">
|
2784 |
+
UPGRADE TO PRO VERSION
|
2785 |
+
<span></span>
|
2786 |
+
</div>
|
2787 |
+
</a>
|
2788 |
+
</div>
|
2789 |
+
<div class="fm-clear"></div>
|
2790 |
+
<form class="wrap" method="post" action="admin.php?page=manage_fmc" style="width:99%;" name="adminForm" id="adminForm">
|
2791 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
2792 |
+
<div class="fm-page-header">
|
2793 |
+
<div class="fm-page-title" style="width: inherit;">
|
2794 |
+
<?php echo $page_title; ?>
|
2795 |
+
</div>
|
2796 |
+
<div class="fm-page-actions">
|
2797 |
+
<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');">
|
2798 |
+
<span></span>
|
2799 |
+
Save
|
2800 |
+
</button>
|
2801 |
+
<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');">
|
2802 |
+
<span></span>
|
2803 |
+
Apply
|
2804 |
+
</button>
|
2805 |
+
<button class="fm-button cancel-button small" onclick="fm_set_input_value('task', 'cancel_options');">
|
2806 |
+
<span></span>
|
2807 |
+
Cancel
|
2808 |
+
</button>
|
2809 |
+
</div>
|
2810 |
+
<div class="fm-clear"></div>
|
2811 |
+
</div>
|
2812 |
+
<div class="fm-form-options">
|
2813 |
+
<div class="submenu-box">
|
2814 |
+
<div class="submenu-pad">
|
2815 |
+
<ul id="submenu" class="configuration">
|
2816 |
+
<li>
|
2817 |
+
<a id="general" class="fm_fieldset_tab" onclick="form_maker_options_tabs('general')" href="#">General Options</a>
|
2818 |
+
</li>
|
2819 |
+
<li>
|
2820 |
+
<a id="custom" class="fm_fieldset_tab" onclick="form_maker_options_tabs('custom')" href="#">Email Options</a>
|
2821 |
+
</li>
|
2822 |
+
<li>
|
2823 |
+
<a id="actions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('actions')" href="#">Actions after Submission</a>
|
2824 |
+
</li>
|
2825 |
+
<li>
|
2826 |
+
<a id="payment" class="fm_fieldset_tab" onclick="form_maker_options_tabs('payment')" href="#">Payment Options</a>
|
2827 |
+
</li>
|
2828 |
+
<li>
|
2829 |
+
<a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript'); codemirror_for_javascript();" href="#">JavaScript</a>
|
2830 |
+
</li>
|
2831 |
+
<li>
|
2832 |
+
<a id="conditions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('conditions')" href="#">Conditional Fields</a>
|
2833 |
+
</li>
|
2834 |
+
|
2835 |
+
</ul>
|
2836 |
+
</div>
|
2837 |
+
</div>
|
2838 |
+
<fieldset id="general_fieldset" class="adminform fm_fieldset_deactive">
|
2839 |
+
<legend>General Options</legend>
|
2840 |
+
<table class="admintable" >
|
2841 |
+
<tr valign="top">
|
2842 |
+
<td class="fm_options_label">
|
2843 |
+
<label>Published</label>
|
2844 |
+
</td>
|
2845 |
+
<td class="fm_options_value">
|
2846 |
+
<button class="fm-checkbox-radio-button <?php echo $row->published == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->published; ?>">
|
2847 |
+
<span></span>
|
2848 |
+
</button>
|
2849 |
+
<input type="hidden" name="published" value="<?php echo $row->published; ?>"/>
|
2850 |
+
</td>
|
2851 |
+
</tr>
|
2852 |
+
<tr valign="top">
|
2853 |
+
<td class="fm_options_label">
|
2854 |
+
<label>Save data(to database)</label>
|
2855 |
+
</td>
|
2856 |
+
<td class="fm_options_value">
|
2857 |
+
<button class="fm-checkbox-radio-button <?php echo $row->savedb == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->savedb; ?>">
|
2858 |
+
<span></span>
|
2859 |
+
</button>
|
2860 |
+
<input type="hidden" name="savedb" value="<?php echo $row->savedb; ?>"/>
|
2861 |
+
</td>
|
2862 |
+
</tr>
|
2863 |
+
<tr valign="top">
|
2864 |
+
<td class="fm_options_label">
|
2865 |
+
<label for="theme">Theme</label>
|
2866 |
+
</td>
|
2867 |
+
<td class="fm_options_value">
|
2868 |
+
<select id="theme" name="theme" onChange="set_preview()">
|
2869 |
+
<?php
|
2870 |
+
foreach ($themes as $theme) {
|
2871 |
+
?>
|
2872 |
+
<option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?>><?php echo $theme->title; ?></option>
|
2873 |
+
<?php
|
2874 |
+
}
|
2875 |
+
?>
|
2876 |
+
</select>
|
2877 |
+
<button id="preview_form" class="fm-button preview-button small" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview_fmc', 'form_id' => $row->id, 'test_theme' => $row->theme, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
|
2878 |
+
<span></span>
|
2879 |
+
Preview
|
2880 |
+
</button>
|
2881 |
+
<button id="edit_css" class="fm-button options-edit-button small" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS_fmc', 'id' => $row->theme, 'form_id' => $row->id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
|
2882 |
+
<span></span>
|
2883 |
+
Edit CSS
|
2884 |
+
</button>
|
2885 |
+
</td>
|
2886 |
+
</tr>
|
2887 |
+
<tr valign="top">
|
2888 |
+
<td class="fm_options_label">
|
2889 |
+
<label for="requiredmark">Required fields mark</label>
|
2890 |
+
</td>
|
2891 |
+
<td class="fm_options_value">
|
2892 |
+
<input type="text" id="requiredmark" name="requiredmark" value="<?php echo $row->requiredmark; ?>" style="width:250px;" />
|
2893 |
+
</td>
|
2894 |
+
</tr>
|
2895 |
+
<tr valign="top">
|
2896 |
+
<td class="fm_options_label">
|
2897 |
+
<label>Save Uploads</label>
|
2898 |
+
</td>
|
2899 |
+
<td class="fm_options_value">
|
2900 |
+
<button class="fm-checkbox-radio-button <?php echo $row->save_uploads == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->save_uploads; ?>">
|
2901 |
+
<span></span>
|
2902 |
+
</button>
|
2903 |
+
<input type="hidden" name="save_uploads" value="<?php echo $row->save_uploads; ?>"/>
|
2904 |
+
</td>
|
2905 |
+
</tr>
|
2906 |
+
</table>
|
2907 |
+
<br/>
|
2908 |
+
<div class="error_fm" style="padding: 5px; font-size: 14px;">Front end submissions are disabled in free version.</div>
|
2909 |
+
<fieldset class="adminform">
|
2910 |
+
<legend>Front end submissions access level</legend>
|
2911 |
+
<table>
|
2912 |
+
<tr>
|
2913 |
+
<td class="key">
|
2914 |
+
<label for="name">Allow User to see submissions:</label>
|
2915 |
+
</td>
|
2916 |
+
<td>
|
2917 |
+
<?php
|
2918 |
+
$checked_UserGroup=explode(',',$row->user_id_wd);
|
2919 |
+
$i = 0;
|
2920 |
+
foreach($userGroups as $val => $uG) {
|
2921 |
+
echo '<input type="checkbox" value="'.$val .'" id="user_'.$i.'"';
|
2922 |
+
if(in_array($val ,$checked_UserGroup))
|
2923 |
+
echo 'checked="checked"';
|
2924 |
+
echo 'onchange="acces_level('.count($userGroups).')" disabled/><label for="user_'.$i.'">'.$uG["name"].'</label><br>';
|
2925 |
+
$i++;
|
2926 |
+
}
|
2927 |
+
?>
|
2928 |
+
<input type="checkbox" value="guest" id="user_<?php echo $i; ?>" onchange="acces_level(<?php echo count($userGroups); ?>)"<?php echo (in_array('guest', $checked_UserGroup) ? 'checked="checked"' : '') ?> disabled/><label for="user_<?php echo $i; ?>">Guest</label>
|
2929 |
+
<input type="hidden" name="user_id_wd" value="<?php echo $row->user_id_wd ?>" id="user_id_wd" />
|
2930 |
+
</td>
|
2931 |
+
</tr>
|
2932 |
+
</table>
|
2933 |
+
</fieldset>
|
2934 |
+
<?php
|
2935 |
+
$labels_for_submissions = $this->model->get_labels($id);
|
2936 |
+
$payment_info = $this->model->is_paypal($id);
|
2937 |
+
$labels_id_for_submissions= array();
|
2938 |
+
$label_titles_for_submissions=array();
|
2939 |
+
$labels_type_for_submissions= array();
|
2940 |
+
if($labels_for_submissions) {
|
2941 |
+
$label_id_for_submissions= array();
|
2942 |
+
$label_order_original_for_submissions= array();
|
2943 |
+
$label_type_for_submissions= array();
|
2944 |
+
|
2945 |
+
if(strpos($row->label_order, 'type_paypal_')) {
|
2946 |
+
$row->label_order=$row->label_order."item_total#**id**#Item Total#**label**#type_paypal_payment_total#****#total#**id**#Total#**label**#type_paypal_payment_total#****#0#**id**#Payment Status#**label**#type_paypal_payment_status#****#";
|
2947 |
+
}
|
2948 |
+
|
2949 |
+
$label_all_for_submissions = explode('#****#',$row->label_order);
|
2950 |
+
$label_all_for_submissions = array_slice($label_all_for_submissions,0, count($label_all_for_submissions)-1);
|
2951 |
+
foreach($label_all_for_submissions as $key => $label_each) {
|
2952 |
+
$label_id_each=explode('#**id**#',$label_each);
|
2953 |
+
array_push($label_id_for_submissions, $label_id_each[0]);
|
2954 |
+
$label_order_each=explode('#**label**#', $label_id_each[1]);
|
2955 |
+
array_push($label_order_original_for_submissions, $label_order_each[0]);
|
2956 |
+
array_push($label_type_for_submissions, $label_order_each[1]);
|
2957 |
+
}
|
2958 |
+
|
2959 |
+
foreach($label_id_for_submissions as $key => $label) {
|
2960 |
+
if(in_array($label, $labels_for_submissions)) {
|
2961 |
+
array_push($labels_type_for_submissions, $label_type_for_submissions[$key]);
|
2962 |
+
array_push($labels_id_for_submissions, $label);
|
2963 |
+
array_push($label_titles_for_submissions, $label_order_original_for_submissions[$key]);
|
2964 |
+
}
|
2965 |
+
}
|
2966 |
+
}
|
2967 |
+
|
2968 |
+
$stats_labels = array();
|
2969 |
+
$stats_labels_ids = array();
|
2970 |
+
foreach($labels_type_for_submissions as $key => $label_type_cur) {
|
2971 |
+
if($label_type_cur=="type_checkbox" || $label_type_cur=="type_radio" || $label_type_cur=="type_own_select" || $label_type_cur=="type_country" || $label_type_cur=="type_paypal_select" || $label_type_cur=="type_paypal_radio" || $label_type_cur=="type_paypal_checkbox" || $label_type_cur=="type_paypal_shipping") {
|
2972 |
+
$stats_labels_ids[] = $labels_id_for_submissions[$key];
|
2973 |
+
$stats_labels[] = $label_titles_for_submissions[$key];
|
2974 |
+
}
|
2975 |
+
}
|
2976 |
+
?>
|
2977 |
+
<script type="text/javascript">
|
2978 |
+
function inArray(needle, myarray) {
|
2979 |
+
var length = myarray.length;
|
2980 |
+
for(var i = 0; i < length; i++) {
|
2981 |
+
if(myarray[i] == needle) return true;
|
2982 |
+
}
|
2983 |
+
return false;
|
2984 |
+
}
|
2985 |
+
|
2986 |
+
function checked_labels(class_name) {
|
2987 |
+
var checked_ids ='';
|
2988 |
+
jQuery('.'+class_name).each(function() {
|
2989 |
+
if(this.checked) {
|
2990 |
+
checked_ids += this.value+',';
|
2991 |
+
}
|
2992 |
+
});
|
2993 |
+
|
2994 |
+
if(class_name == 'filed_label') {
|
2995 |
+
document.getElementById("frontend_submit_fields").value = checked_ids ;
|
2996 |
+
if(checked_ids == document.getElementById("all_fields").value)
|
2997 |
+
document.getElementById("all_fields").checked = true;
|
2998 |
+
else
|
2999 |
+
document.getElementById("all_fields").checked = false;
|
3000 |
+
}
|
3001 |
+
else {
|
3002 |
+
document.getElementById("frontend_submit_stat_fields").value = checked_ids ;
|
3003 |
+
if(checked_ids == document.getElementById("all_stats_fields").value)
|
3004 |
+
document.getElementById("all_stats_fields").checked = true;
|
3005 |
+
else
|
3006 |
+
document.getElementById("all_stats_fields").checked = false;
|
3007 |
+
}
|
3008 |
+
}
|
3009 |
+
|
3010 |
+
jQuery(document).ready(function () {
|
3011 |
+
jQuery('.filed_label').each(function() {
|
3012 |
+
if(document.getElementById("frontend_submit_fields").value == document.getElementById("all_fields").value)
|
3013 |
+
document.getElementById("all_fields").checked = true;
|
3014 |
+
if(inArray(this.value, document.getElementById("frontend_submit_fields").value.split(","))) {
|
3015 |
+
this.checked = true;
|
3016 |
+
}
|
3017 |
+
});
|
3018 |
+
|
3019 |
+
jQuery('.stats_filed_label').each(function() {
|
3020 |
+
if(document.getElementById("frontend_submit_stat_fields").value == document.getElementById("all_stats_fields").value)
|
3021 |
+
document.getElementById("all_stats_fields").checked = true;
|
3022 |
+
if(inArray(this.value, document.getElementById("frontend_submit_stat_fields").value.split(","))) {
|
3023 |
+
this.checked = true;
|
3024 |
+
}
|
3025 |
+
});
|
3026 |
+
|
3027 |
+
jQuery(document).on('change','input[name="all_fields"]',function() {
|
3028 |
+
jQuery('.filed_label').prop("checked" , this.checked);
|
3029 |
+
});
|
3030 |
+
|
3031 |
+
jQuery(document).on('change','input[name="all_stats_fields"]',function() {
|
3032 |
+
jQuery('.stats_filed_label').prop("checked" , this.checked);
|
3033 |
+
});
|
3034 |
+
});
|
3035 |
+
</script>
|
3036 |
+
<style>
|
3037 |
+
li{
|
3038 |
+
list-style-type: none;
|
3039 |
+
}
|
3040 |
+
|
3041 |
+
.simple_table {
|
3042 |
+
padding-left: 0px !important;
|
3043 |
+
}
|
3044 |
+
|
3045 |
+
.simple_table input, .simple_table label, .simple_table img {
|
3046 |
+
display:inline-block !important;
|
3047 |
+
float:none !important;
|
3048 |
+
}
|
3049 |
+
</style>
|
3050 |
+
<fieldset class="adminform">
|
3051 |
+
<legend>Fields to hide in frontend submissions</legend>
|
3052 |
+
<?php if(count($label_titles_for_submissions)): ?>
|
3053 |
+
<table style="margin-left:-3px;">
|
3054 |
+
<tr>
|
3055 |
+
<td>
|
3056 |
+
<label>Select fields:</label>
|
3057 |
+
</td>
|
3058 |
+
<td class="simple_table">
|
3059 |
+
<ul id="form_fields">
|
3060 |
+
<li>
|
3061 |
+
<input type="checkbox" name="all_fields" id="all_fields" value="submit_id,<?php echo implode(',',$labels_id_for_submissions)."," . ($payment_info ? "payment_info" : ""); ?>" onclick="checked_labels('filed_label')" disabled/>
|
3062 |
+
<label for="all_fields">Select All</label>
|
3063 |
+
</li>
|
3064 |
+
<?php
|
3065 |
+
echo "<li><input type=\"checkbox\" id=\"submit_id\" name=\"submit_id\" value=\"submit_id\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" disabled><label for=\"submit_id\">ID</label></li>";
|
3066 |
+
|
3067 |
+
for($i=0, $n=count($label_titles_for_submissions); $i < $n ; $i++)
|
3068 |
+
{
|
3069 |
+
$field_label = $label_titles_for_submissions[$i];
|
3070 |
+
|
3071 |
+
echo "<li><input type=\"checkbox\" id=\"filed_label".$i."\" name=\"filed_label".$i."\" value=\"".$labels_id_for_submissions[$i]."\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" disabled><label for=\"filed_label".$i."\">".(strlen($field_label) > 80 ? substr ($field_label ,0, 80).'...' : $field_label)."</label></li>";
|
3072 |
+
|
3073 |
+
}
|
3074 |
+
if($payment_info)
|
3075 |
+
echo "<li><input type=\"checkbox\" id=\"payment_info\" name=\"payment_info\" value=\"payment_info\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" disabled><label for=\"payment_info\">Payment Info</label></li>";
|
3076 |
+
?>
|
3077 |
+
</ul>
|
3078 |
+
<input type="hidden" name="frontend_submit_fields" value="<?php echo $row->frontend_submit_fields ?>" id="frontend_submit_fields" />
|
3079 |
+
</td>
|
3080 |
+
</tr>
|
3081 |
+
<?php if($stats_labels): ?>
|
3082 |
+
<tr id="stats">
|
3083 |
+
<td>
|
3084 |
+
<label>Stats fields:</label>
|
3085 |
+
</td>
|
3086 |
+
<td class="simple_table">
|
3087 |
+
<ul id="stats_fields">
|
3088 |
+
<li>
|
3089 |
+
<input type="checkbox" name="all_stats_fields" id="all_stats_fields" value="<?php echo implode(',',$stats_labels_ids).","; ?>" onclick="checked_labels('stats_filed_label')" disabled>
|
3090 |
+
<label for="all_stats_fields">Select All</label>
|
3091 |
+
</li>
|
3092 |
+
<?php
|
3093 |
+
for($i=0, $n=count($stats_labels); $i < $n ; $i++)
|
3094 |
+
{
|
3095 |
+
$field_label = $stats_labels[$i];
|
3096 |
+
echo "<li><input type=\"checkbox\" id=\"stats_filed_label".$i."\" name=\"stats_filed_label".$i."\" value=\"".$stats_labels_ids[$i]."\" class=\"stats_filed_label\" onclick=\"checked_labels('stats_filed_label')\" disabled><label for=\"stats_filed_label".$i."\" >".(strlen($field_label) > 80 ? substr ($field_label ,0, 80).'...' : $field_label)."</label></li>";
|
3097 |
+
}
|
3098 |
+
?>
|
3099 |
+
</ul>
|
3100 |
+
<input type="hidden" name="frontend_submit_stat_fields" value="<?php echo $row->frontend_submit_stat_fields ?>" id="frontend_submit_stat_fields" />
|
3101 |
+
</td>
|
3102 |
+
</tr>
|
3103 |
+
<?php endif; ?>
|
3104 |
+
</table>
|
3105 |
+
<?php endif; ?>
|
3106 |
+
</fieldset>
|
3107 |
+
</fieldset>
|
3108 |
+
<fieldset id="custom_fieldset" class="adminform fm_fieldset_deactive">
|
3109 |
+
<legend>Email Options</legend>
|
3110 |
+
<table class="admintable">
|
3111 |
+
<tr valign="top">
|
3112 |
+
<td style="width: 75px; vertical-align: middle;">
|
3113 |
+
<label>Send E-mail</label>
|
3114 |
+
</td>
|
3115 |
+
<td style="padding: 15px;">
|
3116 |
+
<button class="fm-checkbox-radio-button <?php echo $row->sendemail == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->sendemail; ?>">
|
3117 |
+
<span></span>
|
3118 |
+
</button>
|
3119 |
+
<input type="hidden" name="sendemail" value="<?php echo $row->sendemail; ?>"/>
|
3120 |
+
</td>
|
3121 |
+
</tr>
|
3122 |
+
</table>
|
3123 |
+
<fieldset class="adminform fm_mail_options">
|
3124 |
+
<legend>Email to Administrator</legend>
|
3125 |
+
<table class="admintable">
|
3126 |
+
<tr valign="top">
|
3127 |
+
<td class="fm_options_label">
|
3128 |
+
<label for="mailToAdd">Email to send submissions to</label>
|
3129 |
+
</td>
|
3130 |
+
<td class="fm_options_value">
|
3131 |
+
<input type="text" id="mailToAdd" name="mailToAdd" style="width: 250px;" />
|
3132 |
+
<input type="hidden" id="mail" name="mail" value="<?php echo $row->mail . ($row->mail && (substr($row->mail, -1) != ',') ? ',' : ''); ?>" />
|
3133 |
+
<img src="<?php echo WD_FMC_URL . '/images/add.png?ver='. get_option("wd_form_maker_version"); ?>" style="vertical-align: middle; cursor: pointer;" title="Add more emails" onclick="if (fm_check_email('mailToAdd')) {return false;};cfm_create_input('mail', 'mailToAdd', 'cfm_mail_div', '<?php echo WD_FMC_URL; ?>')" />
|
3134 |
+
<div id="cfm_mail_div">
|
3135 |
+
<?php
|
3136 |
+
$mail_array = explode(',', $row->mail);
|
3137 |
+
foreach ($mail_array as $mail) {
|
3138 |
+
if ($mail && $mail != ',') {
|
3139 |
+
?>
|
3140 |
+
<div class="fm_mail_input">
|
3141 |
+
<?php echo $mail; ?>
|
3142 |
+
<img src="<?php echo WD_FMC_URL; ?>/images/delete.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" class="fm_delete_img" onclick="fm_delete_mail(this, '<?php echo $mail; ?>')" title="Delete Email" />
|
3143 |
+
</div>
|
3144 |
+
<?php
|
3145 |
+
}
|
3146 |
+
}
|
3147 |
+
?>
|
3148 |
+
</div>
|
3149 |
+
</td>
|
3150 |
+
</tr>
|
3151 |
+
<tr valign="top">
|
3152 |
+
<td class="fm_options_label">
|
3153 |
+
<label for="from_mail">Email From</label>
|
3154 |
+
</td>
|
3155 |
+
<td class="fm_options_value">
|
3156 |
+
<?php
|
3157 |
+
$is_other = TRUE;
|
3158 |
+
for ($i = 0; $i < $fields_count - 1; $i++) {
|
3159 |
+
?>
|
3160 |
+
<div>
|
3161 |
+
<input type="radio" name="from_mail" id="from_mail<?php echo $i; ?>" value="<?php echo (strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo ((strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]) == $row->from_mail ? 'checked="checked"' : '' ); ?> onclick="wdhide('mail_from_other')" />
|
3162 |
+
<label for="from_mail<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
3163 |
+
</div>
|
3164 |
+
<?php
|
3165 |
+
if(strlen($fields[$i])!=1) {
|
3166 |
+
if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->from_mail) {
|
3167 |
+
$is_other = FALSE;
|
3168 |
+
}
|
3169 |
+
}
|
3170 |
+
else {
|
3171 |
+
if($fields[$i] == $row->from_mail)
|
3172 |
+
$is_other=false;
|
3173 |
+
}
|
3174 |
+
}
|
3175 |
+
?>
|
3176 |
+
<div style="<?php echo ($fields_count == 1) ? 'display:none;' : ''; ?>">
|
3177 |
+
<input type="radio" id="other" name="from_mail" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('mail_from_other')" />
|
3178 |
+
<label for="other">Other</label>
|
3179 |
+
</div>
|
3180 |
+
<input type="text" style="width: <?php echo ($fields_count == 1) ? '250px' : '235px; margin-left: 15px' ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="mail_from_other" name="mail_from_other" value="<?php echo ($is_other) ? $row->from_mail : ''; ?>" />
|
3181 |
+
</td>
|
3182 |
+
</tr>
|
3183 |
+
<tr valign="top">
|
3184 |
+
<td class="fm_options_label">
|
3185 |
+
<label for="from_name">From Name</label>
|
3186 |
+
</td>
|
3187 |
+
<td class="fm_options_value">
|
3188 |
+
<input type="text" id="from_name" name="from_name" value="<?php echo $row->from_name; ?>" style="width: 250px;" />
|
3189 |
+
<img src="<?php echo WD_FMC_URL . '/images/add.png?ver='. get_option("wd_form_maker_version").''; ?>" onclick="document.getElementById('mail_from_labels').style.display='block';" style="vertical-align: middle; cursor: pointer;display:inline-block; margin:0px; float:none;">
|
3190 |
+
<?php
|
3191 |
+
$choise = "document.getElementById('from_name')";
|
3192 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_from_labels" class="email_labels" style="display:none;">';
|
3193 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
3194 |
+
for($i=0; $i<count($label_label); $i++) {
|
3195 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_matrix")
|
3196 |
+
continue;
|
3197 |
+
|
3198 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3199 |
+
$fld_label = $param;
|
3200 |
+
if(strlen($fld_label)>30) {
|
3201 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3202 |
+
$fld_label = explode("\n", $fld_label);
|
3203 |
+
$fld_label = $fld_label[0] . ' ...';
|
3204 |
+
}
|
3205 |
+
|
3206 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_from_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3207 |
+
}
|
3208 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
|
3209 |
+
|
3210 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
3211 |
+
echo '</div></div>';
|
3212 |
+
?>
|
3213 |
+
</td>
|
3214 |
+
</tr>
|
3215 |
+
<tr valign="top">
|
3216 |
+
<td class="fm_options_label">
|
3217 |
+
<label for="reply_to">Reply to<br/>(if different from "Email From") </label>
|
3218 |
+
</td>
|
3219 |
+
<td class="fm_options_value">
|
3220 |
+
<?php
|
3221 |
+
$is_other = TRUE;
|
3222 |
+
for ($i = 0; $i < $fields_count - 1; $i++) {
|
3223 |
+
?>
|
3224 |
+
<div>
|
3225 |
+
<input type="radio" name="reply_to" id="reply_to<?php echo $i; ?>" value="<?php echo (strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo ((strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]) == $row->reply_to ? 'checked="checked"' : '' ); ?> onclick="wdhide('reply_to_other')" />
|
3226 |
+
<label for="reply_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
3227 |
+
</div>
|
3228 |
+
<?php
|
3229 |
+
if(strlen($fields[$i])!=1) {
|
3230 |
+
if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->reply_to) {
|
3231 |
+
$is_other = FALSE;
|
3232 |
+
}
|
3233 |
+
}
|
3234 |
+
else {
|
3235 |
+
if($fields[$i] == $row->reply_to)
|
3236 |
+
$is_other=false;
|
3237 |
+
}
|
3238 |
+
}
|
3239 |
+
?>
|
3240 |
+
<div style="<?php echo ($fields_count == 1) ? 'display: none;' : ''; ?>">
|
3241 |
+
<input type="radio" id="other1" name="reply_to" value="other" <?php echo ($is_other) ? 'checked="checked"' : ''; ?> onclick="wdshow('reply_to_other')" />
|
3242 |
+
<label for="other1">Other</label>
|
3243 |
+
</div>
|
3244 |
+
<input type="text" style="width: <?php echo ($fields_count == 1) ? '250px' : '235px; margin-left: 15px'; ?>; display: <?php echo ($is_other) ? 'block;' : 'none;'; ?>" id="reply_to_other" name="reply_to_other" value="<?php echo ($is_other && $row->reply_to) ? $row->reply_to : ''; ?>" />
|
3245 |
+
</td>
|
3246 |
+
</tr>
|
3247 |
+
<tr valign="top">
|
3248 |
+
<td class="fm_options_label">
|
3249 |
+
<label> CC: </label>
|
3250 |
+
</td>
|
3251 |
+
<td class="fm_options_value">
|
3252 |
+
<input type="text" id="mail_cc" name="mail_cc" value="<?php echo $row->mail_cc ?>" style="width:250px;" />
|
3253 |
+
</td>
|
3254 |
+
</tr>
|
3255 |
+
<tr valign="top">
|
3256 |
+
<td class="fm_options_label">
|
3257 |
+
<label> BCC: </label>
|
3258 |
+
</td>
|
3259 |
+
<td class="fm_options_value">
|
3260 |
+
<input type="text" id="mail_bcc" name="mail_bcc" value="<?php echo $row->mail_bcc ?>" style="width:250px;" />
|
3261 |
+
</td>
|
3262 |
+
</tr>
|
3263 |
+
<tr valign="top">
|
3264 |
+
<td class="fm_options_label">
|
3265 |
+
<label> Subject: </label>
|
3266 |
+
</td>
|
3267 |
+
<td class="fm_options_value">
|
3268 |
+
<input type="text" id="mail_subject" name="mail_subject" value="<?php echo $row->mail_subject ?>" style="width:250px;" />
|
3269 |
+
<img src="<?php echo WD_FMC_URL . '/images/add.png?ver='. get_option("wd_form_maker_version").''; ?>" onclick="document.getElementById('mail_subject_labels').style.display='block';" style="vertical-align: middle;cursor: pointer; display:inline-block; margin:0px; float:none;">
|
3270 |
+
<?php
|
3271 |
+
$choise = "document.getElementById('mail_subject')";
|
3272 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_subject_labels" class="email_labels" style="display:none;">';
|
3273 |
+
for($i=0; $i<count($label_label); $i++) {
|
3274 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_matrix")
|
3275 |
+
continue;
|
3276 |
+
|
3277 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3278 |
+
|
3279 |
+
$fld_label = $param;
|
3280 |
+
if(strlen($fld_label)>30)
|
3281 |
+
{
|
3282 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3283 |
+
$fld_label = explode("\n", $fld_label);
|
3284 |
+
$fld_label = $fld_label[0] . ' ...';
|
3285 |
+
}
|
3286 |
+
|
3287 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_subject_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3288 |
+
|
3289 |
+
}
|
3290 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
|
3291 |
+
|
3292 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
3293 |
+
echo '</div></div>';
|
3294 |
+
?>
|
3295 |
+
</td>
|
3296 |
+
</tr>
|
3297 |
+
<tr valign="top">
|
3298 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
3299 |
+
<label> Mode: </label>
|
3300 |
+
</td>
|
3301 |
+
<td class="fm_options_value">
|
3302 |
+
<button name="mail_mode"class="fm-checkbox-radio-button <?php echo $row->mail_mode == 1 ? 'fm-text-yes' : 'fm-text-no' ?> medium" onclick="fm_change_radio_checkbox_text(this); return false;" value="<?php echo $row->mail_mode ?>">
|
3303 |
+
<label><?php echo $row->mail_mode == 1 ? 'HTML' : 'Text' ?></label>
|
3304 |
+
<span></span>
|
3305 |
+
</button>
|
3306 |
+
<input type="hidden" name="mail_mode" value="<?php echo $row->mail_mode; ?>"/>
|
3307 |
+
</td>
|
3308 |
+
</tr>
|
3309 |
+
<tr valign="top">
|
3310 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
3311 |
+
<label> Attach File: </label>
|
3312 |
+
</td>
|
3313 |
+
<td class="fm_options_value">
|
3314 |
+
<div class="error_fm" style="padding: 5px; font-size: 14px;">File attach is disabled in free version.</div>
|
3315 |
+
<input type="hidden" name="mail_attachment" value="<?php echo $row->mail_attachment; ?>"/>
|
3316 |
+
</td>
|
3317 |
+
</tr>
|
3318 |
+
<tr valign="top">
|
3319 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
3320 |
+
<label> Email empty fields: </label>
|
3321 |
+
</td>
|
3322 |
+
<td class="fm_options_value">
|
3323 |
+
<button class="fm-checkbox-radio-button <?php echo $row->mail_emptyfields == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->mail_emptyfields; ?>">
|
3324 |
+
<span></span>
|
3325 |
+
</button>
|
3326 |
+
<input type="hidden" name="mail_emptyfields" value="<?php echo $row->mail_emptyfields; ?>"/>
|
3327 |
+
</td>
|
3328 |
+
</tr>
|
3329 |
+
<tr>
|
3330 |
+
<td class="fm_options_label" valign="top">
|
3331 |
+
<label>Custom Text in Email For Administrator</label>
|
3332 |
+
</td>
|
3333 |
+
<td class="fm_options_value">
|
3334 |
+
<div style="margin-bottom:5px">
|
3335 |
+
<?php
|
3336 |
+
$choise = "document.getElementById('script_mail')";
|
3337 |
+
for ($i = 0; $i < count($label_label); $i++) {
|
3338 |
+
if ($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_send_copy")
|
3339 |
+
continue;
|
3340 |
+
|
3341 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3342 |
+
$fld_label = $param;
|
3343 |
+
if(strlen($fld_label)>30) {
|
3344 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3345 |
+
$fld_label = explode("\n", $fld_label);
|
3346 |
+
$fld_label = $fld_label[0] . ' ...';
|
3347 |
+
}
|
3348 |
+
|
3349 |
+
if($label_type[$i]=="type_file_upload")
|
3350 |
+
$fld_label .= '(as image)';
|
3351 |
+
?>
|
3352 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
|
3353 |
+
<?php
|
3354 |
+
}
|
3355 |
+
?>
|
3356 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
|
3357 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
|
3358 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
|
3359 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
|
3360 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
|
3361 |
+
</div>
|
3362 |
+
<?php
|
3363 |
+
if (user_can_richedit()) {
|
3364 |
+
wp_editor($row->script_mail, 'script_mail', array('teeny' => FALSE, 'textarea_name' => 'script_mail', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
3365 |
+
}
|
3366 |
+
else {
|
3367 |
+
?>
|
3368 |
+
<textarea name="script_mail" id="script_mail" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail; ?></textarea>
|
3369 |
+
<?php
|
3370 |
+
}
|
3371 |
+
?>
|
3372 |
+
</td>
|
3373 |
+
</tr>
|
3374 |
+
</table>
|
3375 |
+
</fieldset>
|
3376 |
+
<fieldset class="fm_mail_options">
|
3377 |
+
<legend>Email to User</legend>
|
3378 |
+
<table class="admintable">
|
3379 |
+
<tr valign="top">
|
3380 |
+
<td class="fm_options_label">
|
3381 |
+
<label for="mail">Send to</label>
|
3382 |
+
</td>
|
3383 |
+
<td class="fm_options_value">
|
3384 |
+
<?php
|
3385 |
+
$fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
|
3386 |
+
$fields_count = count($fields);
|
3387 |
+
if ($fields_count == 1) { ?>
|
3388 |
+
There is no email field
|
3389 |
+
<?php
|
3390 |
+
}
|
3391 |
+
else {
|
3392 |
+
for ($i = 0; $i < $fields_count - 1; $i++) {
|
3393 |
+
?>
|
3394 |
+
<div>
|
3395 |
+
<input type="checkbox" name="send_to<?php echo $i; ?>" id="send_to<?php echo $i; ?>" value="<?php echo (strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo (is_numeric(strpos($row->send_to, '*'.(strlen($fields[$i])!=1 ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]).'*')) ? 'checked="checked"' : '' ); ?> style="margin: 0px 5px 0px 0px;" />
|
3396 |
+
<label for="send_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
|
3397 |
+
</div>
|
3398 |
+
<?php
|
3399 |
+
}
|
3400 |
+
}
|
3401 |
+
?>
|
3402 |
+
</td>
|
3403 |
+
</tr>
|
3404 |
+
<tr valign="top">
|
3405 |
+
<td class="fm_options_label">
|
3406 |
+
<label for="mail_from_user">Email From</label>
|
3407 |
+
</td>
|
3408 |
+
<td class="fm_options_value">
|
3409 |
+
<input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" style="width: 250px;" />
|
3410 |
+
</td>
|
3411 |
+
</tr>
|
3412 |
+
<tr valign="top">
|
3413 |
+
<td class="fm_options_label">
|
3414 |
+
<label for="mail_from_name_user">From Name</label>
|
3415 |
+
</td>
|
3416 |
+
<td class="fm_options_value">
|
3417 |
+
<input type="text" id="mail_from_name_user" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" style="width: 250px;"/>
|
3418 |
+
<img src="<?php echo WD_FMC_URL . '/images/add.png?ver='. get_option("wd_form_maker_version").''; ?>" onclick="document.getElementById('mail_from_name_user_labels').style.display='block';" style="vertical-align: middle;cursor: pointer; display:inline-block; margin:0px; float:none;">
|
3419 |
+
<?php
|
3420 |
+
$choise = "document.getElementById('mail_from_name_user')";
|
3421 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_from_name_user_labels" class="email_labels" style="display:none;">';
|
3422 |
+
for($i=0; $i<count($label_label); $i++) {
|
3423 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy")
|
3424 |
+
continue;
|
3425 |
+
|
3426 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3427 |
+
$fld_label = $param;
|
3428 |
+
if(strlen($fld_label)>30) {
|
3429 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3430 |
+
$fld_label = explode("\n", $fld_label);
|
3431 |
+
$fld_label = $fld_label[0] . ' ...';
|
3432 |
+
}
|
3433 |
+
|
3434 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3435 |
+
}
|
3436 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
|
3437 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
3438 |
+
echo '</div></div>';
|
3439 |
+
?>
|
3440 |
+
</td>
|
3441 |
+
</tr>
|
3442 |
+
<tr valign="top">
|
3443 |
+
<td class="fm_options_label">
|
3444 |
+
<label for="reply_to_user">Reply to<br />(if different from "Email Form")</label>
|
3445 |
+
</td>
|
3446 |
+
<td class="fm_options_value">
|
3447 |
+
<input type="text" id="reply_to_user" name="reply_to_user" value="<?php echo $row->reply_to_user; ?>" style="width:250px;"/>
|
3448 |
+
</td>
|
3449 |
+
</tr>
|
3450 |
+
<tr valign="top">
|
3451 |
+
<td class="fm_options_label">
|
3452 |
+
<label> CC: </label>
|
3453 |
+
</td>
|
3454 |
+
<td class="fm_options_value">
|
3455 |
+
<input type="text" id="mail_cc_user" name="mail_cc_user" value="<?php echo $row->mail_cc_user ?>" style="width:250px;" />
|
3456 |
+
</td>
|
3457 |
+
</tr>
|
3458 |
+
<tr valign="top">
|
3459 |
+
<td class="fm_options_label">
|
3460 |
+
<label> BCC: </label>
|
3461 |
+
</td>
|
3462 |
+
<td class="fm_options_value">
|
3463 |
+
<input type="text" id="mail_bcc_user" name="mail_bcc_user" value="<?php echo $row->mail_bcc_user ?>" style="width:250px;" />
|
3464 |
+
</td>
|
3465 |
+
</tr>
|
3466 |
+
<tr valign="top">
|
3467 |
+
<td class="fm_options_label">
|
3468 |
+
<label> Subject: </label>
|
3469 |
+
</td>
|
3470 |
+
<td class="fm_options_value">
|
3471 |
+
<input type="text" id="mail_subject_user" name="mail_subject_user" value="<?php echo $row->mail_subject_user ?>" style="width:250px;" />
|
3472 |
+
<img src="<?php echo WD_FMC_URL . '/images/add.png?ver='. get_option("wd_form_maker_version").''; ?>" onclick="document.getElementById('mail_subject_user_labels').style.display='block';" style="vertical-align: middle; cursor: pointer; display:inline-block; margin:0px; float:none;">
|
3473 |
+
<?php
|
3474 |
+
$choise = "document.getElementById('mail_subject_user')";
|
3475 |
+
echo '<div style="position:relative; top:-3px;"><div id="mail_subject_user_labels" class="email_labels" style="display:none;">';
|
3476 |
+
for($i=0; $i<count($label_label); $i++)
|
3477 |
+
{
|
3478 |
+
if($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_file_upload" || $label_type[$i]=="type_send_copy")
|
3479 |
+
continue;
|
3480 |
+
|
3481 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3482 |
+
|
3483 |
+
$fld_label = $param;
|
3484 |
+
if(strlen($fld_label)>30)
|
3485 |
+
{
|
3486 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3487 |
+
$fld_label = explode("\n", $fld_label);
|
3488 |
+
$fld_label = $fld_label[0] . ' ...';
|
3489 |
+
}
|
3490 |
+
|
3491 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'".$param."'); document.getElementById('mail_subject_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">".$fld_label."</a>";
|
3492 |
+
|
3493 |
+
}
|
3494 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
|
3495 |
+
|
3496 |
+
echo "<a onClick=\"insertAtCursor(".$choise.",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
|
3497 |
+
echo '</div></div>';
|
3498 |
+
?>
|
3499 |
+
</td>
|
3500 |
+
</tr>
|
3501 |
+
<tr valign="top">
|
3502 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
3503 |
+
<label> Mode: </label>
|
3504 |
+
</td>
|
3505 |
+
<td class="fm_options_value">
|
3506 |
+
<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' ?>">
|
3507 |
+
<label><?php echo $row->mail_mode_user == 1 ? 'HTML' : 'Text' ?></label>
|
3508 |
+
<span></span>
|
3509 |
+
</button>
|
3510 |
+
<input type="hidden" name="mail_mode_user" value="<?php echo $row->mail_mode_user; ?>"/>
|
3511 |
+
</td>
|
3512 |
+
</tr>
|
3513 |
+
<tr valign="top">
|
3514 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
3515 |
+
<label> Attach File: </label>
|
3516 |
+
</td>
|
3517 |
+
<td class="fm_options_value">
|
3518 |
+
<div class="error_fm" style="padding: 5px; font-size: 14px;">File attach is disabled in free version.</div>
|
3519 |
+
<input type="hidden" name="mail_attachment_user" value="<?php echo $row->mail_attachment_user; ?>"/>
|
3520 |
+
</td>
|
3521 |
+
</tr>
|
3522 |
+
<tr valign="top">
|
3523 |
+
<td class="fm_options_label" style="vertical-align: middle;">
|
3524 |
+
<label> Email verification: </label>
|
3525 |
+
</td>
|
3526 |
+
<td class="fm_options_value">
|
3527 |
+
<button name="mail_verify" class="fm-checkbox-radio-button <?php echo $row->mail_verify == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->mail_verify; ?>">
|
3528 |
+
<span></span>
|
3529 |
+
</button>
|
3530 |
+
<input type="hidden" name="mail_verify" value="<?php echo $row->mail_verify; ?>"/>
|
3531 |
+
</td>
|
3532 |
+
</tr>
|
3533 |
+
<tr valign="top" class="expire_link" <?php echo ($row->mail_verify==0 ? 'style="display:none;"' : '')?>>
|
3534 |
+
<td class="fm_options_label" valign="top">
|
3535 |
+
<label> Verification link expires in: </label>
|
3536 |
+
</td>
|
3537 |
+
<td class="fm_options_value">
|
3538 |
+
<input class="inputbox" type="text" name="mail_verify_expiretime" maxlength="10" value = "<?php echo ($row->mail_verify_expiretime ? $row->mail_verify_expiretime : 0); ?>" style="width:95px;" onkeypress="return check_isnum_point(event)"/><small> -- hours (0 - never expires).</small>
|
3539 |
+
</td>
|
3540 |
+
</tr>
|
3541 |
+
<tr>
|
3542 |
+
<td class="fm_options_label" valign="top">
|
3543 |
+
<label>Custom Text in Email For User</label>
|
3544 |
+
</td>
|
3545 |
+
<td class="fm_options_value">
|
3546 |
+
<div style="margin-bottom:5px">
|
3547 |
+
<?php
|
3548 |
+
$choise = "document.getElementById('script_mail_user')";
|
3549 |
+
for ($i = 0; $i < count($label_label); $i++) {
|
3550 |
+
if ($label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_file_upload" || $label_type[$i] == "type_send_copy")
|
3551 |
+
continue;
|
3552 |
+
|
3553 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3554 |
+
$fld_label = $param;
|
3555 |
+
if(strlen($fld_label)>30) {
|
3556 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3557 |
+
$fld_label = explode("\n", $fld_label);
|
3558 |
+
$fld_label = $fld_label[0] . ' ...';
|
3559 |
+
}
|
3560 |
+
if($label_type[$i]=="type_file_upload")
|
3561 |
+
$fld_label .= '(as image)';
|
3562 |
+
?>
|
3563 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
|
3564 |
+
<?php
|
3565 |
+
}
|
3566 |
+
?>
|
3567 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
|
3568 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
|
3569 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
|
3570 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
|
3571 |
+
<input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
|
3572 |
+
<div class="verification_div" <?php echo ($row->mail_verify==0 ? 'style="display:none;"' : '')?>><input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="Verification link" onClick="insertAtCursor(<?php echo $choise; ?>,'Verification link')" /> </div>
|
3573 |
+
</div>
|
3574 |
+
<?php
|
3575 |
+
if (user_can_richedit()) {
|
3576 |
+
wp_editor($row->script_mail_user, 'script_mail_user', array('teeny' => FALSE, 'textarea_name' => 'script_mail_user', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
3577 |
+
}
|
3578 |
+
else {
|
3579 |
+
?>
|
3580 |
+
<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>
|
3581 |
+
<?php
|
3582 |
+
}
|
3583 |
+
?>
|
3584 |
+
</td>
|
3585 |
+
</tr>
|
3586 |
+
</table>
|
3587 |
+
</fieldset>
|
3588 |
+
</fieldset>
|
3589 |
+
<fieldset id="actions_fieldset" class="adminform fm_fieldset_deactive">
|
3590 |
+
<legend>Actions after submission</legend>
|
3591 |
+
<table class="admintable">
|
3592 |
+
<tr valign="top">
|
3593 |
+
<td class="fm_options_label">
|
3594 |
+
<label>Action type</label>
|
3595 |
+
</td>
|
3596 |
+
<td class="fm_options_value">
|
3597 |
+
<div>
|
3598 |
+
<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" : ""; ?> />
|
3599 |
+
<label for="text_type_none">Stay on Form</label>
|
3600 |
+
</div>
|
3601 |
+
<div>
|
3602 |
+
<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" : ""; ?> />
|
3603 |
+
<label for="text_type_post">Post</label>
|
3604 |
+
</div>
|
3605 |
+
<div>
|
3606 |
+
<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" : ""; ?> />
|
3607 |
+
<label for="text_type_page">Page</label>
|
3608 |
+
</div>
|
3609 |
+
<div>
|
3610 |
+
<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" : ""; ?> />
|
3611 |
+
<label for="text_type_custom_text">Custom Text</label>
|
3612 |
+
</div>
|
3613 |
+
<div>
|
3614 |
+
<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" : ""; ?> />
|
3615 |
+
<label for="text_type_url">URL</label>
|
3616 |
+
</div>
|
3617 |
+
</td>
|
3618 |
+
</tr>
|
3619 |
+
<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"' : ''); ?>>
|
3620 |
+
<td class="fm_options_label">
|
3621 |
+
<label>Stay on Form</label>
|
3622 |
+
</td>
|
3623 |
+
<td class="fm_options_value">
|
3624 |
+
<img src="<?php echo WD_FMC_URL . '/images/verified.png'; ?>" border="0">
|
3625 |
+
</td>
|
3626 |
+
</tr>
|
3627 |
+
<tr id="post" <?php echo (($row->submit_text_type != 2) ? 'style="display:none"' : ''); ?>>
|
3628 |
+
<td class="fm_options_label">
|
3629 |
+
<label for="post_name">Post</label>
|
3630 |
+
</td>
|
3631 |
+
<td class="fm_options_value">
|
3632 |
+
<select id="post_name" name="post_name">
|
3633 |
+
<option value="0">- Select Post -</option>
|
3634 |
+
<?php
|
3635 |
+
$args = array('posts_per_page' => 10000);
|
3636 |
+
query_posts($args);
|
3637 |
+
while (have_posts()) : the_post(); ?>
|
3638 |
+
<option value="<?php $x = get_permalink(get_the_ID()); echo $x; ?>" <?php echo (($row->article_id == $x) ? 'selected="selected"' : ''); ?>><?php the_title(); ?></option>
|
3639 |
+
<?php
|
3640 |
+
endwhile;
|
3641 |
+
wp_reset_query();
|
3642 |
+
?>
|
3643 |
+
</select>
|
3644 |
+
</td>
|
3645 |
+
</tr>
|
3646 |
+
<tr id="page" <?php echo (($row->submit_text_type != 5) ? 'style="display:none"' : ''); ?>>
|
3647 |
+
<td class="fm_options_label">
|
3648 |
+
<label for="page_name">Page</label>
|
3649 |
+
</td>
|
3650 |
+
<td class="fm_options_value">
|
3651 |
+
<select id="page_name" name="page_name">
|
3652 |
+
<option value="0">- Select Page -</option>
|
3653 |
+
<?php
|
3654 |
+
$pages = get_pages();
|
3655 |
+
foreach ($pages as $page) {
|
3656 |
+
$page_id = get_page_link($page->ID);
|
3657 |
+
?>
|
3658 |
+
<option value="<?php echo $page_id; ?>" <?php echo (($row->article_id == $page_id) ? 'selected="selected"' : ''); ?>><?php echo $page->post_title; ?></option>
|
3659 |
+
<?php
|
3660 |
+
}
|
3661 |
+
wp_reset_query();
|
3662 |
+
?>
|
3663 |
+
</select>
|
3664 |
+
</td>
|
3665 |
+
</tr>
|
3666 |
+
<tr id="custom_text" <?php echo (($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
|
3667 |
+
<td class="fm_options_label">
|
3668 |
+
<label for="submit_text">Text</label>
|
3669 |
+
</td>
|
3670 |
+
<td class="fm_options_value">
|
3671 |
+
<?php $choise = "document.getElementById('submit_text')";
|
3672 |
+
for ($i = 0; $i < count($label_label); $i++) {
|
3673 |
+
if ($label_type[$i]=="type_submit_reset" || $label_type[$i]=="type_editor" || $label_type[$i]=="type_map" || $label_type[$i]=="type_mark_map" || $label_type[$i]=="type_captcha"|| $label_type[$i]=="type_recaptcha" || $label_type[$i]=="type_button" || $label_type[$i]=="type_send_copy" || $label_type[$i]=="type_file_upload")
|
3674 |
+
continue;
|
3675 |
+
|
3676 |
+
$param = htmlspecialchars(addslashes($label_label[$i]));
|
3677 |
+
$fld_label = $param;
|
3678 |
+
if(strlen($fld_label)>30) {
|
3679 |
+
$fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
|
3680 |
+
$fld_label = explode("\n", $fld_label);
|
3681 |
+
$fld_label = $fld_label[0] . ' ...';
|
3682 |
+
}
|
3683 |
+
|
3684 |
+
?>
|
3685 |
+
<input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
|
3686 |
+
<?php
|
3687 |
+
}
|
3688 |
+
?>
|
3689 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
|
3690 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
|
3691 |
+
<input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="User Id" onClick="insertAtCursor(<?php echo $choise; ?>, 'userid')" />
|
3692 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
|
3693 |
+
<input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
|
3694 |
+
<?php
|
3695 |
+
if (user_can_richedit()) {
|
3696 |
+
wp_editor($row->submit_text, 'submit_text', array('teeny' => FALSE, 'textarea_name' => 'submit_text', 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
3697 |
+
}
|
3698 |
+
else {
|
3699 |
+
?>
|
3700 |
+
<textarea cols="36" rows="5" id="submit_text" name="submit_text" style="resize: vertical;">
|
3701 |
+
<?php echo $row->submit_text; ?>
|
3702 |
+
</textarea>
|
3703 |
+
<?php
|
3704 |
+
}
|
3705 |
+
?>
|
3706 |
+
</td>
|
3707 |
+
</tr>
|
3708 |
+
<tr id="url" <?php echo (($row->submit_text_type != 4 ) ? 'style="display:none"' : ''); ?>>
|
3709 |
+
<td class="fm_options_label">
|
3710 |
+
<label for="url">URL</label>
|
3711 |
+
</td>
|
3712 |
+
<td class="fm_options_value">
|
3713 |
+
<input type="text" id="url" name="url" style="width:300px" value="<?php echo $row->url; ?>" />
|
3714 |
+
</td>
|
3715 |
+
</tr>
|
3716 |
+
</table>
|
3717 |
+
</fieldset>
|
3718 |
+
<fieldset id="payment_fieldset" class="adminform fm_fieldset_deactive">
|
3719 |
+
<legend>Payment Options</legend>
|
3720 |
+
<table class="admintable">
|
3721 |
+
<tr>
|
3722 |
+
<td colspan="2">
|
3723 |
+
<div class="error_fm" style="padding: 5px; font-size: 14px;">Paypal Options are disabled in free version.</div>
|
3724 |
+
</td>
|
3725 |
+
</tr>
|
3726 |
+
<tr valign="top">
|
3727 |
+
<td class="fm_options_label">
|
3728 |
+
<label>Turn Paypal On</label>
|
3729 |
+
</td>
|
3730 |
+
<td class="fm_options_value">
|
3731 |
+
<button name="paypal_mode" class="fm-checkbox-radio-button <?php echo $row->paypal_mode == 1 ? 'fm-text-yes' : 'fm-text-no' ?> small" onclick="fm_change_radio_checkbox_text(this); return false;" value="<?php echo $row->paypal_mode == 1 ? '1' : '0' ?>" disabled="disabled">
|
3732 |
+
<label><?php echo $row->paypal_mode == 1 ? 'On' : 'Off' ?></label>
|
3733 |
+
<span></span>
|
3734 |
+
</button>
|
3735 |
+
<input type="hidden" name="paypal_mode" value="<?php echo $row->paypal_mode; ?>"/>
|
3736 |
+
</td>
|
3737 |
+
</tr>
|
3738 |
+
<tr valign="top">
|
3739 |
+
<td class="fm_options_label">
|
3740 |
+
<label>Checkout Mode</label>
|
3741 |
+
</td>
|
3742 |
+
<td class="fm_options_value">
|
3743 |
+
<button name="checkout_mode" class="fm-checkbox-radio-button <?php echo $row->checkout_mode == 1 ? 'fm-text-yes' : 'fm-text-no' ?> large" onclick="fm_change_radio_checkbox_text(this); return false;" value="<?php echo $row->checkout_mode == 1 ? '1' : '0' ?>" disabled="disabled">
|
3744 |
+
<label><?php echo $row->checkout_mode == 1 ? 'Production' : 'Testmode' ?></label>
|
3745 |
+
<span></span>
|
3746 |
+
</button>
|
3747 |
+
<input type="hidden" name="checkout_mode" value="<?php echo $row->checkout_mode; ?>"/>
|
3748 |
+
</td>
|
3749 |
+
</tr>
|
3750 |
+
<tr valign="top">
|
3751 |
+
<td class="fm_options_label">
|
3752 |
+
<label for="paypal_email">Paypal email</label>
|
3753 |
+
</td>
|
3754 |
+
<td class="fm_options_value">
|
3755 |
+
<input type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area" style="width:250px" disabled="disabled">
|
3756 |
+
</td>
|
3757 |
+
</tr>
|
3758 |
+
<tr valign="top">
|
3759 |
+
<td class="fm_options_label">
|
3760 |
+
<label for="payment_currency">Payment Currency</label>
|
3761 |
+
</td>
|
3762 |
+
<td class="fm_options_value">
|
3763 |
+
<select id="payment_currency" name="payment_currency" disabled="disabled">
|
3764 |
+
<option value="USD" <?php echo (($row->payment_currency == 'USD') ? 'selected' : ''); ?>>$ • U.S. Dollar</option>
|
3765 |
+
<option value="EUR" <?php echo (($row->payment_currency == 'EUR') ? 'selected' : ''); ?>>€ • Euro</option>
|
3766 |
+
<option value="GBP" <?php echo (($row->payment_currency == 'GBP') ? 'selected' : ''); ?>>£ • Pound Sterling</option>
|
3767 |
+
<option value="JPY" <?php echo (($row->payment_currency == 'JPY') ? 'selected' : ''); ?>>¥ • Japanese Yen</option>
|
3768 |
+
<option value="CAD" <?php echo (($row->payment_currency == 'CAD') ? 'selected' : ''); ?>>C$ • Canadian Dollar</option>
|
3769 |
+
<option value="MXN" <?php echo (($row->payment_currency == 'MXN') ? 'selected' : ''); ?>>Mex$ • Mexican Peso</option>
|
3770 |
+
<option value="HKD" <?php echo (($row->payment_currency == 'HKD') ? 'selected' : ''); ?>>HK$ • Hong Kong Dollar</option>
|
3771 |
+
<option value="HUF" <?php echo (($row->payment_currency == 'HUF') ? 'selected' : ''); ?>>Ft • Hungarian Forint</option>
|
3772 |
+
<option value="NOK" <?php echo (($row->payment_currency == 'NOK') ? 'selected' : ''); ?>>kr • Norwegian Kroner</option>
|
3773 |
+
<option value="NZD" <?php echo (($row->payment_currency == 'NZD') ? 'selected' : ''); ?>>NZ$ • New Zealand Dollar</option>
|
3774 |
+
<option value="SGD" <?php echo (($row->payment_currency == 'SGD') ? 'selected' : ''); ?>>S$ • Singapore Dollar</option>
|
3775 |
+
<option value="SEK" <?php echo (($row->payment_currency == 'SEK') ? 'selected' : ''); ?>>kr • Swedish Kronor</option>
|
3776 |
+
<option value="PLN" <?php echo (($row->payment_currency == 'PLN') ? 'selected' : ''); ?>>zl • Polish Zloty</option>
|
3777 |
+
<option value="AUD" <?php echo (($row->payment_currency == 'AUD') ? 'selected' : ''); ?>>A$ • Australian Dollar</option>
|
3778 |
+
<option value="DKK" <?php echo (($row->payment_currency == 'DKK') ? 'selected' : ''); ?>>kr • Danish Kroner</option>
|
3779 |
+
<option value="CHF" <?php echo (($row->payment_currency == 'CHF') ? 'selected' : ''); ?>>CHF • Swiss Francs</option>
|
3780 |
+
<option value="CZK" <?php echo (($row->payment_currency == 'CZK') ? 'selected' : ''); ?>>Kc • Czech Koruny</option>
|
3781 |
+
<option value="ILS" <?php echo (($row->payment_currency == 'ILS') ? 'selected' : ''); ?>>₪ • Israeli Sheqel</option>
|
3782 |
+
<option value="BRL" <?php echo (($row->payment_currency == 'BRL') ? 'selected' : ''); ?>>R$ • Brazilian Real</option>
|
3783 |
+
<option value="TWD" <?php echo (($row->payment_currency == 'TWD') ? 'selected' : ''); ?>>NT$ • Taiwan New Dollars</option>
|
3784 |
+
<option value="MYR" <?php echo (($row->payment_currency == 'MYR') ? 'selected' : ''); ?>>RM • Malaysian Ringgit</option>
|
3785 |
+
<option value="PHP" <?php echo (($row->payment_currency == 'PHP') ? 'selected' : ''); ?>>₱ • Philippine Peso</option>
|
3786 |
+
<option value="THB" <?php echo (($row->payment_currency == 'THB') ? 'selected' : ''); ?>>฿ • Thai Bahtv</option>
|
3787 |
+
</select>
|
3788 |
+
</td>
|
3789 |
+
</tr>
|
3790 |
+
<tr valign="top">
|
3791 |
+
<td class="fm_options_label">
|
3792 |
+
<label for="tax">Tax</label>
|
3793 |
+
</td>
|
3794 |
+
<td class="fm_options_value">
|
3795 |
+
<input type="text" name="tax" id="tax" value="<?php echo $row->tax; ?>" class="text_area" style="width: 40px;" onKeyPress="return check_isnum_point(event)" disabled="disabled"> %
|
3796 |
+
</td>
|
3797 |
+
</tr>
|
3798 |
+
</table>
|
3799 |
+
</fieldset>
|
3800 |
+
<fieldset id="javascript_fieldset" class="adminform fm_fieldset_deactive">
|
3801 |
+
<legend>JavaScript</legend>
|
3802 |
+
<table class="admintable">
|
3803 |
+
<tr valign="top">
|
3804 |
+
<td class="fm_options_label">
|
3805 |
+
<label for="javascript">Javascript</label>
|
3806 |
+
</td>
|
3807 |
+
<td class="fm_options_value" style="width:650px;">
|
3808 |
+
<textarea style="margin: 0px; height: 400px; width: 600px;" cols="60" rows="30" name="javascript" id="form_javascript"><?php echo $row->javascript; ?></textarea>
|
3809 |
+
</td>
|
3810 |
+
</tr>
|
3811 |
+
</table>
|
3812 |
+
</fieldset>
|
3813 |
+
<fieldset id="conditions_fieldset" class="adminform fm_fieldset_deactive">
|
3814 |
+
<?php
|
3815 |
+
$ids = array();
|
3816 |
+
$types = array();
|
3817 |
+
$labels = array();
|
3818 |
+
$paramss = array();
|
3819 |
+
$all_ids = array();
|
3820 |
+
$all_labels = array();
|
3821 |
+
|
3822 |
+
$select_and_input = array("type_text", "type_password", "type_textarea", "type_name", "type_number", "type_phone", "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");
|
3823 |
$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");
|
3824 |
|
3825 |
$fields=explode('*:*new_field*:*',$row->form_fields);
|
3826 |
$fields = array_slice($fields,0, count($fields)-1);
|
3827 |
+
foreach($fields as $field) {
|
|
|
3828 |
$temp=explode('*:*id*:*',$field);
|
3829 |
array_push($ids, $temp[0]);
|
3830 |
array_push($all_ids, $temp[0]);
|
3837 |
|
3838 |
}
|
3839 |
|
3840 |
+
foreach($types as $key=>$value){
|
3841 |
+
if(!in_array($types[$key],$select_and_input)){
|
|
|
|
|
3842 |
unset($ids[$key]);
|
3843 |
unset($labels[$key]);
|
3844 |
unset($types[$key]);
|
3851 |
$types = array_values($types);
|
3852 |
$paramss = array_values($paramss);
|
3853 |
|
|
|
3854 |
$chose_ids = implode('@@**@@',$ids);
|
3855 |
$chose_labels = implode('@@**@@',$labels);
|
3856 |
$chose_types = implode('@@**@@',$types);
|
3857 |
$chose_paramss = implode('@@**@@',$paramss);
|
3858 |
+
|
3859 |
$all_ids_cond = implode('@@**@@',$all_ids);
|
3860 |
$all_labels_cond = implode('@@**@@',$all_labels);
|
3861 |
|
3865 |
$condition_params = array();
|
3866 |
|
3867 |
$count_of_conditions=0;
|
3868 |
+
if($row->condition!="") {
|
|
|
3869 |
$conditions=explode('*:*new_condition*:*',$row->condition);
|
3870 |
$conditions = array_slice($conditions,0, count($conditions)-1);
|
3871 |
$count_of_conditions = count($conditions);
|
3872 |
|
3873 |
+
foreach($conditions as $condition) {
|
|
|
3874 |
$temp=explode('*:*show_hide*:*',$condition);
|
3875 |
array_push($show_hide, $temp[0]);
|
3876 |
$temp=explode('*:*field_label*:*',$temp[1]);
|
3879 |
array_push($all_any, $temp[0]);
|
3880 |
array_push($condition_params, $temp[1]);
|
3881 |
}
|
|
|
3882 |
}
|
3883 |
+
else {
|
|
|
3884 |
$show_hide[0]=1;
|
3885 |
$all_any[0]='and';
|
3886 |
$condition_params[0]='';
|
3889 |
}
|
3890 |
?>
|
3891 |
<div>
|
3892 |
+
<button class="fm-button add-button large" onclick="add_condition('<?php echo $chose_ids; ?>', '<?php echo htmlspecialchars(addslashes($chose_labels)); ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>', '<?php echo $all_ids_cond; ?>', '<?php echo htmlspecialchars(addslashes($all_labels_cond)); ?>'); return false;">
|
3893 |
+
Add Condition
|
3894 |
+
<span></span>
|
3895 |
+
</button>
|
3896 |
</div>
|
3897 |
+
<?php
|
3898 |
+
for($k=0; $k<$count_of_conditions; $k++) {
|
3899 |
+
if(in_array($field_label[$k],$all_ids)) : ?>
|
3900 |
+
<div id="condition<?php echo $k; ?>" class="fm-condition">
|
3901 |
+
<div id="conditional_fileds<?php echo $k; ?>">
|
3902 |
+
<select id="show_hide<?php echo $k; ?>" name="show_hide<?php echo $k; ?>" style="width:80px; ">
|
3903 |
+
<option value="1" <?php if($show_hide[$k]==1) echo 'selected="selected"'; ?>>show</option>
|
3904 |
+
<option value="0" <?php if($show_hide[$k]==0) echo 'selected="selected"'; ?>>hide</option>
|
3905 |
+
</select>
|
3906 |
+
<select id="fields<?php echo $k; ?>" name="fields<?php echo $k; ?>" style="width:300px; " onChange="" >
|
3907 |
+
<?php
|
3908 |
+
foreach($all_labels as $key => $value) {
|
3909 |
+
if($field_label[$k]==$all_ids[$key])
|
3910 |
+
$selected = 'selected="selected"';
|
3911 |
+
else
|
3912 |
+
$selected ='';
|
3913 |
+
echo '<option value="'.$all_ids[$key].'" '.$selected.'>'.$value.'</option>';
|
3914 |
+
}
|
3915 |
+
?>
|
3916 |
+
</select>
|
3917 |
+
<span>if</span>
|
3918 |
+
<select id="all_any<?php echo $k; ?>" name="all_any<?php echo $k; ?>" style="width:60px; ">
|
3919 |
+
<option value="and" <?php if($all_any[$k]=="and") echo 'selected="selected"'; ?>>all</option>
|
3920 |
+
<option value="or" <?php if($all_any[$k]=="or") echo 'selected="selected"'; ?>>any</option>
|
3921 |
+
</select>
|
3922 |
+
<span>of the following match:</span>
|
3923 |
+
<img src="<?php echo WD_FMC_URL . '/images/add.png?ver='. get_option("wd_form_maker_version").''; ?>" title="add" onclick="add_condition_fields(<?php echo $k; ?>,'<?php echo $chose_ids; ?>', '<?php echo htmlspecialchars(addslashes($chose_labels)); ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>')" style="cursor: pointer; vertical-align: middle;">
|
3924 |
+
<img src="<?php echo WD_FMC_URL . '/images/page_delete.png?ver='. get_option("wd_form_maker_version").''; ?>" onclick="delete_condition('<?php echo $k; ?>')" style="cursor: pointer; vertical-align: middle;">
|
3925 |
+
</div>
|
3926 |
+
<?php
|
3927 |
+
if($condition_params[$k]) {
|
3928 |
+
$_params = explode('*:*next_condition*:*',$condition_params[$k]);
|
3929 |
+
$_params = array_slice($_params,0, count($_params)-1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3930 |
|
3931 |
+
foreach($_params as $key=>$_param) {
|
3932 |
+
$key_select_or_input ='';
|
3933 |
+
$param_values = explode('***',$_param);
|
3934 |
+
$multiselect = explode('@@@',$param_values[2]);
|
|
|
3935 |
|
3936 |
+
if(in_array($param_values[0],$ids)): ?>
|
3937 |
+
<div id="condition_div<?php echo $k; ?>_<?php echo $key; ?>">
|
3938 |
+
<select id="field_labels<?php echo $k; ?>_<?php echo $key; ?>" onchange="change_choices(this.options[this.selectedIndex].id+'_<?php echo $key; ?>','<?php echo $chose_ids; ?>', '<?php echo $chose_types; ?>', '<?php echo htmlspecialchars(addslashes($chose_paramss)); ?>')" style="width:300px;"/>
|
3939 |
+
<?php
|
3940 |
+
foreach($labels as $key1 => $value)
|
3941 |
+
{
|
3942 |
+
if($param_values[0]==$ids[$key1])
|
3943 |
+
{
|
3944 |
+
$selected = 'selected="selected"';
|
3945 |
+
if ($types[$key1]=="type_checkbox" || $types[$key1]=="type_paypal_checkbox")
|
3946 |
+
$multiple = 'multiple="multiple" class="multiple_select"';
|
3947 |
+
else
|
3948 |
+
$multiple ='';
|
3949 |
+
|
3950 |
+
$key_select_or_input = $key1;
|
3951 |
+
}
|
3952 |
+
else
|
3953 |
+
$selected ='';
|
3954 |
+
if($field_label[$k]!=$ids[$key1])
|
3955 |
+
echo '<option id="'.$k.'_'.$key1.'" value="'.$ids[$key1].'" '.$selected.'>'.$value.'</option>';
|
3956 |
|
3957 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3958 |
|
3959 |
+
?>
|
3960 |
+
</select>
|
3961 |
+
|
3962 |
+
<select id="is_select<?php echo $k; ?>_<?php echo $key; ?>" style="vertical-align: top; width:94px;">
|
3963 |
+
<option value="==" <?php if($param_values[1]=="==") echo 'selected="selected"'; ?>>is</option>
|
3964 |
+
<option value="!=" <?php if($param_values[1]=="!=") echo 'selected="selected"'; ?>>is not</option>
|
3965 |
+
<option value="%" <?php if($param_values[1]=="%") echo 'selected="selected"'; ?>>like</option>
|
3966 |
+
|
3967 |
+
<option value="!%" <?php if($param_values[1]=="!%") echo 'selected="selected"'; ?>>not like</option>
|
3968 |
+
|
3969 |
+
<option value="=" <?php if($param_values[1]=="=") echo 'selected="selected"'; ?>>empty</option>
|
3970 |
+
|
3971 |
+
<option value="!" <?php if($param_values[1]=="!") echo 'selected="selected"'; ?>>not empty</option>
|
3972 |
+
|
3973 |
+
</select>
|
3974 |
+
|
3975 |
+
<?php if ($key_select_or_input !== '' && in_array($types[$key_select_or_input],$select_type_fields)) : ?>
|
3976 |
+
<select id="field_value<?php echo $k; ?>_<?php echo $key; ?>" <?php echo $multiple; ?> style="width: 200px;">
|
3977 |
+
<?php
|
3978 |
+
switch($types[$key_select_or_input])
|
3979 |
{
|
3980 |
+
case "type_own_select":
|
3981 |
+
case "type_paypal_select":
|
3982 |
+
$w_size = explode('*:*w_size*:*',$paramss[$key_select_or_input]);
|
3983 |
+
break;
|
3984 |
+
|
3985 |
+
case "type_radio":
|
3986 |
+
case "type_checkbox":
|
3987 |
+
case "type_paypal_radio":
|
3988 |
+
case "type_paypal_checkbox":
|
3989 |
+
case "type_paypal_shipping":
|
3990 |
+
$w_size = explode('*:*w_flow*:*',$paramss[$key_select_or_input]);
|
3991 |
+
break;
|
3992 |
}
|
3993 |
+
|
3994 |
+
$w_choices = explode('*:*w_choices*:*',$w_size[1]);
|
3995 |
+
$w_choices_array = explode('***',$w_choices[0]);
|
3996 |
+
|
3997 |
+
$w_choices_price = explode('*:*w_choices_price*:*',$w_choices[1]);
|
3998 |
+
$w_choices_price_array = explode('***',$w_choices_price[0]);
|
3999 |
+
|
4000 |
+
for($m=0; $m<count($w_choices_array); $m++)
|
4001 |
+
{
|
4002 |
+
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")
|
4003 |
+
$w_choice = $w_choices_array[$m].'*:*value*:*'.$w_choices_price_array[$m];
|
4004 |
+
else
|
4005 |
+
$w_choice = $w_choices_array[$m];
|
4006 |
+
|
4007 |
+
if(in_array(esc_html($w_choice),$multiselect))
|
4008 |
+
{
|
4009 |
+
$selected = 'selected="selected"';
|
4010 |
+
}
|
4011 |
+
else
|
4012 |
+
$selected ='';
|
4013 |
+
|
4014 |
+
if(strpos($w_choices_array[$m], '[') === false && strpos($w_choices_array[$m], ']') === false && strpos($w_choices_array[$m], ':') === false) {
|
4015 |
+
echo '<option id="choise_'.$k.'_'.$m.'" value="'.$w_choice.'" '.$selected.'>'.$w_choices_array[$m].'</option>';
|
4016 |
+
}
|
4017 |
}
|
4018 |
+
|
4019 |
+
if($types[$key_select_or_input]=="type_address")
|
4020 |
+
{
|
4021 |
+
$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");
|
4022 |
+
$w_options = '';
|
4023 |
+
foreach($w_countries as $w_country)
|
4024 |
+
{
|
4025 |
+
if(in_array($w_country,$multiselect))
|
4026 |
+
{
|
4027 |
+
$selected = 'selected="selected"';
|
4028 |
+
}
|
4029 |
+
else
|
4030 |
+
$selected ='';
|
4031 |
+
|
4032 |
+
echo '<option value="'.$w_country.'" '.$selected.'>'.$w_country.'</option>';
|
4033 |
+
}
|
4034 |
+
}
|
4035 |
+
|
4036 |
+
?>
|
4037 |
+
</select>
|
4038 |
+
<?php else :
|
4039 |
+
if($key_select_or_input != '' && ($types[$key_select_or_input]=="type_number" || $types[$key_select_or_input]=="type_phone"))
|
4040 |
+
$onkeypress_function = "onkeypress='return check_isnum_space(event)'";
|
4041 |
else
|
4042 |
+
if($key_select_or_input != '' && $types[$key_select_or_input]=="type_paypal_price")
|
4043 |
+
$onkeypress_function = "onkeypress='return check_isnum_point(event)'";
|
4044 |
+
else
|
4045 |
+
$onkeypress_function = "";
|
4046 |
+
?>
|
4047 |
+
<input id="field_value<?php echo $k; ?>_<?php echo $key; ?>" type="text" value="<?php echo $param_values[2];?>" <?php echo $onkeypress_function; ?> style=" width: 200px;"><?php endif; ?>
|
4048 |
+
|
4049 |
+
<img src="<?php echo WD_FMC_URL . '/images/delete.png?ver='. get_option("wd_form_maker_version").''; ?>" id="delete_condition<?php echo $k; ?>_<?php echo $key; ?>" onclick="delete_field_condition('<?php echo $k; ?>_<?php echo $key; ?>')" style="vertical-align: middle;">
|
4050 |
+
</div>
|
4051 |
+
<?php endif;
|
4052 |
+
}
|
4053 |
}
|
|
|
4054 |
|
4055 |
+
?>
|
4056 |
+
</div>
|
4057 |
+
<?php endif;
|
4058 |
+
}
|
4059 |
+
?>
|
4060 |
+
<input type="hidden" id="condition" name="condition" value="<?php echo $row->condition; ?>" />
|
4061 |
+
</fieldset>
|
4062 |
|
4063 |
+
</div>
|
4064 |
+
<input type="hidden" name="boxchecked" value="0">
|
4065 |
+
<input type="hidden" name="fieldset_id" id="fieldset_id" value="<?php echo WDW_FMC_Library::get('fieldset_id', 'general'); ?>" />
|
4066 |
+
<input type="hidden" id="task" name="task" value=""/>
|
4067 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
4068 |
+
</form>
|
4069 |
+
<script>
|
4070 |
+
jQuery(window).load(function () {
|
4071 |
+
form_maker_options_tabs(jQuery("#fieldset_id").val());
|
4072 |
+
fm_popup();
|
4073 |
+
function hide_email_labels(event) {
|
4074 |
+
var e = event.toElement || event.relatedTarget;
|
4075 |
+
if (e.parentNode == this || e == this) {
|
4076 |
+
return;
|
4077 |
+
}
|
4078 |
+
this.style.display="none";
|
4079 |
+
}
|
4080 |
+
if(document.getElementById('mail_from_labels')) {
|
4081 |
+
document.getElementById('mail_from_labels').addEventListener('mouseout',hide_email_labels,true);
|
4082 |
+
}
|
4083 |
+
if(document.getElementById('mail_subject_labels')) {
|
4084 |
+
document.getElementById('mail_subject_labels').addEventListener('mouseout',hide_email_labels,true);
|
4085 |
+
}
|
4086 |
+
if(document.getElementById('mail_from_name_user_labels')) {
|
4087 |
+
document.getElementById('mail_from_name_user_labels').addEventListener('mouseout',hide_email_labels,true);
|
4088 |
+
}
|
4089 |
+
if(document.getElementById('mail_subject_user_labels')) {
|
4090 |
+
document.getElementById('mail_subject_user_labels').addEventListener('mouseout',hide_email_labels,true);
|
4091 |
+
}
|
4092 |
+
if(document.getElementById('post_title_labels')) {
|
4093 |
+
document.getElementById('post_title_labels').addEventListener('mouseout',hide_email_labels,true);
|
4094 |
+
}
|
4095 |
+
if(document.getElementById('post_tags_labels')) {
|
4096 |
+
document.getElementById('post_tags_labels').addEventListener('mouseout',hide_email_labels,true);
|
4097 |
+
}
|
4098 |
+
if(document.getElementById('post_featured_image_labels')) {
|
4099 |
+
document.getElementById('post_featured_image_labels').addEventListener('mouseout',hide_email_labels,true);
|
4100 |
+
}
|
4101 |
+
if(document.getElementById('dbox_upload_dir_labels')) {
|
4102 |
+
document.getElementById('dbox_upload_dir_labels').addEventListener('mouseout',hide_email_labels,true);
|
4103 |
+
}
|
4104 |
+
});
|
4105 |
+
function wd_fm_apply_options(task) {
|
4106 |
+
set_condition();
|
4107 |
+
fm_set_input_value('task', task);
|
4108 |
+
document.getElementById('adminForm').submit();
|
4109 |
+
}
|
4110 |
+
</script>
|
4111 |
+
<?php
|
4112 |
+
}
|
4113 |
|
4114 |
+
public function form_layout($id) {
|
4115 |
+
$row = $this->model->get_row_data($id);
|
4116 |
+
$ids = array();
|
4117 |
+
$types = array();
|
4118 |
+
$labels = array();
|
4119 |
+
$fields = explode('*:*new_field*:*', $row->form_fields);
|
4120 |
+
$fields = array_slice($fields, 0, count($fields) - 1);
|
4121 |
+
foreach ($fields as $field) {
|
4122 |
+
$temp = explode('*:*id*:*', $field);
|
4123 |
+
array_push($ids, $temp[0]);
|
4124 |
+
$temp = explode('*:*type*:*', $temp[1]);
|
4125 |
+
array_push($types, $temp[0]);
|
4126 |
+
$temp = explode('*:*w_field_label*:*', $temp[1]);
|
4127 |
+
array_push($labels, $temp[0]);
|
4128 |
+
}
|
4129 |
?>
|
4130 |
+
<script>
|
4131 |
+
var form_front = '<?php echo addslashes($row->form_front);?>';
|
4132 |
+
var custom_front = '<?php echo addslashes($row->custom_front);?>';
|
4133 |
+
if (custom_front == '') {
|
4134 |
+
custom_front = form_front;
|
4135 |
+
}
|
4136 |
+
function submitbutton() {
|
4137 |
+
if (jQuery('#autogen_layout').is(':checked')) {
|
4138 |
+
jQuery('#custom_front').val(custom_front.replace(/\s+/g, ' ').replace(/> </g, '><'));
|
4139 |
+
}
|
4140 |
+
else {
|
4141 |
+
jQuery('#custom_front').val(editor.getValue().replace(/\s+/g, ' ').replace(/> </g, '><'));
|
4142 |
+
}
|
4143 |
+
}
|
4144 |
+
function insertAtCursor_form(myId, myLabel) {
|
4145 |
+
if (jQuery('#autogen_layout').is(':checked')) {
|
4146 |
+
alert("Uncheck the Auto-Generate Layout box.");
|
4147 |
+
return;
|
4148 |
+
}
|
4149 |
+
myValue = '<div wdid="' + myId + '" class="wdform_row">%' + myId + ' - ' + myLabel + '%</div>';
|
4150 |
+
line = editor.getCursor().line;
|
4151 |
+
ch = editor.getCursor().ch;
|
4152 |
+
text = editor.getLine(line);
|
4153 |
+
text1 = text.substr(0, ch);
|
4154 |
+
text2 = text.substr(ch);
|
4155 |
+
text = text1 + myValue + text2;
|
4156 |
+
editor.setLine(line, text);
|
4157 |
+
editor.focus();
|
4158 |
+
}
|
4159 |
+
function autogen(status) {
|
4160 |
+
if (status) {
|
4161 |
+
custom_front = editor.getValue();
|
4162 |
+
editor.setValue(form_front);
|
4163 |
+
editor.setOption('readOnly', true);
|
4164 |
+
autoFormat();
|
4165 |
+
}
|
4166 |
+
else {
|
4167 |
+
editor.setValue(custom_front);
|
4168 |
+
editor.setOption('readOnly', false);
|
4169 |
+
autoFormat();
|
4170 |
+
}
|
4171 |
+
}
|
4172 |
+
function autoFormat() {
|
4173 |
+
CodeMirror.commands["selectAll"](editor);
|
4174 |
+
editor.autoFormatRange(editor.getCursor(true), editor.getCursor(false));
|
4175 |
+
editor.scrollTo(0,0);
|
4176 |
+
}
|
4177 |
+
</script>
|
4178 |
|
4179 |
+
<div class="fm_layout">
|
4180 |
+
<form action="admin.php?page=manage_fmc" method="post" name="adminForm" enctype="multipart/form-data">
|
4181 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
4182 |
+
<div class="fm-layout-actions">
|
4183 |
+
<div class="fm-page-actions">
|
4184 |
+
<button class="fm-button save-button small" onclick="submitbutton(); fm_set_input_value('task', 'save_layout');">
|
4185 |
+
Save
|
4186 |
+
<span></span>
|
4187 |
+
</button>
|
4188 |
+
<button class="fm-button apply-button small" onclick="submitbutton(); fm_set_input_value('task', 'apply_layout');">
|
4189 |
+
Apply
|
4190 |
+
<span></span>
|
4191 |
+
</button>
|
4192 |
+
<button class="fm-button cancel-button small" onclick="fm_set_input_value('task', 'cancel_options');">
|
4193 |
+
Cancel
|
4194 |
+
<span></span>
|
4195 |
+
</button>
|
4196 |
+
</div>
|
4197 |
+
</div>
|
4198 |
+
<div class="fm-layout-content">
|
4199 |
+
<h2 style="clear: both;">Description</h2>
|
4200 |
+
<p>To customize the layout of the form fields uncheck the Auto-Generate Layout box and edit the HTML.</p>
|
4201 |
+
<p>You can change positioning, add in-line styles and etc. Click on the provided buttons to add the corresponding field.<br /> This will add the following line:
|
4202 |
+
<b><span class="cm-tag"><div</span> <span class="cm-attribute">wdid</span>=<span class="cm-string">"example_id"</span> <span class="cm-attribute">class</span>=<span class="cm-string">"wdform_row"</span><span class="cm-tag">></span>%example_id - Example%<span class="cm-tag"></div></span></b>
|
4203 |
+
, where <b><span class="cm-tag"><div></span></b> is used to set a row.</p>
|
4204 |
+
<p>To return to the default settings you should check Auto-Generate Layout box.</p>
|
4205 |
+
<h3 style="color:red">Notice</h3>
|
4206 |
+
<p>Make sure not to publish the same field twice. This will cause malfunctioning of the form.</p>
|
4207 |
+
<hr/>
|
4208 |
+
<label for="autogen_layout" style="font-size: 20px; line-height: 45px; margin-left: 10px;">Auto Generate Layout? </label>
|
4209 |
+
<input type="checkbox" value="1" name="autogen_layout" id="autogen_layout" <?php echo (($row->autogen_layout) ? 'checked="checked"' : ''); ?> />
|
4210 |
+
<input type="hidden" name="custom_front" id="custom_front" value="" />
|
4211 |
+
<input type="hidden" id="task" name="task" value=""/>
|
4212 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
|
4213 |
+
<br/>
|
4214 |
+
<?php
|
4215 |
+
foreach($ids as $key => $id) {
|
4216 |
+
if ($types[$key] != "type_section_break") {
|
4217 |
+
?>
|
4218 |
+
<button onClick="insertAtCursor_form('<?php echo $ids[$key]; ?>','<?php echo $labels[$key]; ?>')" class="fm_label_buttons" title="<?php echo $labels[$key]; ?>"><?php echo $labels[$key]; ?></button>
|
4219 |
+
<?php
|
4220 |
+
}
|
4221 |
+
}
|
4222 |
+
?>
|
4223 |
+
</form>
|
4224 |
+
</div>
|
4225 |
+
<br /><br />
|
4226 |
+
<button class="fm_submit_layout button button-secondary button-hero" onclick="autoFormat()"><strong>Apply Source Formatting</strong> <em>(ctrl-enter)</em></button>
|
4227 |
+
<textarea id="source" name="source" style="display: none;"></textarea>
|
4228 |
+
</div>
|
4229 |
+
<script>
|
4230 |
+
var editor = CodeMirror.fromTextArea(document.getElementById("source"), {
|
4231 |
+
lineNumbers: true,
|
4232 |
+
lineWrapping: true,
|
4233 |
+
mode: "htmlmixed",
|
4234 |
+
value: form_front
|
4235 |
+
});
|
4236 |
+
if (jQuery('#autogen_layout').is(':checked')) {
|
4237 |
+
editor.setOption('readOnly', true);
|
4238 |
+
editor.setValue(form_front);
|
4239 |
+
}
|
4240 |
+
else {
|
4241 |
+
editor.setOption('readOnly', false);
|
4242 |
+
editor.setValue(custom_front);
|
4243 |
+
}
|
4244 |
+
jQuery('#autogen_layout').click(function() {
|
4245 |
+
autogen(jQuery(this).is(':checked'));
|
4246 |
+
});
|
4247 |
+
autoFormat();
|
4248 |
+
</script>
|
4249 |
+
<?php
|
4250 |
+
}
|
4251 |
|
4252 |
////////////////////////////////////////////////////////////////////////////////////////
|
4253 |
// Getters & Setters //
|
admin/views/FMViewShow_matrix_fmc.php
DELETED
@@ -1,127 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class FMViewShow_matrix {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $model;
|
14 |
-
|
15 |
-
|
16 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
17 |
-
// Constructor & Destructor //
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
public function __construct($model) {
|
20 |
-
$this->model = $model;
|
21 |
-
}
|
22 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
23 |
-
// Public Methods //
|
24 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
25 |
-
public function display() {
|
26 |
-
$matrix_params = ((isset($_GET['matrix_params'])) ? esc_html(stripslashes($_GET['matrix_params'])) : 0);
|
27 |
-
$new_filename = str_replace("***matrix***", '', $matrix_params);
|
28 |
-
$new_filename = explode('***', $matrix_params);
|
29 |
-
$mat_params = array_slice($new_filename, 0, count($new_filename) - 1);
|
30 |
-
$mat_rows = $mat_params[0];
|
31 |
-
$mat_columns = $mat_params[$mat_rows + 1];
|
32 |
-
?>
|
33 |
-
<table style="margin: 0 auto;">
|
34 |
-
<tr>
|
35 |
-
<td></td>
|
36 |
-
<?php
|
37 |
-
for ($k = 1; $k <= $mat_columns; $k++) {
|
38 |
-
?>
|
39 |
-
<td style="background-color: #BBBBBB; padding: 5px;"><?php echo $mat_params[$mat_rows + 1 + $k]; ?></td>
|
40 |
-
<?php
|
41 |
-
}
|
42 |
-
?>
|
43 |
-
</tr>
|
44 |
-
<?php
|
45 |
-
$aaa = Array();
|
46 |
-
$var_checkbox = 1;
|
47 |
-
for ($k = 1; $k <= $mat_rows; $k++) {
|
48 |
-
?>
|
49 |
-
<tr>
|
50 |
-
<td style="background-color: #BBBBBB; padding: 5px; "><?php echo $mat_params[$k]; ?></td>
|
51 |
-
<?php
|
52 |
-
if ($mat_params[$mat_rows + $mat_columns + 2] == "radio") {
|
53 |
-
if ($mat_params[$mat_rows + $mat_columns + 2 + $k] == 0) {
|
54 |
-
$checked = 0;
|
55 |
-
$aaa[1] = "";
|
56 |
-
}
|
57 |
-
else {
|
58 |
-
$aaa = explode("_", $mat_params[$mat_rows + $mat_columns + 2 + $k]);
|
59 |
-
}
|
60 |
-
for ($l = 1; $l <= $mat_columns; $l++) {
|
61 |
-
if ($aaa[1] == $l) {
|
62 |
-
$checked = "checked";
|
63 |
-
}
|
64 |
-
else {
|
65 |
-
$checked = "";
|
66 |
-
}
|
67 |
-
?>
|
68 |
-
<td style="text-align: center;"><input type="radio" <?php echo $checked; ?> disabled /></td>
|
69 |
-
<?php
|
70 |
-
}
|
71 |
-
}
|
72 |
-
else {
|
73 |
-
if ($mat_params[$mat_rows + $mat_columns + 2] == "checkbox") {
|
74 |
-
for ($l = 1; $l <= $mat_columns; $l++) {
|
75 |
-
if ($mat_params[$mat_rows+$mat_columns + 2 + $var_checkbox] == "1") {
|
76 |
-
$checked = "checked";
|
77 |
-
}
|
78 |
-
else {
|
79 |
-
$checked = "";
|
80 |
-
}
|
81 |
-
?>
|
82 |
-
<td style="text-align:center"><input type="checkbox" <?php echo $checked; ?> disabled /></td>
|
83 |
-
<?php
|
84 |
-
$var_checkbox++;
|
85 |
-
}
|
86 |
-
}
|
87 |
-
else {
|
88 |
-
if ($mat_params[$mat_rows + $mat_columns + 2] == "text") {
|
89 |
-
for ($l = 1; $l <= $mat_columns; $l++) {
|
90 |
-
$checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
|
91 |
-
?>
|
92 |
-
<td style="text-align:center"><input type="text" value="<?php echo $checked; ?>" disabled /></td>
|
93 |
-
<?php
|
94 |
-
$var_checkbox++;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
else {
|
98 |
-
for ($l = 1; $l <= $mat_columns; $l++) {
|
99 |
-
$checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
|
100 |
-
?>
|
101 |
-
<td style="text-align: center;"><?php echo $checked; ?></td>
|
102 |
-
<?php
|
103 |
-
$var_checkbox++;
|
104 |
-
}
|
105 |
-
}
|
106 |
-
}
|
107 |
-
}
|
108 |
-
?>
|
109 |
-
</tr>
|
110 |
-
<?php
|
111 |
-
}
|
112 |
-
?>
|
113 |
-
</table>
|
114 |
-
<?php
|
115 |
-
die();
|
116 |
-
}
|
117 |
-
|
118 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
119 |
-
// Getters & Setters //
|
120 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
121 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
122 |
-
// Private Methods //
|
123 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
124 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
125 |
-
// Listeners //
|
126 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
127 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/views/FMViewSubmissions_fmc.php
CHANGED
@@ -1,784 +1,918 @@
|
|
1 |
<?php
|
2 |
|
3 |
class FMViewSubmissions_fmc {
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
// Constructor & Destructor //
|
17 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
-
public function __construct($model) {
|
19 |
-
$this->model = $model;
|
20 |
-
}
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
renderColumns();
|
118 |
-
}
|
119 |
-
function remove_all() {
|
120 |
-
document.getElementById('startdate').value = '';
|
121 |
-
document.getElementById('enddate').value = '';
|
122 |
-
document.getElementById('ip_search').value = '';
|
123 |
-
document.getElementById('username_search').value='';
|
124 |
-
document.getElementById('useremail_search').value='';
|
125 |
-
<?php
|
126 |
-
$n = count($rows);
|
127 |
-
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
128 |
-
if ($sorted_label_types[$i] != "type_mark_map") {
|
129 |
-
?>
|
130 |
-
document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>').value='';
|
131 |
-
<?php
|
132 |
-
}
|
133 |
-
}
|
134 |
-
?>
|
135 |
-
}
|
136 |
-
function show_hide_filter() {
|
137 |
-
if (document.getElementById('fields_filter').style.display == "none") {
|
138 |
-
document.getElementById('fields_filter').style.display = '';
|
139 |
-
document.getElementById('filter_img').src = '<?php echo WD_FMC_URL . '/images/filter_hide.png'; ?>';
|
140 |
-
}
|
141 |
-
else {
|
142 |
-
document.getElementById('fields_filter').style.display = "none";
|
143 |
-
document.getElementById('filter_img').src = '<?php echo WD_FMC_URL . '/images/filter_show.png'; ?>';
|
144 |
-
}
|
145 |
-
}
|
146 |
-
jQuery(document).ready(function () {
|
147 |
-
jQuery('.theme-detail').click(function () {
|
148 |
-
jQuery(this).siblings('.themedetaildiv').toggle();
|
149 |
-
return false;
|
150 |
-
});
|
151 |
-
});
|
152 |
-
</script>
|
153 |
-
<div id="sbox-overlay" onclick="toggleChBDiv(false)"
|
154 |
-
style="z-index: 65555; position: fixed; top: 0px; left: 0px; visibility: visible; zoom: 1; background-color: #000000; opacity: 0.7; filter: alpha(opacity=70); display: none;">
|
155 |
-
</div>
|
156 |
-
<div style="background-color: #FFFFFF; width: 350px; max-height: 350px; overflow-y: auto; padding: 20px; position: fixed; top: 100px; display: none; border: 2px solid #AAAAAA; z-index: 65556;" id="ChBDiv">
|
157 |
-
<form action="#">
|
158 |
-
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
159 |
-
<p style="font-weight: bold; font-size: 18px; margin-top: 0px;">Select Columns</p>
|
160 |
-
<div class="fm_check_labels"><input type="checkbox" <?php echo ($lists['hide_label_list'] === '') ? 'checked="checked"' : ''; ?> onclick="clickLabChBAll(this)" id="ChBAll"/><label for="ChBAll"> All</label></div>
|
161 |
-
<?php
|
162 |
-
foreach ($templabels as $key => $curlabel) {
|
163 |
-
if (strpos($lists['hide_label_list'], '@' . $curlabel . '@') === FALSE) {
|
164 |
-
?>
|
165 |
-
<div class="fm_check_labels"><input type="checkbox" checked="checked" onclick="clickLabChB('<?php echo $curlabel; ?>', this)" id="fm_check_id_<?php echo $curlabel; ?>" /><label for="fm_check_id_<?php echo $curlabel; ?>"> <?php echo stripslashes($sorted_label_names_for_check[$key]); ?></label></div>
|
166 |
-
<?php
|
167 |
-
}
|
168 |
-
else {
|
169 |
-
?>
|
170 |
-
<div class="fm_check_labels"><input type="checkbox" onclick="clickLabChB('<?php echo $curlabel; ?>', this)" id="fm_check_id_<?php echo $curlabel; ?>"/><label for="fm_check_id_<?php echo $curlabel; ?>"> <?php echo stripslashes($sorted_label_names_for_check[$key]); ?></label></div>
|
171 |
-
<?php
|
172 |
-
}
|
173 |
-
}
|
174 |
-
$ispaypal = FALSE;
|
175 |
-
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
176 |
-
if ($sorted_label_types[$i] == 'type_paypal_payment_status') {
|
177 |
-
$ispaypal = TRUE;
|
178 |
-
}
|
179 |
-
}
|
180 |
-
if ($ispaypal) {
|
181 |
-
?>
|
182 |
-
<div class="fm_check_labels">
|
183 |
-
<input type="checkbox" onclick="clickLabChB('payment_info', this)" id="fm_check_payment_info" <?php echo (strpos($lists['hide_label_list'], '@payment_info@') === FALSE) ? 'checked="checked"' : ''; ?> />
|
184 |
-
<label for="fm_check_payment_info"> Payment Info</label>
|
185 |
-
</div>
|
186 |
-
<?php
|
187 |
-
}
|
188 |
-
?>
|
189 |
-
<div style="text-align: center; padding: 20px;">
|
190 |
-
<input type="button" class="button-secondary" onclick="toggleChBDiv(false);" value="Done" />
|
191 |
-
</div>
|
192 |
-
</form>
|
193 |
-
</div>
|
194 |
-
<div style="clear: both; float: left; width: 99%;">
|
195 |
-
<div style="float:left; font-size: 14px; font-weight: bold;">
|
196 |
-
This section allows you to view and manage form submissions.
|
197 |
-
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-form-maker-guide-6.html">Read More in User Manual</a>
|
198 |
-
</div>
|
199 |
-
<div style="float: right; text-align: right;">
|
200 |
-
<a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/files/fromContactForm.php">
|
201 |
-
<img width="215" border="0" alt="web-dorado.com" src="<?php echo WD_FMC_URL . '/images/wd_logo.png'; ?>" />
|
202 |
-
</a>
|
203 |
-
</div>
|
204 |
-
</div>
|
205 |
-
<form action="admin.php?page=submissions_fmc" method="post" id="admin_form" name="admin_form">
|
206 |
-
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
207 |
-
<input type="hidden" name="option" value="com_formmaker" />
|
208 |
-
<input type="hidden" id="task" name="task" value="" />
|
209 |
-
<input type="hidden" id="current_id" name="current_id" value="" />
|
210 |
-
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php echo $asc_or_desc; ?>" />
|
211 |
-
<input type="hidden" name="order_by" id="order_by" value="<?php echo $order_by; ?>" />
|
212 |
-
<br />
|
213 |
-
<table width="99%">
|
214 |
-
<tr style="line-height: inherit !important;">
|
215 |
-
<td align="left" width="300">
|
216 |
-
<select name="form_id" id="form_id" style="width:99%" onchange="document.admin_form.submit();">
|
217 |
-
<option value="0" selected="selected"> - Select a Form - </option>
|
218 |
-
<?php
|
219 |
-
if ($forms) {
|
220 |
-
foreach($forms as $form) {
|
221 |
-
?>
|
222 |
-
<option value="<?php echo $form->id; ?>" <?php if ($form_id == $form->id) { $chosen_form_title = $form->title; echo 'selected="selected"'; }?>> <?php echo $form->title ?> </option>
|
223 |
-
<?php
|
224 |
-
}
|
225 |
-
}
|
226 |
-
?>
|
227 |
-
</select>
|
228 |
-
</td>
|
229 |
-
<?php
|
230 |
-
if ($form_id > 0) {
|
231 |
-
?>
|
232 |
-
<td class="reports"><strong>Entries</strong><br /><?php echo $statistics["total_entries"]; ?></td>
|
233 |
-
<td class="reports"><strong>Views</strong><br /><?php echo $statistics["total_views"]; ?></td>
|
234 |
-
<td class="reports"><strong>Conversion Rate</strong><br/><?php echo $statistics["conversion_rate"]; ?></td>
|
235 |
-
<td class="form_title">
|
236 |
-
<span class="form_title_cont" title="<?php echo $chosen_form_title; ?>"><?php echo $chosen_form_title; ?></span>
|
237 |
-
</td>
|
238 |
-
<td style="text-align: right;" width="300">
|
239 |
-
<span class="exp_but_span">Export to</span>
|
240 |
-
<input type="button" class="button-secondary" value="CSV" onclick="window.location='<?php echo add_query_arg(array('action' => 'generete_csv_fmc', 'form_id' => $form_id), admin_url('admin-ajax.php')); ?>'" />
|
241 |
-
<input type="button" class="button-secondary" value="XML" onclick="window.location='<?php echo add_query_arg(array('action' => 'generete_xml_fmc', 'form_id' => $form_id), admin_url('admin-ajax.php')); ?>'" />
|
242 |
-
</td>
|
243 |
-
</tr>
|
244 |
-
<tr>
|
245 |
-
<td align="left" colspan="4">
|
246 |
-
<input type="hidden" name="hide_label_list" value="<?php echo $lists['hide_label_list']; ?>" />
|
247 |
-
<img src="<?php echo WD_FMC_URL . '/images/filter_show.png'; ?>" width="40" style="vertical-align: bottom; cursor: pointer;" onclick="show_hide_filter()" title="Search by fields" id="filter_img" />
|
248 |
-
<input type="button" class="button-secondary" onclick="spider_form_submit(event, 'admin_form')" value="Go" />
|
249 |
-
<input type="button" class="button-secondary" onclick="remove_all(); spider_form_submit(event, 'admin_form')" value="Reset" />
|
250 |
-
</td>
|
251 |
-
<td align="right" colspan="2">
|
252 |
-
<br />
|
253 |
-
<?php
|
254 |
-
if (isset($sorted_label_names)) {
|
255 |
-
?>
|
256 |
-
<input type="button" class="button-secondary" onclick="toggleChBDiv(true)" value="Add/Remove Columns" />
|
257 |
-
<?php
|
258 |
-
}
|
259 |
-
?>
|
260 |
-
<input class="button-secondary" type="button" onclick="spider_set_input_value('task', 'block_ip'); spider_form_submit(event, 'admin_form')" value="Block IP" />
|
261 |
-
<input class="button-secondary" type="button" onclick="spider_set_input_value('task', 'unblock_ip'); spider_form_submit(event, 'admin_form')" value="Unblock IP" />
|
262 |
-
<input class="button-secondary" type="button" onclick="if (confirm('Do you want to delete selected items?')) {
|
263 |
-
spider_set_input_value('task', 'delete_all');
|
264 |
-
spider_form_submit(event, 'admin_form')
|
265 |
-
} else {
|
266 |
-
return false;
|
267 |
-
}" value="Delete"/>
|
268 |
-
</td>
|
269 |
-
</tr>
|
270 |
-
<?php
|
271 |
-
}
|
272 |
-
else {
|
273 |
-
?>
|
274 |
-
<td></td>
|
275 |
-
</tr>
|
276 |
-
<?php
|
277 |
-
}
|
278 |
-
?>
|
279 |
-
</table>
|
280 |
-
<div class="tablenav top" style="width: 99%;">
|
281 |
-
<?php WDW_FMC_Library::html_page_nav($lists['total'], $lists['limit'], 'admin_form'); ?>
|
282 |
-
</div>
|
283 |
-
<div class="submit_content" style="width: 99%;">
|
284 |
-
<table class="wp-list-table widefat fixed posts table_content">
|
285 |
-
<thead>
|
286 |
-
<tr>
|
287 |
-
<th class="table_small_col count_col sub-align">#</th>
|
288 |
-
<th scope="col" id="cb" class="manage-column column-cb check-column table_small_col sub-align form_check"><input id="check_all" type="checkbox"></th>
|
289 |
-
<th scope="col" id="submitid_fc" class="table_small_col sub-align submitid_fc <?php if ($order_by == "group_id") echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_id;?>>
|
290 |
-
<a href="" class="sub_id" onclick="spider_set_input_value('order_by', 'group_id');
|
291 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'group_id') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
292 |
-
spider_form_submit(event, 'admin_form')">
|
293 |
-
<span>ID</span>
|
294 |
-
<span class="sorting-indicator" style="margin-top: 8px;"></span>
|
295 |
-
</a>
|
296 |
-
</th>
|
297 |
-
<th class="table_small_col sub-align">Edit</th>
|
298 |
-
<th class="table_small_col sub-align">Delete</th>
|
299 |
-
<th scope="col" id="submitdate_fc" class="table_large_col submitdate_fc <?php if ($order_by == "date") echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_date;?>>
|
300 |
-
<a href="" onclick="spider_set_input_value('order_by', 'date');
|
301 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'date') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
302 |
-
spider_form_submit(event, 'admin_form')">
|
303 |
-
<span>Submit date</span>
|
304 |
-
<span class="sorting-indicator"></span>
|
305 |
-
</a>
|
306 |
-
</th>
|
307 |
-
<th scope="col" id="submitterip_fc" class="table_medium_col_uncenter submitterip_fc <?php if ($order_by == "ip")echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_ip;?>>
|
308 |
-
<a href="" onclick="spider_set_input_value('order_by', 'ip');
|
309 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'ip') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
310 |
-
spider_form_submit(event, 'admin_form')">
|
311 |
-
<span>Submitter's IP</span>
|
312 |
-
<span class="sorting-indicator"></span>
|
313 |
-
</a>
|
314 |
-
</th>
|
315 |
-
|
316 |
-
<th scope="col" id="submitterusername_fc" class="table_medium_col_uncenter submitterusername_fc <?php if ($order_by == "display_name")echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_username;?>>
|
317 |
-
<a href="" onclick="spider_set_input_value('order_by', 'display_name');
|
318 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'display_name') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
319 |
-
spider_form_submit(event, 'admin_form')">
|
320 |
-
<span>Submitter's Username</span>
|
321 |
-
<span class="sorting-indicator"></span>
|
322 |
-
</a>
|
323 |
-
</th>
|
324 |
-
|
325 |
-
<th scope="col" id="submitteremail_fc" class="table_medium_col_uncenter submitteremail_fc <?php if ($order_by == "user_email")echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_useremail ;?>>
|
326 |
-
<a href="" onclick="spider_set_input_value('order_by', 'user_email');
|
327 |
-
spider_set_input_value('asc_or_desc', '<?php echo ((isset($_POST['asc_or_desc']) && isset($_POST['order_by']) && (esc_html(stripslashes($_POST['order_by'])) == 'user_email') && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc') ? 'desc' : 'asc'); ?>');
|
328 |
-
spider_form_submit(event, 'admin_form')">
|
329 |
-
<span>Submitter's Email Address</span>
|
330 |
-
<span class="sorting-indicator"></span>
|
331 |
-
</a>
|
332 |
-
</th>
|
333 |
-
|
334 |
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
711 |
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
732 |
}
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
if (strpos($choices_label, "***quantity***")) {
|
750 |
-
$choices_label = str_replace("***quantity***", " ", $choices_label);
|
751 |
-
}
|
752 |
-
if (strpos($choices_label, "***property***")) {
|
753 |
-
$choices_label = str_replace("***property***", " ", $choices_label);
|
754 |
-
}
|
755 |
-
?>
|
756 |
-
<tr>
|
757 |
-
<td><?php echo str_replace("***br***", '<br>', $choices_label); ?></td>
|
758 |
-
<td>
|
759 |
-
<div class="bordered" style="width:<?php echo ($choices_count[$key] / ($all - $unanswered)) * 100; ?>%; height:18px; background-color:<?php echo $colors[$key % 2]; ?>"></div>
|
760 |
-
</td>
|
761 |
-
<td><?php echo $choices_count[$key]; ?></td>
|
762 |
-
</tr>
|
763 |
-
<?php
|
764 |
}
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
</tr>
|
771 |
-
<?php
|
772 |
}
|
773 |
-
|
774 |
-
|
775 |
-
<
|
776 |
-
<
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
|
783 |
public function edit($id) {
|
784 |
$current_id = ((isset($id)) ? $id : 0);
|
@@ -800,17 +934,17 @@ class FMViewSubmissions_fmc {
|
|
800 |
<tr>
|
801 |
<td width="100%"><h2>Edit Submission</h2></td>
|
802 |
<td align="right">
|
803 |
-
<input type="button" onclick="
|
804 |
-
|
805 |
-
|
806 |
</td>
|
807 |
<td align="right">
|
808 |
-
<input type="button" onclick="
|
809 |
-
|
810 |
-
|
811 |
</td>
|
812 |
<td align="right">
|
813 |
-
<input type="button" onclick="
|
814 |
</td>
|
815 |
</tr>
|
816 |
</tbody>
|
@@ -1030,7 +1164,7 @@ class FMViewSubmissions_fmc {
|
|
1030 |
<input type="hidden" id="task" name="task" value="" />
|
1031 |
<input type="hidden" value="<?php echo WD_FMC_URL; ?>" id="form_plugins_url" />
|
1032 |
<script>
|
1033 |
-
|
1034 |
</script>
|
1035 |
</form>
|
1036 |
<?php
|
@@ -1046,68 +1180,75 @@ class FMViewSubmissions_fmc {
|
|
1046 |
$ispaypal = $params[4];
|
1047 |
$form = $params[5];
|
1048 |
$form_theme = $params[6];
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1054 |
<form action="admin.php?page=submissions_fmc" method="post" id="formform_id_temp" name="formform_id_temp">
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
$form_theme = str_replace($order, '', $form_theme);
|
1107 |
-
$form_theme = str_replace($css_rep1, $css_rep2, $form_theme);
|
1108 |
-
$form_theme = "#form" . $form->id . ' ' . $form_theme;
|
1109 |
-
?>
|
1110 |
-
<style>
|
1111 |
<?php
|
1112 |
echo $form_theme;
|
1113 |
?>
|
@@ -1391,8 +1532,10 @@ class FMViewSubmissions_fmc {
|
|
1391 |
if($element_value =='')
|
1392 |
$element_value = '@@@';
|
1393 |
|
1394 |
-
|
1395 |
-
|
|
|
|
|
1396 |
|
1397 |
foreach($params_names as $params_name ) {
|
1398 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
@@ -1402,56 +1545,66 @@ class FMViewSubmissions_fmc {
|
|
1402 |
|
1403 |
|
1404 |
if($temp) {
|
1405 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
1406 |
-
$attrs
|
1407 |
foreach($attrs as $attr)
|
1408 |
$param['attributes'] = $param['attributes'].' '.$attr;
|
1409 |
}
|
1410 |
|
1411 |
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1455 |
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$w_size) : max($param['w_field_label_size'],$w_size));
|
1456 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1457 |
|
@@ -1522,7 +1675,7 @@ class FMViewSubmissions_fmc {
|
|
1522 |
$g++;
|
1523 |
$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>';
|
1524 |
}
|
1525 |
-
$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","
|
1526 |
$w_options = '';
|
1527 |
foreach($w_countries as $w_country) {
|
1528 |
if($w_country == $elements_of_address[5])
|
@@ -1574,400 +1727,959 @@ class FMViewSubmissions_fmc {
|
|
1574 |
break;
|
1575 |
}
|
1576 |
|
1577 |
-
case 'type_checkbox':
|
1578 |
-
|
1579 |
-
$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');
|
1580 |
-
$temp=$params;
|
1581 |
|
1582 |
-
|
1583 |
-
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1584 |
-
$param[$params_name] = $temp[0];
|
1585 |
-
$temp=$temp[1];
|
1586 |
-
}
|
1587 |
-
|
1588 |
-
if($temp) {
|
1589 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
1590 |
-
$attrs = array_slice($temp,0, count($temp)-1);
|
1591 |
-
foreach($attrs as $attr)
|
1592 |
-
$param['attributes'] = $param['attributes'].' '.$attr;
|
1593 |
-
}
|
1594 |
-
|
1595 |
-
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1596 |
-
|
1597 |
-
$element_value = explode('***br***',$element_value);
|
1598 |
-
$element_value = array_slice($element_value,0, count($element_value)-1);
|
1599 |
-
|
1600 |
-
$param['w_choices'] = explode('***',$param['w_choices']);
|
1601 |
-
|
1602 |
-
$is_other=false;
|
1603 |
-
$other_value = '';
|
1604 |
-
|
1605 |
-
foreach($element_value as $key => $value) {
|
1606 |
-
if(in_array($value, $param['w_choices'])==false) {
|
1607 |
-
$other_value = $value;
|
1608 |
-
$is_other=true;
|
1609 |
-
break;
|
1610 |
-
}
|
1611 |
-
}
|
1612 |
-
|
1613 |
|
1614 |
-
|
1615 |
-
|
1616 |
-
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
1617 |
-
|
1618 |
-
$rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
1619 |
|
1620 |
-
|
1621 |
-
if($key%$param['w_rowcol']==0 && $key>0)
|
1622 |
-
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
1623 |
-
|
1624 |
-
$checked=(in_array($choice, $element_value)=='true' ? 'checked="checked"' : '');
|
1625 |
-
|
1626 |
-
|
1627 |
-
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key && $is_other)
|
1628 |
-
$checked = 'checked="checked"';
|
1629 |
|
1630 |
-
|
1631 |
-
|
1632 |
-
$rep.='<div style="display: '.($param['w_flow']!='hor' ? 'table-cell' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.$key.'" ">'.$choice.'</label><div class="checkbox-div forlabs"><input type="checkbox" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'other="1"' : '' ).' id="wdform_'.$id1.'_element'.$form_id.''.$key.'" name="wdform_'.$id1.'_element'.$form_id.''.$key.'" value="'.htmlspecialchars($choice).'" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'onclick="if(set_checked("wdform_'.$id1.'","'.$key.'","'.$form_id.'")) show_other_input("wdform_'.$id1.'","'.$form_id.'");"' : '').' '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.$key.'"></label></div></div>';
|
1633 |
-
}
|
1634 |
-
$rep.='</div>';
|
1635 |
-
|
1636 |
-
$rep.='</div></div>';
|
1637 |
-
|
1638 |
-
if($is_other)
|
1639 |
-
$onload_js .='show_other_input("wdform_'.$id1.'","'.$form_id.'"); jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val("'.$other_value.'");';
|
1640 |
-
|
1641 |
-
$onsubmit_js.='
|
1642 |
-
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other'.$form_id.'\" value = \"'.$param['w_allow_other'].'\" />").appendTo("#form'.$form_id.'");
|
1643 |
-
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other_num'.$form_id.'\" value = \"'.$param['w_allow_other_num'].'\" />").appendTo("#form'.$form_id.'");
|
1644 |
-
';
|
1645 |
-
|
1646 |
-
break;
|
1647 |
-
}
|
1648 |
|
1649 |
-
|
1650 |
-
$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');
|
1651 |
-
$temp=$params;
|
1652 |
|
1653 |
-
|
1654 |
-
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1655 |
-
$param[$params_name] = $temp[0];
|
1656 |
-
$temp=$temp[1];
|
1657 |
-
}
|
1658 |
-
|
1659 |
-
if($temp) {
|
1660 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
1661 |
-
$attrs = array_slice($temp,0, count($temp)-1);
|
1662 |
-
foreach($attrs as $attr)
|
1663 |
-
$param['attributes'] = $param['attributes'].' '.$attr;
|
1664 |
-
}
|
1665 |
-
|
1666 |
-
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1667 |
-
$param['w_choices'] = explode('***',$param['w_choices']);
|
1668 |
-
$is_other=true;
|
1669 |
-
|
1670 |
-
foreach($param['w_choices'] as $key => $choice) {
|
1671 |
-
if($choice==$element_value) {
|
1672 |
-
$is_other=false;
|
1673 |
-
break;
|
1674 |
-
}
|
1675 |
-
}
|
1676 |
-
|
1677 |
-
|
1678 |
-
$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>';
|
1679 |
-
|
1680 |
-
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
1681 |
-
|
1682 |
-
$rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
1683 |
-
|
1684 |
-
foreach($param['w_choices'] as $key => $choice) {
|
1685 |
-
if($key%$param['w_rowcol']==0 && $key>0)
|
1686 |
-
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
1687 |
-
|
1688 |
-
$checked =($choice==$element_value ? 'checked="checked"' : '');
|
1689 |
-
|
1690 |
-
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key && $is_other==true && $element_value!='')
|
1691 |
-
$checked = 'checked="checked"';
|
1692 |
-
|
1693 |
-
|
1694 |
-
$rep.='<div style="display: '.($param['w_flow']!='hor' ? 'table-cell' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.$key.'">'.$choice.'</label><div class="radio-div forlabs"><input type="radio" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'other="1"' : '').' id="wdform_'.$id1.'_element'.$form_id.''.$key.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.htmlspecialchars($choice).'" onclick="set_default("wdform_'.$id1.'","'.$key.'","'.$form_id.'"); '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'show_other_input("wdform_'.$id1.'","'.$form_id.'");' : '').'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.$key.'"></label></div></div>';
|
1695 |
-
}
|
1696 |
-
$rep.='</div>';
|
1697 |
|
1698 |
-
|
1699 |
-
|
1700 |
-
if($is_other && $element_value!='')
|
1701 |
-
$onload_js .='show_other_input("wdform_'.$id1.'","'.$form_id.'"); jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val("'.$element_value.'");';
|
1702 |
-
|
1703 |
-
$onsubmit_js.='
|
1704 |
-
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other'.$form_id.'\" value = \"'.$param['w_allow_other'].'\" />").appendTo("#form'.$form_id.'");
|
1705 |
-
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other_num'.$form_id.'\" value = \"'.$param['w_allow_other_num'].'\" />").appendTo("#form'.$form_id.'");
|
1706 |
-
';
|
1707 |
-
|
1708 |
-
break;
|
1709 |
-
}
|
1710 |
|
1711 |
-
|
1712 |
-
$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');
|
1713 |
-
$temp=$params;
|
1714 |
|
1715 |
-
|
1716 |
-
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1717 |
-
$param[$params_name] = $temp[0];
|
1718 |
-
$temp=$temp[1];
|
1719 |
-
}
|
1720 |
-
|
1721 |
-
if($temp) {
|
1722 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
1723 |
-
$attrs = array_slice($temp,0, count($temp)-1);
|
1724 |
-
foreach($attrs as $attr)
|
1725 |
-
$param['attributes'] = $param['attributes'].' '.$attr;
|
1726 |
-
}
|
1727 |
-
|
1728 |
-
|
1729 |
-
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
1730 |
-
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1731 |
-
|
1732 |
-
$param['w_choices'] = explode('***',$param['w_choices']);
|
1733 |
-
|
1734 |
-
$post_value = (isset($_POST["counter".$form_id]) ? esc_html(stripslashes( $_POST["counter".$form_id])) : ''); //JRequest::getVar("counter".$form_id);
|
1735 |
-
|
1736 |
-
$rep='<div type="type_own_select" 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>';
|
1737 |
-
|
1738 |
-
$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'].'>';
|
1739 |
-
|
1740 |
-
foreach($param['w_choices'] as $key => $choice) {
|
1741 |
-
$selected=(htmlspecialchars($choice)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
|
1742 |
-
|
1743 |
-
$rep.='<option id="wdform_'.$id1.'_option'.$key.'" value="'.htmlspecialchars($choice).'" '.$selected.'>'.$choice.'</option>';
|
1744 |
-
}
|
1745 |
-
$rep.='</select></div></div>';
|
1746 |
-
|
1747 |
-
|
1748 |
-
break;
|
1749 |
-
}
|
1750 |
-
|
1751 |
-
case 'type_country': {
|
1752 |
-
$params_names=array('w_field_label_size','w_field_label_pos','w_size','w_countries','w_required','w_class');
|
1753 |
-
$temp=$params;
|
1754 |
-
foreach($params_names as $params_name ) {
|
1755 |
-
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1756 |
-
$param[$params_name] = $temp[0];
|
1757 |
-
$temp=$temp[1];
|
1758 |
-
}
|
1759 |
|
1760 |
-
|
1761 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
1762 |
-
$attrs = array_slice($temp,0, count($temp)-1);
|
1763 |
-
foreach($attrs as $attr)
|
1764 |
-
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
1765 |
-
}
|
1766 |
|
1767 |
-
|
1768 |
-
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1769 |
-
|
1770 |
-
$param['w_countries'] = explode('***',$param['w_countries']);
|
1771 |
-
|
1772 |
-
$selected='';
|
1773 |
-
|
1774 |
-
$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>';
|
1775 |
-
|
1776 |
-
$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'].'>';
|
1777 |
-
foreach($param['w_countries'] as $key => $choice) {
|
1778 |
-
|
1779 |
-
$selected=(htmlspecialchars($choice)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
|
1780 |
|
1781 |
-
|
1782 |
-
$rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice.'</option>';
|
1783 |
-
}
|
1784 |
-
$rep.='</select></div></div>';
|
1785 |
-
|
1786 |
-
break;
|
1787 |
-
}
|
1788 |
-
|
1789 |
-
case 'type_time': {
|
1790 |
-
if($element_value =='')
|
1791 |
-
$element_value = ':';
|
1792 |
-
|
1793 |
-
$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');
|
1794 |
-
$temp=$params;
|
1795 |
|
1796 |
-
|
1797 |
-
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1798 |
-
$param[$params_name] = $temp[0];
|
1799 |
-
$temp=$temp[1];
|
1800 |
-
}
|
1801 |
-
|
1802 |
-
if($temp) {
|
1803 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
1804 |
-
$attrs = array_slice($temp,0, count($temp)-1);
|
1805 |
-
foreach($attrs as $attr)
|
1806 |
-
$param['attributes'] = $param['attributes'].' '.$attr;
|
1807 |
-
}
|
1808 |
-
|
1809 |
-
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1810 |
-
|
1811 |
-
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
1812 |
-
$element_value = explode(':',$element_value);
|
1813 |
-
|
1814 |
-
|
1815 |
-
$w_sec = '';
|
1816 |
-
$w_sec_label='';
|
1817 |
-
|
1818 |
-
if($param['w_sec']=='1') {
|
1819 |
-
$w_sec = '<div align="center" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;"> : </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, "wdform_'.$id1.'_ss'.$form_id.'")" '.$param['attributes'].'></div>';
|
1820 |
-
|
1821 |
-
$w_sec_label='<div style="display: table-cell;"></div><div style="display: table-cell;"><label class="mini_label">'.$w_mini_labels[2].'</label></div>';
|
1822 |
-
}
|
1823 |
|
1824 |
-
|
1825 |
-
if($param['w_time_type']=='12') {
|
1826 |
-
if(strpos($element_value[2],'pm')!==false) {
|
1827 |
-
$am_ = "";
|
1828 |
-
$pm_ = "selected=\"selected\"";
|
1829 |
-
}
|
1830 |
-
else {
|
1831 |
-
$am_ = "selected=\"selected\"";
|
1832 |
-
$pm_ = "";
|
1833 |
-
}
|
1834 |
-
|
1835 |
-
$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>';
|
1836 |
-
|
1837 |
-
$w_time_type_label = '<div ><label class="mini_label">'.$w_mini_labels[3].'</label></div>';
|
1838 |
-
|
1839 |
-
}
|
1840 |
-
else {
|
1841 |
-
$w_time_type='';
|
1842 |
-
$w_time_type_label = '';
|
1843 |
-
}
|
1844 |
-
|
1845 |
-
$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>';
|
1846 |
-
|
1847 |
-
$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, "wdform_'.$id1.'_hh'.$form_id.'", "23")" '.$param['attributes'].'></div><div align="center" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;"> : </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, "wdform_'.$id1.'_mm'.$form_id.'")" '.$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>';
|
1848 |
-
|
1849 |
-
break;
|
1850 |
-
}
|
1851 |
|
1852 |
-
|
1853 |
-
$params_names=array('w_field_label_size','w_field_label_pos','w_date','w_required','w_class','w_format','w_but_val');
|
1854 |
-
$temp=$params;
|
1855 |
|
1856 |
-
|
1857 |
-
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1858 |
-
$param[$params_name] = $temp[0];
|
1859 |
-
$temp=$temp[1];
|
1860 |
-
}
|
1861 |
-
|
1862 |
-
if($temp) {
|
1863 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
1864 |
-
$attrs = array_slice($temp,0, count($temp)-1);
|
1865 |
-
foreach($attrs as $attr)
|
1866 |
-
$param['attributes'] = $param['attributes'].' '.$attr;
|
1867 |
-
}
|
1868 |
-
|
1869 |
-
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1870 |
-
|
1871 |
-
$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>';
|
1872 |
-
|
1873 |
-
$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>';
|
1874 |
-
|
1875 |
-
|
1876 |
-
// $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});';
|
1877 |
-
|
1878 |
-
break;
|
1879 |
-
}
|
1880 |
|
1881 |
-
|
1882 |
-
if($element_value=='')
|
1883 |
-
$element_value='--';
|
1884 |
-
|
1885 |
-
$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');
|
1886 |
-
|
1887 |
-
$temp=$params;
|
1888 |
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1971 |
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").blur(function() {check_year2(this)});';
|
1972 |
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").keypress(function() {return check_year1(event, this)});';
|
1973 |
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").change(function() {change_year(this)});';
|
@@ -1981,470 +2693,1378 @@ class FMViewSubmissions_fmc {
|
|
1981 |
}
|
1982 |
|
1983 |
|
1984 |
-
case 'type_hidden': {
|
1985 |
-
$params_names=array('w_name','w_value');
|
1986 |
-
$temp=$params;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1987 |
|
1988 |
-
|
1989 |
-
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1990 |
-
$param[$params_name] = $temp[0];
|
1991 |
-
$temp=$temp[1];
|
1992 |
-
}
|
1993 |
-
|
1994 |
-
if($temp) {
|
1995 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
1996 |
-
$attrs = array_slice($temp,0, count($temp)-1);
|
1997 |
-
foreach($attrs as $attr)
|
1998 |
-
$param['attributes'] = $param['attributes'].' '.$attr;
|
1999 |
-
}
|
2000 |
-
|
2001 |
-
$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>';
|
2002 |
-
|
2003 |
-
break;
|
2004 |
-
}
|
2005 |
|
|
|
2006 |
|
2007 |
-
|
2008 |
-
|
2009 |
-
$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');
|
2010 |
-
$temp=$params;
|
2011 |
|
2012 |
-
|
2013 |
-
|
2014 |
-
$param[$params_name] = $temp[0];
|
2015 |
-
$temp=$temp[1];
|
2016 |
-
}
|
2017 |
-
|
2018 |
-
|
2019 |
-
if($temp) {
|
2020 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
2021 |
-
$attrs = array_slice($temp,0, count($temp)-1);
|
2022 |
-
foreach($attrs as $attr)
|
2023 |
-
$param['attributes'] = $param['attributes'].' '.$attr;
|
2024 |
-
}
|
2025 |
-
|
2026 |
-
if (strpos($element_value,'.')!== false)
|
2027 |
-
$element = explode('.',$element_value);
|
2028 |
-
else {
|
2029 |
-
$element = Array();
|
2030 |
-
$element[0] = preg_replace("/[^0-9]/","",$element_value);
|
2031 |
-
$element[1] = '';
|
2032 |
-
}
|
2033 |
-
|
2034 |
-
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
2035 |
-
|
2036 |
-
$hide_cents = ($param['w_hide_cents']=="yes" ? "none;" : "table-cell;");
|
2037 |
-
|
2038 |
-
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
2039 |
-
|
2040 |
-
$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>';
|
2041 |
-
|
2042 |
-
$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--> '.$form_currency.' <!--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;"> . </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>';
|
2043 |
-
|
2044 |
-
$onload_js .='jQuery("#wdform_'.$id1.'_element_cents'.$form_id.'").blur(function() {add_0(this)});';
|
2045 |
-
$onload_js .='jQuery("#wdform_'.$id1.'_element_cents'.$form_id.'").keypress(function() {return check_isnum_interval(event,this,0,99)});';
|
2046 |
-
|
2047 |
-
break;
|
2048 |
-
}
|
2049 |
-
|
2050 |
-
case 'type_paypal_select': {
|
2051 |
|
2052 |
-
if($element_value=='')
|
2053 |
-
$element_value = ' :';
|
2054 |
-
|
2055 |
-
$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');
|
2056 |
-
$temp=$params;
|
2057 |
|
2058 |
-
foreach($params_names as $params_name ) {
|
2059 |
-
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2060 |
-
$param[$params_name] = $temp[0];
|
2061 |
-
$temp=$temp[1];
|
2062 |
-
}
|
2063 |
-
|
2064 |
-
if($temp) {
|
2065 |
-
$temp =explode('*:*w_attr_name*:*',$temp);
|
2066 |
-
$attrs = array_slice($temp,0, count($temp)-1);
|
2067 |
-
foreach($attrs as $attr)
|
2068 |
-
$param['attributes'] = $param['attributes'].' '.$attr;
|
2069 |
-
}
|
2070 |
-
|
2071 |
-
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
2072 |
-
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
2073 |
-
|
2074 |
-
$param['w_choices'] = explode('***',$param['w_choices']);
|
2075 |
-
$param['w_choices_price'] = explode('***',$param['w_choices_price']);
|
2076 |
-
$param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
|
2077 |
-
$param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
|
2078 |
-
$param['w_property'] = explode('***',$param['w_property']);
|
2079 |
-
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
2080 |
-
|
2081 |
-
if(strpos($element_value,'***br***') !== false) {
|
2082 |
-
$element_value = explode('***br***',$element_value);
|
2083 |
-
if (count($element_value)==2) {
|
2084 |
-
if (strpos($element_value[1],'***quantity***') !== false) {
|
2085 |
-
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
2086 |
-
$quantity_value = $quantity_value[1];
|
2087 |
-
$property_of_select = '';
|
2088 |
-
}
|
2089 |
-
else {
|
2090 |
-
$quantity_value = '' ;
|
2091 |
-
$property_of_select = explode(': ',str_replace("***property***","",$element_value[1]));
|
2092 |
-
$property_of_select = $property_of_select[1];
|
2093 |
-
}
|
2094 |
-
$element_value = explode(' :',$element_value[0]);
|
2095 |
-
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
2096 |
-
}
|
2097 |
-
else {
|
2098 |
-
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
2099 |
-
$quantity_value = $quantity_value[1];
|
2100 |
-
$property_of_select = explode(': ',str_replace("***property***","",$element_value[2]));
|
2101 |
-
$property_of_select = $property_of_select[1];
|
2102 |
-
$element_value = explode(' :',$element_value[0]);
|
2103 |
-
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
2104 |
-
}
|
2105 |
-
}
|
2106 |
-
else {
|
2107 |
-
$element_value = explode(' :',$element_value);
|
2108 |
-
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
2109 |
-
$quantity_value = '';
|
2110 |
-
$property_of_select = '';
|
2111 |
-
}
|
2112 |
-
|
2113 |
-
|
2114 |
-
$rep='<div type="type_paypal_select" 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>';
|
2115 |
-
|
2116 |
-
$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'].'>';
|
2117 |
-
foreach($param['w_choices'] as $key => $choice) {
|
2118 |
-
if($param['w_choices_disabled'][$key]=="true")
|
2119 |
-
$choice_value='';
|
2120 |
-
else
|
2121 |
-
$choice_value=$param['w_choices_price'][$key];
|
2122 |
-
|
2123 |
-
|
2124 |
-
if($element_value[0] == $choice && $param['w_choices_price'][$key] == $choise_value)
|
2125 |
-
$selected = 'selected="selected"';
|
2126 |
-
else
|
2127 |
-
$selected = '';
|
2128 |
-
|
2129 |
-
$rep.='<option id="wdform_'.$id1.'_option'.$key.'" value="'.$choice_value.'" '.$selected.'>'.$choice.'</option>';
|
2130 |
-
}
|
2131 |
-
$rep.='</select><div id="wdform_'.$id1.'_div'.$form_id.'">';
|
2132 |
-
if($param['w_quantity']=="yes") {
|
2133 |
-
$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>';
|
2134 |
-
}
|
2135 |
-
|
2136 |
-
if($param['w_property'][0])
|
2137 |
-
foreach($param['w_property'] as $key => $property) {
|
2138 |
-
|
2139 |
-
$rep.='
|
2140 |
-
<div id="wdform_'.$id1.'_property_'.$key.'" class="paypal-property">
|
2141 |
-
<div style="width:100px; display:inline-block;">
|
2142 |
-
<label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
|
2143 |
-
<select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
|
2144 |
-
$param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
|
2145 |
-
$param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
|
2146 |
-
|
2147 |
-
foreach($param['w_property_values'][$key] as $subkey => $property_value) {
|
2148 |
-
$rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_select==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
|
2149 |
-
}
|
2150 |
-
$rep.='</select></div></div>';
|
2151 |
-
}
|
2152 |
-
|
2153 |
-
$rep.='</div></div></div>';
|
2154 |
-
|
2155 |
-
$onsubmit_js.='
|
2156 |
-
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(jQuer
|
1 |
<?php
|
2 |
|
3 |
class FMViewSubmissions_fmc {
|
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);
|
31 |
+
$labels_parameters = $this->model->get_labels_parameters($form_id);
|
32 |
+
|
33 |
+
$sorted_labels_id = $labels_parameters[0];
|
34 |
+
$sorted_label_types = $labels_parameters[1];
|
35 |
+
$lists = $labels_parameters[2];
|
36 |
+
$sorted_label_names = $labels_parameters[3];
|
37 |
+
$sorted_label_names_original = $labels_parameters[4];
|
38 |
+
$rows = ((isset($labels_parameters[5])) ? $labels_parameters[5] : NULL);
|
39 |
+
$group_ids = ((isset($labels_parameters[6])) ? $labels_parameters[6] : NULL);
|
40 |
+
$where_choices = $labels_parameters[7];
|
41 |
+
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
|
42 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
|
43 |
+
$style_id = $this->model->hide_or_not($lists['hide_label_list'], '@submitid@');
|
44 |
+
$style_date = $this->model->hide_or_not($lists['hide_label_list'], '@submitdate@');
|
45 |
+
$style_ip = $this->model->hide_or_not($lists['hide_label_list'], '@submitterip@');
|
46 |
+
|
47 |
+
$style_username = $this->model->hide_or_not($lists['hide_label_list'], '@submitterusername@');
|
48 |
+
$style_useremail = $this->model->hide_or_not($lists['hide_label_list'], '@submitteremail@');
|
49 |
+
|
50 |
+
$oder_class_default = "manage-column column-autor sortable desc";
|
51 |
+
$oder_class = "manage-column column-title sorted " . $asc_or_desc;
|
52 |
+
$ispaypal = FALSE;
|
53 |
+
$temp = array();
|
54 |
+
$m = count($sorted_label_names);
|
55 |
+
$n = count($rows);
|
56 |
+
$group_id_s = array();
|
57 |
+
$group_id_s = $this->model->sort_group_ids(count($sorted_label_names),$group_ids);
|
58 |
+
$ka_fielderov_search = (($lists['ip_search'] || $lists['startdate'] || $lists['enddate'] || $lists['username_search'] || $lists['useremail_search'] || $lists['id_search']) ? TRUE : FALSE);
|
59 |
+
$is_stats = false;
|
60 |
+
$blocked_ips = $this->model->blocked_ips();
|
61 |
+
|
62 |
+
if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))) {
|
63 |
+
require_once(WD_FM_PDF_DIR.'/model.php');
|
64 |
+
$pdf_data = WD_FM_PDF_model::get_pdf_data($form_id);
|
65 |
+
}
|
66 |
+
$subs_count = $this->model->get_subs_count($form_id);
|
67 |
+
$chosen_form_title = '';
|
68 |
+
if ($forms) {
|
69 |
+
foreach($forms as $form) {
|
70 |
+
if ($form_id == $form->id) {
|
71 |
+
$chosen_form_title = $form->title;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
?>
|
76 |
+
<script type="text/javascript">
|
77 |
+
function export_submissions(type, limit) {
|
78 |
+
var progressbar = jQuery( "#fm-progressbar" );
|
79 |
+
var progressLabel = jQuery( ".fm-progress-label" );
|
80 |
+
|
81 |
+
progressbar.progressbar({
|
82 |
+
max: <?php echo $subs_count; ?>
|
83 |
+
});
|
84 |
+
|
85 |
+
jQuery.ajax({
|
86 |
+
type: "POST",
|
87 |
+
url:"<?php echo add_query_arg(array('form_id' => $form_id, 'send_header' => 0), admin_url('admin-ajax.php')); ?>&action=generete_"+type+"_fmc&limitstart="+limit,
|
88 |
+
beforeSend: function() {
|
89 |
+
if(<?php echo $subs_count; ?> >= 1000 )
|
90 |
+
jQuery('.fm_modal').show();
|
91 |
+
},
|
92 |
+
success: function(data) {
|
93 |
+
if(limit < <?php echo $subs_count; ?>) {
|
94 |
+
limit += 1000;
|
95 |
+
export_submissions(type, limit);
|
96 |
+
progressbar.progressbar( "value", limit);
|
97 |
+
loaded_percent = Math.round((progressbar.progressbar( "value" ) * 100)/ parseInt(<?php echo $subs_count; ?>));
|
98 |
+
progressLabel.text( loaded_percent + ' %');
|
99 |
+
progressbarValue = progressbar.find( ".fm-progress-label" );
|
100 |
+
if( loaded_percent >= 46 ) {
|
101 |
+
progressbarValue.css({
|
102 |
+
"color": '#fff',
|
103 |
+
});
|
104 |
+
}
|
105 |
+
else {
|
106 |
+
progressbarValue.css({
|
107 |
+
"color": '#444',
|
108 |
+
});
|
109 |
+
}
|
110 |
+
}
|
111 |
+
else{
|
112 |
+
jQuery('.fm_modal').hide();
|
113 |
+
progressbar.progressbar( "value", 0);
|
114 |
+
progressLabel.text( 'Loading ...' );
|
115 |
+
progressbarValue = progressbar.find( ".fm-progress-label" );
|
116 |
+
progressbarValue.css({
|
117 |
+
"color": '#444',
|
118 |
+
});
|
119 |
+
window.location = "<?php echo add_query_arg(array('form_id' => $form_id, 'send_header' => 1), admin_url('admin-ajax.php')); ?>&action=generete_"+type+"_fmc&limitstart="+limit;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
});
|
123 |
+
}
|
124 |
|
125 |
+
function clickLabChBAll(ChBAll) {
|
126 |
+
<?php
|
127 |
+
if (isset($sorted_label_names)) {
|
128 |
+
$templabels = array_merge(array(
|
129 |
+
'submitid',
|
130 |
+
'submitdate',
|
131 |
+
'submitterip',
|
132 |
+
'submitterusername',
|
133 |
+
'submitteremail'
|
134 |
+
), $sorted_labels_id);
|
135 |
+
$sorted_label_names_for_check = array_merge(array(
|
136 |
+
'ID',
|
137 |
+
'Submit date',
|
138 |
+
"Submitter's IP",
|
139 |
+
"Submitter's Username",
|
140 |
+
"Submitter's Email Address"
|
141 |
+
), $sorted_label_names_original);
|
142 |
+
}
|
143 |
+
else {
|
144 |
+
$templabels = array(
|
145 |
+
'submitid',
|
146 |
+
'submitdate',
|
147 |
+
'submitterip',
|
148 |
+
'submitterusername',
|
149 |
+
'submitteremail'
|
150 |
+
);
|
151 |
+
$sorted_label_names_for_check = array(
|
152 |
+
'ID',
|
153 |
+
'Submit date',
|
154 |
+
"Submitter's IP",
|
155 |
+
'Submitter\'s Username',
|
156 |
+
'Submitter\'s Email Address'
|
157 |
+
);
|
158 |
+
}
|
159 |
+
?>
|
160 |
+
if (ChBAll.checked) {
|
161 |
+
document.forms.admin_form.hide_label_list.value = '';
|
162 |
+
for (i = 0; i <= ChBAll.form.length; i++) {
|
163 |
+
if (typeof(ChBAll.form[i]) != "undefined") {
|
164 |
+
if (ChBAll.form[i].type == "checkbox") {
|
165 |
+
ChBAll.form[i].checked = true;
|
166 |
+
}
|
167 |
+
}
|
168 |
+
}
|
169 |
+
}
|
170 |
+
else {
|
171 |
+
document.forms.admin_form.hide_label_list.value = '@<?php echo implode($templabels, '@@') ?>@' + '@payment_info@';
|
172 |
+
for (i = 0; i <= ChBAll.form.length; i++) {
|
173 |
+
if (typeof(ChBAll.form[i]) != "undefined") {
|
174 |
+
if (ChBAll.form[i].type == "checkbox") {
|
175 |
+
ChBAll.form[i].checked = false;
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
180 |
+
renderColumns();
|
181 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
+
function remove_all() {
|
184 |
+
if(document.getElementById('startdate'))
|
185 |
+
document.getElementById('startdate').value='';
|
186 |
+
if(document.getElementById('enddate'))
|
187 |
+
document.getElementById('enddate').value='';
|
188 |
+
if(document.getElementById('id_search'))
|
189 |
+
document.getElementById('id_search').value='';
|
190 |
+
if(document.getElementById('ip_search'))
|
191 |
+
document.getElementById('ip_search').value='';
|
192 |
+
if(document.getElementById('username_search'))
|
193 |
+
document.getElementById('username_search').value='';
|
194 |
+
if(document.getElementById('useremail_search'))
|
195 |
+
document.getElementById('useremail_search').value='';
|
196 |
+
<?php
|
197 |
+
$n = count($rows);
|
198 |
+
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
199 |
+
if ($sorted_label_types[$i] != "type_mark_map") { ?>
|
200 |
+
document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>').value='';
|
201 |
+
<?php
|
202 |
+
}
|
203 |
+
}
|
204 |
+
?>
|
205 |
+
}
|
206 |
+
function show_hide_filter() {
|
207 |
+
if (document.getElementById('fields_filter').style.display == "none") {
|
208 |
+
document.getElementById('fields_filter').style.display = '';
|
209 |
+
}
|
210 |
+
else {
|
211 |
+
document.getElementById('fields_filter').style.display = "none";
|
212 |
+
}
|
213 |
+
return false;
|
214 |
+
}
|
215 |
+
jQuery(document).ready(function () {
|
216 |
+
jQuery('.theme-detail').click(function () {
|
217 |
+
jQuery(this).siblings('.themedetaildiv').toggle();
|
218 |
+
return false;
|
219 |
+
});
|
220 |
+
});
|
221 |
+
</script>
|
222 |
+
<div class="fm_modal">
|
223 |
+
<div id="fm-progressbar" >
|
224 |
+
<div class="fm-progress-label">Loading...</div>
|
225 |
+
</div>
|
226 |
+
</div>
|
227 |
+
<div class="export_progress">
|
228 |
+
<span class="exp_count"><?php echo $subs_count; ?></span> left from <?php echo $subs_count; ?>
|
229 |
+
</div>
|
230 |
+
<div id="sbox-overlay" onclick="toggleChBDiv(false);">
|
231 |
+
</div>
|
232 |
+
<div id="ChBDiv">
|
233 |
+
<form action="#">
|
234 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
235 |
+
<p style="font-weight: bold; font-size: 18px; margin-top: 0px;">Select Columns</p>
|
236 |
+
<div class="fm_check_labels"><input type="checkbox" <?php echo ($lists['hide_label_list'] === '') ? 'checked="checked"' : ''; ?> onclick="clickLabChBAll(this)" id="ChBAll"/><label for="ChBAll"> All</label></div>
|
237 |
+
<?php
|
238 |
+
foreach ($templabels as $key => $curlabel) {
|
239 |
+
if (strpos($lists['hide_label_list'], '@' . $curlabel . '@') === FALSE) {
|
240 |
+
?>
|
241 |
+
<div class="fm_check_labels"><input type="checkbox" checked="checked" onclick="clickLabChB('<?php echo $curlabel; ?>', this)" id="fm_check_id_<?php echo $curlabel; ?>" /><label for="fm_check_id_<?php echo $curlabel; ?>"> <?php echo stripslashes($sorted_label_names_for_check[$key]); ?></label></div>
|
242 |
+
<?php
|
243 |
+
}
|
244 |
+
else {
|
245 |
+
?>
|
246 |
+
<div class="fm_check_labels"><input type="checkbox" onclick="clickLabChB('<?php echo $curlabel; ?>', this)" id="fm_check_id_<?php echo $curlabel; ?>"/><label for="fm_check_id_<?php echo $curlabel; ?>"> <?php echo stripslashes($sorted_label_names_for_check[$key]); ?></label></div>
|
247 |
+
<?php
|
248 |
+
}
|
249 |
+
}
|
250 |
+
$ispaypal = FALSE;
|
251 |
+
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
252 |
+
if ($sorted_label_types[$i] == 'type_paypal_payment_status') {
|
253 |
+
$ispaypal = TRUE;
|
254 |
+
}
|
255 |
+
}
|
256 |
+
if ($ispaypal) {
|
257 |
+
?>
|
258 |
+
<div class="fm_check_labels">
|
259 |
+
<input type="checkbox" onclick="clickLabChB('payment_info', this)" id="fm_check_payment_info" <?php echo (strpos($lists['hide_label_list'], '@payment_info@') === FALSE) ? 'checked="checked"' : ''; ?> />
|
260 |
+
<label for="fm_check_payment_info"> Payment Info</label>
|
261 |
+
</div>
|
262 |
+
<?php
|
263 |
+
}
|
264 |
+
?>
|
265 |
+
<div style="text-align: center; padding-top: 20px;">
|
266 |
+
<button onclick="toggleChBDiv(false); return false;" style="background: #4EC0D9; width: 78px; height: 32px; border: 1px solid #4EC0D9; border-radius: 0px; color: #fff; cursor: pointer;">Done</button>
|
267 |
+
</div>
|
268 |
+
</form>
|
269 |
+
</div>
|
270 |
+
<div class="fm-user-manual">
|
271 |
+
This section allows you to view and manage form submissions.
|
272 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-7.html">Read More in User Manual</a>
|
273 |
+
</div>
|
274 |
+
<div class="fm-upgrade-pro">
|
275 |
+
<a target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
276 |
+
<div class="fm-upgrade-img">
|
277 |
+
UPGRADE TO PRO VERSION
|
278 |
+
<span></span>
|
279 |
+
</div>
|
280 |
+
</a>
|
281 |
+
</div>
|
282 |
+
<div class="fm-clear"></div>
|
283 |
+
<form action="admin.php?page=submissions_fmc" method="post" id="admin_form" name="admin_form">
|
284 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
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">
|
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>
|
301 |
+
<button class="fm-button unblock-button medium" onclick="fm_set_input_value('task', 'unblock_ip'); fm_form_submit(event, 'admin_form');">
|
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>
|
309 |
+
</div>
|
310 |
+
</div>
|
311 |
+
<div class="submissions-toolbar">
|
312 |
+
<div class="submissions-tools">
|
313 |
+
<select name="form_id" id="form_id" onchange="document.admin_form.submit();">
|
314 |
+
<option value="0" selected="selected"> - Select a Form - </option>
|
315 |
+
<?php if ($forms) {
|
316 |
+
foreach($forms as $form) {
|
317 |
+
?>
|
318 |
+
<option value="<?php echo $form->id; ?>" <?php if ($form_id == $form->id) { echo 'selected="selected"'; }?>> <?php echo $form->title ?> </option>
|
319 |
+
<?php
|
320 |
+
}
|
321 |
+
} ?>
|
322 |
+
</select>
|
323 |
+
<div class="fm-reports">
|
324 |
+
<div class="fm-tools-button"><div class="fm-total_entries"><?php echo $statistics["total_entries"]; ?></div>Entries</div>
|
325 |
+
<div class="fm-tools-button"><div class="fm-total_rate"><?php echo $statistics["conversion_rate"]; ?></div>Conversion Rate</div>
|
326 |
+
<div class="fm-tools-button"><div class="fm-total_views"><?php echo $statistics["total_views"] ? $statistics["total_views"] : 0; ?></div>Views</div>
|
327 |
+
</div>
|
328 |
+
|
329 |
+
<div class="fm-export-tools">
|
330 |
+
<span class="exp_but_span">Export to</span>
|
331 |
+
|
332 |
+
<button class="fm-tools-button" onclick="export_submissions('csv', 0); return false;">
|
333 |
+
CSV
|
334 |
+
</button>
|
335 |
+
<button class="fm-tools-button" onclick="export_submissions('xml', 0); return false;">
|
336 |
+
XML
|
337 |
+
</button>
|
338 |
+
</div>
|
339 |
+
</div>
|
340 |
+
</div>
|
341 |
+
<div class="tablenav top">
|
342 |
+
<div class="fm-filters">
|
343 |
+
<div class="fm-search-tools">
|
344 |
+
<input type="hidden" name="hide_label_list" value="<?php echo $lists['hide_label_list']; ?>">
|
345 |
+
<button class="fm-icon show-filter-icon" onclick="show_hide_filter(); return false;" title="Show Filters">
|
346 |
+
<span></span>
|
347 |
+
</button>
|
348 |
+
<button class="fm-icon search-icon" onclick="fm_form_submit(event, 'admin_form'); return false;" title="Search">
|
349 |
+
</button>
|
350 |
+
<button class="fm-icon reset-icon" onclick="remove_all(); fm_form_submit(event, 'admin_form'); return false;" title="Reset">
|
351 |
+
</button>
|
352 |
+
</div>
|
353 |
+
<div class="fm-add-remove">
|
354 |
+
<?php if (isset($sorted_label_names)) { ?>
|
355 |
+
<button class="fm-button" onclick="toggleChBDiv(true); return false;">
|
356 |
+
Add/Remove Columns
|
357 |
+
</button>
|
358 |
+
<?php WDW_FMC_Library::html_page_nav($lists['total'], $lists['limit'], 'admin_form'); ?>
|
359 |
+
<?php } ?>
|
360 |
+
<input type="hidden" name="pagination_clicked" id="pagination_clicked" value=""/>
|
361 |
+
</div>
|
362 |
+
</div>
|
363 |
+
<div class="fm-clear"></div>
|
364 |
+
</div>
|
365 |
+
|
366 |
+
<div class="fm-loading-container" style="display:none;">
|
367 |
+
<div class="fm-loading-content">
|
368 |
+
</div>
|
369 |
+
</div>
|
370 |
+
<div class="submit_content" id="fm-scroll" style="width: 100%;">
|
371 |
+
<table class="wp-list-table widefat fixed posts table_content">
|
372 |
+
<thead>
|
373 |
+
<tr>
|
374 |
+
<?php if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))): ?>
|
375 |
+
<th class="table_small_col count_col sub-align">PDF</th>
|
376 |
+
<?php endif; ?>
|
377 |
+
<th class="table_small_col count_col sub-align">#</th>
|
378 |
+
<th scope="col" id="cb" class="manage-column column-cb check-column table_small_col sub-align form_check"><input id="check_all" type="checkbox"></th>
|
379 |
+
<th scope="col" id="submitid_fc" class="table_small_col sub-align submitid_fc <?php if ($order_by == "group_id") echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_id;?>>
|
380 |
+
<a href="" class="sub_id" onclick="fm_set_input_value('order_by', 'group_id');
|
381 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'group_id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
382 |
+
fm_form_submit(event, 'admin_form')">
|
383 |
+
<span>ID</span>
|
384 |
+
<span class="sorting-indicator" style="margin-top: 8px;"></span>
|
385 |
+
</a>
|
386 |
+
</th>
|
387 |
+
<th class="table_small_col sub-align">Edit</th>
|
388 |
+
<th class="table_small_col sub-align">Delete</th>
|
389 |
+
<th scope="col" id="submitdate_fc" class="table_large_col submitdate_fc <?php if ($order_by == "date") echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_date;?>>
|
390 |
+
<a href="" onclick="fm_set_input_value('order_by', 'date');
|
391 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'date' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
392 |
+
fm_form_submit(event, 'admin_form')">
|
393 |
+
<span>Submit date</span>
|
394 |
+
<span class="sorting-indicator"></span>
|
395 |
+
</a>
|
396 |
+
</th>
|
397 |
+
<th scope="col" id="submitterip_fc" class="table_medium_col_uncenter submitterip_fc <?php if ($order_by == "ip")echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_ip;?>>
|
398 |
+
<a href="" onclick="fm_set_input_value('order_by', 'ip');
|
399 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'ip' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
400 |
+
fm_form_submit(event, 'admin_form')">
|
401 |
+
<span>Submitter's IP</span>
|
402 |
+
<span class="sorting-indicator"></span>
|
403 |
+
</a>
|
404 |
+
</th>
|
405 |
+
<th scope="col" id="submitterusername_fc" class="table_medium_col_uncenter submitterusername_fc <?php if ($order_by == "display_name")echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_username;?>>
|
406 |
+
<a href="" onclick="fm_set_input_value('order_by', 'display_name');
|
407 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'display_name' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
408 |
+
fm_form_submit(event, 'admin_form')">
|
409 |
+
<span>Submitter's Username</span>
|
410 |
+
<span class="sorting-indicator"></span>
|
411 |
+
</a>
|
412 |
+
</th>
|
413 |
+
<th scope="col" id="submitteremail_fc" class="table_medium_col_uncenter submitteremail_fc <?php if ($order_by == "user_email")echo $oder_class; else echo $oder_class_default; ?>" <?php echo $style_useremail ;?>>
|
414 |
+
<a href="" onclick="fm_set_input_value('order_by', 'user_email');
|
415 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'user_email' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
416 |
+
fm_form_submit(event, 'admin_form')">
|
417 |
+
<span>Submitter's Email Address</span>
|
418 |
+
<span class="sorting-indicator"></span>
|
419 |
+
</a>
|
420 |
+
</th>
|
421 |
+
<?php
|
422 |
+
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
423 |
+
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
|
424 |
+
$styleStr2 = $this->model->hide_or_not($lists['hide_label_list'] , '@payment_info@');
|
425 |
+
$field_title = $this->model->get_type_address($sorted_label_types[$i], $sorted_label_names_original[$i]);
|
426 |
+
if ($sorted_label_types[$i] == 'type_paypal_payment_status') {
|
427 |
+
$ispaypal = TRUE;
|
428 |
+
?>
|
429 |
+
<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 . '"'; ?>">
|
430 |
+
<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')">
|
431 |
+
<span><?php echo $field_title; ?></span>
|
432 |
+
<span class="sorting-indicator"></span>
|
433 |
+
</a>
|
434 |
+
</th>
|
435 |
+
<th class="table_large_col payment_info_fc" <?php echo $styleStr2; ?>>Payment Info</th>
|
436 |
+
<?php
|
437 |
+
}
|
438 |
+
else {
|
439 |
+
?>
|
440 |
+
<th <?php echo $styleStr; ?> id="<?php echo $sorted_labels_id[$i] . '_fc';?>" class="<?php echo ($sorted_label_types[$i] == 'type_mark_map' || $sorted_label_types[$i] == 'type_matrix') ? 'table_large_col ' : ''; echo $sorted_labels_id[$i] . '_fc'; if ($order_by == $sorted_labels_id[$i] . "_field") echo $oder_class . '"';else echo $oder_class_default . '"'; ?>">
|
441 |
+
<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')">
|
442 |
+
<span><?php echo $field_title; ?></span>
|
443 |
+
<span class="sorting-indicator"></span>
|
444 |
+
</a>
|
445 |
+
</th>
|
446 |
+
<?php
|
447 |
+
}
|
448 |
+
}
|
449 |
+
?>
|
450 |
+
</tr>
|
451 |
+
<tr id="fields_filter" style="display: none;">
|
452 |
+
<th></th>
|
453 |
+
<th></th>
|
454 |
+
<th class="submitid_fc" <?php echo $style_id; ?> >
|
455 |
+
<input type="text" name="id_search" id="id_search" value="<?php echo $lists['id_search'] ?>" onChange="this.form.submit();" style="width:30px"/>
|
456 |
+
</th>
|
457 |
+
<th></th>
|
458 |
+
<th></th>
|
459 |
+
<th width="150" class="submitdate_fc" <?php echo $style_date; ?>>
|
460 |
+
<table align="center" style="margin:auto" class="simple_table">
|
461 |
+
<tr class="simple_table">
|
462 |
+
<td class="simple_table" style="text-align: left;">From:</td>
|
463 |
+
<td style="text-align: center;" class="simple_table">
|
464 |
+
<input class="inputbox" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="<?php echo $lists['startdate']; ?>" />
|
465 |
+
</td>
|
466 |
+
<td style="text-align: center;" class="simple_table">
|
467 |
+
<input type="reset" style="width: 22px; border-radius: 3px !important;" class="button" value="..." onclick="return showCalendar('startdate','%Y-%m-%d');" />
|
468 |
+
</td>
|
469 |
+
</tr>
|
470 |
+
<tr class="simple_table">
|
471 |
+
<td style="text-align: left;" class="simple_table">To:</td>
|
472 |
+
<td style="text-align: center;" class="simple_table">
|
473 |
+
<input class="inputbox" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="<?php echo $lists['enddate']; ?>" />
|
474 |
+
</td>
|
475 |
+
<td style="text-align: center;" class="simple_table">
|
476 |
+
<input type="reset" style="width: 22px; border-radius: 3px !important;" class="button" value="..." onclick="return showCalendar('enddate','%Y-%m-%d');" />
|
477 |
+
</td>
|
478 |
+
</tr>
|
479 |
+
</table>
|
480 |
+
</th>
|
481 |
+
<th class="table_medium_col_uncenter submitterip_fc" <?php echo $style_ip; ?>>
|
482 |
+
<input type="text" name="ip_search" id="ip_search" value="<?php echo $lists['ip_search']; ?>" onChange="this.form.submit();" />
|
483 |
+
</th>
|
484 |
+
<th class="table_medium_col_uncenter submitterusername_fc" <?php echo $style_username; ?>>
|
485 |
+
<input type="text" name="username_search" id="username_search" value="<?php echo $lists['username_search']; ?>" onChange="this.form.submit();" />
|
486 |
+
</th>
|
487 |
+
<th class="table_medium_col_uncenter submitteremail_fc" <?php echo $style_useremail; ?>>
|
488 |
+
<input type="text" name="useremail_search" id="useremail_search" value="<?php echo $lists['useremail_search']; ?>" onChange="this.form.submit();" />
|
489 |
+
</th>
|
490 |
+
<?php
|
491 |
+
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
492 |
+
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
|
493 |
+
if (!$ka_fielderov_search) {
|
494 |
+
if ($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search']) {
|
495 |
+
$ka_fielderov_search = TRUE;
|
496 |
+
}
|
497 |
+
}
|
498 |
+
switch ($sorted_label_types[$i]) {
|
499 |
+
case 'type_mark_map': ?>
|
500 |
+
<th class="table_large_col <?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>></th>
|
501 |
+
<?php
|
502 |
+
break;
|
503 |
+
case 'type_paypal_payment_status': ?>
|
504 |
+
<th class="table_large_col <?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
|
505 |
+
<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']; ?>" >
|
506 |
+
<option value="" ></option>
|
507 |
+
<option value="canceled" >Canceled</option>
|
508 |
+
<option value="cleared" >Cleared</option>
|
509 |
+
<option value="cleared by payment review" >Cleared by payment review</option>
|
510 |
+
<option value="completed" >Completed</option>
|
511 |
+
<option value="denied" >Denied</option>
|
512 |
+
<option value="failed" >Failed</option>
|
513 |
+
<option value="held" >Held</option>
|
514 |
+
<option value="in progress" >In progress</option>
|
515 |
+
<option value="on hold" >On hold</option>
|
516 |
+
<option value="paid" >Paid</option>
|
517 |
+
<option value="partially refunded" >Partially refunded</option>
|
518 |
+
<option value="pending verification" >Pending verification</option>
|
519 |
+
<option value="placed" >Placed</option>
|
520 |
+
<option value="processing" >Processing</option>
|
521 |
+
<option value="refunded" >Refunded</option>
|
522 |
+
<option value="refused" >Refused</option>
|
523 |
+
<option value="removed" >Removed</option>
|
524 |
+
<option value="returned" >Returned</option>
|
525 |
+
<option value="reversed" >Reversed</option>
|
526 |
+
<option value="temporary hold" >Temporary hold</option>
|
527 |
+
<option value="unclaimed" >Unclaimed</option>
|
528 |
+
</select>
|
529 |
+
<script>
|
530 |
+
var element = document.getElementById('<?php echo $form_id.'_'.$sorted_labels_id[$i]; ?>_search');
|
531 |
+
element.value = '<?php echo $lists[$form_id.'_'.$sorted_labels_id[$i].'_search']; ?>';
|
532 |
+
</script>
|
533 |
+
</th>
|
534 |
+
<th class="table_large_col payment_info_fc" <?php echo $styleStr2; ?>></th>
|
535 |
+
<?php
|
536 |
+
break;
|
537 |
+
default: ?>
|
538 |
+
<th class="<?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
|
539 |
+
<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();" >
|
540 |
+
</th>
|
541 |
+
<?php
|
542 |
+
break;
|
543 |
+
}
|
544 |
+
}
|
545 |
+
?>
|
546 |
+
</tr>
|
547 |
+
</thead>
|
548 |
+
<?php
|
549 |
+
$k = 0;
|
550 |
+
for ($www = 0, $qqq = count($group_id_s); $www < $qqq; $www++) {
|
551 |
+
$i = $group_id_s[$www];
|
552 |
+
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
553 |
+
$temp = $this->model->array_for_group_id($group_id_s[$www], $rows);
|
554 |
+
$data = $temp[0];
|
555 |
+
$userinfo=get_userdata($data->user_id_wd);
|
556 |
+
$useremail=$userinfo ? $userinfo->user_email : "";
|
557 |
+
$username=$userinfo ? $userinfo->display_name : "";
|
558 |
+
?>
|
559 |
+
<tr <?php echo $alternate; ?>>
|
560 |
+
<?php if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))): ?>
|
561 |
+
<td class="table_small_col pdf_col sub-align">
|
562 |
+
<?php if($pdf_data && isset($pdf_data[$group_id_s[$www]])): ?>
|
563 |
+
<a href="<?php echo site_url().'/'.$pdf_data[$group_id_s[$www]]; ?>" style="display: block;" download><img src="<?php echo WD_FM_PDF_URL . '/images/pdf-icon.png'; ?>" /></a>
|
564 |
+
<?php endif; ?>
|
565 |
+
</td>
|
566 |
+
<?php endif; ?>
|
567 |
+
<td class="table_small_col count_col sub-align"><?php echo $www + 1; ?></td>
|
568 |
+
<td class="check-column table_small_col sub-align" style="padding: 0;">
|
569 |
+
<input type="checkbox" name="post[]" value="<?php echo $data->group_id; ?>">
|
570 |
+
</td>
|
571 |
+
<td class="table_small_col sub-align submitid_fc" id="submitid_fc" <?php echo $style_id; ?>>
|
572 |
+
<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');" >
|
573 |
+
<?php echo $data->group_id; ?>
|
574 |
+
</a>
|
575 |
+
</td>
|
576 |
+
<td class="table_small_col sub-align">
|
577 |
+
<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
|
578 |
+
</a>
|
579 |
+
</td>
|
580 |
+
<td class="table_small_col sub-align">
|
581 |
+
<a href="" 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 $data->group_id; ?>); fm_form_submit(event, 'admin_form'); } else { return false; }">Delete
|
582 |
+
</a>
|
583 |
+
</td>
|
584 |
+
<td class="table_large_col submitdate_fc sub-align" id="submitdate_fc" <?php echo $style_date; ?>>
|
585 |
+
<a href="" onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id',<?php echo $data->group_id; ?>); fm_form_submit(event, 'admin_form');" ><?php echo $data->date ;?>
|
586 |
+
</a>
|
587 |
+
</td>
|
588 |
+
<td class="table_medium_col_uncenter submitterip_fc sub-align" id="submitterip_fc" <?php echo $style_ip; ?>>
|
589 |
+
<a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'fromipinfoinpopup_fmc', '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>
|
590 |
+
</td>
|
591 |
+
<td class="table_large_col submitterusername_fc sub-align" id="submitterusername_fc" <?php echo $style_username; ?>>
|
592 |
+
<?php echo $username; ?>
|
593 |
+
</td>
|
594 |
+
<td class="table_large_col submitteremail_fc sub-align" id="submitteremail_fc" <?php echo $style_useremail; ?>>
|
595 |
+
<?php echo $useremail; ?>
|
596 |
+
</td>
|
597 |
+
<?php
|
598 |
+
for ($h = 0; $h < $m; $h++) {
|
599 |
+
$not_label = TRUE;
|
600 |
+
for ($g = 0; $g < count($temp); $g++) {
|
601 |
+
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$h]);
|
602 |
+
if ($temp[$g]->element_label == $sorted_labels_id[$h]) {
|
603 |
+
if (strpos($temp[$g]->element_value, "***map***")) {
|
604 |
+
$map_params = explode('***map***', $temp[$g]->element_value);
|
605 |
+
?>
|
606 |
+
<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; ?>>
|
607 |
+
<a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'frommapeditinpopup_fmc', 'long' => $map_params[0], 'lat' => $map_params[1], 'width' => '620', 'height' => '550', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" title="Show on Map">Show on Map</a>
|
608 |
+
</td>
|
609 |
+
<?php
|
610 |
+
}
|
611 |
+
elseif (strpos($temp[$g]->element_value, "*@@url@@*")) {
|
612 |
+
?>
|
613 |
+
<td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
614 |
+
<?php
|
615 |
+
$new_files = explode("*@@url@@*", $temp[$g]->element_value);
|
616 |
+
foreach ($new_files as $new_file) {
|
617 |
+
if ($new_file) {
|
618 |
+
$new_filename = explode('/', $new_file);
|
619 |
+
$new_filename = $new_filename[count($new_filename) - 1];
|
620 |
+
?>
|
621 |
+
<a target="_blank" class="fm_fancybox" rel="group_<?php echo $www; ?>" href="<?php echo $new_file; ?>"><?php echo $new_filename; ?></a><br />
|
622 |
+
<?php
|
623 |
+
}
|
624 |
+
}
|
625 |
+
?>
|
626 |
+
</td>
|
627 |
+
<?php
|
628 |
+
}
|
629 |
+
elseif (strpos($temp[$g]->element_value, "***star_rating***")) {
|
630 |
+
$view_star_rating_array = $this->model->view_for_star_rating($temp[$g]->element_value, $temp[$g]->element_label);
|
631 |
+
$stars = $view_star_rating_array[0];
|
632 |
+
?>
|
633 |
+
<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>
|
634 |
+
<?php
|
635 |
+
}
|
636 |
+
elseif (strpos($temp[$g]->element_value, "***matrix***")) {
|
637 |
+
?>
|
638 |
+
<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; ?>>
|
639 |
+
<a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'show_matrix', 'matrix_params' => $temp[$g]->element_value, 'width' => '620', 'height' => '550', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" title="Show Matrix">Show Matrix</a>
|
640 |
+
</td>
|
641 |
+
<?php
|
642 |
+
}
|
643 |
+
elseif (strpos($temp[$g]->element_value, "@@@") !== FALSE || $temp[$g]->element_value == "@@@" || $temp[$g]->element_value == "@@@@@@@@@") {
|
644 |
+
?>
|
645 |
+
<td class="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
646 |
+
<p><?php echo str_replace("@@@", " ", $temp[$g]->element_value); ?></p>
|
647 |
+
</td>
|
648 |
+
<?php
|
649 |
+
}
|
650 |
+
elseif (strpos($temp[$g]->element_value, "***grading***")) {
|
651 |
+
$view_grading_array = $this->model->view_for_grading($temp[$g]->element_value);
|
652 |
+
$items = $view_grading_array[0];
|
653 |
+
?>
|
654 |
+
<td class="<?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
655 |
+
<p><?php echo $items; ?></p>
|
656 |
+
</td>
|
657 |
+
<?php
|
658 |
+
}
|
659 |
+
else {
|
660 |
+
if (strpos($temp[$g]->element_value, "***quantity***")) {
|
661 |
+
$temp[$g]->element_value = str_replace("***quantity***", " ", $temp[$g]->element_value);
|
662 |
+
}
|
663 |
+
if (strpos($temp[$g]->element_value, "***property***")) {
|
664 |
+
$temp[$g]->element_value = str_replace("***property***", " ", $temp[$g]->element_value);
|
665 |
+
}
|
666 |
|
667 |
+
if($sorted_label_types[$h]=="type_submitter_mail"){
|
668 |
+
$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]);
|
669 |
+
$isverified = $wpdb->get_var($query);
|
670 |
+
|
671 |
+
if($isverified) { ?>
|
672 |
+
<td class="<?php echo $sorted_labels_id[$h];?>_fc" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
673 |
+
<p><?php echo $temp[$g]->element_value; ?> <span style="color:#2DA068;">( Verified <img src="<?php echo WD_FMC_URL . '/images/verified.png'; ?>" /> )</span></p>
|
674 |
+
</td>
|
675 |
+
<?php }
|
676 |
+
else {?>
|
677 |
+
<td class="<?php echo $sorted_labels_id[$h];?>_fc" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
678 |
+
<p><?php echo $temp[$g]->element_value; ?></p>
|
679 |
+
</td>
|
680 |
+
<?php }
|
681 |
+
}
|
682 |
+
else{
|
683 |
+
?>
|
684 |
+
<td class="<?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
685 |
+
<p><?php echo str_replace("***br***", '<br>', stripslashes($temp[$g]->element_value)) ; ?></p>
|
686 |
+
</td>
|
687 |
+
<?php
|
688 |
+
}
|
689 |
+
}
|
690 |
+
$not_label = FALSE;
|
691 |
+
}
|
692 |
+
}
|
693 |
+
if ($not_label) {
|
694 |
+
?>
|
695 |
+
<td class="<?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>><p> </p></td>
|
696 |
+
<?php
|
697 |
+
}
|
698 |
+
}
|
699 |
+
if ($ispaypal) {
|
700 |
+
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], '@payment_info@');
|
701 |
+
?>
|
702 |
+
<td class="table_large_col payment_info_fc sub-align" id="payment_info_fc" <?php echo $styleStr; ?>>
|
703 |
+
<a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'paypal_info', 'id' => $i, 'width' => '600', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>">
|
704 |
+
<img src="<?php echo WD_FMC_URL . '/images/info.png'; ?>" />
|
705 |
+
</a>
|
706 |
+
</td>
|
707 |
+
<?php
|
708 |
+
}
|
709 |
+
?>
|
710 |
+
</tr>
|
711 |
+
<?php
|
712 |
+
$k = 1 - $k;
|
713 |
+
}
|
714 |
+
?>
|
715 |
+
</table>
|
716 |
+
</div>
|
717 |
+
<?php
|
718 |
+
if ($sorted_label_types) {
|
719 |
+
foreach ($sorted_label_types as $key => $sorted_label_type) {
|
720 |
+
if ($this->model->check_radio_type($sorted_label_type)) {
|
721 |
+
$is_stats = true;
|
722 |
+
break;
|
723 |
+
}
|
724 |
+
}
|
725 |
+
if ($is_stats) {
|
726 |
+
$ajax_nonce = wp_create_nonce( "nonce_fmc_ajax" );
|
727 |
+
?>
|
728 |
+
<br/>
|
729 |
+
<div class="fm-statistics">
|
730 |
+
<h1>Statistics</h1>
|
731 |
+
<table class="stats">
|
732 |
+
<tr>
|
733 |
+
<td>
|
734 |
+
<label for="sorted_label_key">Select a Field:</label>
|
735 |
+
</td>
|
736 |
+
<td>
|
737 |
+
<select id="sorted_label_key">
|
738 |
+
<option value="">Select a Field</option>
|
739 |
+
<?php
|
740 |
+
foreach ($sorted_label_types as $key => $sorted_label_type) {
|
741 |
+
if ($sorted_label_type=="type_checkbox" || $sorted_label_type=="type_radio" || $sorted_label_type=="type_own_select" || $sorted_label_type=="type_country" || $sorted_label_type=="type_paypal_select" || $sorted_label_type=="type_paypal_radio" || $sorted_label_type=="type_paypal_checkbox" || $sorted_label_type=="type_paypal_shipping") {
|
742 |
+
?>
|
743 |
+
<option value="<?php echo $key; ?>"><?php echo $sorted_label_names_original[$key]; ?></option>
|
744 |
+
<?php
|
745 |
+
}
|
746 |
+
}
|
747 |
+
?>
|
748 |
+
</select>
|
749 |
+
</td>
|
750 |
+
<td></td>
|
751 |
+
</tr>
|
752 |
+
<tr>
|
753 |
+
<td>
|
754 |
+
<label>Select a Date:</label>
|
755 |
+
</td>
|
756 |
+
<td>
|
757 |
+
From: <input class="inputbox" type="text" name="startstats" id="startstats" size="9" maxlength="9" />
|
758 |
+
<input type="reset" class="button" style="width: 22px;" value="..." name="startstats_but" id="startstats_but" onclick="return showCalendar('startstats','%Y-%m-%d');" />
|
759 |
+
|
760 |
+
To: <input class="inputbox" type="text" name="endstats" id="endstats" size="9" maxlength="9" />
|
761 |
+
<input type="reset" class="button" style="width: 22px;" value="..." name="endstats_but" id="endstats_but" onclick="return showCalendar('endstats','%Y-%m-%d');" />
|
762 |
+
</td>
|
763 |
+
<td>
|
764 |
+
<button onclick="show_stats(); return false;">Show</button>
|
765 |
+
</td>
|
766 |
+
</tr>
|
767 |
+
</table>
|
768 |
+
|
769 |
+
<div id="div_stats"></div>
|
770 |
+
</div>
|
771 |
+
<script>
|
772 |
+
function show_stats() {
|
773 |
+
jQuery('#div_stats').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
774 |
+
if(jQuery('#sorted_label_key').val()!="") {
|
775 |
+
jQuery('#div_stats').load('<?php echo add_query_arg(array('action' => 'get_stats_fmc', 'page' => 'submissions_fmc'), admin_url('admin-ajax.php')); ?>', {
|
776 |
+
'task': 'show_stats',
|
777 |
+
'form_id' : '<?php echo $form_id; ?>',
|
778 |
+
'sorted_label_key' : jQuery('#sorted_label_key').val(),
|
779 |
+
'startdate' : jQuery('#startstats').val(),
|
780 |
+
'enddate' : jQuery('#endstats').val(),
|
781 |
+
'nonce_fmc_ajax': '<?php echo $ajax_nonce; ?>'
|
782 |
+
});
|
783 |
+
}
|
784 |
+
else {
|
785 |
+
jQuery('#div_stats').html("<div style='padding:10px 5px; color:red; font-size:14px;'>Please select the field!</div>");
|
786 |
+
}
|
787 |
+
jQuery("#div_stats").removeClass("fm_loading");
|
788 |
+
}
|
789 |
+
</script>
|
790 |
+
<?php
|
791 |
+
}
|
792 |
+
}
|
793 |
+
?>
|
794 |
+
</div>
|
795 |
+
</form>
|
796 |
+
<script>
|
797 |
+
function fm_scroll(element) {
|
798 |
+
var scrollbar= document.createElement('div');
|
799 |
+
scrollbar.appendChild(document.createElement('div'));
|
800 |
+
scrollbar.style.overflow= 'auto';
|
801 |
+
scrollbar.style.overflowY= 'hidden';
|
802 |
+
scrollbar.firstChild.style.width= element.scrollWidth+'px';
|
803 |
+
scrollbar.firstChild.style.paddingTop= '1px';
|
804 |
+
scrollbar.firstChild.appendChild(document.createTextNode('\xA0'));
|
805 |
+
scrollbar.onscroll= function() {
|
806 |
+
element.scrollLeft= scrollbar.scrollLeft;
|
807 |
+
};
|
808 |
+
element.onscroll= function() {
|
809 |
+
scrollbar.scrollLeft= element.scrollLeft;
|
810 |
+
};
|
811 |
+
element.parentNode.insertBefore(scrollbar, element);
|
812 |
+
}
|
813 |
+
jQuery(window).load(function() {
|
814 |
+
fm_popup();
|
815 |
+
fm_scroll(document.getElementById('fm-scroll'));
|
816 |
+
if (typeof jQuery().fancybox !== 'undefined' && jQuery.isFunction(jQuery().fancybox)) {
|
817 |
+
jQuery(".fm_fancybox").fancybox({
|
818 |
+
'maxWidth ' : 600,
|
819 |
+
'maxHeight' : 500
|
820 |
+
});
|
821 |
+
}
|
822 |
+
});
|
823 |
+
<?php if ($ka_fielderov_search) { ?>
|
824 |
+
document.getElementById('fields_filter').style.display = '';
|
825 |
+
<?php } ?>
|
826 |
+
</script>
|
827 |
+
<?php
|
828 |
}
|
829 |
+
|
830 |
+
public function show_stats($form_id) {
|
831 |
+
$key = (isset($_POST['sorted_label_key']) ? esc_html(stripslashes($_POST['sorted_label_key'])) : '');
|
832 |
+
$labels_parameters = $this->model->get_labels_parameters($form_id);
|
833 |
+
$where_choices = $labels_parameters[7];
|
834 |
+
$sorted_label_names_original = $labels_parameters[4];
|
835 |
+
$sorted_labels_id = $labels_parameters[0];
|
836 |
+
if(count($sorted_labels_id)!=0 && $key < count($sorted_labels_id) ) {
|
837 |
+
$choices_params = $this->model->statistic_for_radio($where_choices, $sorted_labels_id[$key]);
|
838 |
+
$sorted_label_name_original = $sorted_label_names_original[$key];
|
839 |
+
$choices_count = $choices_params[0];
|
840 |
+
$choices_labels = $choices_params[1];
|
841 |
+
$unanswered = $choices_params[2];
|
842 |
+
$all = $choices_params[3];
|
843 |
+
$colors = $choices_params[4];
|
844 |
+
$choices_colors = $choices_params[5];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
845 |
}
|
846 |
+
else {
|
847 |
+
$choices_labels = array();
|
848 |
+
$sorted_label_name_original = '';
|
849 |
+
$unanswered = NULL;
|
850 |
+
$all = 0;
|
|
|
|
|
851 |
}
|
852 |
+
?>
|
853 |
+
<br/>
|
854 |
+
<br/>
|
855 |
+
<div class="field-label"><?php echo stripslashes($sorted_label_name_original); ?></div>
|
856 |
+
<table class="adminlist">
|
857 |
+
<thead>
|
858 |
+
<tr>
|
859 |
+
<th width="20%">Choices</th>
|
860 |
+
<th>Percentage</th>
|
861 |
+
<th width="10%">Count</th>
|
862 |
+
</tr>
|
863 |
+
</thead>
|
864 |
+
<?php
|
865 |
+
$k=0;
|
866 |
+
foreach ($choices_labels as $key => $choices_label) {
|
867 |
+
if (strpos($choices_label, "***quantity***")) {
|
868 |
+
$choices_label = str_replace("***quantity***", " ", $choices_label);
|
869 |
+
}
|
870 |
+
if (strpos($choices_label, "***property***")) {
|
871 |
+
$choices_label = str_replace("***property***", " ", $choices_label);
|
872 |
+
}
|
873 |
+
?>
|
874 |
+
<tr>
|
875 |
+
<td class="label<?php echo $k; ?>"><?php echo str_replace("***br***",'<br>', $choices_label)?></td>
|
876 |
+
<td>
|
877 |
+
<div class="bordered" style="width:<?php echo ($choices_count[$key]/($all-$unanswered))*100; ?>%; height:16px; background-color:<?php echo $colors[$key % 2]; ?>; float: left;">
|
878 |
+
</div>
|
879 |
+
<div <?php echo ($choices_count[$key]/($all-$unanswered)!=1 ? 'class="bordered'.$k.'"' : "") ?> style="width:<?php echo 100-($choices_count[$key]/($all-$unanswered))*100; ?>%; height:16px; background-color:#F2F0F1; float: left;">
|
880 |
+
</div>
|
881 |
+
</td>
|
882 |
+
<td>
|
883 |
+
<div>
|
884 |
+
<div style="width: 0; height: 0; border-top: 8px solid transparent;border-bottom: 8px solid transparent; border-right:8px solid <?php echo $choices_colors[$key % 2]; ?>; float:left;">
|
885 |
+
</div>
|
886 |
+
<div style="background-color:<?php echo $choices_colors[$key % 2]; ?>; height:16px; width:16px; text-align: center; margin-left:8px; color: #fff;">
|
887 |
+
<?php echo $choices_count[$key]?>
|
888 |
+
</div>
|
889 |
+
</div>
|
890 |
+
</td>
|
891 |
+
</tr>
|
892 |
+
<tr>
|
893 |
+
<td colspan="3">
|
894 |
+
</td>
|
895 |
+
</tr>
|
896 |
+
<?php
|
897 |
+
$k = 1 - $k;
|
898 |
+
}
|
899 |
+
if($unanswered){
|
900 |
+
?>
|
901 |
+
<tr>
|
902 |
+
<td colspan="2" style="text-align:right; color: #000;">Unanswered</th>
|
903 |
+
<td><strong style="margin-left:10px;"><?php echo $unanswered;?></strong></th>
|
904 |
+
</tr>
|
905 |
+
<?php
|
906 |
+
}
|
907 |
+
?>
|
908 |
+
<tr>
|
909 |
+
<td colspan="2" style="text-align:right; color: #000;"><strong>Total</strong></th>
|
910 |
+
<td><strong style="margin-left:10px;"><?php echo $all;?></strong></th>
|
911 |
+
</tr>
|
912 |
+
</table>
|
913 |
+
<?php
|
914 |
+
die();
|
915 |
+
}
|
916 |
|
917 |
public function edit($id) {
|
918 |
$current_id = ((isset($id)) ? $id : 0);
|
934 |
<tr>
|
935 |
<td width="100%"><h2>Edit Submission</h2></td>
|
936 |
<td align="right">
|
937 |
+
<input type="button" onclick="fm_set_input_value('task', 'save');
|
938 |
+
fm_set_input_value('current_id', <?php echo $current_id; ?>);
|
939 |
+
fm_form_submit(event, 'adminForm');" value="Save" class="button-secondary action">
|
940 |
</td>
|
941 |
<td align="right">
|
942 |
+
<input type="button" onclick="fm_set_input_value('task', 'apply');
|
943 |
+
fm_set_input_value('current_id', <?php echo $current_id ;?>);
|
944 |
+
fm_form_submit(event, 'adminForm');" value="Apply" class="button-secondary action">
|
945 |
</td>
|
946 |
<td align="right">
|
947 |
+
<input type="button" onclick="fm_set_input_value('task', '');fm_form_submit(event, 'adminForm');" value="Cancel" class="button-secondary action">
|
948 |
</td>
|
949 |
</tr>
|
950 |
</tbody>
|
1164 |
<input type="hidden" id="task" name="task" value="" />
|
1165 |
<input type="hidden" value="<?php echo WD_FMC_URL; ?>" id="form_plugins_url" />
|
1166 |
<script>
|
1167 |
+
plugin_url = document.getElementById('form_plugins_url').value;
|
1168 |
</script>
|
1169 |
</form>
|
1170 |
<?php
|
1180 |
$ispaypal = $params[4];
|
1181 |
$form = $params[5];
|
1182 |
$form_theme = $params[6];
|
1183 |
+
$userinfo = get_userdata($rows[0]->user_id_wd);
|
1184 |
+
$username = $userinfo ? $userinfo->display_name : "";
|
1185 |
+
$useremail = $userinfo ? $userinfo->user_email : "";
|
|
|
1186 |
?>
|
1187 |
+
<div class="fm-user-manual">
|
1188 |
+
This section allows you to edit form submissions.
|
1189 |
+
<a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-form-maker-guide-6.html">Read More in User Manual</a>
|
1190 |
+
</div>
|
1191 |
+
<div class="fm-upgrade-pro">
|
1192 |
+
<a target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
1193 |
+
<div class="fm-upgrade-img">
|
1194 |
+
UPGRADE TO PRO VERSION
|
1195 |
+
<span></span>
|
1196 |
+
</div>
|
1197 |
+
</a>
|
1198 |
+
</div>
|
1199 |
+
<div class="fm-clear"></div>
|
1200 |
<form action="admin.php?page=submissions_fmc" method="post" id="formform_id_temp" name="formform_id_temp">
|
1201 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
1202 |
+
<div class="fm-page-header">
|
1203 |
+
<div class="fm-page-title">Edit Submission</div>
|
1204 |
+
<div class="fm-page-actions">
|
1205 |
+
<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');">
|
1206 |
+
<span></span>
|
1207 |
+
Save
|
1208 |
+
</button>
|
1209 |
+
<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');">
|
1210 |
+
<span></span>
|
1211 |
+
Apply
|
1212 |
+
</button>
|
1213 |
+
<button class="fm-button cancel-button small" onclick="fm_set_input_value('task', '');fm_form_submit(event, 'formform_id_temp');">
|
1214 |
+
<span></span>
|
1215 |
+
Cancel
|
1216 |
+
</button>
|
1217 |
+
</div>
|
1218 |
+
<div class="fm-clear"></div>
|
1219 |
+
</div>
|
1220 |
+
<div class="fm-submissins-edit">
|
1221 |
+
<table>
|
1222 |
+
<tr>
|
1223 |
+
<td class="fm-key"><label for="ID">ID: </label></td>
|
1224 |
+
<td><?php echo $rows[0]->group_id; ?></td>
|
1225 |
+
</tr>
|
1226 |
+
<tr>
|
1227 |
+
<td class="fm-key"><label for="Date">Date: </label></td>
|
1228 |
+
<td><?php echo $rows[0]->date; ?></td>
|
1229 |
+
</tr>
|
1230 |
+
<tr>
|
1231 |
+
<td class="fm-key"><label for="IP">IP: </label></td>
|
1232 |
+
<td><?php echo $rows[0]->ip; ?></td>
|
1233 |
+
</tr>
|
1234 |
+
<tr>
|
1235 |
+
<td class="fm-key"><label for="Submitter's Username">Submitter's Username: </label></td>
|
1236 |
+
<td><?php echo $username; ?></td>
|
1237 |
+
</tr>
|
1238 |
+
<tr>
|
1239 |
+
<td class="fm-key"><label for="Submitter's Email Address">Submitter's Email Address: </label></td>
|
1240 |
+
<td><?php echo $useremail; ?></td>
|
1241 |
+
</tr>
|
1242 |
+
</table>
|
1243 |
+
<?php
|
1244 |
+
$css_rep1 = array("[SITE_ROOT]");
|
1245 |
+
$css_rep2 = array(WD_FMC_URL);
|
1246 |
+
$order = array("\r\n", "\n", "\r");
|
1247 |
+
$form_theme = str_replace($order, '', $form_theme);
|
1248 |
+
$form_theme = str_replace($css_rep1, $css_rep2, $form_theme);
|
1249 |
+
$form_theme = "#form" . $form->id . ' ' . $form_theme;
|
1250 |
+
?>
|
1251 |
+
<style>
|
|
|
|
|
|
|
|
|
|
|
1252 |
<?php
|
1253 |
echo $form_theme;
|
1254 |
?>
|
1532 |
if($element_value =='')
|
1533 |
$element_value = '@@@';
|
1534 |
|
1535 |
+
$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');
|
1536 |
+
$temp = $params;
|
1537 |
+
if(strpos($temp, 'w_name_fields') > -1)
|
1538 |
+
$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');
|
1539 |
|
1540 |
foreach($params_names as $params_name ) {
|
1541 |
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
1545 |
|
1546 |
|
1547 |
if($temp) {
|
1548 |
+
$temp = explode('*:*w_attr_name*:*',$temp);
|
1549 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
1550 |
foreach($attrs as $attr)
|
1551 |
$param['attributes'] = $param['attributes'].' '.$attr;
|
1552 |
}
|
1553 |
|
1554 |
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
1555 |
+
$param['w_name_fields'] = isset($param['w_name_fields']) ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
|
1556 |
+
$w_name_fields = explode('***', $param['w_name_fields']);
|
1557 |
+
$element_value = explode('@@@', $element_value);
|
1558 |
+
|
1559 |
+
if($w_name_fields[0]== 'no' && $w_name_fields[1]== 'no' ) {
|
1560 |
+
$w_name_format = '
|
1561 |
+
<div style="display: table-cell; width:50%">
|
1562 |
+
<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>
|
1563 |
+
<div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
|
1564 |
+
</div>
|
1565 |
+
<div style="display:table-cell;"><div style="margin: 0px 8px; padding: 0px;"></div></div>
|
1566 |
+
<div style="display: table-cell; width:50%">
|
1567 |
+
<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>
|
1568 |
+
<div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
|
1569 |
+
</div>
|
1570 |
+
';
|
1571 |
+
$w_size=2*$param['w_size'];
|
1572 |
+
}
|
1573 |
+
else {
|
1574 |
+
$first_last_size = $w_name_fields[0] == 'yes' && $w_name_fields[1] == 'no' ? 45 : 30;
|
1575 |
+
$w_name_format = '
|
1576 |
+
<div style="display: table-cell; width:30%">
|
1577 |
+
<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>
|
1578 |
+
<div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
|
1579 |
+
</div>
|
1580 |
+
<div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
|
1581 |
+
<div style="display: table-cell; width:30%">
|
1582 |
+
<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>
|
1583 |
+
<div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
|
1584 |
+
</div>';
|
1585 |
+
$w_size = 2*$param['w_size'];
|
1586 |
+
|
1587 |
+
if($w_name_fields[0] == 'yes') {
|
1588 |
+
$w_name_format = '
|
1589 |
+
<div style="display: table-cell;">
|
1590 |
+
<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>
|
1591 |
+
<div><label class="mini_label">'.$w_mini_labels[0].'</label></div>
|
1592 |
+
</div>
|
1593 |
+
<div style="display:table-cell;"><div style="margin: 0px 1px; padding: 0px;"></div></div>'.$w_name_format;
|
1594 |
+
$w_size += 80;
|
1595 |
+
}
|
1596 |
+
if($w_name_fields[1] == 'yes') {
|
1597 |
+
$w_name_format = $w_name_format.'
|
1598 |
+
<div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
|
1599 |
+
<div style="display: table-cell; width:30%">
|
1600 |
+
<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>
|
1601 |
+
<div><label class="mini_label">'.$w_mini_labels[3].'</label></div>
|
1602 |
+
</div>
|
1603 |
+
';
|
1604 |
+
$w_size += $param['w_size'];
|
1605 |
+
}
|
1606 |
+
}
|
1607 |
+
|
1608 |
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$w_size) : max($param['w_field_label_size'],$w_size));
|
1609 |
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1610 |
|
1675 |
$g++;
|
1676 |
$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>';
|
1677 |
}
|
1678 |
+
$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");
|
1679 |
$w_options = '';
|
1680 |
foreach($w_countries as $w_country) {
|
1681 |
if($w_country == $elements_of_address[5])
|
1727 |
break;
|
1728 |
}
|
1729 |
|
1730 |
+
case 'type_checkbox':
|
|
|
|
|
|
|
1731 |
|
1732 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1733 |
|
1734 |
+
|
|
|
|
|
|
|
|
|
1735 |
|
1736 |
+
$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');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1737 |
|
1738 |
+
$temp=$params;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1739 |
|
1740 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
|
|
|
|
1741 |
|
1742 |
+
$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');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1743 |
|
1744 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1745 |
|
1746 |
+
foreach($params_names as $params_name )
|
|
|
|
|
1747 |
|
1748 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1749 |
|
1750 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
|
|
|
|
|
|
|
|
|
|
1751 |
|
1752 |
+
$param[$params_name] = $temp[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1753 |
|
1754 |
+
$temp=$temp[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1755 |
|
1756 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1757 |
|
1758 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1759 |
|
1760 |
+
if($temp)
|
|
|
|
|
1761 |
|
1762 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1763 |
|
1764 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
|
|
|
|
|
|
|
|
|
|
|
|
1765 |
|
1766 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
1767 |
+
|
1768 |
+
foreach($attrs as $attr)
|
1769 |
+
|
1770 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
1771 |
+
|
1772 |
+
}
|
1773 |
+
|
1774 |
+
|
1775 |
+
|
1776 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
1777 |
+
|
1778 |
+
if(!isset($param['w_value_disabled']))
|
1779 |
+
|
1780 |
+
$param['w_value_disabled'] = 'no';
|
1781 |
+
|
1782 |
+
|
1783 |
+
|
1784 |
+
if(!isset($param['w_field_option_pos']))
|
1785 |
+
|
1786 |
+
$param['w_field_option_pos'] = 'left';
|
1787 |
+
|
1788 |
+
|
1789 |
+
|
1790 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
1791 |
+
|
1792 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
1793 |
+
|
1794 |
+
|
1795 |
+
|
1796 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
1797 |
+
|
1798 |
+
if(isset($param['w_choices_value']))
|
1799 |
+
|
1800 |
+
{
|
1801 |
+
|
1802 |
+
$param['w_choices_value'] = explode('***',$param['w_choices_value']);
|
1803 |
+
|
1804 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
1805 |
+
|
1806 |
+
}
|
1807 |
+
|
1808 |
+
|
1809 |
+
|
1810 |
+
$element_value = explode('***br***',$element_value);
|
1811 |
+
|
1812 |
+
$element_value = array_slice($element_value,0, count($element_value)-1);
|
1813 |
+
|
1814 |
+
$is_other=false;
|
1815 |
+
|
1816 |
+
$other_value = '';
|
1817 |
+
|
1818 |
+
|
1819 |
+
|
1820 |
+
foreach($element_value as $key => $value)
|
1821 |
+
|
1822 |
+
{
|
1823 |
+
|
1824 |
+
if(!in_array($value, ($param['w_value_disabled']=='no' ? $param['w_choices'] : (isset($param['w_choices_value']) ? $param['w_choices_value'] : array()))))
|
1825 |
+
|
1826 |
+
{
|
1827 |
+
|
1828 |
+
$other_value = $value;
|
1829 |
+
|
1830 |
+
$is_other=true;
|
1831 |
+
|
1832 |
+
break;
|
1833 |
+
|
1834 |
+
}
|
1835 |
+
|
1836 |
+
}
|
1837 |
+
|
1838 |
+
|
1839 |
+
|
1840 |
+
$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>';
|
1841 |
+
|
1842 |
+
|
1843 |
+
|
1844 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
1845 |
+
|
1846 |
+
|
1847 |
+
|
1848 |
+
$rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
1849 |
+
|
1850 |
+
$total_queries = 0;
|
1851 |
+
|
1852 |
+
foreach($param['w_choices'] as $key => $choice)
|
1853 |
+
|
1854 |
+
{
|
1855 |
+
|
1856 |
+
$key1 = $key + $total_queries;
|
1857 |
+
|
1858 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
1859 |
+
|
1860 |
+
{
|
1861 |
+
|
1862 |
+
$choices_labels =array();
|
1863 |
+
$choices_values = array();
|
1864 |
+
|
1865 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
1866 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
1867 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
1868 |
+
|
1869 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
1870 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
1871 |
+
|
1872 |
+
|
1873 |
+
|
1874 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
1875 |
+
|
1876 |
+
$table = $label_table_and_column[0];
|
1877 |
+
|
1878 |
+
$label_column = $label_table_and_column[1];
|
1879 |
+
|
1880 |
+
if($label_column)
|
1881 |
+
|
1882 |
+
{
|
1883 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
1884 |
+
|
1885 |
+
}
|
1886 |
+
|
1887 |
+
|
1888 |
+
|
1889 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_value'][$key]));
|
1890 |
+
|
1891 |
+
$value_column = $value_table_and_column[1];
|
1892 |
+
|
1893 |
+
|
1894 |
+
|
1895 |
+
if($value_column)
|
1896 |
+
|
1897 |
+
{
|
1898 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
1899 |
+
|
1900 |
+
}
|
1901 |
+
|
1902 |
+
$columns_count_checkbox = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
1903 |
+
|
1904 |
+
|
1905 |
+
|
1906 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
1907 |
+
|
1908 |
+
{
|
1909 |
+
|
1910 |
+
$total_queries = $total_queries + $columns_count_checkbox-1;
|
1911 |
+
|
1912 |
+
|
1913 |
+
|
1914 |
+
if(!isset($post_value))
|
1915 |
+
|
1916 |
+
$param['w_choices_checked'][$key]=($param['w_choices_checked'][$key]=='true' ? 'checked="checked"' : '');
|
1917 |
+
|
1918 |
+
|
1919 |
+
|
1920 |
+
for($k=0; $k<$columns_count_checkbox; $k++)
|
1921 |
+
|
1922 |
+
{
|
1923 |
+
|
1924 |
+
$choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
|
1925 |
+
|
1926 |
+
$choice_value = isset($choices_values[$k]) ? $choices_values[$k] : $choice_label;
|
1927 |
+
|
1928 |
+
if(($key1+$k)%$param['w_rowcol']==0 && ($key1+$k)>0)
|
1929 |
+
|
1930 |
+
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
1931 |
+
|
1932 |
+
|
1933 |
+
|
1934 |
+
$checked=(in_array($choice_value, $element_value) ? 'checked="checked"' : '');
|
1935 |
+
|
1936 |
+
|
1937 |
+
|
1938 |
+
$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("wdform_'.$id1.'","'.($key1+$k).'","'.$form_id.'")) show_other_input("wdform_'.$id1.'","'.$form_id.'");"' : '').' '.$param['attributes'].' '.$checked.'><label for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'"></label></div></div>';
|
1939 |
+
|
1940 |
+
|
1941 |
+
|
1942 |
+
}
|
1943 |
+
|
1944 |
+
}
|
1945 |
+
|
1946 |
+
}
|
1947 |
+
|
1948 |
+
else
|
1949 |
+
|
1950 |
+
{
|
1951 |
+
|
1952 |
+
if($key1%$param['w_rowcol']==0 && $key1>0)
|
1953 |
+
|
1954 |
+
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
1955 |
+
|
1956 |
+
|
1957 |
+
|
1958 |
+
$checked=(in_array($choice, $element_value) ? 'checked="checked"' : '');
|
1959 |
+
|
1960 |
+
|
1961 |
+
|
1962 |
+
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key && $is_other)
|
1963 |
+
|
1964 |
+
$checked = 'checked="checked"';
|
1965 |
+
|
1966 |
+
|
1967 |
+
|
1968 |
+
|
1969 |
+
|
1970 |
+
$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).'" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'onclick="if(set_checked("wdform_'.$id1.'","'.$key1.'","'.$form_id.'")) show_other_input("wdform_'.$id1.'","'.$form_id.'");"' : '').' '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.$key1.'"></label></div></div>';
|
1971 |
+
|
1972 |
+
|
1973 |
+
|
1974 |
+
$param['w_allow_other_num'] = $param['w_allow_other_num']==$key ? $key1 : $param['w_allow_other_num'];
|
1975 |
+
|
1976 |
+
}
|
1977 |
+
|
1978 |
+
}
|
1979 |
+
|
1980 |
+
$rep.='</div>';
|
1981 |
+
|
1982 |
+
|
1983 |
+
|
1984 |
+
$rep.='</div></div>';
|
1985 |
+
|
1986 |
+
|
1987 |
+
|
1988 |
+
|
1989 |
+
|
1990 |
+
if($is_other)
|
1991 |
+
|
1992 |
+
$onload_js .='show_other_input("wdform_'.$id1.'","'.$form_id.'"); jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val("'.$other_value.'");';
|
1993 |
+
|
1994 |
+
|
1995 |
+
|
1996 |
+
$onsubmit_js.='
|
1997 |
+
|
1998 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other'.$form_id.'\" value = \"'.$param['w_allow_other'].'\" />").appendTo("#adminForm");
|
1999 |
+
|
2000 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other_num'.$form_id.'\" value = \"'.$param['w_allow_other_num'].'\" />").appendTo("#adminForm");
|
2001 |
+
|
2002 |
+
';
|
2003 |
+
|
2004 |
+
|
2005 |
+
|
2006 |
+
break;
|
2007 |
+
|
2008 |
+
}
|
2009 |
+
|
2010 |
+
case 'type_radio':
|
2011 |
+
|
2012 |
+
{
|
2013 |
+
|
2014 |
+
|
2015 |
+
|
2016 |
+
|
2017 |
+
|
2018 |
+
$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');
|
2019 |
+
|
2020 |
+
$temp=$params;
|
2021 |
+
|
2022 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
2023 |
+
|
2024 |
+
$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');
|
2025 |
+
|
2026 |
+
|
2027 |
+
|
2028 |
+
foreach($params_names as $params_name )
|
2029 |
+
|
2030 |
+
{
|
2031 |
+
|
2032 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2033 |
+
|
2034 |
+
$param[$params_name] = $temp[0];
|
2035 |
+
|
2036 |
+
$temp=$temp[1];
|
2037 |
+
|
2038 |
+
}
|
2039 |
+
|
2040 |
+
|
2041 |
+
|
2042 |
+
if($temp)
|
2043 |
+
|
2044 |
+
{
|
2045 |
+
|
2046 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2047 |
+
|
2048 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2049 |
+
|
2050 |
+
foreach($attrs as $attr)
|
2051 |
+
|
2052 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
2053 |
+
|
2054 |
+
}
|
2055 |
+
|
2056 |
+
if(!isset($param['w_value_disabled']))
|
2057 |
+
|
2058 |
+
$param['w_value_disabled'] = 'no';
|
2059 |
+
|
2060 |
+
|
2061 |
+
|
2062 |
+
if(!isset($param['w_field_option_pos']))
|
2063 |
+
|
2064 |
+
$param['w_field_option_pos'] = 'left';
|
2065 |
+
|
2066 |
+
|
2067 |
+
|
2068 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
2069 |
+
|
2070 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
2071 |
+
|
2072 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
2073 |
+
|
2074 |
+
|
2075 |
+
|
2076 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
2077 |
+
|
2078 |
+
if(isset($param['w_choices_value']))
|
2079 |
+
|
2080 |
+
{
|
2081 |
+
|
2082 |
+
$param['w_choices_value'] = explode('***',$param['w_choices_value']);
|
2083 |
+
|
2084 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
2085 |
+
|
2086 |
+
}
|
2087 |
+
|
2088 |
+
|
2089 |
+
|
2090 |
+
$is_other=true;
|
2091 |
+
|
2092 |
+
|
2093 |
+
|
2094 |
+
foreach($param['w_choices'] as $key => $choice)
|
2095 |
+
|
2096 |
+
{
|
2097 |
+
|
2098 |
+
$choice_value = isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice;
|
2099 |
+
|
2100 |
+
if($choice_value==$element_value)
|
2101 |
+
|
2102 |
+
{
|
2103 |
+
|
2104 |
+
$is_other=false;
|
2105 |
+
|
2106 |
+
break;
|
2107 |
+
|
2108 |
+
}
|
2109 |
+
|
2110 |
+
}
|
2111 |
+
|
2112 |
+
|
2113 |
+
|
2114 |
+
$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>';
|
2115 |
+
|
2116 |
+
|
2117 |
+
|
2118 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
2119 |
+
|
2120 |
+
|
2121 |
+
|
2122 |
+
$rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
2123 |
+
|
2124 |
+
$total_queries =0;
|
2125 |
+
|
2126 |
+
foreach($param['w_choices'] as $key => $choice)
|
2127 |
+
|
2128 |
+
{
|
2129 |
+
|
2130 |
+
$key1 = $key + $total_queries;
|
2131 |
+
|
2132 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
2133 |
+
|
2134 |
+
{
|
2135 |
+
|
2136 |
+
$choices_labels =array();
|
2137 |
+
$choices_values =array();
|
2138 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
2139 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
2140 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
2141 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
2142 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
2143 |
+
|
2144 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
2145 |
+
|
2146 |
+
$table = $label_table_and_column[0];
|
2147 |
+
|
2148 |
+
$label_column = $label_table_and_column[1];
|
2149 |
+
|
2150 |
+
if($label_column) {
|
2151 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
2152 |
+
}
|
2153 |
+
|
2154 |
+
|
2155 |
+
|
2156 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_value'][$key]));
|
2157 |
+
|
2158 |
+
$value_column = $value_table_and_column[1];
|
2159 |
+
|
2160 |
+
|
2161 |
+
|
2162 |
+
if($value_column) {
|
2163 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
2164 |
+
}
|
2165 |
+
|
2166 |
+
|
2167 |
+
|
2168 |
+
$columns_count_radio = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
2169 |
+
|
2170 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
2171 |
+
|
2172 |
+
{
|
2173 |
+
|
2174 |
+
$total_queries = $total_queries + $columns_count_radio-1;
|
2175 |
+
|
2176 |
+
|
2177 |
+
|
2178 |
+
for($k=0; $k<$columns_count_radio; $k++)
|
2179 |
+
|
2180 |
+
{
|
2181 |
+
|
2182 |
+
$choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
|
2183 |
+
|
2184 |
+
$choice_value = isset($choices_values[$k]) ? $choices_values[$k] : $choice_label;
|
2185 |
+
|
2186 |
+
|
2187 |
+
|
2188 |
+
if(($key1+$k)%$param['w_rowcol']==0 && ($key1+$k)>0)
|
2189 |
+
|
2190 |
+
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
2191 |
+
|
2192 |
+
|
2193 |
+
|
2194 |
+
$checked =($choice_value==$element_value ? 'checked="checked"' : '');
|
2195 |
+
|
2196 |
+
if($choice_value==$element_value)
|
2197 |
+
|
2198 |
+
$is_other=false;
|
2199 |
+
|
2200 |
+
|
2201 |
+
|
2202 |
+
$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("wdform_'.$id1.'","'.($key1+$k).'","'.$form_id.'"); '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'show_other_input("wdform_'.$id1.'","'.$form_id.'");' : '').'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'"></label></div></div>';
|
2203 |
+
|
2204 |
+
|
2205 |
+
|
2206 |
+
}
|
2207 |
+
|
2208 |
+
}
|
2209 |
+
|
2210 |
+
}
|
2211 |
+
|
2212 |
+
else
|
2213 |
+
|
2214 |
+
{
|
2215 |
+
|
2216 |
+
if($key1%$param['w_rowcol']==0 && $key1>0)
|
2217 |
+
|
2218 |
+
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
2219 |
+
|
2220 |
+
|
2221 |
+
|
2222 |
+
$checked =($choice==$element_value ? 'checked="checked"' : '');
|
2223 |
+
|
2224 |
+
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key && $is_other==true && $element_value!='')
|
2225 |
+
|
2226 |
+
$checked = 'checked="checked"';
|
2227 |
+
|
2228 |
+
$choice_value = isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice;
|
2229 |
+
|
2230 |
+
|
2231 |
+
|
2232 |
+
$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("wdform_'.$id1.'","'.$key1.'","'.$form_id.'"); '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'show_other_input("wdform_'.$id1.'","'.$form_id.'");' : '').'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.$key1.'"></label></div></div>';
|
2233 |
+
|
2234 |
+
|
2235 |
+
|
2236 |
+
$param['w_allow_other_num'] = $param['w_allow_other_num']==$key ? $key1 : $param['w_allow_other_num'];
|
2237 |
+
|
2238 |
+
}
|
2239 |
+
|
2240 |
+
}
|
2241 |
+
|
2242 |
+
$rep.='</div>';
|
2243 |
+
|
2244 |
+
|
2245 |
+
|
2246 |
+
$rep.='</div></div>';
|
2247 |
+
|
2248 |
+
|
2249 |
+
|
2250 |
+
|
2251 |
+
|
2252 |
+
if($is_other && $element_value!='')
|
2253 |
+
|
2254 |
+
$onload_js .='show_other_input("wdform_'.$id1.'","'.$form_id.'"); jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val("'.$element_value.'");';
|
2255 |
+
|
2256 |
+
|
2257 |
+
|
2258 |
+
$onsubmit_js.='
|
2259 |
+
|
2260 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other'.$form_id.'\" value = \"'.$param['w_allow_other'].'\" />").appendTo("#form'.$form_id.'");
|
2261 |
+
|
2262 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other_num'.$form_id.'\" value = \"'.$param['w_allow_other_num'].'\" />").appendTo("#adminForm");
|
2263 |
+
|
2264 |
+
';
|
2265 |
+
|
2266 |
+
|
2267 |
+
|
2268 |
+
break;
|
2269 |
+
|
2270 |
+
}
|
2271 |
+
|
2272 |
+
case 'type_own_select':
|
2273 |
+
|
2274 |
+
{
|
2275 |
+
|
2276 |
+
|
2277 |
+
|
2278 |
+
$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');
|
2279 |
+
|
2280 |
+
$temp=$params;
|
2281 |
+
|
2282 |
+
if(strpos($temp, 'w_choices_value') > -1)
|
2283 |
+
|
2284 |
+
$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');
|
2285 |
+
|
2286 |
+
|
2287 |
+
|
2288 |
+
foreach($params_names as $params_name )
|
2289 |
+
|
2290 |
+
{
|
2291 |
+
|
2292 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2293 |
+
|
2294 |
+
$param[$params_name] = $temp[0];
|
2295 |
+
|
2296 |
+
$temp=$temp[1];
|
2297 |
+
|
2298 |
+
}
|
2299 |
+
|
2300 |
+
|
2301 |
+
|
2302 |
+
|
2303 |
+
|
2304 |
+
if($temp)
|
2305 |
+
|
2306 |
+
{
|
2307 |
+
|
2308 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2309 |
+
|
2310 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2311 |
+
|
2312 |
+
foreach($attrs as $attr)
|
2313 |
+
|
2314 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
2315 |
+
|
2316 |
+
}
|
2317 |
+
|
2318 |
+
|
2319 |
+
|
2320 |
+
|
2321 |
+
|
2322 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
2323 |
+
|
2324 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
2325 |
+
|
2326 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
2327 |
+
|
2328 |
+
|
2329 |
+
|
2330 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
2331 |
+
|
2332 |
+
$param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
|
2333 |
+
|
2334 |
+
if(isset($param['w_choices_value']))
|
2335 |
+
|
2336 |
+
{
|
2337 |
+
|
2338 |
+
$param['w_choices_value'] = explode('***',$param['w_choices_value']);
|
2339 |
+
|
2340 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
2341 |
+
|
2342 |
+
}
|
2343 |
+
|
2344 |
+
|
2345 |
+
|
2346 |
+
if(!isset($param['w_value_disabled']))
|
2347 |
+
|
2348 |
+
$param['w_value_disabled'] = 'no';
|
2349 |
+
|
2350 |
+
|
2351 |
+
|
2352 |
+
$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>';
|
2353 |
+
|
2354 |
+
|
2355 |
+
|
2356 |
+
$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'].'>';
|
2357 |
+
|
2358 |
+
foreach($param['w_choices'] as $key => $choice)
|
2359 |
+
|
2360 |
+
{
|
2361 |
+
|
2362 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
2363 |
+
|
2364 |
+
{
|
2365 |
+
|
2366 |
+
$choices_labels =array();
|
2367 |
+
$choices_values = array();
|
2368 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
2369 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
2370 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
2371 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
2372 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
2373 |
+
|
2374 |
+
|
2375 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
2376 |
+
|
2377 |
+
$table = $label_table_and_column[0];
|
2378 |
+
|
2379 |
+
$label_column = $label_table_and_column[1];
|
2380 |
+
|
2381 |
+
if($label_column)
|
2382 |
+
|
2383 |
+
{
|
2384 |
+
|
2385 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
2386 |
+
|
2387 |
+
}
|
2388 |
+
|
2389 |
+
|
2390 |
+
|
2391 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_value'][$key]));
|
2392 |
+
|
2393 |
+
$value_column = $param['w_choices_disabled'][$key]=="true" ? '' : $value_table_and_column[1];
|
2394 |
+
|
2395 |
+
|
2396 |
+
|
2397 |
+
if($value_column)
|
2398 |
+
|
2399 |
+
{
|
2400 |
+
|
2401 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
2402 |
+
|
2403 |
+
}
|
2404 |
+
|
2405 |
+
|
2406 |
+
|
2407 |
+
$columns_count = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
2408 |
+
|
2409 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
2410 |
+
|
2411 |
+
for($k=0; $k<$columns_count; $k++)
|
2412 |
+
|
2413 |
+
{
|
2414 |
+
|
2415 |
+
$choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
|
2416 |
+
|
2417 |
+
$choice_value = isset($choices_values[$k]) ? $choices_values[$k] : ($param['w_choices_disabled'][$key]=="true" ? '' : $choice_label);
|
2418 |
+
|
2419 |
+
|
2420 |
+
|
2421 |
+
$selected=($element_value && htmlspecialchars($choice_value)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
|
2422 |
+
|
2423 |
+
|
2424 |
+
|
2425 |
+
$rep.='<option value="'.htmlspecialchars($choice_value).'" '.$selected.'>'.$choice_label.'</option>';
|
2426 |
+
|
2427 |
+
|
2428 |
+
|
2429 |
+
}
|
2430 |
+
|
2431 |
+
}
|
2432 |
+
|
2433 |
+
else
|
2434 |
+
|
2435 |
+
{
|
2436 |
+
|
2437 |
+
$choice_value = $param['w_choices_disabled'][$key]=="true" ? '' : (isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice);
|
2438 |
+
|
2439 |
+
|
2440 |
+
|
2441 |
+
$selected=($element_value && htmlspecialchars($choice_value)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
|
2442 |
+
|
2443 |
+
|
2444 |
+
|
2445 |
+
$rep.='<option value="'.htmlspecialchars($choice_value).'" '.$selected.'>'.$choice.'</option>';
|
2446 |
+
|
2447 |
+
}
|
2448 |
+
|
2449 |
+
}
|
2450 |
+
|
2451 |
+
$rep.='</select></div></div>';
|
2452 |
+
|
2453 |
+
|
2454 |
+
|
2455 |
+
|
2456 |
+
|
2457 |
+
break;
|
2458 |
+
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
case 'type_country': {
|
2462 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_size','w_countries','w_required','w_class');
|
2463 |
+
$temp=$params;
|
2464 |
+
foreach($params_names as $params_name ) {
|
2465 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2466 |
+
$param[$params_name] = $temp[0];
|
2467 |
+
$temp=$temp[1];
|
2468 |
+
}
|
2469 |
+
|
2470 |
+
if($temp) {
|
2471 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2472 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2473 |
+
foreach($attrs as $attr)
|
2474 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
2475 |
+
}
|
2476 |
+
|
2477 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
2478 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
2479 |
+
|
2480 |
+
$param['w_countries'] = explode('***',$param['w_countries']);
|
2481 |
+
|
2482 |
+
$selected='';
|
2483 |
+
|
2484 |
+
$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>';
|
2485 |
+
|
2486 |
+
$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'].'>';
|
2487 |
+
foreach($param['w_countries'] as $key => $choice) {
|
2488 |
+
|
2489 |
+
$selected=(htmlspecialchars($choice)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
|
2490 |
+
|
2491 |
+
$choice_value=$choice;
|
2492 |
+
$rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice.'</option>';
|
2493 |
+
}
|
2494 |
+
$rep.='</select></div></div>';
|
2495 |
+
|
2496 |
+
break;
|
2497 |
+
}
|
2498 |
+
|
2499 |
+
case 'type_time': {
|
2500 |
+
if($element_value =='')
|
2501 |
+
$element_value = ':';
|
2502 |
+
|
2503 |
+
$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');
|
2504 |
+
$temp=$params;
|
2505 |
+
|
2506 |
+
foreach($params_names as $params_name ) {
|
2507 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2508 |
+
$param[$params_name] = $temp[0];
|
2509 |
+
$temp=$temp[1];
|
2510 |
+
}
|
2511 |
+
|
2512 |
+
if($temp) {
|
2513 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2514 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2515 |
+
foreach($attrs as $attr)
|
2516 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
2517 |
+
}
|
2518 |
+
|
2519 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
2520 |
+
|
2521 |
+
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
2522 |
+
$element_value = explode(':',$element_value);
|
2523 |
+
|
2524 |
+
|
2525 |
+
$w_sec = '';
|
2526 |
+
$w_sec_label='';
|
2527 |
+
|
2528 |
+
if($param['w_sec']=='1') {
|
2529 |
+
$w_sec = '<div align="center" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;"> : </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, "wdform_'.$id1.'_ss'.$form_id.'")" '.$param['attributes'].'></div>';
|
2530 |
+
|
2531 |
+
$w_sec_label='<div style="display: table-cell;"></div><div style="display: table-cell;"><label class="mini_label">'.$w_mini_labels[2].'</label></div>';
|
2532 |
+
}
|
2533 |
+
|
2534 |
+
|
2535 |
+
if($param['w_time_type']=='12') {
|
2536 |
+
if(strpos($element_value[2],'pm')!==false) {
|
2537 |
+
$am_ = "";
|
2538 |
+
$pm_ = "selected=\"selected\"";
|
2539 |
+
}
|
2540 |
+
else {
|
2541 |
+
$am_ = "selected=\"selected\"";
|
2542 |
+
$pm_ = "";
|
2543 |
+
}
|
2544 |
+
|
2545 |
+
$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>';
|
2546 |
+
|
2547 |
+
$w_time_type_label = '<div ><label class="mini_label">'.$w_mini_labels[3].'</label></div>';
|
2548 |
+
|
2549 |
+
}
|
2550 |
+
else {
|
2551 |
+
$w_time_type='';
|
2552 |
+
$w_time_type_label = '';
|
2553 |
+
}
|
2554 |
+
|
2555 |
+
$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>';
|
2556 |
+
|
2557 |
+
$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, "wdform_'.$id1.'_hh'.$form_id.'", "23")" '.$param['attributes'].'></div><div align="center" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;"> : </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, "wdform_'.$id1.'_mm'.$form_id.'")" '.$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>';
|
2558 |
+
|
2559 |
+
break;
|
2560 |
+
}
|
2561 |
+
|
2562 |
+
case 'type_date': {
|
2563 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_date','w_required','w_class','w_format','w_but_val');
|
2564 |
+
$temp = $params;
|
2565 |
+
if(strpos($temp, 'w_disable_past_days') > -1)
|
2566 |
+
$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');
|
2567 |
+
|
2568 |
+
foreach($params_names as $params_name ) {
|
2569 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2570 |
+
$param[$params_name] = $temp[0];
|
2571 |
+
$temp=$temp[1];
|
2572 |
+
}
|
2573 |
+
|
2574 |
+
if($temp) {
|
2575 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2576 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2577 |
+
foreach($attrs as $attr)
|
2578 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
2579 |
+
}
|
2580 |
+
|
2581 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
2582 |
+
|
2583 |
+
$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>';
|
2584 |
+
|
2585 |
+
$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>';
|
2586 |
+
|
2587 |
+
|
2588 |
+
// $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});';
|
2589 |
+
|
2590 |
+
break;
|
2591 |
+
}
|
2592 |
+
|
2593 |
+
case 'type_date_fields': {
|
2594 |
+
if($element_value=='')
|
2595 |
+
$element_value='--';
|
2596 |
+
|
2597 |
+
$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');
|
2598 |
+
|
2599 |
+
$temp=$params;
|
2600 |
+
|
2601 |
+
foreach($params_names as $params_name ) {
|
2602 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2603 |
+
$param[$params_name] = $temp[0];
|
2604 |
+
$temp=$temp[1];
|
2605 |
+
}
|
2606 |
+
|
2607 |
+
|
2608 |
+
if($temp) {
|
2609 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2610 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2611 |
+
foreach($attrs as $attr)
|
2612 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
2613 |
+
}
|
2614 |
+
|
2615 |
+
$element_value = explode('-',$element_value);
|
2616 |
+
|
2617 |
+
$param['w_day'] = (isset($_POST['wdform_'.$id1."_day".$form_id]) ? esc_html(stripslashes( $_POST['wdform_'.$id1."_day".$form_id])) : $param['w_day']);
|
2618 |
+
$param['w_month'] = (isset($_POST['wdform_'.$id1."_month".$form_id]) ? esc_html(stripslashes( $_POST['wdform_'.$id1."_month".$form_id])) : $element_value[1]);//??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
|
2619 |
+
$param['w_year'] = (isset($_POST['wdform_'.$id1."w_year".$form_id]) ? esc_html(stripslashes( $_POST['wdform_'.$id1."_year".$form_id])) : $param['w_year']);
|
2620 |
+
|
2621 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
2622 |
+
|
2623 |
+
if($param['w_day_type']=="SELECT") {
|
2624 |
+
|
2625 |
+
$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>';
|
2626 |
+
|
2627 |
+
for($k=1; $k<=31; $k++) {
|
2628 |
+
|
2629 |
+
if($k<10) {
|
2630 |
+
if($element_value[0]=='0'.$k)
|
2631 |
+
$selected = "selected=\"selected\"";
|
2632 |
+
else
|
2633 |
+
$selected = "";
|
2634 |
+
|
2635 |
+
$w_day_type .= '<option value="0'.$k.'" '.$selected.'>0'.$k.'</option>';
|
2636 |
+
}
|
2637 |
+
else {
|
2638 |
+
if($element_value[0]==''.$k)
|
2639 |
+
$selected = "selected=\"selected\"";
|
2640 |
+
else
|
2641 |
+
$selected = "";
|
2642 |
+
|
2643 |
+
$w_day_type .= '<option value="'.$k.'" '.$selected.'>'.$k.'</option>';
|
2644 |
+
}
|
2645 |
+
|
2646 |
+
}
|
2647 |
+
$w_day_type .= '</select>';
|
2648 |
+
|
2649 |
+
}
|
2650 |
+
else {
|
2651 |
+
$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'].'>';
|
2652 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_day'.$form_id.'").blur(function() {if (jQuery(this).val()=="0") jQuery(this).val(""); else add_0(this)});';
|
2653 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_day'.$form_id.'").keypress(function() {return check_day(event, this)});';
|
2654 |
+
}
|
2655 |
+
|
2656 |
+
|
2657 |
+
if($param['w_month_type']=="SELECT") {
|
2658 |
+
|
2659 |
+
$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>';
|
2660 |
+
}
|
2661 |
+
else {
|
2662 |
+
$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'].'>';
|
2663 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_month'.$form_id.'").blur(function() {if (jQuery(this).val()=="0") jQuery(this).val(""); else add_0(this)});';
|
2664 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_month'.$form_id.'").keypress(function() {return check_month(event, this)});';
|
2665 |
+
}
|
2666 |
+
|
2667 |
+
|
2668 |
+
if($param['w_year_type']=="SELECT" ) {
|
2669 |
+
$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>';
|
2670 |
+
|
2671 |
+
for($k=$param['w_to']; $k>=$param['w_from']; $k--) {
|
2672 |
+
if($element_value[2]==$k)
|
2673 |
+
$selected = "selected=\"selected\"";
|
2674 |
+
else
|
2675 |
+
$selected = "";
|
2676 |
+
|
2677 |
+
$w_year_type .= '<option value="'.$k.'" '.$selected.'>'.$k.'</option>';
|
2678 |
+
}
|
2679 |
+
$w_year_type .= '</select>';
|
2680 |
+
}
|
2681 |
+
else {
|
2682 |
+
$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'].'>';
|
2683 |
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").blur(function() {check_year2(this)});';
|
2684 |
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").keypress(function() {return check_year1(event, this)});';
|
2685 |
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").change(function() {change_year(this)});';
|
2693 |
}
|
2694 |
|
2695 |
|
2696 |
+
case 'type_hidden': {
|
2697 |
+
$params_names=array('w_name','w_value');
|
2698 |
+
$temp=$params;
|
2699 |
+
|
2700 |
+
foreach($params_names as $params_name ) {
|
2701 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2702 |
+
$param[$params_name] = $temp[0];
|
2703 |
+
$temp=$temp[1];
|
2704 |
+
}
|
2705 |
+
|
2706 |
+
if($temp) {
|
2707 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2708 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2709 |
+
foreach($attrs as $attr)
|
2710 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
2711 |
+
}
|
2712 |
+
|
2713 |
+
$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>';
|
2714 |
+
|
2715 |
+
break;
|
2716 |
+
}
|
2717 |
+
|
2718 |
+
|
2719 |
+
case 'type_paypal_price': {
|
2720 |
+
|
2721 |
+
$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');
|
2722 |
+
$temp=$params;
|
2723 |
+
|
2724 |
+
foreach($params_names as $params_name ) {
|
2725 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2726 |
+
$param[$params_name] = $temp[0];
|
2727 |
+
$temp=$temp[1];
|
2728 |
+
}
|
2729 |
+
|
2730 |
+
|
2731 |
+
if($temp) {
|
2732 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2733 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2734 |
+
foreach($attrs as $attr)
|
2735 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
2736 |
+
}
|
2737 |
+
|
2738 |
+
if (strpos($element_value,'.')!== false)
|
2739 |
+
$element = explode('.',$element_value);
|
2740 |
+
else {
|
2741 |
+
$element = Array();
|
2742 |
+
$element[0] = preg_replace("/[^0-9]/","",$element_value);
|
2743 |
+
$element[1] = '';
|
2744 |
+
}
|
2745 |
+
|
2746 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
2747 |
+
|
2748 |
+
$hide_cents = ($param['w_hide_cents']=="yes" ? "none;" : "table-cell;");
|
2749 |
+
|
2750 |
+
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
2751 |
+
|
2752 |
+
$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>';
|
2753 |
+
|
2754 |
+
$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--> '.$form_currency.' <!--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;"> . </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>';
|
2755 |
+
|
2756 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_element_cents'.$form_id.'").blur(function() {add_0(this)});';
|
2757 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_element_cents'.$form_id.'").keypress(function() {return check_isnum_interval(event,this,0,99)});';
|
2758 |
+
|
2759 |
+
break;
|
2760 |
+
}
|
2761 |
+
|
2762 |
+
case 'type_paypal_select':
|
2763 |
+
|
2764 |
+
{
|
2765 |
+
|
2766 |
+
|
2767 |
+
|
2768 |
+
if($element_value=='')
|
2769 |
+
|
2770 |
+
$element_value = ' :';
|
2771 |
+
|
2772 |
+
|
2773 |
+
|
2774 |
+
$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');
|
2775 |
+
|
2776 |
+
$temp=$params;
|
2777 |
+
|
2778 |
+
|
2779 |
+
|
2780 |
+
if(strpos($temp, 'w_choices_params') > -1)
|
2781 |
+
|
2782 |
+
$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');
|
2783 |
+
|
2784 |
+
|
2785 |
+
|
2786 |
+
foreach($params_names as $params_name )
|
2787 |
+
|
2788 |
+
{
|
2789 |
+
|
2790 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
2791 |
+
|
2792 |
+
$param[$params_name] = $temp[0];
|
2793 |
+
|
2794 |
+
$temp=$temp[1];
|
2795 |
+
|
2796 |
+
}
|
2797 |
+
|
2798 |
+
|
2799 |
+
|
2800 |
+
|
2801 |
+
|
2802 |
+
if($temp)
|
2803 |
+
|
2804 |
+
{
|
2805 |
+
|
2806 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
2807 |
+
|
2808 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
2809 |
+
|
2810 |
+
foreach($attrs as $attr)
|
2811 |
+
|
2812 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
2813 |
+
|
2814 |
+
}
|
2815 |
+
|
2816 |
+
|
2817 |
+
|
2818 |
+
|
2819 |
+
|
2820 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
2821 |
+
|
2822 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
2823 |
+
|
2824 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
2825 |
+
|
2826 |
+
|
2827 |
+
|
2828 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
2829 |
+
|
2830 |
+
$param['w_choices_price'] = explode('***',$param['w_choices_price']);
|
2831 |
+
|
2832 |
+
|
2833 |
+
|
2834 |
+
$param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
|
2835 |
+
|
2836 |
+
$param['w_property'] = explode('***',$param['w_property']);
|
2837 |
+
|
2838 |
+
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
2839 |
+
|
2840 |
+
if(isset($param['w_choices_params']))
|
2841 |
+
|
2842 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
2843 |
+
|
2844 |
+
|
2845 |
+
|
2846 |
+
|
2847 |
+
|
2848 |
+
if(strpos($element_value,'***br***') !== false)
|
2849 |
+
|
2850 |
+
{
|
2851 |
+
|
2852 |
+
$element_value = explode('***br***',$element_value);
|
2853 |
+
|
2854 |
+
if(count($element_value)==2)
|
2855 |
+
|
2856 |
+
{
|
2857 |
+
|
2858 |
+
if(strpos($element_value[1],'***quantity***') !== false)
|
2859 |
+
|
2860 |
+
{
|
2861 |
+
|
2862 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
2863 |
+
|
2864 |
+
$quantity_value = $quantity_value[1];
|
2865 |
+
|
2866 |
+
$property_of_select = '';
|
2867 |
+
|
2868 |
+
}
|
2869 |
+
|
2870 |
+
else
|
2871 |
+
|
2872 |
+
{
|
2873 |
+
|
2874 |
+
$quantity_value = '' ;
|
2875 |
+
|
2876 |
+
$property_of_select = explode(': ',str_replace("***property***","",$element_value[1]));
|
2877 |
+
|
2878 |
+
$property_of_select = $property_of_select[1];
|
2879 |
+
|
2880 |
+
}
|
2881 |
+
|
2882 |
+
|
2883 |
+
|
2884 |
+
$element_value = explode(' :',$element_value[0]);
|
2885 |
+
|
2886 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
2887 |
+
|
2888 |
+
}
|
2889 |
+
|
2890 |
+
else
|
2891 |
+
|
2892 |
+
{
|
2893 |
+
|
2894 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
2895 |
+
|
2896 |
+
$quantity_value = $quantity_value[1];
|
2897 |
+
|
2898 |
+
$property_of_select = explode(': ',str_replace("***property***","",$element_value[2]));
|
2899 |
+
|
2900 |
+
$property_of_select = $property_of_select[1];
|
2901 |
+
|
2902 |
+
$element_value = explode(' :',$element_value[0]);
|
2903 |
+
|
2904 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
2905 |
+
|
2906 |
+
}
|
2907 |
+
|
2908 |
+
}
|
2909 |
+
|
2910 |
+
else
|
2911 |
+
|
2912 |
+
{
|
2913 |
+
|
2914 |
+
$element_value = explode(' :',$element_value);
|
2915 |
+
|
2916 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
2917 |
+
|
2918 |
+
$quantity_value = '';
|
2919 |
+
|
2920 |
+
$property_of_select = '';
|
2921 |
+
|
2922 |
+
}
|
2923 |
+
|
2924 |
+
|
2925 |
+
|
2926 |
+
|
2927 |
+
|
2928 |
+
$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>';
|
2929 |
+
|
2930 |
+
|
2931 |
+
|
2932 |
+
$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'].'>';
|
2933 |
+
|
2934 |
+
foreach($param['w_choices'] as $key => $choice)
|
2935 |
+
|
2936 |
+
{
|
2937 |
+
|
2938 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
2939 |
+
|
2940 |
+
{
|
2941 |
+
|
2942 |
+
$choices_labels =array();
|
2943 |
+
$choices_values =array();
|
2944 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
2945 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
2946 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
2947 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
2948 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
2949 |
+
|
2950 |
+
|
2951 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
2952 |
+
|
2953 |
+
$table = $label_table_and_column[0];
|
2954 |
+
|
2955 |
+
$label_column = $label_table_and_column[1];
|
2956 |
+
|
2957 |
+
if($label_column)
|
2958 |
+
|
2959 |
+
{
|
2960 |
+
|
2961 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
2962 |
+
|
2963 |
+
}
|
2964 |
+
|
2965 |
+
|
2966 |
+
|
2967 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
|
2968 |
+
|
2969 |
+
$value_column = $param['w_choices_disabled'][$key]=="true" ? '' : $value_table_and_column[1];
|
2970 |
+
|
2971 |
+
|
2972 |
+
|
2973 |
+
if($value_column)
|
2974 |
+
|
2975 |
+
{
|
2976 |
+
|
2977 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
2978 |
+
|
2979 |
+
}
|
2980 |
+
|
2981 |
+
|
2982 |
+
|
2983 |
+
$columns_count = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
2984 |
+
|
2985 |
+
|
2986 |
+
|
2987 |
+
for($k=0; $k<$columns_count; $k++)
|
2988 |
+
|
2989 |
+
{
|
2990 |
+
|
2991 |
+
$choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
|
2992 |
+
|
2993 |
+
$choice_value = isset($choices_values[$k]) ? (float)$choices_values[$k] : '';
|
2994 |
+
|
2995 |
+
|
2996 |
+
|
2997 |
+
if($element_value[0] == $choice_label && $choice_value == $choise_value)
|
2998 |
+
|
2999 |
+
$selected = 'selected="selected"';
|
3000 |
+
|
3001 |
+
else
|
3002 |
+
|
3003 |
+
$selected = '';
|
3004 |
+
|
3005 |
+
|
3006 |
+
|
3007 |
+
$rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice_label.'</option>';
|
3008 |
+
|
3009 |
+
}
|
3010 |
+
|
3011 |
+
}
|
3012 |
+
|
3013 |
+
else
|
3014 |
+
|
3015 |
+
{
|
3016 |
+
|
3017 |
+
if($param['w_choices_disabled'][$key]=="true")
|
3018 |
+
|
3019 |
+
$choice_value='';
|
3020 |
+
|
3021 |
+
else
|
3022 |
+
|
3023 |
+
$choice_value=$param['w_choices_price'][$key];
|
3024 |
+
|
3025 |
+
|
3026 |
+
|
3027 |
+
if($element_value[0] == $choice && $param['w_choices_price'][$key] == $choise_value)
|
3028 |
+
|
3029 |
+
$selected = 'selected="selected"';
|
3030 |
+
|
3031 |
+
else
|
3032 |
+
|
3033 |
+
$selected = '';
|
3034 |
+
|
3035 |
+
|
3036 |
+
|
3037 |
+
$rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice.'</option>';
|
3038 |
+
|
3039 |
+
|
3040 |
+
|
3041 |
+
}
|
3042 |
+
|
3043 |
+
}
|
3044 |
+
|
3045 |
+
$rep.='</select><div id="wdform_'.$id1.'_div'.$form_id.'">';
|
3046 |
+
|
3047 |
+
if($param['w_quantity']=="yes")
|
3048 |
+
|
3049 |
+
{
|
3050 |
+
|
3051 |
+
$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>';
|
3052 |
+
|
3053 |
+
}
|
3054 |
+
|
3055 |
+
if($param['w_property'][0])
|
3056 |
+
|
3057 |
+
foreach($param['w_property'] as $key => $property)
|
3058 |
+
|
3059 |
+
{
|
3060 |
+
|
3061 |
+
|
3062 |
+
|
3063 |
+
$rep.='
|
3064 |
+
|
3065 |
+
<div id="wdform_'.$id1.'_property_'.$key.'" class="paypal-property">
|
3066 |
+
|
3067 |
+
<div style="width:150px; display:inline-block;">
|
3068 |
+
|
3069 |
+
<label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
|
3070 |
+
|
3071 |
+
<select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
|
3072 |
+
|
3073 |
+
$param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
|
3074 |
+
|
3075 |
+
$param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
|
3076 |
+
|
3077 |
+
foreach($param['w_property_values'][$key] as $subkey => $property_value)
|
3078 |
+
|
3079 |
+
{
|
3080 |
+
|
3081 |
+
$rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_select==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
|
3082 |
+
|
3083 |
+
}
|
3084 |
+
|
3085 |
+
$rep.='</select></div></div>';
|
3086 |
+
|
3087 |
+
}
|
3088 |
+
|
3089 |
+
|
3090 |
+
|
3091 |
+
$rep.='</div></div></div>';
|
3092 |
+
|
3093 |
+
|
3094 |
+
|
3095 |
+
|
3096 |
+
|
3097 |
+
$onsubmit_js.='
|
3098 |
+
|
3099 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(jQuery("#wdform_'.$id1.'_element'.$form_id.' option:selected").text()).appendTo("#adminForm");
|
3100 |
+
|
3101 |
+
';
|
3102 |
+
|
3103 |
+
$onsubmit_js.='
|
3104 |
+
|
3105 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("Quantity").appendTo("#adminForm");
|
3106 |
+
|
3107 |
+
';
|
3108 |
+
|
3109 |
+
$onsubmit_js.='
|
3110 |
+
|
3111 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.'\" />").val("'.$param['w_property'][0].'").appendTo("#adminForm");
|
3112 |
+
|
3113 |
+
';
|
3114 |
+
|
3115 |
+
|
3116 |
+
|
3117 |
+
|
3118 |
+
|
3119 |
+
break;
|
3120 |
+
|
3121 |
+
}
|
3122 |
+
|
3123 |
+
case 'type_paypal_checkbox':
|
3124 |
+
|
3125 |
+
{
|
3126 |
+
|
3127 |
+
|
3128 |
+
|
3129 |
+
if($element_value == '')
|
3130 |
+
|
3131 |
+
$element_value =' :';
|
3132 |
+
|
3133 |
+
|
3134 |
+
|
3135 |
+
$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');
|
3136 |
+
|
3137 |
+
$temp=$params;
|
3138 |
+
|
3139 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
3140 |
+
|
3141 |
+
$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');
|
3142 |
+
|
3143 |
+
foreach($params_names as $params_name )
|
3144 |
+
|
3145 |
+
{
|
3146 |
+
|
3147 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
3148 |
+
|
3149 |
+
$param[$params_name] = $temp[0];
|
3150 |
+
|
3151 |
+
$temp=$temp[1];
|
3152 |
+
|
3153 |
+
}
|
3154 |
+
|
3155 |
+
|
3156 |
+
|
3157 |
+
|
3158 |
+
|
3159 |
+
if($temp)
|
3160 |
+
|
3161 |
+
{
|
3162 |
+
|
3163 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
3164 |
+
|
3165 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
3166 |
+
|
3167 |
+
foreach($attrs as $attr)
|
3168 |
+
|
3169 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
3170 |
+
|
3171 |
+
}
|
3172 |
+
|
3173 |
+
|
3174 |
+
|
3175 |
+
|
3176 |
+
|
3177 |
+
if(!isset($param['w_field_option_pos']))
|
3178 |
+
|
3179 |
+
$param['w_field_option_pos'] = 'left';
|
3180 |
+
|
3181 |
+
|
3182 |
+
|
3183 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
3184 |
+
|
3185 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
3186 |
+
|
3187 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
3188 |
+
|
3189 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
3190 |
+
|
3191 |
+
|
3192 |
+
|
3193 |
+
|
3194 |
+
|
3195 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
3196 |
+
|
3197 |
+
$param['w_choices_price'] = explode('***',$param['w_choices_price']);
|
3198 |
+
|
3199 |
+
|
3200 |
+
|
3201 |
+
$param['w_property'] = explode('***',$param['w_property']);
|
3202 |
+
|
3203 |
+
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
3204 |
+
|
3205 |
+
if(isset($param['w_choices_params']))
|
3206 |
+
|
3207 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
3208 |
+
|
3209 |
+
|
3210 |
+
|
3211 |
+
$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>';
|
3212 |
+
|
3213 |
+
|
3214 |
+
|
3215 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
3216 |
+
|
3217 |
+
|
3218 |
+
|
3219 |
+
|
3220 |
+
|
3221 |
+
if(strpos($element_value,'***br***') !== false)
|
3222 |
+
|
3223 |
+
{
|
3224 |
+
|
3225 |
+
$element_value = explode('***br***',$element_value);
|
3226 |
+
|
3227 |
+
foreach($element_value as $key => $element)
|
3228 |
+
|
3229 |
+
{
|
3230 |
+
|
3231 |
+
|
3232 |
+
|
3233 |
+
if(strpos($element,'***quantity***') !== false)
|
3234 |
+
|
3235 |
+
{
|
3236 |
+
|
3237 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element));
|
3238 |
+
|
3239 |
+
$quantity_value = $quantity_value[1];
|
3240 |
+
|
3241 |
+
unset($element_value[$key]);
|
3242 |
+
|
3243 |
+
}
|
3244 |
+
|
3245 |
+
else
|
3246 |
+
|
3247 |
+
if(strpos($element,'***property***') !== false)
|
3248 |
+
|
3249 |
+
{
|
3250 |
+
|
3251 |
+
$property_of_check = explode(': ',str_replace("***property***","",$element));
|
3252 |
+
|
3253 |
+
$property_of_check = $property_of_check[1];
|
3254 |
+
|
3255 |
+
unset($element_value[$key]);
|
3256 |
+
|
3257 |
+
}
|
3258 |
+
|
3259 |
+
else
|
3260 |
+
|
3261 |
+
{
|
3262 |
+
|
3263 |
+
for($m=0; $m<strlen($element); $m++)
|
3264 |
+
|
3265 |
+
{
|
3266 |
+
|
3267 |
+
if(!ctype_digit($element[strlen($element)-1]))
|
3268 |
+
|
3269 |
+
$element_value[$key] = substr($element,0,-1);
|
3270 |
+
|
3271 |
+
else
|
3272 |
+
|
3273 |
+
break;
|
3274 |
+
|
3275 |
+
}
|
3276 |
+
|
3277 |
+
$quantity_value = '';
|
3278 |
+
|
3279 |
+
$property_of_check = '';
|
3280 |
+
|
3281 |
+
}
|
3282 |
+
|
3283 |
+
|
3284 |
+
|
3285 |
+
}
|
3286 |
+
|
3287 |
+
}
|
3288 |
+
|
3289 |
+
else
|
3290 |
+
|
3291 |
+
{
|
3292 |
+
|
3293 |
+
$element_value = explode(' :',$element_value);
|
3294 |
+
|
3295 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
3296 |
+
|
3297 |
+
$quantity_value = '';
|
3298 |
+
|
3299 |
+
$property_of_check = '';
|
3300 |
+
|
3301 |
+
}
|
3302 |
+
|
3303 |
+
|
3304 |
+
|
3305 |
+
$total_queries = 0;
|
3306 |
+
|
3307 |
+
foreach($param['w_choices'] as $key => $choice)
|
3308 |
+
|
3309 |
+
{
|
3310 |
+
|
3311 |
+
$key1 = $key + $total_queries;
|
3312 |
+
|
3313 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
3314 |
+
|
3315 |
+
{
|
3316 |
+
|
3317 |
+
$choices_labels = array();
|
3318 |
+
$choices_values = array();
|
3319 |
+
|
3320 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
3321 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
3322 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
3323 |
+
|
3324 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
3325 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
3326 |
+
|
3327 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
3328 |
+
|
3329 |
+
$table = $label_table_and_column[0];
|
3330 |
+
|
3331 |
+
$label_column = $label_table_and_column[1];
|
3332 |
+
|
3333 |
+
if($label_column)
|
3334 |
+
|
3335 |
+
{
|
3336 |
+
|
3337 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
3338 |
+
}
|
3339 |
+
|
3340 |
+
|
3341 |
+
|
3342 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
|
3343 |
+
|
3344 |
+
$value_column = $value_table_and_column[1];
|
3345 |
+
|
3346 |
+
|
3347 |
+
|
3348 |
+
if($value_column)
|
3349 |
+
|
3350 |
+
{
|
3351 |
+
|
3352 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
3353 |
+
|
3354 |
+
}
|
3355 |
+
|
3356 |
+
|
3357 |
+
|
3358 |
+
$columns_count = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
3359 |
+
|
3360 |
+
|
3361 |
+
|
3362 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
3363 |
+
|
3364 |
+
{
|
3365 |
+
|
3366 |
+
$total_queries = $total_queries + $columns_count-1;
|
3367 |
+
|
3368 |
+
|
3369 |
+
|
3370 |
+
|
3371 |
+
|
3372 |
+
for($k=0; $k<$columns_count; $k++)
|
3373 |
+
|
3374 |
+
{
|
3375 |
+
|
3376 |
+
$choice_label = isset($choices_labels) ? $choices_labels[$k] : '';
|
3377 |
+
|
3378 |
+
$choice_value = isset($choices_values) ? (float)$choices_values[$k] : '';
|
3379 |
+
|
3380 |
+
|
3381 |
+
|
3382 |
+
$checked=(in_array($choice_label.' - '.$choice_value, $element_value)=='true' ? 'checked="checked"' : '');
|
3383 |
+
|
3384 |
+
|
3385 |
+
|
3386 |
+
$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>';
|
3387 |
+
|
3388 |
+
|
3389 |
+
|
3390 |
+
|
3391 |
+
|
3392 |
+
}
|
3393 |
+
|
3394 |
+
}
|
3395 |
+
|
3396 |
+
}
|
3397 |
+
|
3398 |
+
else
|
3399 |
+
|
3400 |
+
{
|
3401 |
+
|
3402 |
+
$checked=(in_array($choice.' - '.$param['w_choices_price'][$key], $element_value)=='true' ? 'checked="checked"' : '');
|
3403 |
+
|
3404 |
+
|
3405 |
+
|
3406 |
+
$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>';
|
3407 |
+
|
3408 |
+
}
|
3409 |
+
|
3410 |
+
}
|
3411 |
+
|
3412 |
+
|
3413 |
+
|
3414 |
+
$rep.='<div id="wdform_'.$id1.'_div'.$form_id.'">';
|
3415 |
+
|
3416 |
+
if($param['w_quantity']=="yes")
|
3417 |
+
|
3418 |
+
$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>';
|
3419 |
+
|
3420 |
+
|
3421 |
+
|
3422 |
+
if($param['w_property'][0])
|
3423 |
+
|
3424 |
+
foreach($param['w_property'] as $key => $property)
|
3425 |
+
|
3426 |
+
{
|
3427 |
+
|
3428 |
+
|
3429 |
+
|
3430 |
+
$rep.='
|
3431 |
+
|
3432 |
+
<div class="paypal-property">
|
3433 |
+
|
3434 |
+
<div style="width:150px; display:inline-block;">
|
3435 |
+
|
3436 |
+
<label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
|
3437 |
+
|
3438 |
+
<select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
|
3439 |
+
|
3440 |
+
$param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
|
3441 |
+
|
3442 |
+
$param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
|
3443 |
+
|
3444 |
+
foreach($param['w_property_values'][$key] as $subkey => $property_value)
|
3445 |
+
|
3446 |
+
{
|
3447 |
+
|
3448 |
+
$rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_check==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
|
3449 |
+
|
3450 |
+
}
|
3451 |
+
|
3452 |
+
$rep.='</select></div></div>';
|
3453 |
+
|
3454 |
+
}
|
3455 |
+
|
3456 |
+
|
3457 |
+
|
3458 |
+
$rep.='</div></div></div>';
|
3459 |
+
|
3460 |
+
|
3461 |
+
|
3462 |
+
$onsubmit_js.='
|
3463 |
+
|
3464 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("Quantity").appendTo("#adminForm");
|
3465 |
+
|
3466 |
+
';
|
3467 |
+
|
3468 |
+
$onsubmit_js.='
|
3469 |
+
|
3470 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.'\" />").val("'.$param['w_property'][0].'").appendTo("#adminForm");
|
3471 |
+
|
3472 |
+
';
|
3473 |
+
|
3474 |
+
|
3475 |
+
|
3476 |
+
break;
|
3477 |
+
|
3478 |
+
}
|
3479 |
+
|
3480 |
+
case 'type_paypal_radio':
|
3481 |
+
|
3482 |
+
{
|
3483 |
+
|
3484 |
+
|
3485 |
+
|
3486 |
+
if($element_value=='')
|
3487 |
+
|
3488 |
+
$element_value = ' :';
|
3489 |
+
|
3490 |
+
|
3491 |
+
|
3492 |
+
$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');
|
3493 |
+
|
3494 |
+
$temp=$params;
|
3495 |
+
|
3496 |
+
|
3497 |
+
|
3498 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
3499 |
+
|
3500 |
+
$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');
|
3501 |
+
|
3502 |
+
|
3503 |
+
|
3504 |
+
foreach($params_names as $params_name )
|
3505 |
+
|
3506 |
+
{
|
3507 |
+
|
3508 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
3509 |
+
|
3510 |
+
$param[$params_name] = $temp[0];
|
3511 |
+
|
3512 |
+
$temp=$temp[1];
|
3513 |
+
|
3514 |
+
}
|
3515 |
+
|
3516 |
+
|
3517 |
+
|
3518 |
+
if($temp)
|
3519 |
+
|
3520 |
+
{
|
3521 |
+
|
3522 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
3523 |
+
|
3524 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
3525 |
+
|
3526 |
+
foreach($attrs as $attr)
|
3527 |
+
|
3528 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
3529 |
+
|
3530 |
+
}
|
3531 |
+
|
3532 |
+
if(!isset($param['w_field_option_pos']))
|
3533 |
+
|
3534 |
+
$param['w_field_option_pos'] = 'left';
|
3535 |
+
|
3536 |
+
|
3537 |
+
|
3538 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
3539 |
+
|
3540 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
3541 |
+
|
3542 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
3543 |
+
|
3544 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
3545 |
+
|
3546 |
+
|
3547 |
+
|
3548 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
3549 |
+
|
3550 |
+
$param['w_choices_price'] = explode('***',$param['w_choices_price']);
|
3551 |
+
|
3552 |
+
|
3553 |
+
|
3554 |
+
$param['w_property'] = explode('***',$param['w_property']);
|
3555 |
+
|
3556 |
+
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
3557 |
+
|
3558 |
+
if(isset($param['w_choices_params']))
|
3559 |
+
|
3560 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
3561 |
+
|
3562 |
+
|
3563 |
+
|
3564 |
+
$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>';
|
3565 |
+
|
3566 |
+
|
3567 |
+
|
3568 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
3569 |
+
|
3570 |
+
|
3571 |
+
|
3572 |
+
if(strpos($element_value,'***br***') !== false)
|
3573 |
+
|
3574 |
+
{
|
3575 |
+
|
3576 |
+
$element_value = explode('***br***',$element_value);
|
3577 |
+
|
3578 |
+
if(count($element_value)==2)
|
3579 |
+
|
3580 |
+
{
|
3581 |
+
|
3582 |
+
if(strpos($element_value[1],'***quantity***') !== false)
|
3583 |
+
|
3584 |
+
{
|
3585 |
+
|
3586 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
3587 |
+
|
3588 |
+
$quantity_value = $quantity_value[1];
|
3589 |
+
|
3590 |
+
$property_of_radio = '';
|
3591 |
+
|
3592 |
+
}
|
3593 |
+
|
3594 |
+
else
|
3595 |
+
|
3596 |
+
{
|
3597 |
+
|
3598 |
+
$quantity_value = '' ;
|
3599 |
+
|
3600 |
+
$property_of_radio = explode(': ',str_replace("***property***","",$element_value[1]));
|
3601 |
+
|
3602 |
+
$property_of_radio = $property_of_radio[1];
|
3603 |
+
|
3604 |
+
}
|
3605 |
+
|
3606 |
+
|
3607 |
+
|
3608 |
+
$element_value = explode(' :',$element_value[0]);
|
3609 |
+
|
3610 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
3611 |
+
|
3612 |
+
}
|
3613 |
+
|
3614 |
+
else
|
3615 |
+
|
3616 |
+
{
|
3617 |
+
|
3618 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
3619 |
+
|
3620 |
+
$quantity_value = $quantity_value[1];
|
3621 |
+
|
3622 |
+
$property_of_radio = explode(': ',str_replace("***property***","",$element_value[2]));
|
3623 |
+
|
3624 |
+
$property_of_radio = $property_of_radio[1];
|
3625 |
+
|
3626 |
+
|
3627 |
+
|
3628 |
+
$element_value = explode(' :',$element_value[0]);
|
3629 |
+
|
3630 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
3631 |
+
|
3632 |
+
}
|
3633 |
+
|
3634 |
+
}
|
3635 |
+
|
3636 |
+
else
|
3637 |
+
|
3638 |
+
{
|
3639 |
+
|
3640 |
+
$element_value = explode(' :',$element_value);
|
3641 |
+
|
3642 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
3643 |
+
|
3644 |
+
$quantity_value = '';
|
3645 |
+
|
3646 |
+
$property_of_radio = '';
|
3647 |
+
|
3648 |
+
}
|
3649 |
+
|
3650 |
+
$total_queries = 0;
|
3651 |
+
|
3652 |
+
foreach($param['w_choices'] as $key => $choice)
|
3653 |
+
|
3654 |
+
{
|
3655 |
+
|
3656 |
+
$key1 = $key + $total_queries;
|
3657 |
+
|
3658 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
3659 |
+
|
3660 |
+
{
|
3661 |
+
|
3662 |
+
$choices_labels =array();
|
3663 |
+
$choices_values =array();
|
3664 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
3665 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
3666 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
3667 |
+
|
3668 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
3669 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
3670 |
+
|
3671 |
+
|
3672 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
3673 |
+
|
3674 |
+
$table = $label_table_and_column[0];
|
3675 |
+
|
3676 |
+
$label_column = $label_table_and_column[1];
|
3677 |
+
|
3678 |
+
if($label_column)
|
3679 |
+
|
3680 |
+
{
|
3681 |
+
|
3682 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
3683 |
+
}
|
3684 |
+
|
3685 |
+
|
3686 |
+
|
3687 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
|
3688 |
+
|
3689 |
+
$value_column = $value_table_and_column[1];
|
3690 |
+
|
3691 |
+
|
3692 |
+
|
3693 |
+
if($value_column)
|
3694 |
+
|
3695 |
+
{
|
3696 |
+
|
3697 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
3698 |
+
|
3699 |
+
}
|
3700 |
+
|
3701 |
+
|
3702 |
+
|
3703 |
+
$columns_count_radio = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
3704 |
+
|
3705 |
+
|
3706 |
+
|
3707 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
3708 |
+
|
3709 |
+
{
|
3710 |
+
|
3711 |
+
$total_queries = $total_queries + $columns_count_radio-1;
|
3712 |
+
|
3713 |
+
for($k=0; $k<$columns_count_radio; $k++)
|
3714 |
+
|
3715 |
+
{
|
3716 |
+
|
3717 |
+
$choice_label = isset($choices_labels) ? $choices_labels[$k] : '';
|
3718 |
+
|
3719 |
+
$choice_value = isset($choices_values) ? (float)$choices_values[$k] : '';
|
3720 |
+
|
3721 |
+
|
3722 |
+
|
3723 |
+
if($element_value[0] == $choice_label && $choice_value == $choise_value)
|
3724 |
+
|
3725 |
+
$checked = 'checked="checked"';
|
3726 |
+
|
3727 |
+
else
|
3728 |
+
|
3729 |
+
$checked = '';
|
3730 |
+
|
3731 |
+
|
3732 |
+
|
3733 |
+
|
3734 |
+
|
3735 |
+
$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>';
|
3736 |
+
|
3737 |
+
|
3738 |
+
|
3739 |
+
}
|
3740 |
+
|
3741 |
+
}
|
3742 |
+
|
3743 |
+
}
|
3744 |
+
|
3745 |
+
else
|
3746 |
+
|
3747 |
+
{
|
3748 |
+
|
3749 |
+
if($element_value[0] == $choice && $param['w_choices_price'][$key] == $choise_value)
|
3750 |
+
|
3751 |
+
$checked = 'checked="checked"';
|
3752 |
+
|
3753 |
+
else
|
3754 |
+
|
3755 |
+
$checked = '';
|
3756 |
+
|
3757 |
+
|
3758 |
+
|
3759 |
+
$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>';
|
3760 |
+
|
3761 |
+
}
|
3762 |
+
|
3763 |
+
|
3764 |
+
|
3765 |
+
}
|
3766 |
+
|
3767 |
+
|
3768 |
+
|
3769 |
+
$rep.='<div id="wdform_'.$id1.'_div'.$form_id.'">';
|
3770 |
+
|
3771 |
+
if($param['w_quantity']=="yes")
|
3772 |
+
|
3773 |
+
$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>';
|
3774 |
+
|
3775 |
+
|
3776 |
+
|
3777 |
+
if($param['w_property'][0])
|
3778 |
+
|
3779 |
+
foreach($param['w_property'] as $key => $property)
|
3780 |
+
|
3781 |
+
{
|
3782 |
+
|
3783 |
+
|
3784 |
+
|
3785 |
+
$rep.='
|
3786 |
+
|
3787 |
+
<div class="paypal-property">
|
3788 |
+
|
3789 |
+
<div style="width:150px; display:inline-block;">
|
3790 |
+
|
3791 |
+
<label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
|
3792 |
+
|
3793 |
+
<select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
|
3794 |
+
|
3795 |
+
$param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
|
3796 |
+
|
3797 |
+
$param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
|
3798 |
+
|
3799 |
+
foreach($param['w_property_values'][$key] as $subkey => $property_value)
|
3800 |
+
|
3801 |
+
{
|
3802 |
+
|
3803 |
+
$rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_radio==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
|
3804 |
+
|
3805 |
+
}
|
3806 |
+
|
3807 |
+
$rep.='</select></div></div>';
|
3808 |
+
|
3809 |
+
}
|
3810 |
+
|
3811 |
+
|
3812 |
+
|
3813 |
+
$rep.='</div></div></div>';
|
3814 |
+
|
3815 |
+
|
3816 |
+
|
3817 |
+
|
3818 |
+
|
3819 |
+
$onsubmit_js.='
|
3820 |
+
|
3821 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(
|
3822 |
+
|
3823 |
+
jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$id1.'_element'.$form_id.'\']:checked").prop("id")+"\']").eq(0).text()
|
3824 |
+
|
3825 |
+
).appendTo("#adminForm");
|
3826 |
+
|
3827 |
+
|
3828 |
+
|
3829 |
+
';
|
3830 |
+
|
3831 |
+
$onsubmit_js.='
|
3832 |
+
|
3833 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("Quantity").appendTo("#adminForm");
|
3834 |
+
|
3835 |
+
';
|
3836 |
+
|
3837 |
+
$onsubmit_js.='
|
3838 |
+
|
3839 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.'\" />").val("'.$param['w_property'][0].'").appendTo("#adminForm");
|
3840 |
+
|
3841 |
+
';
|
3842 |
+
|
3843 |
+
break;
|
3844 |
+
|
3845 |
+
}
|
3846 |
+
|
3847 |
+
|
3848 |
+
case 'type_paypal_shipping':
|
3849 |
+
|
3850 |
+
{
|
3851 |
+
|
3852 |
+
|
3853 |
+
|
3854 |
+
if($element_value=='')
|
3855 |
+
|
3856 |
+
$element_value =' - ';
|
3857 |
+
|
3858 |
+
|
3859 |
+
|
3860 |
+
$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');
|
3861 |
+
|
3862 |
+
$temp=$params;
|
3863 |
+
|
3864 |
+
|
3865 |
+
|
3866 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
3867 |
+
|
3868 |
+
$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');
|
3869 |
+
|
3870 |
+
foreach($params_names as $params_name )
|
3871 |
+
|
3872 |
+
{
|
3873 |
+
|
3874 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
3875 |
+
|
3876 |
+
$param[$params_name] = $temp[0];
|
3877 |
+
|
3878 |
+
$temp=$temp[1];
|
3879 |
+
|
3880 |
+
}
|
3881 |
+
|
3882 |
+
|
3883 |
+
|
3884 |
+
if($temp)
|
3885 |
+
|
3886 |
+
{
|
3887 |
+
|
3888 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
3889 |
+
|
3890 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
3891 |
+
|
3892 |
+
foreach($attrs as $attr)
|
3893 |
+
|
3894 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
3895 |
+
|
3896 |
+
}
|
3897 |
+
|
3898 |
+
|
3899 |
+
|
3900 |
+
if(!isset($param['w_field_option_pos']))
|
3901 |
+
|
3902 |
+
$param['w_field_option_pos'] = 'left';
|
3903 |
+
|
3904 |
+
|
3905 |
+
|
3906 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
3907 |
+
|
3908 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
3909 |
+
|
3910 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
3911 |
+
|
3912 |
+
|
3913 |
+
|
3914 |
+
|
3915 |
+
|
3916 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
3917 |
+
|
3918 |
+
$param['w_choices_price'] = explode('***',$param['w_choices_price']);
|
3919 |
+
|
3920 |
+
if(isset($param['w_choices_params']))
|
3921 |
+
|
3922 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
3923 |
+
|
3924 |
+
|
3925 |
+
|
3926 |
+
|
3927 |
+
|
3928 |
+
|
3929 |
+
|
3930 |
+
$element_value = explode(' - ',$element_value);
|
3931 |
+
|
3932 |
+
$element_value[1] = preg_replace("/[^0-9]/","",$element_value[1]);
|
3933 |
+
|
3934 |
+
|
3935 |
+
|
3936 |
+
$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>';
|
3937 |
+
|
3938 |
+
|
3939 |
+
|
3940 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
3941 |
+
|
3942 |
+
|
3943 |
+
|
3944 |
+
$total_queries = 0;
|
3945 |
+
|
3946 |
+
foreach($param['w_choices'] as $key => $choice)
|
3947 |
+
|
3948 |
+
{
|
3949 |
+
|
3950 |
+
$key1 = $key + $total_queries;
|
3951 |
+
|
3952 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
3953 |
+
|
3954 |
+
{
|
3955 |
+
|
3956 |
+
$choices_labels =array();
|
3957 |
+
$choices_values =array();
|
3958 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
3959 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
3960 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
3961 |
+
|
3962 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
3963 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
3964 |
+
|
3965 |
+
|
3966 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
3967 |
+
|
3968 |
+
$table = $label_table_and_column[0];
|
3969 |
|
3970 |
+
$label_column = $label_table_and_column[1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3971 |
|
3972 |
+
if($label_column)
|
3973 |
|
3974 |
+
{
|
|
|
|
|
|
|
3975 |
|
3976 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
3977 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3978 |
|
|
|
|
|
|
|
|
|
|
|
3979 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|