Version Description
- Fixed: Bug with Hidden field in custom text in Email
- Fixed: Bug on email verification custom post
- Changed: Filters now apply to CSV and XML export
Download this release
Release Info
| Developer | webdorado |
| Plugin | |
| Version | 1.8.39 |
| Comparing to | |
| See all releases | |
Code changes from version 1.8.38 to 1.8.39
- admin/models/FMModelGenerete_csv_fmc.php +278 -268
- admin/models/FMModelGenerete_xml_fmc.php +284 -275
- admin/models/FMModelSubmissions_fmc.php +14 -2
- admin/models/FMModelUninstall_fmc.php +56 -56
- admin/views/FMViewSubmissions_fmc.php +4466 -4464
- contact-form-maker.php +46 -20
- frontend/models/FMModelForm_maker_fmc.php +4707 -4705
- readme.txt +424 -419
admin/models/FMModelGenerete_csv_fmc.php
CHANGED
|
@@ -1,269 +1,279 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class FMModelGenerete_csv_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 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 |
-
|
| 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 |
-
array_push($
|
| 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 |
-
$data_temp
|
| 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 |
-
$
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
$
|
| 158 |
-
$
|
| 159 |
-
$
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
$
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
$
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
$
|
| 232 |
-
|
| 233 |
-
if
|
| 234 |
-
$
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
}
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
}
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class FMModelGenerete_csv_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 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 |
+
$search_labels = isset($_REQUEST['search_labels']) ? $_REQUEST['search_labels'] : '';
|
| 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 |
+
|
| 34 |
+
if($search_labels){
|
| 35 |
+
$query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d and group_id IN(".$search_labels.")", $form_id);
|
| 36 |
+
$group_id_s = $wpdb->get_col($query);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
$query = $wpdb->prepare("SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d",$form_id);
|
| 40 |
+
$labels = $wpdb->get_col($query);
|
| 41 |
+
|
| 42 |
+
$query_lable = $wpdb->prepare("SELECT label_order,title FROM " . $wpdb->prefix . "formmaker where id=%d", $form_id);
|
| 43 |
+
$rows_lable = $wpdb->get_results($query_lable);
|
| 44 |
+
$ptn = "/[^a-zA-Z0-9_]/";
|
| 45 |
+
$rpltxt = "";
|
| 46 |
+
$title = isset($rows_lable[0]) ? preg_replace($ptn, $rpltxt, $rows_lable[0]->title) : '';
|
| 47 |
+
|
| 48 |
+
$sorted_labels_id = array();
|
| 49 |
+
$sorted_labels = array();
|
| 50 |
+
$label_titles = array();
|
| 51 |
+
$label_id = array();
|
| 52 |
+
$label_order = array();
|
| 53 |
+
$label_order_original = array();
|
| 54 |
+
$label_type = array();
|
| 55 |
+
if ($labels) {
|
| 56 |
+
$label_all = explode('#****#', $rows_lable[0]->label_order);
|
| 57 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 58 |
+
foreach ($label_all as $key => $label_each) {
|
| 59 |
+
$label_id_each = explode('#**id**#', $label_each);
|
| 60 |
+
array_push($label_id, $label_id_each[0]);
|
| 61 |
+
$label_oder_each = explode('#**label**#', $label_id_each[1]);
|
| 62 |
+
array_push($label_order_original, $label_oder_each[0]);
|
| 63 |
+
$label_temp = preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
| 64 |
+
array_push($label_order, $label_temp);
|
| 65 |
+
array_push($label_type, $label_oder_each[1]);
|
| 66 |
+
}
|
| 67 |
+
foreach ($label_id as $key => $label) {
|
| 68 |
+
if (in_array($label, $labels) && $label_type[$key] !='type_arithmetic_captcha') {
|
| 69 |
+
array_push($sorted_labels, $label_order[$key]);
|
| 70 |
+
array_push($sorted_labels_id, $label);
|
| 71 |
+
array_push($label_titles, stripslashes($label_order_original[$key]));
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
$m = count($sorted_labels);
|
| 77 |
+
$wpdb->query("SET SESSION group_concat_max_len = 1000000");
|
| 78 |
+
|
| 79 |
+
$rows = array();
|
| 80 |
+
|
| 81 |
+
if($search_labels){
|
| 82 |
+
$query = $wpdb->prepare("SELECT group_id, ip, date, user_id_wd, GROUP_CONCAT( element_label SEPARATOR ',') as element_label, GROUP_CONCAT( element_value SEPARATOR '*:*el_value*:*') as element_value FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d and group_id IN (".$search_labels.") GROUP BY group_id ORDER BY date ASC limit %d, %d", $form_id, $limitstart, 1000);
|
| 83 |
+
$rows = $wpdb->get_results($query, OBJECT_K);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
$data = array();
|
| 87 |
+
$group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
|
| 88 |
+
|
| 89 |
+
sort($group_id_s,SORT_NUMERIC);
|
| 90 |
+
|
| 91 |
+
for ($www = $limitstart; $www < $group_id_s_count; $www++) {
|
| 92 |
+
$i = $group_id_s[$www];
|
| 93 |
+
$field_key = array_search($i, $label_id);
|
| 94 |
+
if($label_type[$field_key] != 'type_arithmetic_captcha') {
|
| 95 |
+
$data_temp = array();
|
| 96 |
+
$tt = $rows[$i];
|
| 97 |
+
|
| 98 |
+
$date = $tt->date;
|
| 99 |
+
$ip = $tt->ip;
|
| 100 |
+
$user_id = get_userdata($tt->user_id_wd);
|
| 101 |
+
$username = $user_id ? $user_id->display_name : "";
|
| 102 |
+
$useremail = $user_id ? $user_id->user_email : "";
|
| 103 |
+
$data_temp['Submit date'] = $date;
|
| 104 |
+
$data_temp['Ip']=$ip;
|
| 105 |
+
$data_temp['Submitter\'s Username']=$username;
|
| 106 |
+
$data_temp['Submitter\'s Email Address']=$useremail;
|
| 107 |
+
|
| 108 |
+
$element_labels = explode(',', $tt->element_label);
|
| 109 |
+
$element_values = explode('*:*el_value*:*', $tt->element_value);
|
| 110 |
+
for ($h = 0; $h < $m; $h++) {
|
| 111 |
+
if(isset($data_temp[$label_titles[$h]]))
|
| 112 |
+
$label_titles[$h] .= '(1)';
|
| 113 |
+
|
| 114 |
+
if(in_array($sorted_labels_id[$h], $element_labels)) {
|
| 115 |
+
$element_value = $element_values[array_search($sorted_labels_id[$h], $element_labels)];
|
| 116 |
+
|
| 117 |
+
if (strpos($element_value, "*@@url@@*")) {
|
| 118 |
+
$file_names = '';
|
| 119 |
+
$new_files = explode("*@@url@@*", $element_value);
|
| 120 |
+
foreach ($new_files as $new_file) {
|
| 121 |
+
if ($new_file) {
|
| 122 |
+
$file_names .= $new_file . ", ";
|
| 123 |
+
}
|
| 124 |
+
}
|
| 125 |
+
$data_temp[stripslashes($label_titles[$h])] = $file_names;
|
| 126 |
+
}
|
| 127 |
+
elseif (strpos($element_value, "***br***")) {
|
| 128 |
+
$element_value = str_replace("***br***", ', ', $element_value);
|
| 129 |
+
if (strpos($element_value, "***quantity***")) {
|
| 130 |
+
$element_value = str_replace("***quantity***", '', $element_value);
|
| 131 |
+
}
|
| 132 |
+
if (strpos($element_value, "***property***")) {
|
| 133 |
+
$element_value = str_replace("***property***", '', $element_value);
|
| 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 |
+
elseif (strpos($element_value, "***map***")) {
|
| 143 |
+
$data_temp[stripslashes($label_titles[$h])] = 'Longitude:' . str_replace("***map***", ', Latitude:', $element_value);
|
| 144 |
+
}
|
| 145 |
+
elseif (strpos($element_value, "***star_rating***")) {
|
| 146 |
+
$element = str_replace("***star_rating***", '', $element_value);
|
| 147 |
+
$element = explode("***", $element);
|
| 148 |
+
$data_temp[stripslashes($label_titles[$h])] = ' ' . $element[1] . '/' . $element[0];
|
| 149 |
+
}
|
| 150 |
+
elseif (strpos($element_value, "@@@") || $element_value == "@@@" || $element_value == "@@@@@@@@@") {
|
| 151 |
+
$data_temp[stripslashes($label_titles[$h])] = str_replace("@@@", ' ', $element_value);
|
| 152 |
+
}
|
| 153 |
+
elseif (strpos($element_value, "***grading***")) {
|
| 154 |
+
$element = str_replace("***grading***", '', $element_value);
|
| 155 |
+
$grading = explode(":", $element);
|
| 156 |
+
$items_count = sizeof($grading) - 1;
|
| 157 |
+
$items = "";
|
| 158 |
+
$total = "";
|
| 159 |
+
for ($k = 0; $k < $items_count / 2; $k++) {
|
| 160 |
+
$items .= $grading[$items_count / 2 + $k] . ": " . $grading[$k] . ", ";
|
| 161 |
+
$total += $grading[$k];
|
| 162 |
+
}
|
| 163 |
+
$items .= "Total: " . $total;
|
| 164 |
+
$data_temp[stripslashes($label_titles[$h])] = $items;
|
| 165 |
+
}
|
| 166 |
+
elseif (strpos($element_value, "***matrix***")) {
|
| 167 |
+
$element = str_replace("***matrix***", '', $element_value);
|
| 168 |
+
$matrix_value = explode('***', $element);
|
| 169 |
+
$matrix_value = array_slice($matrix_value, 0, count($matrix_value) - 1);
|
| 170 |
+
$mat_rows = $matrix_value[0];
|
| 171 |
+
$mat_columns = $matrix_value[$mat_rows + 1];
|
| 172 |
+
$matrix = "";
|
| 173 |
+
$aaa = array();
|
| 174 |
+
$var_checkbox = 1;
|
| 175 |
+
$selected_value = "";
|
| 176 |
+
$selected_value_yes = "";
|
| 177 |
+
$selected_value_no = "";
|
| 178 |
+
for ($k = 1; $k <= $mat_rows; $k++) {
|
| 179 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2] == "radio") {
|
| 180 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2 + $k] == 0) {
|
| 181 |
+
$checked = "0";
|
| 182 |
+
$aaa[1] = "";
|
| 183 |
+
}
|
| 184 |
+
else {
|
| 185 |
+
$aaa = explode("_", $matrix_value[$mat_rows + $mat_columns + 2 + $k]);
|
| 186 |
+
}
|
| 187 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
| 188 |
+
$checked = $aaa[1] == $l ? '1' : '0';
|
| 189 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
| 190 |
+
}
|
| 191 |
+
}
|
| 192 |
+
else {
|
| 193 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "checkbox") {
|
| 194 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
| 195 |
+
$checked = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox] == 1 ? '1' : '0';
|
| 196 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
| 197 |
+
$var_checkbox++;
|
| 198 |
+
}
|
| 199 |
+
}
|
| 200 |
+
else {
|
| 201 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "text") {
|
| 202 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
| 203 |
+
$text_value = $matrix_value[$mat_rows+$mat_columns+2+$var_checkbox];
|
| 204 |
+
$matrix .='['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$text_value."; ";
|
| 205 |
+
$var_checkbox++;
|
| 206 |
+
}
|
| 207 |
+
}
|
| 208 |
+
else {
|
| 209 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
| 210 |
+
$selected_text = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox];
|
| 211 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows + 1 + $l].']='.$selected_text."; ";
|
| 212 |
+
$var_checkbox++;
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
}
|
| 217 |
+
}
|
| 218 |
+
$data_temp[stripslashes($label_titles[$h])] = $matrix;
|
| 219 |
+
}
|
| 220 |
+
else {
|
| 221 |
+
$val = htmlspecialchars_decode($element_value);
|
| 222 |
+
$val = stripslashes(str_replace(''', "'", $val));
|
| 223 |
+
$data_temp[stripslashes($label_titles[$h])] = ($element_value ? $val : '');
|
| 224 |
+
}
|
| 225 |
+
}
|
| 226 |
+
else
|
| 227 |
+
$data_temp[stripslashes($label_titles[$h])] = '';
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
$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);
|
| 231 |
+
$is_paypal = $wpdb->get_results($query);
|
| 232 |
+
|
| 233 |
+
if($is_paypal) {
|
| 234 |
+
$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'));
|
| 235 |
+
$total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s", $i, 'total'));
|
| 236 |
+
$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'));
|
| 237 |
+
$data_temp['Item Total'] = $item_total;
|
| 238 |
+
$data_temp['Total'] = $total;
|
| 239 |
+
$data_temp['Payment Status'] = $payment_status;
|
| 240 |
+
}
|
| 241 |
+
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_sessions where group_id=%d",$i);
|
| 242 |
+
$paypal_info = $wpdb->get_results($query);
|
| 243 |
+
if ($paypal_info) {
|
| 244 |
+
$is_paypal_info = TRUE;
|
| 245 |
+
}
|
| 246 |
+
if ($is_paypal) {
|
| 247 |
+
foreach ($paypal_info_fields as $key=>$paypal_info_field) {
|
| 248 |
+
if ($paypal_info) {
|
| 249 |
+
$data_temp['PAYPAL_'.$paypal_info_labels[$key]]=$paypal_info[0]->$paypal_info_field;
|
| 250 |
+
}
|
| 251 |
+
else {
|
| 252 |
+
$data_temp['PAYPAL_'.$paypal_info_labels[$key]]='';
|
| 253 |
+
}
|
| 254 |
+
}
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
$data[$i] = $data_temp;
|
| 258 |
+
}
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
array_push($params, $data);
|
| 262 |
+
array_push($params, $title);
|
| 263 |
+
array_push($params, $is_paypal_info);
|
| 264 |
+
|
| 265 |
+
return $params;
|
| 266 |
+
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 271 |
+
// Getters & Setters //
|
| 272 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 273 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 274 |
+
// Private Methods //
|
| 275 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 276 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 277 |
+
// Listeners //
|
| 278 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 279 |
}
|
admin/models/FMModelGenerete_xml_fmc.php
CHANGED
|
@@ -1,276 +1,285 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class FMModelGenerete_xml_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 |
-
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 |
-
|
| 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 |
-
array_push($
|
| 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 |
-
$data_temp
|
| 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 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
$
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
$
|
| 158 |
-
$
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
$
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
$
|
| 167 |
-
$
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
}
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
}
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
$var_checkbox
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
}
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class FMModelGenerete_xml_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 |
+
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 |
+
$search_labels = isset($_REQUEST['search_labels']) ? $_REQUEST['search_labels'] : '';
|
| 30 |
+
|
| 31 |
+
$paypal_info_fields = array('currency', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'ipn', 'tax', 'shipping');
|
| 32 |
+
$paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
|
| 33 |
+
|
| 34 |
+
if($search_labels){
|
| 35 |
+
$query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d and group_id IN(".$search_labels.")", $form_id);
|
| 36 |
+
$group_id_s = $wpdb->get_col($query);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
$query = $wpdb->prepare("SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d",$form_id);
|
| 40 |
+
$labels = $wpdb->get_col($query);
|
| 41 |
+
|
| 42 |
+
$query_lable = $wpdb->prepare("SELECT label_order,title FROM " . $wpdb->prefix . "formmaker where id=%d", $form_id);
|
| 43 |
+
$rows_lable = $wpdb->get_results($query_lable);
|
| 44 |
+
$ptn = "/[^a-zA-Z0-9_]/";
|
| 45 |
+
$rpltxt = "";
|
| 46 |
+
$title = isset($rows_lable[0]) ? preg_replace($ptn, $rpltxt, $rows_lable[0]->title) : '';
|
| 47 |
+
|
| 48 |
+
$sorted_labels_id = array();
|
| 49 |
+
$sorted_labels = array();
|
| 50 |
+
$label_titles = array();
|
| 51 |
+
$label_id = array();
|
| 52 |
+
$label_order = array();
|
| 53 |
+
$label_order_original = array();
|
| 54 |
+
$label_type = array();
|
| 55 |
+
if ($labels) {
|
| 56 |
+
$label_all = explode('#****#', $rows_lable[0]->label_order);
|
| 57 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 58 |
+
foreach ($label_all as $key => $label_each) {
|
| 59 |
+
$label_id_each = explode('#**id**#', $label_each);
|
| 60 |
+
array_push($label_id, $label_id_each[0]);
|
| 61 |
+
$label_oder_each = explode('#**label**#', $label_id_each[1]);
|
| 62 |
+
array_push($label_order_original, $label_oder_each[0]);
|
| 63 |
+
$label_temp = preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
| 64 |
+
array_push($label_order, $label_temp);
|
| 65 |
+
array_push($label_type, $label_oder_each[1]);
|
| 66 |
+
}
|
| 67 |
+
foreach ($label_id as $key => $label) {
|
| 68 |
+
if (in_array($label, $labels) && $label_type[$key] !='type_arithmetic_captcha') {
|
| 69 |
+
array_push($sorted_labels, $label_order[$key]);
|
| 70 |
+
array_push($sorted_labels_id, $label);
|
| 71 |
+
array_push($label_titles, stripslashes($label_order_original[$key]));
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
$m = count($sorted_labels);
|
| 77 |
+
|
| 78 |
+
$rows = array();
|
| 79 |
+
|
| 80 |
+
if($search_labels){
|
| 81 |
+
$query = $wpdb->prepare("SELECT group_id, ip, date, user_id_wd, GROUP_CONCAT( element_label SEPARATOR ',') as element_label, GROUP_CONCAT( element_value SEPARATOR '*:*el_value*:*') as element_value FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d and group_id IN(".$search_labels.") GROUP BY group_id ORDER BY date ASC limit %d, %d", $form_id, $limitstart, 1000);
|
| 82 |
+
$rows = $wpdb->get_results($query, OBJECT_K);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
$data = array();
|
| 86 |
+
$group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
|
| 87 |
+
|
| 88 |
+
sort($group_id_s,SORT_NUMERIC);
|
| 89 |
+
|
| 90 |
+
for ($www = $limitstart; $www < $group_id_s_count; $www++) {
|
| 91 |
+
$i = $group_id_s[$www];
|
| 92 |
+
$field_key = array_search($i, $label_id);
|
| 93 |
+
if($label_type[$field_key] != 'type_arithmetic_captcha') {
|
| 94 |
+
$data_temp = array();
|
| 95 |
+
$tt = $rows[$i];
|
| 96 |
+
|
| 97 |
+
$date = $tt->date;
|
| 98 |
+
$ip = $tt->ip;
|
| 99 |
+
$user_id = get_userdata($tt->user_id_wd);
|
| 100 |
+
$username = $user_id ? $user_id->display_name : "";
|
| 101 |
+
$useremail = $user_id ? $user_id->user_email : "";
|
| 102 |
+
$data_temp['Submit date'] = $date;
|
| 103 |
+
$data_temp['Ip']=$ip;
|
| 104 |
+
$data_temp['Submitter\'s Username']=$username;
|
| 105 |
+
$data_temp['Submitter\'s Email Address']=$useremail;
|
| 106 |
+
|
| 107 |
+
$element_labels = explode(',', $tt->element_label);
|
| 108 |
+
$element_values = explode('*:*el_value*:*', $tt->element_value);
|
| 109 |
+
for ($h = 0; $h < $m; $h++) {
|
| 110 |
+
if(isset($data_temp[$label_titles[$h]]))
|
| 111 |
+
$label_titles[$h] .= '(1)';
|
| 112 |
+
|
| 113 |
+
if(in_array($sorted_labels_id[$h], $element_labels)) {
|
| 114 |
+
$element_value = $element_values[array_search($sorted_labels_id[$h], $element_labels)];
|
| 115 |
+
|
| 116 |
+
if (strpos($element_value, "*@@url@@*")) {
|
| 117 |
+
$file_names = '';
|
| 118 |
+
$new_files = explode("*@@url@@*", $element_value);
|
| 119 |
+
foreach ($new_files as $new_file) {
|
| 120 |
+
if ($new_file) {
|
| 121 |
+
$file_names .= $new_file . ", ";
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
+
$data_temp[stripslashes($label_titles[$h])] = $file_names;
|
| 125 |
+
}
|
| 126 |
+
elseif (strpos($element_value, "***br***")) {
|
| 127 |
+
$element_value = str_replace("***br***", ', ', $element_value);
|
| 128 |
+
if (strpos($element_value, "***quantity***")) {
|
| 129 |
+
$element_value = str_replace("***quantity***", '', $element_value);
|
| 130 |
+
}
|
| 131 |
+
if (strpos($element_value, "***property***")) {
|
| 132 |
+
$element_value = str_replace("***property***", '', $element_value);
|
| 133 |
+
}
|
| 134 |
+
if(substr($element_value, -2) == ', ') {
|
| 135 |
+
$data_temp[stripslashes($label_titles[$h])]= substr($element_value, 0, -2);
|
| 136 |
+
}
|
| 137 |
+
else {
|
| 138 |
+
$data_temp[stripslashes($label_titles[$h])]= $element_value;
|
| 139 |
+
}
|
| 140 |
+
}
|
| 141 |
+
elseif (strpos($element_value, "***map***")) {
|
| 142 |
+
$data_temp[stripslashes($label_titles[$h])] = 'Longitude:' . str_replace("***map***", ', Latitude:', $element_value);
|
| 143 |
+
}
|
| 144 |
+
elseif (strpos($element_value, "***star_rating***")) {
|
| 145 |
+
$element = str_replace("***star_rating***", '', $element_value);
|
| 146 |
+
$element = explode("***", $element);
|
| 147 |
+
$data_temp[stripslashes($label_titles[$h])] = ' ' . $element[1] . '/' . $element[0];
|
| 148 |
+
}
|
| 149 |
+
elseif (strpos($element_value, "@@@") || $element_value == "@@@" || $element_value == "@@@@@@@@@") {
|
| 150 |
+
$data_temp[stripslashes($label_titles[$h])] = str_replace("@@@", ' ', $element_value);
|
| 151 |
+
}
|
| 152 |
+
elseif (strpos($element_value, "***grading***")) {
|
| 153 |
+
$element = str_replace("***grading***", '', $element_value);
|
| 154 |
+
$grading = explode(":", $element);
|
| 155 |
+
$items_count = sizeof($grading) - 1;
|
| 156 |
+
$items = "";
|
| 157 |
+
$total = "";
|
| 158 |
+
for ($k = 0; $k < $items_count / 2; $k++) {
|
| 159 |
+
$items .= $grading[$items_count / 2 + $k] . ": " . $grading[$k] . ", ";
|
| 160 |
+
$total += $grading[$k];
|
| 161 |
+
}
|
| 162 |
+
$items .= "Total: " . $total;
|
| 163 |
+
$data_temp[stripslashes($label_titles[$h])] = $items;
|
| 164 |
+
}
|
| 165 |
+
elseif (strpos($element_value, "***matrix***")) {
|
| 166 |
+
$element = str_replace("***matrix***", '', $element_value);
|
| 167 |
+
$matrix_value = explode('***', $element);
|
| 168 |
+
$matrix_value = array_slice($matrix_value, 0, count($matrix_value) - 1);
|
| 169 |
+
$mat_rows = $matrix_value[0];
|
| 170 |
+
$mat_columns = $matrix_value[$mat_rows + 1];
|
| 171 |
+
$matrix = "";
|
| 172 |
+
$aaa = array();
|
| 173 |
+
$var_checkbox = 1;
|
| 174 |
+
$selected_value = "";
|
| 175 |
+
$selected_value_yes = "";
|
| 176 |
+
$selected_value_no = "";
|
| 177 |
+
for ($k = 1; $k <= $mat_rows; $k++) {
|
| 178 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2] == "radio") {
|
| 179 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2 + $k] == 0) {
|
| 180 |
+
$checked = "0";
|
| 181 |
+
$aaa[1] = "";
|
| 182 |
+
}
|
| 183 |
+
else {
|
| 184 |
+
$aaa = explode("_", $matrix_value[$mat_rows + $mat_columns + 2 + $k]);
|
| 185 |
+
}
|
| 186 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
| 187 |
+
$checked = $aaa[1] == $l ? '1' : '0';
|
| 188 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
| 189 |
+
}
|
| 190 |
+
}
|
| 191 |
+
else {
|
| 192 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "checkbox") {
|
| 193 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
| 194 |
+
$checked = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox] == 1 ? '1' : '0';
|
| 195 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
| 196 |
+
$var_checkbox++;
|
| 197 |
+
}
|
| 198 |
+
}
|
| 199 |
+
else {
|
| 200 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "text") {
|
| 201 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
| 202 |
+
$text_value = $matrix_value[$mat_rows+$mat_columns+2+$var_checkbox];
|
| 203 |
+
$matrix .='['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$text_value."; ";
|
| 204 |
+
$var_checkbox++;
|
| 205 |
+
}
|
| 206 |
+
}
|
| 207 |
+
else {
|
| 208 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
| 209 |
+
$selected_text = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox];
|
| 210 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows + 1 + $l].']='.$selected_text."; ";
|
| 211 |
+
$var_checkbox++;
|
| 212 |
+
}
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
}
|
| 217 |
+
$data_temp[stripslashes($label_titles[$h])] = $matrix;
|
| 218 |
+
}
|
| 219 |
+
else {
|
| 220 |
+
$val = htmlspecialchars_decode($element_value);
|
| 221 |
+
$val = stripslashes(str_replace(''', "'", $val));
|
| 222 |
+
$data_temp[stripslashes($label_titles[$h])] = ($element_value ? $val : '');
|
| 223 |
+
}
|
| 224 |
+
}
|
| 225 |
+
else
|
| 226 |
+
$data_temp[stripslashes($label_titles[$h])] = '';
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
$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'));
|
| 230 |
+
|
| 231 |
+
$total = $wpdb->get_var($wpdb->prepare("SELECT `element_value` FROM " . $wpdb->prefix . "formmaker_submits where group_id=%d AND element_label=%s",$i,'total'));
|
| 232 |
+
|
| 233 |
+
$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'));
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
if($item_total)
|
| 237 |
+
$data_temp['Item Total'] = $item_total;
|
| 238 |
+
|
| 239 |
+
if($total)
|
| 240 |
+
$data_temp['Total'] = $total;
|
| 241 |
+
|
| 242 |
+
if($payment_status)
|
| 243 |
+
$data_temp['Payment Status'] = $payment_status;
|
| 244 |
+
|
| 245 |
+
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_sessions where group_id= %d", $i);
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
$paypal_info = $wpdb->get_results($query);
|
| 250 |
+
if ($paypal_info) {
|
| 251 |
+
$is_paypal_info = TRUE;
|
| 252 |
+
}
|
| 253 |
+
if ($is_paypal_info) {
|
| 254 |
+
foreach ($paypal_info_fields as $key=>$paypal_info_field) {
|
| 255 |
+
if ($paypal_info) {
|
| 256 |
+
$data_temp['PAYPAL_' . $paypal_info_labels[$key]] = $paypal_info[0]->$paypal_info_field;
|
| 257 |
+
}
|
| 258 |
+
else {
|
| 259 |
+
$data_temp['PAYPAL_' . $paypal_info_labels[$key]] = '';
|
| 260 |
+
}
|
| 261 |
+
}
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
$data[$i] = $data_temp;
|
| 265 |
+
}
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
array_push($params, $data);
|
| 269 |
+
array_push($params, $title);
|
| 270 |
+
array_push($params, $is_paypal_info);
|
| 271 |
+
|
| 272 |
+
return $params;
|
| 273 |
+
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 277 |
+
// Getters & Setters //
|
| 278 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 279 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 280 |
+
// Private Methods //
|
| 281 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 282 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 283 |
+
// Listeners //
|
| 284 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 285 |
}
|
admin/models/FMModelSubmissions_fmc.php
CHANGED
|
@@ -60,7 +60,7 @@ class FMModelSubmissions_fmc {
|
|
| 60 |
$join_where = array();
|
| 61 |
$rows_ord = array();
|
| 62 |
$join = '';
|
| 63 |
-
for ($i = 0; $i <
|
| 64 |
array_push($labels_parameters, NULL);
|
| 65 |
}
|
| 66 |
$sorted_label_names = array();
|
|
@@ -115,7 +115,7 @@ class FMModelSubmissions_fmc {
|
|
| 115 |
$orderby = "";
|
| 116 |
}
|
| 117 |
if ($form_id) {
|
| 118 |
-
for($i = 0; $i <
|
| 119 |
array_pop($labels_parameters);
|
| 120 |
}
|
| 121 |
$query = "SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits WHERE ". $where;
|
|
@@ -221,11 +221,22 @@ class FMModelSubmissions_fmc {
|
|
| 221 |
for ($i = 0; $i < count($results); $i++) {
|
| 222 |
array_push($rows_ord, $results[$i]->group_id);
|
| 223 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
$where2 = array();
|
| 225 |
$where2[] = "group_id='0'";
|
| 226 |
foreach ($rows_ord as $rows_ordd) {
|
| 227 |
$where2[] = "group_id='" . $rows_ordd . "'";
|
| 228 |
}
|
|
|
|
| 229 |
$where2 = (count($where2) ? ' WHERE ' . implode( ' OR ', $where2 ) . '' : '' );
|
| 230 |
$query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits ' . $where2;
|
| 231 |
$rows = $wpdb->get_results($query);
|
|
@@ -241,6 +252,7 @@ class FMModelSubmissions_fmc {
|
|
| 241 |
array_push($labels_parameters, $rows);
|
| 242 |
array_push($labels_parameters, $group_ids);
|
| 243 |
array_push($labels_parameters, $where_choices);
|
|
|
|
| 244 |
}
|
| 245 |
return $labels_parameters;
|
| 246 |
}
|
| 60 |
$join_where = array();
|
| 61 |
$rows_ord = array();
|
| 62 |
$join = '';
|
| 63 |
+
for ($i = 0; $i < 9; $i++) {
|
| 64 |
array_push($labels_parameters, NULL);
|
| 65 |
}
|
| 66 |
$sorted_label_names = array();
|
| 115 |
$orderby = "";
|
| 116 |
}
|
| 117 |
if ($form_id) {
|
| 118 |
+
for($i = 0; $i < 9; $i++) {
|
| 119 |
array_pop($labels_parameters);
|
| 120 |
}
|
| 121 |
$query = "SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits WHERE ". $where;
|
| 221 |
for ($i = 0; $i < count($results); $i++) {
|
| 222 |
array_push($rows_ord, $results[$i]->group_id);
|
| 223 |
}
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
$query1 = $join . ' ' . $orderby ;
|
| 227 |
+
$searched_group_ids = $wpdb->get_results($query1);
|
| 228 |
+
$searched_ids = array();
|
| 229 |
+
for ($i = 0; $i < count($searched_group_ids); $i++) {
|
| 230 |
+
array_push($searched_ids, $searched_group_ids[$i]->group_id);
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
|
| 234 |
$where2 = array();
|
| 235 |
$where2[] = "group_id='0'";
|
| 236 |
foreach ($rows_ord as $rows_ordd) {
|
| 237 |
$where2[] = "group_id='" . $rows_ordd . "'";
|
| 238 |
}
|
| 239 |
+
|
| 240 |
$where2 = (count($where2) ? ' WHERE ' . implode( ' OR ', $where2 ) . '' : '' );
|
| 241 |
$query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits ' . $where2;
|
| 242 |
$rows = $wpdb->get_results($query);
|
| 252 |
array_push($labels_parameters, $rows);
|
| 253 |
array_push($labels_parameters, $group_ids);
|
| 254 |
array_push($labels_parameters, $where_choices);
|
| 255 |
+
array_push($labels_parameters, $searched_ids);
|
| 256 |
}
|
| 257 |
return $labels_parameters;
|
| 258 |
}
|
admin/models/FMModelUninstall_fmc.php
CHANGED
|
@@ -1,57 +1,57 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class FMModelUninstall_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 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");
|
| 32 |
-
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_submits");
|
| 33 |
-
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_views");
|
| 34 |
-
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_themes");
|
| 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 //
|
| 50 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 51 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 52 |
-
// Private Methods //
|
| 53 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 54 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 55 |
-
// Listeners //
|
| 56 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 57 |
}
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class FMModelUninstall_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 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");
|
| 32 |
+
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_submits");
|
| 33 |
+
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_views");
|
| 34 |
+
$wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_themes");
|
| 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 //
|
| 50 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 51 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 52 |
+
// Private Methods //
|
| 53 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 54 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 55 |
+
// Listeners //
|
| 56 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 57 |
}
|
admin/views/FMViewSubmissions_fmc.php
CHANGED
|
@@ -1,4464 +1,4466 @@
|
|
| 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 |
-
$
|
| 42 |
-
$
|
| 43 |
-
$
|
| 44 |
-
$
|
| 45 |
-
$
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
$
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
$
|
| 52 |
-
$
|
| 53 |
-
$
|
| 54 |
-
$
|
| 55 |
-
$
|
| 56 |
-
$
|
| 57 |
-
$group_id_s =
|
| 58 |
-
$
|
| 59 |
-
$
|
| 60 |
-
$
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
$
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
var
|
| 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 |
-
"Submitter's
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
'
|
| 148 |
-
'
|
| 149 |
-
'
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
'
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
if(document.getElementById('
|
| 187 |
-
document.getElementById('
|
| 188 |
-
if(document.getElementById('
|
| 189 |
-
document.getElementById('
|
| 190 |
-
if(document.getElementById('
|
| 191 |
-
document.getElementById('
|
| 192 |
-
if(document.getElementById('
|
| 193 |
-
document.getElementById('
|
| 194 |
-
if(document.getElementById('
|
| 195 |
-
document.getElementById('
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
</div>
|
| 232 |
-
<div id="
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 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 |
-
|
| 287 |
-
<input type="hidden"
|
| 288 |
-
<input type="hidden"
|
| 289 |
-
<input type="hidden"
|
| 290 |
-
|
| 291 |
-
<
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
<div class="fm-tools-button"><div class="fm-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
<
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
</button>
|
| 350 |
-
<button class="fm-icon
|
| 351 |
-
</button>
|
| 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 |
-
<?php
|
| 377 |
-
<th class="table_small_col count_col sub-align"
|
| 378 |
-
|
| 379 |
-
<th
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
<th
|
| 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 |
-
<th
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
<th
|
| 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 |
-
<option value="
|
| 509 |
-
<option value="
|
| 510 |
-
<option value="
|
| 511 |
-
<option value="
|
| 512 |
-
<option value="
|
| 513 |
-
<option value="
|
| 514 |
-
<option value="
|
| 515 |
-
<option value="
|
| 516 |
-
<option value="
|
| 517 |
-
<option value="
|
| 518 |
-
<option value="
|
| 519 |
-
<option value="
|
| 520 |
-
<option value="
|
| 521 |
-
<option value="
|
| 522 |
-
<option value="
|
| 523 |
-
<option value="
|
| 524 |
-
<option value="
|
| 525 |
-
<option value="
|
| 526 |
-
<option value="
|
| 527 |
-
<option value="
|
| 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 |
-
<?php
|
| 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 |
-
|
| 750 |
-
|
| 751 |
-
|
| 752 |
-
|
| 753 |
-
|
| 754 |
-
|
| 755 |
-
|
| 756 |
-
|
| 757 |
-
|
| 758 |
-
|
| 759 |
-
|
| 760 |
-
|
| 761 |
-
|
| 762 |
-
|
| 763 |
-
|
| 764 |
-
|
| 765 |
-
|
| 766 |
-
|
| 767 |
-
|
| 768 |
-
|
| 769 |
-
|
| 770 |
-
|
| 771 |
-
|
| 772 |
-
|
| 773 |
-
|
| 774 |
-
|
| 775 |
-
|
| 776 |
-
|
| 777 |
-
|
| 778 |
-
'
|
| 779 |
-
'
|
| 780 |
-
'
|
| 781 |
-
'
|
| 782 |
-
|
| 783 |
-
|
| 784 |
-
|
| 785 |
-
|
| 786 |
-
|
| 787 |
-
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
|
| 797 |
-
|
| 798 |
-
|
| 799 |
-
|
| 800 |
-
scrollbar
|
| 801 |
-
scrollbar.
|
| 802 |
-
scrollbar.
|
| 803 |
-
scrollbar.
|
| 804 |
-
scrollbar.firstChild.
|
| 805 |
-
scrollbar.
|
| 806 |
-
|
| 807 |
-
|
| 808 |
-
|
| 809 |
-
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
|
| 814 |
-
|
| 815 |
-
|
| 816 |
-
|
| 817 |
-
|
| 818 |
-
|
| 819 |
-
|
| 820 |
-
|
| 821 |
-
|
| 822 |
-
|
| 823 |
-
|
| 824 |
-
|
| 825 |
-
|
| 826 |
-
|
| 827 |
-
|
| 828 |
-
|
| 829 |
-
|
| 830 |
-
|
| 831 |
-
|
| 832 |
-
|
| 833 |
-
$
|
| 834 |
-
$
|
| 835 |
-
$
|
| 836 |
-
|
| 837 |
-
|
| 838 |
-
|
| 839 |
-
$
|
| 840 |
-
$
|
| 841 |
-
$
|
| 842 |
-
$
|
| 843 |
-
$
|
| 844 |
-
$
|
| 845 |
-
|
| 846 |
-
|
| 847 |
-
|
| 848 |
-
|
| 849 |
-
$
|
| 850 |
-
$
|
| 851 |
-
|
| 852 |
-
|
| 853 |
-
|
| 854 |
-
|
| 855 |
-
<
|
| 856 |
-
<
|
| 857 |
-
|
| 858 |
-
|
| 859 |
-
|
| 860 |
-
|
| 861 |
-
<th width="
|
| 862 |
-
|
| 863 |
-
|
| 864 |
-
|
| 865 |
-
|
| 866 |
-
|
| 867 |
-
|
| 868 |
-
|
| 869 |
-
|
| 870 |
-
|
| 871 |
-
|
| 872 |
-
|
| 873 |
-
|
| 874 |
-
|
| 875 |
-
|
| 876 |
-
|
| 877 |
-
|
| 878 |
-
|
| 879 |
-
<div
|
| 880 |
-
</div>
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
| 884 |
-
|
| 885 |
-
|
| 886 |
-
<div style="
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
|
| 890 |
-
|
| 891 |
-
|
| 892 |
-
|
| 893 |
-
|
| 894 |
-
|
| 895 |
-
|
| 896 |
-
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
|
| 900 |
-
|
| 901 |
-
|
| 902 |
-
|
| 903 |
-
|
| 904 |
-
|
| 905 |
-
|
| 906 |
-
|
| 907 |
-
|
| 908 |
-
|
| 909 |
-
|
| 910 |
-
|
| 911 |
-
|
| 912 |
-
|
| 913 |
-
|
| 914 |
-
|
| 915 |
-
|
| 916 |
-
|
| 917 |
-
|
| 918 |
-
|
| 919 |
-
|
| 920 |
-
$
|
| 921 |
-
$
|
| 922 |
-
$
|
| 923 |
-
$
|
| 924 |
-
$
|
| 925 |
-
|
| 926 |
-
|
| 927 |
-
$
|
| 928 |
-
|
| 929 |
-
|
| 930 |
-
|
| 931 |
-
|
| 932 |
-
|
| 933 |
-
|
| 934 |
-
|
| 935 |
-
|
| 936 |
-
|
| 937 |
-
|
| 938 |
-
|
| 939 |
-
|
| 940 |
-
|
| 941 |
-
|
| 942 |
-
|
| 943 |
-
|
| 944 |
-
|
| 945 |
-
|
| 946 |
-
|
| 947 |
-
|
| 948 |
-
|
| 949 |
-
|
| 950 |
-
|
| 951 |
-
|
| 952 |
-
|
| 953 |
-
|
| 954 |
-
|
| 955 |
-
|
| 956 |
-
|
| 957 |
-
|
| 958 |
-
|
| 959 |
-
|
| 960 |
-
|
| 961 |
-
|
| 962 |
-
|
| 963 |
-
|
| 964 |
-
|
| 965 |
-
|
| 966 |
-
|
| 967 |
-
|
| 968 |
-
|
| 969 |
-
|
| 970 |
-
|
| 971 |
-
|
| 972 |
-
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
|
| 976 |
-
|
| 977 |
-
|
| 978 |
-
|
| 979 |
-
|
| 980 |
-
|
| 981 |
-
|
| 982 |
-
|
| 983 |
-
|
| 984 |
-
|
| 985 |
-
|
| 986 |
-
|
| 987 |
-
|
| 988 |
-
|
| 989 |
-
|
| 990 |
-
|
| 991 |
-
|
| 992 |
-
|
| 993 |
-
|
| 994 |
-
|
| 995 |
-
|
| 996 |
-
|
| 997 |
-
|
| 998 |
-
|
| 999 |
-
|
| 1000 |
-
|
| 1001 |
-
|
| 1002 |
-
|
| 1003 |
-
|
| 1004 |
-
|
| 1005 |
-
|
| 1006 |
-
|
| 1007 |
-
|
| 1008 |
-
|
| 1009 |
-
|
| 1010 |
-
|
| 1011 |
-
<option value="
|
| 1012 |
-
<option value="
|
| 1013 |
-
<option value="
|
| 1014 |
-
<option value="
|
| 1015 |
-
<option value="
|
| 1016 |
-
<option value="
|
| 1017 |
-
<option value="
|
| 1018 |
-
<option value="
|
| 1019 |
-
<option value="
|
| 1020 |
-
<option value="
|
| 1021 |
-
<option value="
|
| 1022 |
-
<option value="
|
| 1023 |
-
<option value="
|
| 1024 |
-
<option value="
|
| 1025 |
-
<option value="
|
| 1026 |
-
<option value="
|
| 1027 |
-
<option value="
|
| 1028 |
-
<option value="
|
| 1029 |
-
<option value="
|
| 1030 |
-
<option value="
|
| 1031 |
-
|
| 1032 |
-
|
| 1033 |
-
|
| 1034 |
-
|
| 1035 |
-
|
| 1036 |
-
|
| 1037 |
-
|
| 1038 |
-
|
| 1039 |
-
|
| 1040 |
-
|
| 1041 |
-
|
| 1042 |
-
|
| 1043 |
-
$
|
| 1044 |
-
|
| 1045 |
-
|
| 1046 |
-
|
| 1047 |
-
|
| 1048 |
-
|
| 1049 |
-
|
| 1050 |
-
|
| 1051 |
-
|
| 1052 |
-
<input type="hidden" id="<?php echo $label_id; ?>
|
| 1053 |
-
<?php echo $
|
| 1054 |
-
<input type="hidden"
|
| 1055 |
-
|
| 1056 |
-
|
| 1057 |
-
|
| 1058 |
-
|
| 1059 |
-
|
| 1060 |
-
|
| 1061 |
-
|
| 1062 |
-
$
|
| 1063 |
-
$
|
| 1064 |
-
|
| 1065 |
-
|
| 1066 |
-
|
| 1067 |
-
|
| 1068 |
-
|
| 1069 |
-
|
| 1070 |
-
|
| 1071 |
-
|
| 1072 |
-
<input type="hidden"
|
| 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 |
-
$
|
| 1107 |
-
$
|
| 1108 |
-
$
|
| 1109 |
-
$
|
| 1110 |
-
|
| 1111 |
-
|
| 1112 |
-
|
| 1113 |
-
|
| 1114 |
-
|
| 1115 |
-
|
| 1116 |
-
|
| 1117 |
-
|
| 1118 |
-
|
| 1119 |
-
<
|
| 1120 |
-
<input type="hidden"
|
| 1121 |
-
|
| 1122 |
-
|
| 1123 |
-
|
| 1124 |
-
|
| 1125 |
-
|
| 1126 |
-
|
| 1127 |
-
|
| 1128 |
-
$
|
| 1129 |
-
|
| 1130 |
-
|
| 1131 |
-
|
| 1132 |
-
|
| 1133 |
-
|
| 1134 |
-
|
| 1135 |
-
|
| 1136 |
-
|
| 1137 |
-
<input type="hidden"
|
| 1138 |
-
|
| 1139 |
-
|
| 1140 |
-
|
| 1141 |
-
|
| 1142 |
-
|
| 1143 |
-
|
| 1144 |
-
|
| 1145 |
-
|
| 1146 |
-
|
| 1147 |
-
|
| 1148 |
-
|
| 1149 |
-
|
| 1150 |
-
|
| 1151 |
-
|
| 1152 |
-
|
| 1153 |
-
|
| 1154 |
-
|
| 1155 |
-
|
| 1156 |
-
|
| 1157 |
-
|
| 1158 |
-
|
| 1159 |
-
|
| 1160 |
-
|
| 1161 |
-
<input type="hidden" name="
|
| 1162 |
-
<input type="hidden" name="
|
| 1163 |
-
<input type="hidden" name="
|
| 1164 |
-
<input type="hidden"
|
| 1165 |
-
<input type="hidden" value="<?php echo
|
| 1166 |
-
<
|
| 1167 |
-
|
| 1168 |
-
|
| 1169 |
-
|
| 1170 |
-
|
| 1171 |
-
|
| 1172 |
-
|
| 1173 |
-
|
| 1174 |
-
|
| 1175 |
-
|
| 1176 |
-
$
|
| 1177 |
-
$
|
| 1178 |
-
$
|
| 1179 |
-
$
|
| 1180 |
-
$
|
| 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 |
-
|
| 1209 |
-
|
| 1210 |
-
|
| 1211 |
-
|
| 1212 |
-
|
| 1213 |
-
|
| 1214 |
-
|
| 1215 |
-
|
| 1216 |
-
|
| 1217 |
-
|
| 1218 |
-
|
| 1219 |
-
|
| 1220 |
-
|
| 1221 |
-
|
| 1222 |
-
|
| 1223 |
-
|
| 1224 |
-
|
| 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 |
-
$form_theme =
|
| 1250 |
-
|
| 1251 |
-
|
| 1252 |
-
|
| 1253 |
-
|
| 1254 |
-
|
| 1255 |
-
|
| 1256 |
-
|
| 1257 |
-
|
| 1258 |
-
|
| 1259 |
-
|
| 1260 |
-
|
| 1261 |
-
|
| 1262 |
-
|
| 1263 |
-
|
| 1264 |
-
|
| 1265 |
-
$
|
| 1266 |
-
$
|
| 1267 |
-
$
|
| 1268 |
-
$
|
| 1269 |
-
$
|
| 1270 |
-
$
|
| 1271 |
-
$
|
| 1272 |
-
$
|
| 1273 |
-
$
|
| 1274 |
-
$
|
| 1275 |
-
$
|
| 1276 |
-
|
| 1277 |
-
|
| 1278 |
-
|
| 1279 |
-
$temp = explode('*:*
|
| 1280 |
-
array_push($
|
| 1281 |
-
$temp = explode('*:*
|
| 1282 |
-
array_push($
|
| 1283 |
-
|
| 1284 |
-
|
| 1285 |
-
|
| 1286 |
-
|
| 1287 |
-
$
|
| 1288 |
-
|
| 1289 |
-
|
| 1290 |
-
|
| 1291 |
-
$
|
| 1292 |
-
|
| 1293 |
-
|
| 1294 |
-
|
| 1295 |
-
|
| 1296 |
-
|
| 1297 |
-
|
| 1298 |
-
|
| 1299 |
-
|
| 1300 |
-
|
| 1301 |
-
|
| 1302 |
-
|
| 1303 |
-
|
| 1304 |
-
|
| 1305 |
-
|
| 1306 |
-
|
| 1307 |
-
|
| 1308 |
-
|
| 1309 |
-
|
| 1310 |
-
|
| 1311 |
-
|
| 1312 |
-
|
| 1313 |
-
|
| 1314 |
-
|
| 1315 |
-
|
| 1316 |
-
|
| 1317 |
-
$
|
| 1318 |
-
$
|
| 1319 |
-
|
| 1320 |
-
|
| 1321 |
-
|
| 1322 |
-
case '
|
| 1323 |
-
case '
|
| 1324 |
-
case '
|
| 1325 |
-
case '
|
| 1326 |
-
case '
|
| 1327 |
-
case '
|
| 1328 |
-
case '
|
| 1329 |
-
case '
|
| 1330 |
-
|
| 1331 |
-
|
| 1332 |
-
|
| 1333 |
-
|
| 1334 |
-
|
| 1335 |
-
|
| 1336 |
-
|
| 1337 |
-
|
| 1338 |
-
$temp = $temp
|
| 1339 |
-
|
| 1340 |
-
|
| 1341 |
-
|
| 1342 |
-
|
| 1343 |
-
|
| 1344 |
-
|
| 1345 |
-
|
| 1346 |
-
|
| 1347 |
-
|
| 1348 |
-
|
| 1349 |
-
$
|
| 1350 |
-
$
|
| 1351 |
-
|
| 1352 |
-
|
| 1353 |
-
|
| 1354 |
-
|
| 1355 |
-
|
| 1356 |
-
|
| 1357 |
-
|
| 1358 |
-
|
| 1359 |
-
|
| 1360 |
-
$temp = $temp
|
| 1361 |
-
|
| 1362 |
-
|
| 1363 |
-
|
| 1364 |
-
|
| 1365 |
-
|
| 1366 |
-
|
| 1367 |
-
|
| 1368 |
-
|
| 1369 |
-
|
| 1370 |
-
|
| 1371 |
-
|
| 1372 |
-
$
|
| 1373 |
-
|
| 1374 |
-
$rep
|
| 1375 |
-
|
| 1376 |
-
|
| 1377 |
-
|
| 1378 |
-
|
| 1379 |
-
|
| 1380 |
-
|
| 1381 |
-
|
| 1382 |
-
|
| 1383 |
-
|
| 1384 |
-
|
| 1385 |
-
|
| 1386 |
-
$temp
|
| 1387 |
-
|
| 1388 |
-
|
| 1389 |
-
|
| 1390 |
-
|
| 1391 |
-
|
| 1392 |
-
|
| 1393 |
-
|
| 1394 |
-
|
| 1395 |
-
|
| 1396 |
-
|
| 1397 |
-
|
| 1398 |
-
|
| 1399 |
-
|
| 1400 |
-
|
| 1401 |
-
|
| 1402 |
-
$rep
|
| 1403 |
-
|
| 1404 |
-
|
| 1405 |
-
|
| 1406 |
-
|
| 1407 |
-
|
| 1408 |
-
|
| 1409 |
-
|
| 1410 |
-
|
| 1411 |
-
|
| 1412 |
-
|
| 1413 |
-
|
| 1414 |
-
|
| 1415 |
-
$temp
|
| 1416 |
-
|
| 1417 |
-
|
| 1418 |
-
|
| 1419 |
-
|
| 1420 |
-
|
| 1421 |
-
|
| 1422 |
-
|
| 1423 |
-
|
| 1424 |
-
|
| 1425 |
-
|
| 1426 |
-
|
| 1427 |
-
|
| 1428 |
-
|
| 1429 |
-
|
| 1430 |
-
|
| 1431 |
-
|
| 1432 |
-
|
| 1433 |
-
|
| 1434 |
-
$rep
|
| 1435 |
-
|
| 1436 |
-
|
| 1437 |
-
|
| 1438 |
-
|
| 1439 |
-
|
| 1440 |
-
|
| 1441 |
-
|
| 1442 |
-
|
| 1443 |
-
|
| 1444 |
-
|
| 1445 |
-
|
| 1446 |
-
|
| 1447 |
-
|
| 1448 |
-
$temp
|
| 1449 |
-
|
| 1450 |
-
|
| 1451 |
-
|
| 1452 |
-
|
| 1453 |
-
|
| 1454 |
-
|
| 1455 |
-
|
| 1456 |
-
|
| 1457 |
-
|
| 1458 |
-
|
| 1459 |
-
|
| 1460 |
-
|
| 1461 |
-
$
|
| 1462 |
-
|
| 1463 |
-
$rep
|
| 1464 |
-
|
| 1465 |
-
|
| 1466 |
-
|
| 1467 |
-
|
| 1468 |
-
|
| 1469 |
-
|
| 1470 |
-
|
| 1471 |
-
|
| 1472 |
-
|
| 1473 |
-
|
| 1474 |
-
|
| 1475 |
-
|
| 1476 |
-
|
| 1477 |
-
|
| 1478 |
-
|
| 1479 |
-
|
| 1480 |
-
|
| 1481 |
-
|
| 1482 |
-
|
| 1483 |
-
|
| 1484 |
-
|
| 1485 |
-
$
|
| 1486 |
-
|
| 1487 |
-
|
| 1488 |
-
|
| 1489 |
-
|
| 1490 |
-
|
| 1491 |
-
$temp
|
| 1492 |
-
|
| 1493 |
-
|
| 1494 |
-
|
| 1495 |
-
|
| 1496 |
-
|
| 1497 |
-
|
| 1498 |
-
|
| 1499 |
-
|
| 1500 |
-
|
| 1501 |
-
|
| 1502 |
-
|
| 1503 |
-
$
|
| 1504 |
-
|
| 1505 |
-
|
| 1506 |
-
$
|
| 1507 |
-
|
| 1508 |
-
$
|
| 1509 |
-
|
| 1510 |
-
$rep
|
| 1511 |
-
|
| 1512 |
-
|
| 1513 |
-
|
| 1514 |
-
|
| 1515 |
-
|
| 1516 |
-
|
| 1517 |
-
|
| 1518 |
-
|
| 1519 |
-
|
| 1520 |
-
|
| 1521 |
-
|
| 1522 |
-
|
| 1523 |
-
|
| 1524 |
-
|
| 1525 |
-
|
| 1526 |
-
|
| 1527 |
-
|
| 1528 |
-
|
| 1529 |
-
|
| 1530 |
-
|
| 1531 |
-
|
| 1532 |
-
|
| 1533 |
-
|
| 1534 |
-
|
| 1535 |
-
|
| 1536 |
-
|
| 1537 |
-
|
| 1538 |
-
|
| 1539 |
-
|
| 1540 |
-
|
| 1541 |
-
|
| 1542 |
-
|
| 1543 |
-
$temp
|
| 1544 |
-
|
| 1545 |
-
|
| 1546 |
-
|
| 1547 |
-
|
| 1548 |
-
|
| 1549 |
-
|
| 1550 |
-
|
| 1551 |
-
|
| 1552 |
-
|
| 1553 |
-
|
| 1554 |
-
|
| 1555 |
-
|
| 1556 |
-
|
| 1557 |
-
|
| 1558 |
-
|
| 1559 |
-
|
| 1560 |
-
|
| 1561 |
-
|
| 1562 |
-
|
| 1563 |
-
|
| 1564 |
-
|
| 1565 |
-
|
| 1566 |
-
|
| 1567 |
-
|
| 1568 |
-
|
| 1569 |
-
|
| 1570 |
-
|
| 1571 |
-
|
| 1572 |
-
|
| 1573 |
-
|
| 1574 |
-
|
| 1575 |
-
|
| 1576 |
-
|
| 1577 |
-
|
| 1578 |
-
|
| 1579 |
-
|
| 1580 |
-
|
| 1581 |
-
|
| 1582 |
-
|
| 1583 |
-
|
| 1584 |
-
|
| 1585 |
-
|
| 1586 |
-
|
| 1587 |
-
|
| 1588 |
-
|
| 1589 |
-
|
| 1590 |
-
|
| 1591 |
-
|
| 1592 |
-
|
| 1593 |
-
|
| 1594 |
-
|
| 1595 |
-
|
| 1596 |
-
|
| 1597 |
-
|
| 1598 |
-
|
| 1599 |
-
|
| 1600 |
-
|
| 1601 |
-
|
| 1602 |
-
|
| 1603 |
-
|
| 1604 |
-
|
| 1605 |
-
|
| 1606 |
-
|
| 1607 |
-
|
| 1608 |
-
|
| 1609 |
-
|
| 1610 |
-
|
| 1611 |
-
$
|
| 1612 |
-
|
| 1613 |
-
$rep
|
| 1614 |
-
|
| 1615 |
-
|
| 1616 |
-
|
| 1617 |
-
|
| 1618 |
-
|
| 1619 |
-
|
| 1620 |
-
|
| 1621 |
-
|
| 1622 |
-
|
| 1623 |
-
|
| 1624 |
-
|
| 1625 |
-
$temp
|
| 1626 |
-
|
| 1627 |
-
|
| 1628 |
-
|
| 1629 |
-
|
| 1630 |
-
|
| 1631 |
-
|
| 1632 |
-
|
| 1633 |
-
|
| 1634 |
-
|
| 1635 |
-
|
| 1636 |
-
|
| 1637 |
-
|
| 1638 |
-
$
|
| 1639 |
-
|
| 1640 |
-
|
| 1641 |
-
$
|
| 1642 |
-
|
| 1643 |
-
$
|
| 1644 |
-
|
| 1645 |
-
|
| 1646 |
-
|
| 1647 |
-
|
| 1648 |
-
|
| 1649 |
-
|
| 1650 |
-
|
| 1651 |
-
|
| 1652 |
-
|
| 1653 |
-
|
| 1654 |
-
|
| 1655 |
-
|
| 1656 |
-
|
| 1657 |
-
|
| 1658 |
-
|
| 1659 |
-
|
| 1660 |
-
$
|
| 1661 |
-
|
| 1662 |
-
|
| 1663 |
-
|
| 1664 |
-
|
| 1665 |
-
$selected = '';
|
| 1666 |
-
|
| 1667 |
-
|
| 1668 |
-
|
| 1669 |
-
|
| 1670 |
-
|
| 1671 |
-
|
| 1672 |
-
|
| 1673 |
-
|
| 1674 |
-
|
| 1675 |
-
|
| 1676 |
-
|
| 1677 |
-
|
| 1678 |
-
|
| 1679 |
-
|
| 1680 |
-
|
| 1681 |
-
|
| 1682 |
-
|
| 1683 |
-
|
| 1684 |
-
$selected = '';
|
| 1685 |
-
|
| 1686 |
-
|
| 1687 |
-
|
| 1688 |
-
|
| 1689 |
-
|
| 1690 |
-
|
| 1691 |
-
|
| 1692 |
-
|
| 1693 |
-
|
| 1694 |
-
|
| 1695 |
-
|
| 1696 |
-
|
| 1697 |
-
|
| 1698 |
-
|
| 1699 |
-
|
| 1700 |
-
|
| 1701 |
-
|
| 1702 |
-
|
| 1703 |
-
|
| 1704 |
-
|
| 1705 |
-
|
| 1706 |
-
$temp
|
| 1707 |
-
|
| 1708 |
-
|
| 1709 |
-
|
| 1710 |
-
|
| 1711 |
-
|
| 1712 |
-
|
| 1713 |
-
|
| 1714 |
-
|
| 1715 |
-
|
| 1716 |
-
|
| 1717 |
-
|
| 1718 |
-
|
| 1719 |
-
|
| 1720 |
-
|
| 1721 |
-
$
|
| 1722 |
-
|
| 1723 |
-
$rep
|
| 1724 |
-
|
| 1725 |
-
|
| 1726 |
-
|
| 1727 |
-
|
| 1728 |
-
|
| 1729 |
-
|
| 1730 |
-
|
| 1731 |
-
|
| 1732 |
-
|
| 1733 |
-
|
| 1734 |
-
|
| 1735 |
-
|
| 1736 |
-
|
| 1737 |
-
|
| 1738 |
-
$
|
| 1739 |
-
|
| 1740 |
-
|
| 1741 |
-
|
| 1742 |
-
|
| 1743 |
-
|
| 1744 |
-
|
| 1745 |
-
|
| 1746 |
-
|
| 1747 |
-
|
| 1748 |
-
|
| 1749 |
-
|
| 1750 |
-
|
| 1751 |
-
|
| 1752 |
-
$
|
| 1753 |
-
|
| 1754 |
-
$temp
|
| 1755 |
-
|
| 1756 |
-
|
| 1757 |
-
|
| 1758 |
-
|
| 1759 |
-
|
| 1760 |
-
|
| 1761 |
-
|
| 1762 |
-
|
| 1763 |
-
|
| 1764 |
-
|
| 1765 |
-
|
| 1766 |
-
$
|
| 1767 |
-
|
| 1768 |
-
|
| 1769 |
-
|
| 1770 |
-
|
| 1771 |
-
|
| 1772 |
-
|
| 1773 |
-
|
| 1774 |
-
|
| 1775 |
-
|
| 1776 |
-
|
| 1777 |
-
|
| 1778 |
-
|
| 1779 |
-
|
| 1780 |
-
$param['w_value_disabled']
|
| 1781 |
-
|
| 1782 |
-
|
| 1783 |
-
|
| 1784 |
-
|
| 1785 |
-
|
| 1786 |
-
$param['w_field_option_pos']
|
| 1787 |
-
|
| 1788 |
-
|
| 1789 |
-
|
| 1790 |
-
|
| 1791 |
-
|
| 1792 |
-
$param['
|
| 1793 |
-
|
| 1794 |
-
|
| 1795 |
-
|
| 1796 |
-
|
| 1797 |
-
|
| 1798 |
-
|
| 1799 |
-
|
| 1800 |
-
|
| 1801 |
-
|
| 1802 |
-
|
| 1803 |
-
|
| 1804 |
-
$param['
|
| 1805 |
-
|
| 1806 |
-
|
| 1807 |
-
|
| 1808 |
-
|
| 1809 |
-
|
| 1810 |
-
|
| 1811 |
-
|
| 1812 |
-
$element_value
|
| 1813 |
-
|
| 1814 |
-
$
|
| 1815 |
-
|
| 1816 |
-
$
|
| 1817 |
-
|
| 1818 |
-
|
| 1819 |
-
|
| 1820 |
-
|
| 1821 |
-
|
| 1822 |
-
|
| 1823 |
-
|
| 1824 |
-
|
| 1825 |
-
|
| 1826 |
-
|
| 1827 |
-
|
| 1828 |
-
|
| 1829 |
-
|
| 1830 |
-
$
|
| 1831 |
-
|
| 1832 |
-
|
| 1833 |
-
|
| 1834 |
-
|
| 1835 |
-
|
| 1836 |
-
|
| 1837 |
-
|
| 1838 |
-
|
| 1839 |
-
|
| 1840 |
-
|
| 1841 |
-
|
| 1842 |
-
|
| 1843 |
-
|
| 1844 |
-
|
| 1845 |
-
|
| 1846 |
-
|
| 1847 |
-
|
| 1848 |
-
|
| 1849 |
-
|
| 1850 |
-
$
|
| 1851 |
-
|
| 1852 |
-
|
| 1853 |
-
|
| 1854 |
-
|
| 1855 |
-
|
| 1856 |
-
|
| 1857 |
-
|
| 1858 |
-
|
| 1859 |
-
|
| 1860 |
-
|
| 1861 |
-
|
| 1862 |
-
|
| 1863 |
-
|
| 1864 |
-
|
| 1865 |
-
$
|
| 1866 |
-
|
| 1867 |
-
$w_choices_params = explode('[
|
| 1868 |
-
|
| 1869 |
-
$
|
| 1870 |
-
|
| 1871 |
-
|
| 1872 |
-
|
| 1873 |
-
|
| 1874 |
-
|
| 1875 |
-
|
| 1876 |
-
$
|
| 1877 |
-
|
| 1878 |
-
$
|
| 1879 |
-
|
| 1880 |
-
|
| 1881 |
-
|
| 1882 |
-
|
| 1883 |
-
|
| 1884 |
-
|
| 1885 |
-
|
| 1886 |
-
|
| 1887 |
-
|
| 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 |
-
|
| 1972 |
-
|
| 1973 |
-
|
| 1974 |
-
|
| 1975 |
-
|
| 1976 |
-
|
| 1977 |
-
|
| 1978 |
-
|
| 1979 |
-
|
| 1980 |
-
|
| 1981 |
-
|
| 1982 |
-
|
| 1983 |
-
|
| 1984 |
-
|
| 1985 |
-
|
| 1986 |
-
|
| 1987 |
-
|
| 1988 |
-
|
| 1989 |
-
|
| 1990 |
-
|
| 1991 |
-
|
| 1992 |
-
|
| 1993 |
-
|
| 1994 |
-
|
| 1995 |
-
|
| 1996 |
-
|
| 1997 |
-
|
| 1998 |
-
|
| 1999 |
-
|
| 2000 |
-
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'
|
| 2001 |
-
|
| 2002 |
-
';
|
| 2003 |
-
|
| 2004 |
-
|
| 2005 |
-
|
| 2006 |
-
|
| 2007 |
-
|
| 2008 |
-
|
| 2009 |
-
|
| 2010 |
-
|
| 2011 |
-
|
| 2012 |
-
|
| 2013 |
-
|
| 2014 |
-
|
| 2015 |
-
|
| 2016 |
-
|
| 2017 |
-
|
| 2018 |
-
|
| 2019 |
-
|
| 2020 |
-
$
|
| 2021 |
-
|
| 2022 |
-
|
| 2023 |
-
|
| 2024 |
-
$
|
| 2025 |
-
|
| 2026 |
-
|
| 2027 |
-
|
| 2028 |
-
|
| 2029 |
-
|
| 2030 |
-
|
| 2031 |
-
|
| 2032 |
-
|
| 2033 |
-
|
| 2034 |
-
$
|
| 2035 |
-
|
| 2036 |
-
$temp
|
| 2037 |
-
|
| 2038 |
-
|
| 2039 |
-
|
| 2040 |
-
|
| 2041 |
-
|
| 2042 |
-
|
| 2043 |
-
|
| 2044 |
-
|
| 2045 |
-
|
| 2046 |
-
|
| 2047 |
-
|
| 2048 |
-
$
|
| 2049 |
-
|
| 2050 |
-
|
| 2051 |
-
|
| 2052 |
-
|
| 2053 |
-
|
| 2054 |
-
|
| 2055 |
-
|
| 2056 |
-
|
| 2057 |
-
|
| 2058 |
-
|
| 2059 |
-
|
| 2060 |
-
|
| 2061 |
-
|
| 2062 |
-
|
| 2063 |
-
|
| 2064 |
-
|
| 2065 |
-
|
| 2066 |
-
|
| 2067 |
-
|
| 2068 |
-
|
| 2069 |
-
|
| 2070 |
-
$param['
|
| 2071 |
-
|
| 2072 |
-
$param['
|
| 2073 |
-
|
| 2074 |
-
|
| 2075 |
-
|
| 2076 |
-
|
| 2077 |
-
|
| 2078 |
-
|
| 2079 |
-
|
| 2080 |
-
|
| 2081 |
-
|
| 2082 |
-
|
| 2083 |
-
|
| 2084 |
-
$param['
|
| 2085 |
-
|
| 2086 |
-
|
| 2087 |
-
|
| 2088 |
-
|
| 2089 |
-
|
| 2090 |
-
|
| 2091 |
-
|
| 2092 |
-
|
| 2093 |
-
|
| 2094 |
-
|
| 2095 |
-
|
| 2096 |
-
|
| 2097 |
-
|
| 2098 |
-
|
| 2099 |
-
|
| 2100 |
-
|
| 2101 |
-
|
| 2102 |
-
|
| 2103 |
-
|
| 2104 |
-
|
| 2105 |
-
|
| 2106 |
-
|
| 2107 |
-
|
| 2108 |
-
|
| 2109 |
-
|
| 2110 |
-
|
| 2111 |
-
|
| 2112 |
-
|
| 2113 |
-
|
| 2114 |
-
|
| 2115 |
-
|
| 2116 |
-
|
| 2117 |
-
|
| 2118 |
-
|
| 2119 |
-
|
| 2120 |
-
|
| 2121 |
-
|
| 2122 |
-
|
| 2123 |
-
|
| 2124 |
-
$
|
| 2125 |
-
|
| 2126 |
-
|
| 2127 |
-
|
| 2128 |
-
|
| 2129 |
-
|
| 2130 |
-
|
| 2131 |
-
|
| 2132 |
-
|
| 2133 |
-
|
| 2134 |
-
|
| 2135 |
-
|
| 2136 |
-
|
| 2137 |
-
|
| 2138 |
-
|
| 2139 |
-
$
|
| 2140 |
-
$w_choices_params = explode('[
|
| 2141 |
-
$
|
| 2142 |
-
$
|
| 2143 |
-
|
| 2144 |
-
|
| 2145 |
-
|
| 2146 |
-
$
|
| 2147 |
-
|
| 2148 |
-
$
|
| 2149 |
-
|
| 2150 |
-
|
| 2151 |
-
|
| 2152 |
-
|
| 2153 |
-
|
| 2154 |
-
|
| 2155 |
-
|
| 2156 |
-
|
| 2157 |
-
|
| 2158 |
-
$
|
| 2159 |
-
|
| 2160 |
-
|
| 2161 |
-
|
| 2162 |
-
|
| 2163 |
-
|
| 2164 |
-
|
| 2165 |
-
|
| 2166 |
-
|
| 2167 |
-
|
| 2168 |
-
|
| 2169 |
-
|
| 2170 |
-
|
| 2171 |
-
|
| 2172 |
-
|
| 2173 |
-
|
| 2174 |
-
|
| 2175 |
-
|
| 2176 |
-
|
| 2177 |
-
|
| 2178 |
-
|
| 2179 |
-
|
| 2180 |
-
|
| 2181 |
-
|
| 2182 |
-
|
| 2183 |
-
|
| 2184 |
-
$
|
| 2185 |
-
|
| 2186 |
-
|
| 2187 |
-
|
| 2188 |
-
|
| 2189 |
-
|
| 2190 |
-
|
| 2191 |
-
|
| 2192 |
-
|
| 2193 |
-
|
| 2194 |
-
|
| 2195 |
-
|
| 2196 |
-
|
| 2197 |
-
|
| 2198 |
-
|
| 2199 |
-
|
| 2200 |
-
|
| 2201 |
-
|
| 2202 |
-
|
| 2203 |
-
|
| 2204 |
-
|
| 2205 |
-
|
| 2206 |
-
|
| 2207 |
-
|
| 2208 |
-
|
| 2209 |
-
|
| 2210 |
-
|
| 2211 |
-
|
| 2212 |
-
|
| 2213 |
-
|
| 2214 |
-
|
| 2215 |
-
|
| 2216 |
-
|
| 2217 |
-
|
| 2218 |
-
|
| 2219 |
-
|
| 2220 |
-
|
| 2221 |
-
|
| 2222 |
-
|
| 2223 |
-
|
| 2224 |
-
|
| 2225 |
-
|
| 2226 |
-
|
| 2227 |
-
|
| 2228 |
-
|
| 2229 |
-
|
| 2230 |
-
|
| 2231 |
-
|
| 2232 |
-
|
| 2233 |
-
|
| 2234 |
-
|
| 2235 |
-
|
| 2236 |
-
|
| 2237 |
-
|
| 2238 |
-
|
| 2239 |
-
|
| 2240 |
-
|
| 2241 |
-
|
| 2242 |
-
|
| 2243 |
-
|
| 2244 |
-
|
| 2245 |
-
|
| 2246 |
-
|
| 2247 |
-
|
| 2248 |
-
|
| 2249 |
-
|
| 2250 |
-
|
| 2251 |
-
|
| 2252 |
-
|
| 2253 |
-
|
| 2254 |
-
|
| 2255 |
-
|
| 2256 |
-
|
| 2257 |
-
|
| 2258 |
-
|
| 2259 |
-
|
| 2260 |
-
|
| 2261 |
-
|
| 2262 |
-
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'
|
| 2263 |
-
|
| 2264 |
-
';
|
| 2265 |
-
|
| 2266 |
-
|
| 2267 |
-
|
| 2268 |
-
|
| 2269 |
-
|
| 2270 |
-
|
| 2271 |
-
|
| 2272 |
-
|
| 2273 |
-
|
| 2274 |
-
|
| 2275 |
-
|
| 2276 |
-
|
| 2277 |
-
|
| 2278 |
-
|
| 2279 |
-
|
| 2280 |
-
$
|
| 2281 |
-
|
| 2282 |
-
|
| 2283 |
-
|
| 2284 |
-
$
|
| 2285 |
-
|
| 2286 |
-
|
| 2287 |
-
|
| 2288 |
-
|
| 2289 |
-
|
| 2290 |
-
|
| 2291 |
-
|
| 2292 |
-
|
| 2293 |
-
|
| 2294 |
-
$
|
| 2295 |
-
|
| 2296 |
-
$temp
|
| 2297 |
-
|
| 2298 |
-
|
| 2299 |
-
|
| 2300 |
-
|
| 2301 |
-
|
| 2302 |
-
|
| 2303 |
-
|
| 2304 |
-
|
| 2305 |
-
|
| 2306 |
-
|
| 2307 |
-
|
| 2308 |
-
|
| 2309 |
-
|
| 2310 |
-
$
|
| 2311 |
-
|
| 2312 |
-
|
| 2313 |
-
|
| 2314 |
-
|
| 2315 |
-
|
| 2316 |
-
|
| 2317 |
-
|
| 2318 |
-
|
| 2319 |
-
|
| 2320 |
-
|
| 2321 |
-
|
| 2322 |
-
|
| 2323 |
-
|
| 2324 |
-
$
|
| 2325 |
-
|
| 2326 |
-
$param['
|
| 2327 |
-
|
| 2328 |
-
|
| 2329 |
-
|
| 2330 |
-
|
| 2331 |
-
|
| 2332 |
-
$param['
|
| 2333 |
-
|
| 2334 |
-
|
| 2335 |
-
|
| 2336 |
-
|
| 2337 |
-
|
| 2338 |
-
|
| 2339 |
-
|
| 2340 |
-
$param['
|
| 2341 |
-
|
| 2342 |
-
|
| 2343 |
-
|
| 2344 |
-
|
| 2345 |
-
|
| 2346 |
-
|
| 2347 |
-
|
| 2348 |
-
$param['w_value_disabled']
|
| 2349 |
-
|
| 2350 |
-
|
| 2351 |
-
|
| 2352 |
-
|
| 2353 |
-
|
| 2354 |
-
|
| 2355 |
-
|
| 2356 |
-
|
| 2357 |
-
|
| 2358 |
-
|
| 2359 |
-
|
| 2360 |
-
|
| 2361 |
-
|
| 2362 |
-
|
| 2363 |
-
|
| 2364 |
-
|
| 2365 |
-
|
| 2366 |
-
|
| 2367 |
-
|
| 2368 |
-
|
| 2369 |
-
$
|
| 2370 |
-
$w_choices_params = explode('[
|
| 2371 |
-
$
|
| 2372 |
-
$
|
| 2373 |
-
|
| 2374 |
-
|
| 2375 |
-
|
| 2376 |
-
|
| 2377 |
-
$
|
| 2378 |
-
|
| 2379 |
-
$
|
| 2380 |
-
|
| 2381 |
-
|
| 2382 |
-
|
| 2383 |
-
|
| 2384 |
-
|
| 2385 |
-
|
| 2386 |
-
|
| 2387 |
-
|
| 2388 |
-
|
| 2389 |
-
|
| 2390 |
-
|
| 2391 |
-
|
| 2392 |
-
|
| 2393 |
-
$
|
| 2394 |
-
|
| 2395 |
-
|
| 2396 |
-
|
| 2397 |
-
|
| 2398 |
-
|
| 2399 |
-
|
| 2400 |
-
|
| 2401 |
-
|
| 2402 |
-
|
| 2403 |
-
|
| 2404 |
-
|
| 2405 |
-
|
| 2406 |
-
|
| 2407 |
-
|
| 2408 |
-
|
| 2409 |
-
|
| 2410 |
-
|
| 2411 |
-
|
| 2412 |
-
|
| 2413 |
-
|
| 2414 |
-
|
| 2415 |
-
|
| 2416 |
-
|
| 2417 |
-
$
|
| 2418 |
-
|
| 2419 |
-
|
| 2420 |
-
|
| 2421 |
-
|
| 2422 |
-
|
| 2423 |
-
|
| 2424 |
-
|
| 2425 |
-
|
| 2426 |
-
|
| 2427 |
-
|
| 2428 |
-
|
| 2429 |
-
|
| 2430 |
-
|
| 2431 |
-
|
| 2432 |
-
|
| 2433 |
-
|
| 2434 |
-
|
| 2435 |
-
|
| 2436 |
-
|
| 2437 |
-
|
| 2438 |
-
|
| 2439 |
-
|
| 2440 |
-
|
| 2441 |
-
|
| 2442 |
-
|
| 2443 |
-
|
| 2444 |
-
|
| 2445 |
-
|
| 2446 |
-
|
| 2447 |
-
|
| 2448 |
-
|
| 2449 |
-
|
| 2450 |
-
|
| 2451 |
-
|
| 2452 |
-
|
| 2453 |
-
|
| 2454 |
-
|
| 2455 |
-
|
| 2456 |
-
|
| 2457 |
-
|
| 2458 |
-
|
| 2459 |
-
|
| 2460 |
-
|
| 2461 |
-
|
| 2462 |
-
|
| 2463 |
-
|
| 2464 |
-
|
| 2465 |
-
|
| 2466 |
-
|
| 2467 |
-
$temp
|
| 2468 |
-
|
| 2469 |
-
|
| 2470 |
-
|
| 2471 |
-
|
| 2472 |
-
|
| 2473 |
-
|
| 2474 |
-
|
| 2475 |
-
|
| 2476 |
-
|
| 2477 |
-
|
| 2478 |
-
|
| 2479 |
-
|
| 2480 |
-
$param['
|
| 2481 |
-
|
| 2482 |
-
$
|
| 2483 |
-
|
| 2484 |
-
$
|
| 2485 |
-
|
| 2486 |
-
$rep
|
| 2487 |
-
|
| 2488 |
-
|
| 2489 |
-
|
| 2490 |
-
|
| 2491 |
-
|
| 2492 |
-
|
| 2493 |
-
|
| 2494 |
-
|
| 2495 |
-
|
| 2496 |
-
|
| 2497 |
-
|
| 2498 |
-
|
| 2499 |
-
|
| 2500 |
-
|
| 2501 |
-
|
| 2502 |
-
|
| 2503 |
-
$
|
| 2504 |
-
|
| 2505 |
-
|
| 2506 |
-
|
| 2507 |
-
|
| 2508 |
-
|
| 2509 |
-
$temp
|
| 2510 |
-
|
| 2511 |
-
|
| 2512 |
-
|
| 2513 |
-
|
| 2514 |
-
|
| 2515 |
-
|
| 2516 |
-
|
| 2517 |
-
|
| 2518 |
-
|
| 2519 |
-
|
| 2520 |
-
|
| 2521 |
-
$
|
| 2522 |
-
|
| 2523 |
-
|
| 2524 |
-
|
| 2525 |
-
|
| 2526 |
-
|
| 2527 |
-
|
| 2528 |
-
|
| 2529 |
-
|
| 2530 |
-
|
| 2531 |
-
$
|
| 2532 |
-
|
| 2533 |
-
|
| 2534 |
-
|
| 2535 |
-
|
| 2536 |
-
|
| 2537 |
-
|
| 2538 |
-
|
| 2539 |
-
|
| 2540 |
-
|
| 2541 |
-
|
| 2542 |
-
|
| 2543 |
-
|
| 2544 |
-
|
| 2545 |
-
|
| 2546 |
-
|
| 2547 |
-
$
|
| 2548 |
-
|
| 2549 |
-
|
| 2550 |
-
|
| 2551 |
-
|
| 2552 |
-
|
| 2553 |
-
|
| 2554 |
-
|
| 2555 |
-
|
| 2556 |
-
|
| 2557 |
-
$rep
|
| 2558 |
-
|
| 2559 |
-
|
| 2560 |
-
|
| 2561 |
-
|
| 2562 |
-
|
| 2563 |
-
|
| 2564 |
-
|
| 2565 |
-
|
| 2566 |
-
|
| 2567 |
-
|
| 2568 |
-
|
| 2569 |
-
|
| 2570 |
-
|
| 2571 |
-
$temp
|
| 2572 |
-
|
| 2573 |
-
|
| 2574 |
-
|
| 2575 |
-
|
| 2576 |
-
|
| 2577 |
-
|
| 2578 |
-
|
| 2579 |
-
|
| 2580 |
-
|
| 2581 |
-
|
| 2582 |
-
|
| 2583 |
-
$
|
| 2584 |
-
|
| 2585 |
-
$rep
|
| 2586 |
-
|
| 2587 |
-
|
| 2588 |
-
|
| 2589 |
-
|
| 2590 |
-
|
| 2591 |
-
|
| 2592 |
-
|
| 2593 |
-
|
| 2594 |
-
|
| 2595 |
-
|
| 2596 |
-
|
| 2597 |
-
$
|
| 2598 |
-
|
| 2599 |
-
$
|
| 2600 |
-
|
| 2601 |
-
|
| 2602 |
-
|
| 2603 |
-
|
| 2604 |
-
$temp
|
| 2605 |
-
|
| 2606 |
-
|
| 2607 |
-
|
| 2608 |
-
|
| 2609 |
-
|
| 2610 |
-
|
| 2611 |
-
|
| 2612 |
-
|
| 2613 |
-
|
| 2614 |
-
|
| 2615 |
-
|
| 2616 |
-
|
| 2617 |
-
$
|
| 2618 |
-
|
| 2619 |
-
$param['
|
| 2620 |
-
|
| 2621 |
-
$param['
|
| 2622 |
-
|
| 2623 |
-
|
| 2624 |
-
|
| 2625 |
-
|
| 2626 |
-
|
| 2627 |
-
|
| 2628 |
-
|
| 2629 |
-
|
| 2630 |
-
|
| 2631 |
-
|
| 2632 |
-
|
| 2633 |
-
$selected = "";
|
| 2634 |
-
|
| 2635 |
-
$
|
| 2636 |
-
|
| 2637 |
-
|
| 2638 |
-
|
| 2639 |
-
|
| 2640 |
-
|
| 2641 |
-
$selected = "";
|
| 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 |
-
$selected = "";
|
| 2676 |
-
|
| 2677 |
-
$
|
| 2678 |
-
|
| 2679 |
-
|
| 2680 |
-
|
| 2681 |
-
|
| 2682 |
-
|
| 2683 |
-
|
| 2684 |
-
$
|
| 2685 |
-
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").
|
| 2686 |
-
|
| 2687 |
-
|
| 2688 |
-
|
| 2689 |
-
|
| 2690 |
-
$rep
|
| 2691 |
-
|
| 2692 |
-
|
| 2693 |
-
|
| 2694 |
-
|
| 2695 |
-
|
| 2696 |
-
|
| 2697 |
-
|
| 2698 |
-
|
| 2699 |
-
|
| 2700 |
-
|
| 2701 |
-
|
| 2702 |
-
|
| 2703 |
-
$temp
|
| 2704 |
-
|
| 2705 |
-
|
| 2706 |
-
|
| 2707 |
-
|
| 2708 |
-
|
| 2709 |
-
|
| 2710 |
-
|
| 2711 |
-
|
| 2712 |
-
|
| 2713 |
-
|
| 2714 |
-
|
| 2715 |
-
|
| 2716 |
-
|
| 2717 |
-
|
| 2718 |
-
|
| 2719 |
-
|
| 2720 |
-
|
| 2721 |
-
|
| 2722 |
-
|
| 2723 |
-
|
| 2724 |
-
|
| 2725 |
-
|
| 2726 |
-
|
| 2727 |
-
$temp
|
| 2728 |
-
|
| 2729 |
-
|
| 2730 |
-
|
| 2731 |
-
|
| 2732 |
-
|
| 2733 |
-
|
| 2734 |
-
|
| 2735 |
-
|
| 2736 |
-
|
| 2737 |
-
|
| 2738 |
-
|
| 2739 |
-
|
| 2740 |
-
|
| 2741 |
-
$element =
|
| 2742 |
-
|
| 2743 |
-
$element
|
| 2744 |
-
|
| 2745 |
-
|
| 2746 |
-
|
| 2747 |
-
|
| 2748 |
-
$
|
| 2749 |
-
|
| 2750 |
-
$
|
| 2751 |
-
|
| 2752 |
-
$
|
| 2753 |
-
|
| 2754 |
-
$rep
|
| 2755 |
-
|
| 2756 |
-
$
|
| 2757 |
-
|
| 2758 |
-
|
| 2759 |
-
|
| 2760 |
-
|
| 2761 |
-
|
| 2762 |
-
|
| 2763 |
-
|
| 2764 |
-
|
| 2765 |
-
|
| 2766 |
-
|
| 2767 |
-
|
| 2768 |
-
|
| 2769 |
-
|
| 2770 |
-
|
| 2771 |
-
|
| 2772 |
-
|
| 2773 |
-
|
| 2774 |
-
|
| 2775 |
-
|
| 2776 |
-
$
|
| 2777 |
-
|
| 2778 |
-
|
| 2779 |
-
|
| 2780 |
-
|
| 2781 |
-
|
| 2782 |
-
|
| 2783 |
-
|
| 2784 |
-
|
| 2785 |
-
|
| 2786 |
-
|
| 2787 |
-
|
| 2788 |
-
|
| 2789 |
-
|
| 2790 |
-
|
| 2791 |
-
|
| 2792 |
-
$
|
| 2793 |
-
|
| 2794 |
-
$temp
|
| 2795 |
-
|
| 2796 |
-
|
| 2797 |
-
|
| 2798 |
-
|
| 2799 |
-
|
| 2800 |
-
|
| 2801 |
-
|
| 2802 |
-
|
| 2803 |
-
|
| 2804 |
-
|
| 2805 |
-
|
| 2806 |
-
|
| 2807 |
-
|
| 2808 |
-
$
|
| 2809 |
-
|
| 2810 |
-
|
| 2811 |
-
|
| 2812 |
-
|
| 2813 |
-
|
| 2814 |
-
|
| 2815 |
-
|
| 2816 |
-
|
| 2817 |
-
|
| 2818 |
-
|
| 2819 |
-
|
| 2820 |
-
|
| 2821 |
-
|
| 2822 |
-
$
|
| 2823 |
-
|
| 2824 |
-
$param['
|
| 2825 |
-
|
| 2826 |
-
|
| 2827 |
-
|
| 2828 |
-
|
| 2829 |
-
|
| 2830 |
-
$param['
|
| 2831 |
-
|
| 2832 |
-
|
| 2833 |
-
|
| 2834 |
-
|
| 2835 |
-
|
| 2836 |
-
$param['
|
| 2837 |
-
|
| 2838 |
-
$param['
|
| 2839 |
-
|
| 2840 |
-
|
| 2841 |
-
|
| 2842 |
-
|
| 2843 |
-
|
| 2844 |
-
|
| 2845 |
-
|
| 2846 |
-
|
| 2847 |
-
|
| 2848 |
-
|
| 2849 |
-
|
| 2850 |
-
|
| 2851 |
-
|
| 2852 |
-
|
| 2853 |
-
|
| 2854 |
-
|
| 2855 |
-
|
| 2856 |
-
|
| 2857 |
-
|
| 2858 |
-
|
| 2859 |
-
|
| 2860 |
-
|
| 2861 |
-
|
| 2862 |
-
|
| 2863 |
-
|
| 2864 |
-
$quantity_value =
|
| 2865 |
-
|
| 2866 |
-
$
|
| 2867 |
-
|
| 2868 |
-
|
| 2869 |
-
|
| 2870 |
-
|
| 2871 |
-
|
| 2872 |
-
|
| 2873 |
-
|
| 2874 |
-
|
| 2875 |
-
|
| 2876 |
-
$
|
| 2877 |
-
|
| 2878 |
-
$property_of_select =
|
| 2879 |
-
|
| 2880 |
-
|
| 2881 |
-
|
| 2882 |
-
|
| 2883 |
-
|
| 2884 |
-
|
| 2885 |
-
|
| 2886 |
-
$
|
| 2887 |
-
|
| 2888 |
-
|
| 2889 |
-
|
| 2890 |
-
|
| 2891 |
-
|
| 2892 |
-
|
| 2893 |
-
|
| 2894 |
-
|
| 2895 |
-
|
| 2896 |
-
$quantity_value =
|
| 2897 |
-
|
| 2898 |
-
$
|
| 2899 |
-
|
| 2900 |
-
$property_of_select =
|
| 2901 |
-
|
| 2902 |
-
$
|
| 2903 |
-
|
| 2904 |
-
$
|
| 2905 |
-
|
| 2906 |
-
|
| 2907 |
-
|
| 2908 |
-
|
| 2909 |
-
|
| 2910 |
-
|
| 2911 |
-
|
| 2912 |
-
|
| 2913 |
-
|
| 2914 |
-
|
| 2915 |
-
|
| 2916 |
-
$
|
| 2917 |
-
|
| 2918 |
-
$
|
| 2919 |
-
|
| 2920 |
-
$
|
| 2921 |
-
|
| 2922 |
-
|
| 2923 |
-
|
| 2924 |
-
|
| 2925 |
-
|
| 2926 |
-
|
| 2927 |
-
|
| 2928 |
-
|
| 2929 |
-
|
| 2930 |
-
|
| 2931 |
-
|
| 2932 |
-
|
| 2933 |
-
|
| 2934 |
-
|
| 2935 |
-
|
| 2936 |
-
|
| 2937 |
-
|
| 2938 |
-
|
| 2939 |
-
|
| 2940 |
-
|
| 2941 |
-
|
| 2942 |
-
|
| 2943 |
-
|
| 2944 |
-
$
|
| 2945 |
-
$
|
| 2946 |
-
$w_choices_params = explode('[
|
| 2947 |
-
$
|
| 2948 |
-
$
|
| 2949 |
-
|
| 2950 |
-
|
| 2951 |
-
|
| 2952 |
-
|
| 2953 |
-
$
|
| 2954 |
-
|
| 2955 |
-
$
|
| 2956 |
-
|
| 2957 |
-
|
| 2958 |
-
|
| 2959 |
-
|
| 2960 |
-
|
| 2961 |
-
|
| 2962 |
-
|
| 2963 |
-
|
| 2964 |
-
|
| 2965 |
-
|
| 2966 |
-
|
| 2967 |
-
|
| 2968 |
-
|
| 2969 |
-
$
|
| 2970 |
-
|
| 2971 |
-
|
| 2972 |
-
|
| 2973 |
-
|
| 2974 |
-
|
| 2975 |
-
|
| 2976 |
-
|
| 2977 |
-
|
| 2978 |
-
|
| 2979 |
-
|
| 2980 |
-
|
| 2981 |
-
|
| 2982 |
-
|
| 2983 |
-
|
| 2984 |
-
|
| 2985 |
-
|
| 2986 |
-
|
| 2987 |
-
|
| 2988 |
-
|
| 2989 |
-
|
| 2990 |
-
|
| 2991 |
-
|
| 2992 |
-
|
| 2993 |
-
$
|
| 2994 |
-
|
| 2995 |
-
|
| 2996 |
-
|
| 2997 |
-
|
| 2998 |
-
|
| 2999 |
-
|
| 3000 |
-
|
| 3001 |
-
|
| 3002 |
-
|
| 3003 |
-
|
| 3004 |
-
|
| 3005 |
-
|
| 3006 |
-
|
| 3007 |
-
|
| 3008 |
-
|
| 3009 |
-
|
| 3010 |
-
|
| 3011 |
-
|
| 3012 |
-
|
| 3013 |
-
|
| 3014 |
-
|
| 3015 |
-
|
| 3016 |
-
|
| 3017 |
-
|
| 3018 |
-
|
| 3019 |
-
|
| 3020 |
-
|
| 3021 |
-
|
| 3022 |
-
|
| 3023 |
-
|
| 3024 |
-
|
| 3025 |
-
|
| 3026 |
-
|
| 3027 |
-
|
| 3028 |
-
|
| 3029 |
-
|
| 3030 |
-
|
| 3031 |
-
|
| 3032 |
-
|
| 3033 |
-
|
| 3034 |
-
|
| 3035 |
-
|
| 3036 |
-
|
| 3037 |
-
|
| 3038 |
-
|
| 3039 |
-
|
| 3040 |
-
|
| 3041 |
-
|
| 3042 |
-
|
| 3043 |
-
|
| 3044 |
-
|
| 3045 |
-
|
| 3046 |
-
|
| 3047 |
-
|
| 3048 |
-
|
| 3049 |
-
|
| 3050 |
-
|
| 3051 |
-
|
| 3052 |
-
|
| 3053 |
-
|
| 3054 |
-
|
| 3055 |
-
|
| 3056 |
-
|
| 3057 |
-
|
| 3058 |
-
|
| 3059 |
-
|
| 3060 |
-
|
| 3061 |
-
|
| 3062 |
-
|
| 3063 |
-
|
| 3064 |
-
|
| 3065 |
-
|
| 3066 |
-
|
| 3067 |
-
<div
|
| 3068 |
-
|
| 3069 |
-
<
|
| 3070 |
-
|
| 3071 |
-
<
|
| 3072 |
-
|
| 3073 |
-
|
| 3074 |
-
|
| 3075 |
-
$param['w_property_values'][$key] =
|
| 3076 |
-
|
| 3077 |
-
|
| 3078 |
-
|
| 3079 |
-
|
| 3080 |
-
|
| 3081 |
-
|
| 3082 |
-
|
| 3083 |
-
|
| 3084 |
-
|
| 3085 |
-
|
| 3086 |
-
|
| 3087 |
-
|
| 3088 |
-
|
| 3089 |
-
|
| 3090 |
-
|
| 3091 |
-
|
| 3092 |
-
|
| 3093 |
-
|
| 3094 |
-
|
| 3095 |
-
|
| 3096 |
-
|
| 3097 |
-
|
| 3098 |
-
|
| 3099 |
-
|
| 3100 |
-
|
| 3101 |
-
';
|
| 3102 |
-
|
| 3103 |
-
|
| 3104 |
-
|
| 3105 |
-
|
| 3106 |
-
|
| 3107 |
-
|
| 3108 |
-
|
| 3109 |
-
|
| 3110 |
-
|
| 3111 |
-
|
| 3112 |
-
|
| 3113 |
-
|
| 3114 |
-
|
| 3115 |
-
|
| 3116 |
-
|
| 3117 |
-
|
| 3118 |
-
|
| 3119 |
-
|
| 3120 |
-
|
| 3121 |
-
|
| 3122 |
-
|
| 3123 |
-
|
| 3124 |
-
|
| 3125 |
-
|
| 3126 |
-
|
| 3127 |
-
|
| 3128 |
-
|
| 3129 |
-
|
| 3130 |
-
|
| 3131 |
-
|
| 3132 |
-
|
| 3133 |
-
|
| 3134 |
-
|
| 3135 |
-
|
| 3136 |
-
|
| 3137 |
-
$
|
| 3138 |
-
|
| 3139 |
-
|
| 3140 |
-
|
| 3141 |
-
|
| 3142 |
-
|
| 3143 |
-
|
| 3144 |
-
|
| 3145 |
-
|
| 3146 |
-
|
| 3147 |
-
|
| 3148 |
-
|
| 3149 |
-
$
|
| 3150 |
-
|
| 3151 |
-
$temp
|
| 3152 |
-
|
| 3153 |
-
|
| 3154 |
-
|
| 3155 |
-
|
| 3156 |
-
|
| 3157 |
-
|
| 3158 |
-
|
| 3159 |
-
|
| 3160 |
-
|
| 3161 |
-
|
| 3162 |
-
|
| 3163 |
-
|
| 3164 |
-
|
| 3165 |
-
$
|
| 3166 |
-
|
| 3167 |
-
|
| 3168 |
-
|
| 3169 |
-
|
| 3170 |
-
|
| 3171 |
-
|
| 3172 |
-
|
| 3173 |
-
|
| 3174 |
-
|
| 3175 |
-
|
| 3176 |
-
|
| 3177 |
-
|
| 3178 |
-
|
| 3179 |
-
|
| 3180 |
-
|
| 3181 |
-
|
| 3182 |
-
|
| 3183 |
-
|
| 3184 |
-
|
| 3185 |
-
$param['
|
| 3186 |
-
|
| 3187 |
-
$param['
|
| 3188 |
-
|
| 3189 |
-
$param['
|
| 3190 |
-
|
| 3191 |
-
|
| 3192 |
-
|
| 3193 |
-
|
| 3194 |
-
|
| 3195 |
-
|
| 3196 |
-
|
| 3197 |
-
$param['
|
| 3198 |
-
|
| 3199 |
-
|
| 3200 |
-
|
| 3201 |
-
|
| 3202 |
-
|
| 3203 |
-
$param['
|
| 3204 |
-
|
| 3205 |
-
|
| 3206 |
-
|
| 3207 |
-
|
| 3208 |
-
|
| 3209 |
-
|
| 3210 |
-
|
| 3211 |
-
|
| 3212 |
-
|
| 3213 |
-
|
| 3214 |
-
|
| 3215 |
-
|
| 3216 |
-
|
| 3217 |
-
|
| 3218 |
-
|
| 3219 |
-
|
| 3220 |
-
|
| 3221 |
-
|
| 3222 |
-
|
| 3223 |
-
|
| 3224 |
-
|
| 3225 |
-
|
| 3226 |
-
|
| 3227 |
-
|
| 3228 |
-
|
| 3229 |
-
|
| 3230 |
-
|
| 3231 |
-
|
| 3232 |
-
|
| 3233 |
-
|
| 3234 |
-
|
| 3235 |
-
|
| 3236 |
-
|
| 3237 |
-
|
| 3238 |
-
|
| 3239 |
-
$quantity_value =
|
| 3240 |
-
|
| 3241 |
-
|
| 3242 |
-
|
| 3243 |
-
|
| 3244 |
-
|
| 3245 |
-
|
| 3246 |
-
|
| 3247 |
-
|
| 3248 |
-
|
| 3249 |
-
|
| 3250 |
-
|
| 3251 |
-
|
| 3252 |
-
|
| 3253 |
-
$property_of_check =
|
| 3254 |
-
|
| 3255 |
-
|
| 3256 |
-
|
| 3257 |
-
|
| 3258 |
-
|
| 3259 |
-
|
| 3260 |
-
|
| 3261 |
-
|
| 3262 |
-
|
| 3263 |
-
|
| 3264 |
-
|
| 3265 |
-
|
| 3266 |
-
|
| 3267 |
-
|
| 3268 |
-
|
| 3269 |
-
|
| 3270 |
-
|
| 3271 |
-
|
| 3272 |
-
|
| 3273 |
-
|
| 3274 |
-
|
| 3275 |
-
|
| 3276 |
-
|
| 3277 |
-
|
| 3278 |
-
|
| 3279 |
-
$
|
| 3280 |
-
|
| 3281 |
-
|
| 3282 |
-
|
| 3283 |
-
|
| 3284 |
-
|
| 3285 |
-
|
| 3286 |
-
|
| 3287 |
-
|
| 3288 |
-
|
| 3289 |
-
|
| 3290 |
-
|
| 3291 |
-
|
| 3292 |
-
|
| 3293 |
-
|
| 3294 |
-
|
| 3295 |
-
$
|
| 3296 |
-
|
| 3297 |
-
$
|
| 3298 |
-
|
| 3299 |
-
$
|
| 3300 |
-
|
| 3301 |
-
|
| 3302 |
-
|
| 3303 |
-
|
| 3304 |
-
|
| 3305 |
-
|
| 3306 |
-
|
| 3307 |
-
|
| 3308 |
-
|
| 3309 |
-
|
| 3310 |
-
|
| 3311 |
-
|
| 3312 |
-
|
| 3313 |
-
|
| 3314 |
-
|
| 3315 |
-
|
| 3316 |
-
|
| 3317 |
-
|
| 3318 |
-
|
| 3319 |
-
|
| 3320 |
-
$
|
| 3321 |
-
|
| 3322 |
-
$w_choices_params = explode('[
|
| 3323 |
-
|
| 3324 |
-
$
|
| 3325 |
-
|
| 3326 |
-
|
| 3327 |
-
$
|
| 3328 |
-
|
| 3329 |
-
$
|
| 3330 |
-
|
| 3331 |
-
$
|
| 3332 |
-
|
| 3333 |
-
|
| 3334 |
-
|
| 3335 |
-
|
| 3336 |
-
|
| 3337 |
-
|
| 3338 |
-
|
| 3339 |
-
|
| 3340 |
-
|
| 3341 |
-
|
| 3342 |
-
|
| 3343 |
-
|
| 3344 |
-
$
|
| 3345 |
-
|
| 3346 |
-
|
| 3347 |
-
|
| 3348 |
-
|
| 3349 |
-
|
| 3350 |
-
|
| 3351 |
-
|
| 3352 |
-
|
| 3353 |
-
|
| 3354 |
-
|
| 3355 |
-
|
| 3356 |
-
|
| 3357 |
-
|
| 3358 |
-
|
| 3359 |
-
|
| 3360 |
-
|
| 3361 |
-
|
| 3362 |
-
|
| 3363 |
-
|
| 3364 |
-
|
| 3365 |
-
|
| 3366 |
-
|
| 3367 |
-
|
| 3368 |
-
|
| 3369 |
-
|
| 3370 |
-
|
| 3371 |
-
|
| 3372 |
-
|
| 3373 |
-
|
| 3374 |
-
|
| 3375 |
-
|
| 3376 |
-
|
| 3377 |
-
|
| 3378 |
-
$
|
| 3379 |
-
|
| 3380 |
-
|
| 3381 |
-
|
| 3382 |
-
|
| 3383 |
-
|
| 3384 |
-
|
| 3385 |
-
|
| 3386 |
-
|
| 3387 |
-
|
| 3388 |
-
|
| 3389 |
-
|
| 3390 |
-
|
| 3391 |
-
|
| 3392 |
-
|
| 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 |
-
<div
|
| 3435 |
-
|
| 3436 |
-
<
|
| 3437 |
-
|
| 3438 |
-
<
|
| 3439 |
-
|
| 3440 |
-
|
| 3441 |
-
|
| 3442 |
-
$param['w_property_values'][$key] =
|
| 3443 |
-
|
| 3444 |
-
|
| 3445 |
-
|
| 3446 |
-
|
| 3447 |
-
|
| 3448 |
-
|
| 3449 |
-
|
| 3450 |
-
|
| 3451 |
-
|
| 3452 |
-
|
| 3453 |
-
|
| 3454 |
-
|
| 3455 |
-
|
| 3456 |
-
|
| 3457 |
-
|
| 3458 |
-
|
| 3459 |
-
|
| 3460 |
-
|
| 3461 |
-
|
| 3462 |
-
|
| 3463 |
-
|
| 3464 |
-
|
| 3465 |
-
|
| 3466 |
-
';
|
| 3467 |
-
|
| 3468 |
-
|
| 3469 |
-
|
| 3470 |
-
|
| 3471 |
-
|
| 3472 |
-
';
|
| 3473 |
-
|
| 3474 |
-
|
| 3475 |
-
|
| 3476 |
-
|
| 3477 |
-
|
| 3478 |
-
|
| 3479 |
-
|
| 3480 |
-
|
| 3481 |
-
|
| 3482 |
-
|
| 3483 |
-
|
| 3484 |
-
|
| 3485 |
-
|
| 3486 |
-
|
| 3487 |
-
|
| 3488 |
-
|
| 3489 |
-
|
| 3490 |
-
|
| 3491 |
-
|
| 3492 |
-
|
| 3493 |
-
|
| 3494 |
-
$
|
| 3495 |
-
|
| 3496 |
-
|
| 3497 |
-
|
| 3498 |
-
|
| 3499 |
-
|
| 3500 |
-
|
| 3501 |
-
|
| 3502 |
-
|
| 3503 |
-
|
| 3504 |
-
|
| 3505 |
-
|
| 3506 |
-
|
| 3507 |
-
|
| 3508 |
-
|
| 3509 |
-
|
| 3510 |
-
$
|
| 3511 |
-
|
| 3512 |
-
$temp
|
| 3513 |
-
|
| 3514 |
-
|
| 3515 |
-
|
| 3516 |
-
|
| 3517 |
-
|
| 3518 |
-
|
| 3519 |
-
|
| 3520 |
-
|
| 3521 |
-
|
| 3522 |
-
|
| 3523 |
-
|
| 3524 |
-
$
|
| 3525 |
-
|
| 3526 |
-
|
| 3527 |
-
|
| 3528 |
-
|
| 3529 |
-
|
| 3530 |
-
|
| 3531 |
-
|
| 3532 |
-
|
| 3533 |
-
|
| 3534 |
-
|
| 3535 |
-
|
| 3536 |
-
|
| 3537 |
-
|
| 3538 |
-
|
| 3539 |
-
|
| 3540 |
-
$param['
|
| 3541 |
-
|
| 3542 |
-
$param['
|
| 3543 |
-
|
| 3544 |
-
$param['
|
| 3545 |
-
|
| 3546 |
-
|
| 3547 |
-
|
| 3548 |
-
|
| 3549 |
-
|
| 3550 |
-
$param['
|
| 3551 |
-
|
| 3552 |
-
|
| 3553 |
-
|
| 3554 |
-
|
| 3555 |
-
|
| 3556 |
-
$param['
|
| 3557 |
-
|
| 3558 |
-
|
| 3559 |
-
|
| 3560 |
-
|
| 3561 |
-
|
| 3562 |
-
|
| 3563 |
-
|
| 3564 |
-
|
| 3565 |
-
|
| 3566 |
-
|
| 3567 |
-
|
| 3568 |
-
|
| 3569 |
-
|
| 3570 |
-
|
| 3571 |
-
|
| 3572 |
-
|
| 3573 |
-
|
| 3574 |
-
|
| 3575 |
-
|
| 3576 |
-
|
| 3577 |
-
|
| 3578 |
-
|
| 3579 |
-
|
| 3580 |
-
|
| 3581 |
-
|
| 3582 |
-
|
| 3583 |
-
|
| 3584 |
-
|
| 3585 |
-
|
| 3586 |
-
|
| 3587 |
-
|
| 3588 |
-
$quantity_value =
|
| 3589 |
-
|
| 3590 |
-
$
|
| 3591 |
-
|
| 3592 |
-
|
| 3593 |
-
|
| 3594 |
-
|
| 3595 |
-
|
| 3596 |
-
|
| 3597 |
-
|
| 3598 |
-
|
| 3599 |
-
|
| 3600 |
-
$
|
| 3601 |
-
|
| 3602 |
-
$property_of_radio =
|
| 3603 |
-
|
| 3604 |
-
|
| 3605 |
-
|
| 3606 |
-
|
| 3607 |
-
|
| 3608 |
-
|
| 3609 |
-
|
| 3610 |
-
$
|
| 3611 |
-
|
| 3612 |
-
|
| 3613 |
-
|
| 3614 |
-
|
| 3615 |
-
|
| 3616 |
-
|
| 3617 |
-
|
| 3618 |
-
|
| 3619 |
-
|
| 3620 |
-
$quantity_value =
|
| 3621 |
-
|
| 3622 |
-
$
|
| 3623 |
-
|
| 3624 |
-
$property_of_radio =
|
| 3625 |
-
|
| 3626 |
-
|
| 3627 |
-
|
| 3628 |
-
|
| 3629 |
-
|
| 3630 |
-
$
|
| 3631 |
-
|
| 3632 |
-
|
| 3633 |
-
|
| 3634 |
-
|
| 3635 |
-
|
| 3636 |
-
|
| 3637 |
-
|
| 3638 |
-
|
| 3639 |
-
|
| 3640 |
-
|
| 3641 |
-
|
| 3642 |
-
$
|
| 3643 |
-
|
| 3644 |
-
$
|
| 3645 |
-
|
| 3646 |
-
$
|
| 3647 |
-
|
| 3648 |
-
|
| 3649 |
-
|
| 3650 |
-
|
| 3651 |
-
|
| 3652 |
-
|
| 3653 |
-
|
| 3654 |
-
|
| 3655 |
-
|
| 3656 |
-
|
| 3657 |
-
|
| 3658 |
-
|
| 3659 |
-
|
| 3660 |
-
|
| 3661 |
-
|
| 3662 |
-
|
| 3663 |
-
|
| 3664 |
-
$
|
| 3665 |
-
$
|
| 3666 |
-
$w_choices_params = explode('[
|
| 3667 |
-
|
| 3668 |
-
$
|
| 3669 |
-
|
| 3670 |
-
|
| 3671 |
-
|
| 3672 |
-
|
| 3673 |
-
|
| 3674 |
-
$
|
| 3675 |
-
|
| 3676 |
-
$
|
| 3677 |
-
|
| 3678 |
-
|
| 3679 |
-
|
| 3680 |
-
|
| 3681 |
-
|
| 3682 |
-
|
| 3683 |
-
|
| 3684 |
-
|
| 3685 |
-
|
| 3686 |
-
|
| 3687 |
-
|
| 3688 |
-
|
| 3689 |
-
$
|
| 3690 |
-
|
| 3691 |
-
|
| 3692 |
-
|
| 3693 |
-
|
| 3694 |
-
|
| 3695 |
-
|
| 3696 |
-
|
| 3697 |
-
|
| 3698 |
-
|
| 3699 |
-
|
| 3700 |
-
|
| 3701 |
-
|
| 3702 |
-
|
| 3703 |
-
|
| 3704 |
-
|
| 3705 |
-
|
| 3706 |
-
|
| 3707 |
-
|
| 3708 |
-
|
| 3709 |
-
|
| 3710 |
-
|
| 3711 |
-
|
| 3712 |
-
|
| 3713 |
-
|
| 3714 |
-
|
| 3715 |
-
|
| 3716 |
-
|
| 3717 |
-
|
| 3718 |
-
|
| 3719 |
-
$
|
| 3720 |
-
|
| 3721 |
-
|
| 3722 |
-
|
| 3723 |
-
|
| 3724 |
-
|
| 3725 |
-
|
| 3726 |
-
|
| 3727 |
-
|
| 3728 |
-
|
| 3729 |
-
|
| 3730 |
-
|
| 3731 |
-
|
| 3732 |
-
|
| 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 |
-
|
| 3767 |
-
|
| 3768 |
-
|
| 3769 |
-
|
| 3770 |
-
|
| 3771 |
-
|
| 3772 |
-
|
| 3773 |
-
|
| 3774 |
-
|
| 3775 |
-
|
| 3776 |
-
|
| 3777 |
-
|
| 3778 |
-
|
| 3779 |
-
|
| 3780 |
-
|
| 3781 |
-
|
| 3782 |
-
|
| 3783 |
-
|
| 3784 |
-
|
| 3785 |
-
|
| 3786 |
-
|
| 3787 |
-
|
| 3788 |
-
|
| 3789 |
-
<div
|
| 3790 |
-
|
| 3791 |
-
<
|
| 3792 |
-
|
| 3793 |
-
<
|
| 3794 |
-
|
| 3795 |
-
|
| 3796 |
-
|
| 3797 |
-
$param['w_property_values'][$key] =
|
| 3798 |
-
|
| 3799 |
-
|
| 3800 |
-
|
| 3801 |
-
|
| 3802 |
-
|
| 3803 |
-
|
| 3804 |
-
|
| 3805 |
-
|
| 3806 |
-
|
| 3807 |
-
|
| 3808 |
-
|
| 3809 |
-
|
| 3810 |
-
|
| 3811 |
-
|
| 3812 |
-
|
| 3813 |
-
|
| 3814 |
-
|
| 3815 |
-
|
| 3816 |
-
|
| 3817 |
-
|
| 3818 |
-
|
| 3819 |
-
|
| 3820 |
-
|
| 3821 |
-
|
| 3822 |
-
|
| 3823 |
-
jQuery("
|
| 3824 |
-
|
| 3825 |
-
).
|
| 3826 |
-
|
| 3827 |
-
|
| 3828 |
-
|
| 3829 |
-
|
| 3830 |
-
|
| 3831 |
-
|
| 3832 |
-
|
| 3833 |
-
|
| 3834 |
-
|
| 3835 |
-
|
| 3836 |
-
|
| 3837 |
-
|
| 3838 |
-
|
| 3839 |
-
|
| 3840 |
-
|
| 3841 |
-
|
| 3842 |
-
|
| 3843 |
-
|
| 3844 |
-
|
| 3845 |
-
|
| 3846 |
-
|
| 3847 |
-
|
| 3848 |
-
|
| 3849 |
-
|
| 3850 |
-
|
| 3851 |
-
|
| 3852 |
-
|
| 3853 |
-
|
| 3854 |
-
|
| 3855 |
-
|
| 3856 |
-
|
| 3857 |
-
|
| 3858 |
-
|
| 3859 |
-
|
| 3860 |
-
|
| 3861 |
-
|
| 3862 |
-
$
|
| 3863 |
-
|
| 3864 |
-
|
| 3865 |
-
|
| 3866 |
-
|
| 3867 |
-
|
| 3868 |
-
$
|
| 3869 |
-
|
| 3870 |
-
|
| 3871 |
-
|
| 3872 |
-
|
| 3873 |
-
|
| 3874 |
-
|
| 3875 |
-
|
| 3876 |
-
$
|
| 3877 |
-
|
| 3878 |
-
$temp
|
| 3879 |
-
|
| 3880 |
-
|
| 3881 |
-
|
| 3882 |
-
|
| 3883 |
-
|
| 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 |
-
$param['
|
| 3909 |
-
|
| 3910 |
-
$param['
|
| 3911 |
-
|
| 3912 |
-
|
| 3913 |
-
|
| 3914 |
-
|
| 3915 |
-
|
| 3916 |
-
|
| 3917 |
-
|
| 3918 |
-
$param['
|
| 3919 |
-
|
| 3920 |
-
|
| 3921 |
-
|
| 3922 |
-
|
| 3923 |
-
|
| 3924 |
-
|
| 3925 |
-
|
| 3926 |
-
|
| 3927 |
-
|
| 3928 |
-
|
| 3929 |
-
|
| 3930 |
-
|
| 3931 |
-
|
| 3932 |
-
$element_value
|
| 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 |
-
$w_choices_params = explode('[
|
| 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 |
-
jQuery("
|
| 4056 |
-
|
| 4057 |
-
).
|
| 4058 |
-
|
| 4059 |
-
|
| 4060 |
-
|
| 4061 |
-
|
| 4062 |
-
|
| 4063 |
-
|
| 4064 |
-
|
| 4065 |
-
|
| 4066 |
-
|
| 4067 |
-
|
| 4068 |
-
|
| 4069 |
-
|
| 4070 |
-
|
| 4071 |
-
|
| 4072 |
-
|
| 4073 |
-
$
|
| 4074 |
-
|
| 4075 |
-
|
| 4076 |
-
|
| 4077 |
-
|
| 4078 |
-
$temp
|
| 4079 |
-
|
| 4080 |
-
|
| 4081 |
-
|
| 4082 |
-
|
| 4083 |
-
|
| 4084 |
-
|
| 4085 |
-
|
| 4086 |
-
|
| 4087 |
-
|
| 4088 |
-
|
| 4089 |
-
|
| 4090 |
-
|
| 4091 |
-
$
|
| 4092 |
-
|
| 4093 |
-
|
| 4094 |
-
|
| 4095 |
-
$
|
| 4096 |
-
|
| 4097 |
-
$onload_js .='jQuery("#wdform_'.$id1.'_star_'.$i.'_'.$form_id.'").
|
| 4098 |
-
$onload_js .='
|
| 4099 |
-
|
| 4100 |
-
|
| 4101 |
-
|
| 4102 |
-
|
| 4103 |
-
$rep
|
| 4104 |
-
|
| 4105 |
-
|
| 4106 |
-
|
| 4107 |
-
|
| 4108 |
-
'
|
| 4109 |
-
|
| 4110 |
-
|
| 4111 |
-
|
| 4112 |
-
|
| 4113 |
-
|
| 4114 |
-
|
| 4115 |
-
|
| 4116 |
-
|
| 4117 |
-
$
|
| 4118 |
-
|
| 4119 |
-
|
| 4120 |
-
|
| 4121 |
-
|
| 4122 |
-
$temp
|
| 4123 |
-
|
| 4124 |
-
|
| 4125 |
-
|
| 4126 |
-
|
| 4127 |
-
|
| 4128 |
-
|
| 4129 |
-
|
| 4130 |
-
|
| 4131 |
-
|
| 4132 |
-
|
| 4133 |
-
|
| 4134 |
-
|
| 4135 |
-
|
| 4136 |
-
$
|
| 4137 |
-
|
| 4138 |
-
$
|
| 4139 |
-
$
|
| 4140 |
-
|
| 4141 |
-
|
| 4142 |
-
|
| 4143 |
-
|
| 4144 |
-
|
| 4145 |
-
|
| 4146 |
-
|
| 4147 |
-
|
| 4148 |
-
$rep
|
| 4149 |
-
|
| 4150 |
-
$
|
| 4151 |
-
|
| 4152 |
-
'
|
| 4153 |
-
|
| 4154 |
-
|
| 4155 |
-
|
| 4156 |
-
|
| 4157 |
-
|
| 4158 |
-
|
| 4159 |
-
|
| 4160 |
-
|
| 4161 |
-
|
| 4162 |
-
|
| 4163 |
-
|
| 4164 |
-
$temp
|
| 4165 |
-
|
| 4166 |
-
|
| 4167 |
-
|
| 4168 |
-
|
| 4169 |
-
|
| 4170 |
-
|
| 4171 |
-
|
| 4172 |
-
|
| 4173 |
-
|
| 4174 |
-
|
| 4175 |
-
|
| 4176 |
-
|
| 4177 |
-
|
| 4178 |
-
$rep
|
| 4179 |
-
|
| 4180 |
-
$
|
| 4181 |
-
|
| 4182 |
-
|
| 4183 |
-
|
| 4184 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner(
|
| 4185 |
-
|
| 4186 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({
|
| 4187 |
-
|
| 4188 |
-
|
| 4189 |
-
|
| 4190 |
-
|
| 4191 |
-
|
| 4192 |
-
|
| 4193 |
-
|
| 4194 |
-
|
| 4195 |
-
|
| 4196 |
-
|
| 4197 |
-
|
| 4198 |
-
|
| 4199 |
-
$temp
|
| 4200 |
-
|
| 4201 |
-
|
| 4202 |
-
|
| 4203 |
-
|
| 4204 |
-
|
| 4205 |
-
|
| 4206 |
-
|
| 4207 |
-
|
| 4208 |
-
|
| 4209 |
-
|
| 4210 |
-
|
| 4211 |
-
|
| 4212 |
-
|
| 4213 |
-
|
| 4214 |
-
|
| 4215 |
-
|
| 4216 |
-
|
| 4217 |
-
|
| 4218 |
-
|
| 4219 |
-
|
| 4220 |
-
|
| 4221 |
-
|
| 4222 |
-
|
| 4223 |
-
|
| 4224 |
-
|
| 4225 |
-
|
| 4226 |
-
|
| 4227 |
-
|
| 4228 |
-
|
| 4229 |
-
|
| 4230 |
-
|
| 4231 |
-
|
| 4232 |
-
|
| 4233 |
-
|
| 4234 |
-
|
| 4235 |
-
|
| 4236 |
-
|
| 4237 |
-
|
| 4238 |
-
|
| 4239 |
-
|
| 4240 |
-
|
| 4241 |
-
|
| 4242 |
-
$
|
| 4243 |
-
|
| 4244 |
-
|
| 4245 |
-
|
| 4246 |
-
|
| 4247 |
-
$temp
|
| 4248 |
-
|
| 4249 |
-
|
| 4250 |
-
|
| 4251 |
-
|
| 4252 |
-
|
| 4253 |
-
|
| 4254 |
-
|
| 4255 |
-
|
| 4256 |
-
|
| 4257 |
-
|
| 4258 |
-
$
|
| 4259 |
-
|
| 4260 |
-
$
|
| 4261 |
-
|
| 4262 |
-
$
|
| 4263 |
-
|
| 4264 |
-
$rep
|
| 4265 |
-
|
| 4266 |
-
$
|
| 4267 |
-
|
| 4268 |
-
|
| 4269 |
-
|
| 4270 |
-
|
| 4271 |
-
|
| 4272 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner(
|
| 4273 |
-
|
| 4274 |
-
|
| 4275 |
-
|
| 4276 |
-
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner(
|
| 4277 |
-
|
| 4278 |
-
|
| 4279 |
-
|
| 4280 |
-
|
| 4281 |
-
|
| 4282 |
-
|
| 4283 |
-
|
| 4284 |
-
|
| 4285 |
-
|
| 4286 |
-
|
| 4287 |
-
|
| 4288 |
-
$temp
|
| 4289 |
-
|
| 4290 |
-
|
| 4291 |
-
|
| 4292 |
-
|
| 4293 |
-
|
| 4294 |
-
|
| 4295 |
-
|
| 4296 |
-
|
| 4297 |
-
|
| 4298 |
-
|
| 4299 |
-
|
| 4300 |
-
|
| 4301 |
-
|
| 4302 |
-
$
|
| 4303 |
-
|
| 4304 |
-
$
|
| 4305 |
-
|
| 4306 |
-
$
|
| 4307 |
-
|
| 4308 |
-
|
| 4309 |
-
|
| 4310 |
-
|
| 4311 |
-
|
| 4312 |
-
$
|
| 4313 |
-
|
| 4314 |
-
|
| 4315 |
-
|
| 4316 |
-
|
| 4317 |
-
|
| 4318 |
-
$rep
|
| 4319 |
-
|
| 4320 |
-
$
|
| 4321 |
-
|
| 4322 |
-
|
| 4323 |
-
|
| 4324 |
-
|
| 4325 |
-
|
| 4326 |
-
|
| 4327 |
-
|
| 4328 |
-
|
| 4329 |
-
|
| 4330 |
-
|
| 4331 |
-
|
| 4332 |
-
'
|
| 4333 |
-
|
| 4334 |
-
|
| 4335 |
-
|
| 4336 |
-
|
| 4337 |
-
|
| 4338 |
-
|
| 4339 |
-
|
| 4340 |
-
|
| 4341 |
-
|
| 4342 |
-
|
| 4343 |
-
$temp
|
| 4344 |
-
|
| 4345 |
-
|
| 4346 |
-
|
| 4347 |
-
|
| 4348 |
-
|
| 4349 |
-
|
| 4350 |
-
|
| 4351 |
-
|
| 4352 |
-
|
| 4353 |
-
|
| 4354 |
-
|
| 4355 |
-
$
|
| 4356 |
-
$
|
| 4357 |
-
$
|
| 4358 |
-
$element_value =
|
| 4359 |
-
$
|
| 4360 |
-
|
| 4361 |
-
|
| 4362 |
-
|
| 4363 |
-
|
| 4364 |
-
|
| 4365 |
-
|
| 4366 |
-
|
| 4367 |
-
|
| 4368 |
-
|
| 4369 |
-
|
| 4370 |
-
|
| 4371 |
-
|
| 4372 |
-
|
| 4373 |
-
|
| 4374 |
-
|
| 4375 |
-
|
| 4376 |
-
|
| 4377 |
-
|
| 4378 |
-
$to_check
|
| 4379 |
-
|
| 4380 |
-
|
| 4381 |
-
|
| 4382 |
-
|
| 4383 |
-
|
| 4384 |
-
|
| 4385 |
-
|
| 4386 |
-
|
| 4387 |
-
|
| 4388 |
-
|
| 4389 |
-
$to_check
|
| 4390 |
-
|
| 4391 |
-
|
| 4392 |
-
|
| 4393 |
-
$
|
| 4394 |
-
|
| 4395 |
-
|
| 4396 |
-
|
| 4397 |
-
|
| 4398 |
-
|
| 4399 |
-
$for_matrix
|
| 4400 |
-
|
| 4401 |
-
|
| 4402 |
-
|
| 4403 |
-
|
| 4404 |
-
|
| 4405 |
-
$for_matrix
|
| 4406 |
-
|
| 4407 |
-
|
| 4408 |
-
|
| 4409 |
-
|
| 4410 |
-
|
| 4411 |
-
|
| 4412 |
-
|
| 4413 |
-
|
| 4414 |
-
|
| 4415 |
-
$rep
|
| 4416 |
-
|
| 4417 |
-
$
|
| 4418 |
-
|
| 4419 |
-
|
| 4420 |
-
|
| 4421 |
-
|
| 4422 |
-
|
| 4423 |
-
|
| 4424 |
-
|
| 4425 |
-
|
| 4426 |
-
|
| 4427 |
-
|
| 4428 |
-
|
| 4429 |
-
|
| 4430 |
-
|
| 4431 |
-
|
| 4432 |
-
|
| 4433 |
-
|
| 4434 |
-
<input type="hidden" name="
|
| 4435 |
-
<input type="hidden" name="
|
| 4436 |
-
<input type="hidden"
|
| 4437 |
-
<input type="hidden" value="<?php echo
|
| 4438 |
-
<
|
| 4439 |
-
|
| 4440 |
-
|
| 4441 |
-
|
| 4442 |
-
|
| 4443 |
-
|
| 4444 |
-
|
| 4445 |
-
|
| 4446 |
-
|
| 4447 |
-
|
| 4448 |
-
|
| 4449 |
-
|
| 4450 |
-
|
| 4451 |
-
|
| 4452 |
-
|
| 4453 |
-
|
| 4454 |
-
|
| 4455 |
-
|
| 4456 |
-
|
| 4457 |
-
|
| 4458 |
-
|
| 4459 |
-
|
| 4460 |
-
|
| 4461 |
-
|
| 4462 |
-
|
| 4463 |
-
|
| 4464 |
-
|
|
|
|
|
|
| 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 |
+
$searched_ids = $labels_parameters[8] ? implode(',', $labels_parameters[8]) : '';
|
| 42 |
+
$order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
|
| 43 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
|
| 44 |
+
$style_id = $this->model->hide_or_not($lists['hide_label_list'], '@submitid@');
|
| 45 |
+
$style_date = $this->model->hide_or_not($lists['hide_label_list'], '@submitdate@');
|
| 46 |
+
$style_ip = $this->model->hide_or_not($lists['hide_label_list'], '@submitterip@');
|
| 47 |
+
|
| 48 |
+
$style_username = $this->model->hide_or_not($lists['hide_label_list'], '@submitterusername@');
|
| 49 |
+
$style_useremail = $this->model->hide_or_not($lists['hide_label_list'], '@submitteremail@');
|
| 50 |
+
|
| 51 |
+
$oder_class_default = "manage-column column-autor sortable desc";
|
| 52 |
+
$oder_class = "manage-column column-title sorted " . $asc_or_desc;
|
| 53 |
+
$ispaypal = FALSE;
|
| 54 |
+
$temp = array();
|
| 55 |
+
$m = count($sorted_label_names);
|
| 56 |
+
$n = count($rows);
|
| 57 |
+
$group_id_s = array();
|
| 58 |
+
$group_id_s = $this->model->sort_group_ids(count($sorted_label_names),$group_ids);
|
| 59 |
+
$ka_fielderov_search = (($lists['ip_search'] || $lists['startdate'] || $lists['enddate'] || $lists['username_search'] || $lists['useremail_search'] || $lists['id_search']) ? TRUE : FALSE);
|
| 60 |
+
$is_stats = false;
|
| 61 |
+
$blocked_ips = $this->model->blocked_ips();
|
| 62 |
+
|
| 63 |
+
if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))) {
|
| 64 |
+
require_once(WD_FM_PDF_DIR.'/model.php');
|
| 65 |
+
$pdf_data = WD_FM_PDF_model::get_pdf_data($form_id);
|
| 66 |
+
}
|
| 67 |
+
$subs_count = $this->model->get_subs_count($form_id);
|
| 68 |
+
$chosen_form_title = '';
|
| 69 |
+
if ($forms) {
|
| 70 |
+
foreach($forms as $form) {
|
| 71 |
+
if ($form_id == $form->id) {
|
| 72 |
+
$chosen_form_title = $form->title;
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
?>
|
| 77 |
+
<script type="text/javascript">
|
| 78 |
+
function export_submissions(type, limit) {
|
| 79 |
+
var progressbar = jQuery( "#fm-progressbar" );
|
| 80 |
+
var progressLabel = jQuery( ".fm-progress-label" );
|
| 81 |
+
|
| 82 |
+
progressbar.progressbar({
|
| 83 |
+
max: <?php echo $subs_count; ?>
|
| 84 |
+
});
|
| 85 |
+
|
| 86 |
+
jQuery.ajax({
|
| 87 |
+
type: "POST",
|
| 88 |
+
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,
|
| 89 |
+
data: {search_labels : '<?php echo $searched_ids; ?>'},
|
| 90 |
+
beforeSend: function() {
|
| 91 |
+
if(<?php echo $subs_count; ?> >= 1000 )
|
| 92 |
+
jQuery('.fm_modal').show();
|
| 93 |
+
},
|
| 94 |
+
success: function(data) {
|
| 95 |
+
if(limit < <?php echo $subs_count; ?>) {
|
| 96 |
+
limit += 1000;
|
| 97 |
+
export_submissions(type, limit);
|
| 98 |
+
progressbar.progressbar( "value", limit);
|
| 99 |
+
loaded_percent = Math.round((progressbar.progressbar( "value" ) * 100)/ parseInt(<?php echo $subs_count; ?>));
|
| 100 |
+
progressLabel.text( loaded_percent + ' %');
|
| 101 |
+
progressbarValue = progressbar.find( ".fm-progress-label" );
|
| 102 |
+
if( loaded_percent >= 46 ) {
|
| 103 |
+
progressbarValue.css({
|
| 104 |
+
"color": '#fff',
|
| 105 |
+
});
|
| 106 |
+
}
|
| 107 |
+
else {
|
| 108 |
+
progressbarValue.css({
|
| 109 |
+
"color": '#444',
|
| 110 |
+
});
|
| 111 |
+
}
|
| 112 |
+
}
|
| 113 |
+
else{
|
| 114 |
+
jQuery('.fm_modal').hide();
|
| 115 |
+
progressbar.progressbar( "value", 0);
|
| 116 |
+
progressLabel.text( 'Loading ...' );
|
| 117 |
+
progressbarValue = progressbar.find( ".fm-progress-label" );
|
| 118 |
+
progressbarValue.css({
|
| 119 |
+
"color": '#444',
|
| 120 |
+
});
|
| 121 |
+
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;
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
+
});
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
function clickLabChBAll(ChBAll) {
|
| 128 |
+
<?php
|
| 129 |
+
if (isset($sorted_label_names)) {
|
| 130 |
+
$templabels = array_merge(array(
|
| 131 |
+
'submitid',
|
| 132 |
+
'submitdate',
|
| 133 |
+
'submitterip',
|
| 134 |
+
'submitterusername',
|
| 135 |
+
'submitteremail'
|
| 136 |
+
), $sorted_labels_id);
|
| 137 |
+
$sorted_label_names_for_check = array_merge(array(
|
| 138 |
+
'ID',
|
| 139 |
+
'Submit date',
|
| 140 |
+
"Submitter's IP",
|
| 141 |
+
"Submitter's Username",
|
| 142 |
+
"Submitter's Email Address"
|
| 143 |
+
), $sorted_label_names_original);
|
| 144 |
+
}
|
| 145 |
+
else {
|
| 146 |
+
$templabels = array(
|
| 147 |
+
'submitid',
|
| 148 |
+
'submitdate',
|
| 149 |
+
'submitterip',
|
| 150 |
+
'submitterusername',
|
| 151 |
+
'submitteremail'
|
| 152 |
+
);
|
| 153 |
+
$sorted_label_names_for_check = array(
|
| 154 |
+
'ID',
|
| 155 |
+
'Submit date',
|
| 156 |
+
"Submitter's IP",
|
| 157 |
+
'Submitter\'s Username',
|
| 158 |
+
'Submitter\'s Email Address'
|
| 159 |
+
);
|
| 160 |
+
}
|
| 161 |
+
?>
|
| 162 |
+
if (ChBAll.checked) {
|
| 163 |
+
document.forms.admin_form.hide_label_list.value = '';
|
| 164 |
+
for (i = 0; i <= ChBAll.form.length; i++) {
|
| 165 |
+
if (typeof(ChBAll.form[i]) != "undefined") {
|
| 166 |
+
if (ChBAll.form[i].type == "checkbox") {
|
| 167 |
+
ChBAll.form[i].checked = true;
|
| 168 |
+
}
|
| 169 |
+
}
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
else {
|
| 173 |
+
document.forms.admin_form.hide_label_list.value = '@<?php echo implode($templabels, '@@') ?>@' + '@payment_info@';
|
| 174 |
+
for (i = 0; i <= ChBAll.form.length; i++) {
|
| 175 |
+
if (typeof(ChBAll.form[i]) != "undefined") {
|
| 176 |
+
if (ChBAll.form[i].type == "checkbox") {
|
| 177 |
+
ChBAll.form[i].checked = false;
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
}
|
| 181 |
+
}
|
| 182 |
+
renderColumns();
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
function remove_all() {
|
| 186 |
+
if(document.getElementById('startdate'))
|
| 187 |
+
document.getElementById('startdate').value='';
|
| 188 |
+
if(document.getElementById('enddate'))
|
| 189 |
+
document.getElementById('enddate').value='';
|
| 190 |
+
if(document.getElementById('id_search'))
|
| 191 |
+
document.getElementById('id_search').value='';
|
| 192 |
+
if(document.getElementById('ip_search'))
|
| 193 |
+
document.getElementById('ip_search').value='';
|
| 194 |
+
if(document.getElementById('username_search'))
|
| 195 |
+
document.getElementById('username_search').value='';
|
| 196 |
+
if(document.getElementById('useremail_search'))
|
| 197 |
+
document.getElementById('useremail_search').value='';
|
| 198 |
+
<?php
|
| 199 |
+
$n = count($rows);
|
| 200 |
+
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
| 201 |
+
if ($sorted_label_types[$i] != "type_mark_map") { ?>
|
| 202 |
+
document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>').value='';
|
| 203 |
+
<?php
|
| 204 |
+
}
|
| 205 |
+
}
|
| 206 |
+
?>
|
| 207 |
+
}
|
| 208 |
+
function show_hide_filter() {
|
| 209 |
+
if (document.getElementById('fields_filter').style.display == "none") {
|
| 210 |
+
document.getElementById('fields_filter').style.display = '';
|
| 211 |
+
}
|
| 212 |
+
else {
|
| 213 |
+
document.getElementById('fields_filter').style.display = "none";
|
| 214 |
+
}
|
| 215 |
+
return false;
|
| 216 |
+
}
|
| 217 |
+
jQuery(document).ready(function () {
|
| 218 |
+
jQuery('.theme-detail').click(function () {
|
| 219 |
+
jQuery(this).siblings('.themedetaildiv').toggle();
|
| 220 |
+
return false;
|
| 221 |
+
});
|
| 222 |
+
});
|
| 223 |
+
</script>
|
| 224 |
+
<div class="fm_modal">
|
| 225 |
+
<div id="fm-progressbar" >
|
| 226 |
+
<div class="fm-progress-label">Loading...</div>
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
+
<div class="export_progress">
|
| 230 |
+
<span class="exp_count"><?php echo $subs_count; ?></span> left from <?php echo $subs_count; ?>
|
| 231 |
+
</div>
|
| 232 |
+
<div id="sbox-overlay" onclick="toggleChBDiv(false);">
|
| 233 |
+
</div>
|
| 234 |
+
<div id="ChBDiv">
|
| 235 |
+
<form action="#">
|
| 236 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
| 237 |
+
<p style="font-weight: bold; font-size: 18px; margin-top: 0px;">Select Columns</p>
|
| 238 |
+
<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>
|
| 239 |
+
<?php
|
| 240 |
+
foreach ($templabels as $key => $curlabel) {
|
| 241 |
+
if (strpos($lists['hide_label_list'], '@' . $curlabel . '@') === FALSE) {
|
| 242 |
+
?>
|
| 243 |
+
<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>
|
| 244 |
+
<?php
|
| 245 |
+
}
|
| 246 |
+
else {
|
| 247 |
+
?>
|
| 248 |
+
<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>
|
| 249 |
+
<?php
|
| 250 |
+
}
|
| 251 |
+
}
|
| 252 |
+
$ispaypal = FALSE;
|
| 253 |
+
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
| 254 |
+
if ($sorted_label_types[$i] == 'type_paypal_payment_status') {
|
| 255 |
+
$ispaypal = TRUE;
|
| 256 |
+
}
|
| 257 |
+
}
|
| 258 |
+
if ($ispaypal) {
|
| 259 |
+
?>
|
| 260 |
+
<div class="fm_check_labels">
|
| 261 |
+
<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"' : ''; ?> />
|
| 262 |
+
<label for="fm_check_payment_info"> Payment Info</label>
|
| 263 |
+
</div>
|
| 264 |
+
<?php
|
| 265 |
+
}
|
| 266 |
+
?>
|
| 267 |
+
<div style="text-align: center; padding-top: 20px;">
|
| 268 |
+
<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>
|
| 269 |
+
</div>
|
| 270 |
+
</form>
|
| 271 |
+
</div>
|
| 272 |
+
<div class="fm-user-manual">
|
| 273 |
+
This section allows you to view and manage form submissions.
|
| 274 |
+
<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>
|
| 275 |
+
</div>
|
| 276 |
+
<div class="fm-upgrade-pro">
|
| 277 |
+
<a target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
| 278 |
+
<div class="fm-upgrade-img">
|
| 279 |
+
UPGRADE TO PRO VERSION
|
| 280 |
+
<span></span>
|
| 281 |
+
</div>
|
| 282 |
+
</a>
|
| 283 |
+
</div>
|
| 284 |
+
<div class="fm-clear"></div>
|
| 285 |
+
<form action="admin.php?page=submissions_fmc" method="post" id="admin_form" name="admin_form">
|
| 286 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
| 287 |
+
<input type="hidden" name="option" value="com_formmaker" />
|
| 288 |
+
<input type="hidden" id="task" name="task" value="" />
|
| 289 |
+
<input type="hidden" id="current_id" name="current_id" value="" />
|
| 290 |
+
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php echo $asc_or_desc; ?>" />
|
| 291 |
+
<input type="hidden" name="order_by" id="order_by" value="<?php echo $order_by; ?>" />
|
| 292 |
+
|
| 293 |
+
<div class="fm-submissions-page">
|
| 294 |
+
<div class="submissions-actions">
|
| 295 |
+
<div class="fm-form-title">
|
| 296 |
+
<?php echo $chosen_form_title; ?>
|
| 297 |
+
</div>
|
| 298 |
+
<div class="fm-page-actions">
|
| 299 |
+
<button class="fm-button block-button small" onclick="fm_set_input_value('task', 'block_ip'); fm_form_submit(event, 'admin_form');">
|
| 300 |
+
<span></span>
|
| 301 |
+
Block IP
|
| 302 |
+
</button>
|
| 303 |
+
<button class="fm-button unblock-button medium" onclick="fm_set_input_value('task', 'unblock_ip'); fm_form_submit(event, 'admin_form');">
|
| 304 |
+
<span></span>
|
| 305 |
+
Unblock IP
|
| 306 |
+
</button>
|
| 307 |
+
<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; }">
|
| 308 |
+
<span></span>
|
| 309 |
+
Delete
|
| 310 |
+
</button>
|
| 311 |
+
</div>
|
| 312 |
+
</div>
|
| 313 |
+
<div class="submissions-toolbar">
|
| 314 |
+
<div class="submissions-tools">
|
| 315 |
+
<select name="form_id" id="form_id" onchange="document.admin_form.submit();">
|
| 316 |
+
<option value="0" selected="selected"> - Select a Form - </option>
|
| 317 |
+
<?php if ($forms) {
|
| 318 |
+
foreach($forms as $form) {
|
| 319 |
+
?>
|
| 320 |
+
<option value="<?php echo $form->id; ?>" <?php if ($form_id == $form->id) { echo 'selected="selected"'; }?>> <?php echo $form->title ?> </option>
|
| 321 |
+
<?php
|
| 322 |
+
}
|
| 323 |
+
} ?>
|
| 324 |
+
</select>
|
| 325 |
+
<div class="fm-reports">
|
| 326 |
+
<div class="fm-tools-button"><div class="fm-total_entries"><?php echo $statistics["total_entries"]; ?></div>Entries</div>
|
| 327 |
+
<div class="fm-tools-button"><div class="fm-total_rate"><?php echo $statistics["conversion_rate"]; ?></div>Conversion Rate</div>
|
| 328 |
+
<div class="fm-tools-button"><div class="fm-total_views"><?php echo $statistics["total_views"] ? $statistics["total_views"] : 0; ?></div>Views</div>
|
| 329 |
+
</div>
|
| 330 |
+
|
| 331 |
+
<div class="fm-export-tools">
|
| 332 |
+
<span class="exp_but_span">Export to</span>
|
| 333 |
+
|
| 334 |
+
<button class="fm-tools-button" onclick="export_submissions('csv', 0); return false;">
|
| 335 |
+
CSV
|
| 336 |
+
</button>
|
| 337 |
+
<button class="fm-tools-button" onclick="export_submissions('xml', 0); return false;">
|
| 338 |
+
XML
|
| 339 |
+
</button>
|
| 340 |
+
</div>
|
| 341 |
+
</div>
|
| 342 |
+
</div>
|
| 343 |
+
<div class="tablenav top">
|
| 344 |
+
<div class="fm-filters">
|
| 345 |
+
<div class="fm-search-tools">
|
| 346 |
+
<input type="hidden" name="hide_label_list" value="<?php echo $lists['hide_label_list']; ?>">
|
| 347 |
+
<button class="fm-icon show-filter-icon" onclick="show_hide_filter(); return false;" title="Show Filters">
|
| 348 |
+
<span></span>
|
| 349 |
+
</button>
|
| 350 |
+
<button class="fm-icon search-icon" onclick="fm_form_submit(event, 'admin_form'); return false;" title="Search">
|
| 351 |
+
</button>
|
| 352 |
+
<button class="fm-icon reset-icon" onclick="remove_all(); fm_form_submit(event, 'admin_form'); return false;" title="Reset">
|
| 353 |
+
</button>
|
| 354 |
+
</div>
|
| 355 |
+
<div class="fm-add-remove">
|
| 356 |
+
<?php if (isset($sorted_label_names)) { ?>
|
| 357 |
+
<button class="fm-button" onclick="toggleChBDiv(true); return false;">
|
| 358 |
+
Add/Remove Columns
|
| 359 |
+
</button>
|
| 360 |
+
<?php WDW_FMC_Library::html_page_nav($lists['total'], $lists['limit'], 'admin_form'); ?>
|
| 361 |
+
<?php } ?>
|
| 362 |
+
<input type="hidden" name="pagination_clicked" id="pagination_clicked" value=""/>
|
| 363 |
+
</div>
|
| 364 |
+
</div>
|
| 365 |
+
<div class="fm-clear"></div>
|
| 366 |
+
</div>
|
| 367 |
+
|
| 368 |
+
<div class="fm-loading-container" style="display:none;">
|
| 369 |
+
<div class="fm-loading-content">
|
| 370 |
+
</div>
|
| 371 |
+
</div>
|
| 372 |
+
<div class="submit_content" id="fm-scroll" style="width: 100%;">
|
| 373 |
+
<table class="wp-list-table widefat fixed posts table_content">
|
| 374 |
+
<thead>
|
| 375 |
+
<tr>
|
| 376 |
+
<?php if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))): ?>
|
| 377 |
+
<th class="table_small_col count_col sub-align">PDF</th>
|
| 378 |
+
<?php endif; ?>
|
| 379 |
+
<th class="table_small_col count_col sub-align">#</th>
|
| 380 |
+
<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>
|
| 381 |
+
<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;?>>
|
| 382 |
+
<a href="" class="sub_id" onclick="fm_set_input_value('order_by', 'group_id');
|
| 383 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'group_id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
| 384 |
+
fm_form_submit(event, 'admin_form')">
|
| 385 |
+
<span>ID</span>
|
| 386 |
+
<span class="sorting-indicator" style="margin-top: 8px;"></span>
|
| 387 |
+
</a>
|
| 388 |
+
</th>
|
| 389 |
+
<th class="table_small_col sub-align">Edit</th>
|
| 390 |
+
<th class="table_small_col sub-align">Delete</th>
|
| 391 |
+
<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;?>>
|
| 392 |
+
<a href="" onclick="fm_set_input_value('order_by', 'date');
|
| 393 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'date' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
| 394 |
+
fm_form_submit(event, 'admin_form')">
|
| 395 |
+
<span>Submit date</span>
|
| 396 |
+
<span class="sorting-indicator"></span>
|
| 397 |
+
</a>
|
| 398 |
+
</th>
|
| 399 |
+
<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;?>>
|
| 400 |
+
<a href="" onclick="fm_set_input_value('order_by', 'ip');
|
| 401 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'ip' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
| 402 |
+
fm_form_submit(event, 'admin_form')">
|
| 403 |
+
<span>Submitter's IP</span>
|
| 404 |
+
<span class="sorting-indicator"></span>
|
| 405 |
+
</a>
|
| 406 |
+
</th>
|
| 407 |
+
<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;?>>
|
| 408 |
+
<a href="" onclick="fm_set_input_value('order_by', 'display_name');
|
| 409 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'display_name' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
| 410 |
+
fm_form_submit(event, 'admin_form')">
|
| 411 |
+
<span>Submitter's Username</span>
|
| 412 |
+
<span class="sorting-indicator"></span>
|
| 413 |
+
</a>
|
| 414 |
+
</th>
|
| 415 |
+
<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 ;?>>
|
| 416 |
+
<a href="" onclick="fm_set_input_value('order_by', 'user_email');
|
| 417 |
+
fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'user_email' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
| 418 |
+
fm_form_submit(event, 'admin_form')">
|
| 419 |
+
<span>Submitter's Email Address</span>
|
| 420 |
+
<span class="sorting-indicator"></span>
|
| 421 |
+
</a>
|
| 422 |
+
</th>
|
| 423 |
+
<?php
|
| 424 |
+
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
| 425 |
+
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
|
| 426 |
+
$styleStr2 = $this->model->hide_or_not($lists['hide_label_list'] , '@payment_info@');
|
| 427 |
+
$field_title = $this->model->get_type_address($sorted_label_types[$i], $sorted_label_names_original[$i]);
|
| 428 |
+
if ($sorted_label_types[$i] == 'type_paypal_payment_status') {
|
| 429 |
+
$ispaypal = TRUE;
|
| 430 |
+
?>
|
| 431 |
+
<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 . '"'; ?>">
|
| 432 |
+
<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')">
|
| 433 |
+
<span><?php echo $field_title; ?></span>
|
| 434 |
+
<span class="sorting-indicator"></span>
|
| 435 |
+
</a>
|
| 436 |
+
</th>
|
| 437 |
+
<th class="table_large_col payment_info_fc" <?php echo $styleStr2; ?>>Payment Info</th>
|
| 438 |
+
<?php
|
| 439 |
+
}
|
| 440 |
+
else {
|
| 441 |
+
?>
|
| 442 |
+
<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 . '"'; ?>">
|
| 443 |
+
<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')">
|
| 444 |
+
<span><?php echo $field_title; ?></span>
|
| 445 |
+
<span class="sorting-indicator"></span>
|
| 446 |
+
</a>
|
| 447 |
+
</th>
|
| 448 |
+
<?php
|
| 449 |
+
}
|
| 450 |
+
}
|
| 451 |
+
?>
|
| 452 |
+
</tr>
|
| 453 |
+
<tr id="fields_filter" style="display: none;">
|
| 454 |
+
<th></th>
|
| 455 |
+
<th></th>
|
| 456 |
+
<th class="submitid_fc" <?php echo $style_id; ?> >
|
| 457 |
+
<input type="text" name="id_search" id="id_search" value="<?php echo $lists['id_search'] ?>" onChange="this.form.submit();" style="width:30px"/>
|
| 458 |
+
</th>
|
| 459 |
+
<th></th>
|
| 460 |
+
<th></th>
|
| 461 |
+
<th width="150" class="submitdate_fc" <?php echo $style_date; ?>>
|
| 462 |
+
<table align="center" style="margin:auto" class="simple_table">
|
| 463 |
+
<tr class="simple_table">
|
| 464 |
+
<td class="simple_table" style="text-align: left;">From:</td>
|
| 465 |
+
<td style="text-align: center;" class="simple_table">
|
| 466 |
+
<input class="inputbox" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="<?php echo $lists['startdate']; ?>" />
|
| 467 |
+
</td>
|
| 468 |
+
<td style="text-align: center;" class="simple_table">
|
| 469 |
+
<input type="reset" style="width: 22px; border-radius: 3px !important;" class="button" value="..." onclick="return showCalendar('startdate','%Y-%m-%d');" />
|
| 470 |
+
</td>
|
| 471 |
+
</tr>
|
| 472 |
+
<tr class="simple_table">
|
| 473 |
+
<td style="text-align: left;" class="simple_table">To:</td>
|
| 474 |
+
<td style="text-align: center;" class="simple_table">
|
| 475 |
+
<input class="inputbox" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="<?php echo $lists['enddate']; ?>" />
|
| 476 |
+
</td>
|
| 477 |
+
<td style="text-align: center;" class="simple_table">
|
| 478 |
+
<input type="reset" style="width: 22px; border-radius: 3px !important;" class="button" value="..." onclick="return showCalendar('enddate','%Y-%m-%d');" />
|
| 479 |
+
</td>
|
| 480 |
+
</tr>
|
| 481 |
+
</table>
|
| 482 |
+
</th>
|
| 483 |
+
<th class="table_medium_col_uncenter submitterip_fc" <?php echo $style_ip; ?>>
|
| 484 |
+
<input type="text" name="ip_search" id="ip_search" value="<?php echo $lists['ip_search']; ?>" onChange="this.form.submit();" />
|
| 485 |
+
</th>
|
| 486 |
+
<th class="table_medium_col_uncenter submitterusername_fc" <?php echo $style_username; ?>>
|
| 487 |
+
<input type="text" name="username_search" id="username_search" value="<?php echo $lists['username_search']; ?>" onChange="this.form.submit();" />
|
| 488 |
+
</th>
|
| 489 |
+
<th class="table_medium_col_uncenter submitteremail_fc" <?php echo $style_useremail; ?>>
|
| 490 |
+
<input type="text" name="useremail_search" id="useremail_search" value="<?php echo $lists['useremail_search']; ?>" onChange="this.form.submit();" />
|
| 491 |
+
</th>
|
| 492 |
+
<?php
|
| 493 |
+
for ($i = 0; $i < count($sorted_label_names); $i++) {
|
| 494 |
+
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
|
| 495 |
+
if (!$ka_fielderov_search) {
|
| 496 |
+
if ($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search']) {
|
| 497 |
+
$ka_fielderov_search = TRUE;
|
| 498 |
+
}
|
| 499 |
+
}
|
| 500 |
+
switch ($sorted_label_types[$i]) {
|
| 501 |
+
case 'type_mark_map': ?>
|
| 502 |
+
<th class="table_large_col <?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>></th>
|
| 503 |
+
<?php
|
| 504 |
+
break;
|
| 505 |
+
case 'type_paypal_payment_status': ?>
|
| 506 |
+
<th class="table_large_col <?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
|
| 507 |
+
<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']; ?>" >
|
| 508 |
+
<option value="" ></option>
|
| 509 |
+
<option value="canceled" >Canceled</option>
|
| 510 |
+
<option value="cleared" >Cleared</option>
|
| 511 |
+
<option value="cleared by payment review" >Cleared by payment review</option>
|
| 512 |
+
<option value="completed" >Completed</option>
|
| 513 |
+
<option value="denied" >Denied</option>
|
| 514 |
+
<option value="failed" >Failed</option>
|
| 515 |
+
<option value="held" >Held</option>
|
| 516 |
+
<option value="in progress" >In progress</option>
|
| 517 |
+
<option value="on hold" >On hold</option>
|
| 518 |
+
<option value="paid" >Paid</option>
|
| 519 |
+
<option value="partially refunded" >Partially refunded</option>
|
| 520 |
+
<option value="pending verification" >Pending verification</option>
|
| 521 |
+
<option value="placed" >Placed</option>
|
| 522 |
+
<option value="processing" >Processing</option>
|
| 523 |
+
<option value="refunded" >Refunded</option>
|
| 524 |
+
<option value="refused" >Refused</option>
|
| 525 |
+
<option value="removed" >Removed</option>
|
| 526 |
+
<option value="returned" >Returned</option>
|
| 527 |
+
<option value="reversed" >Reversed</option>
|
| 528 |
+
<option value="temporary hold" >Temporary hold</option>
|
| 529 |
+
<option value="unclaimed" >Unclaimed</option>
|
| 530 |
+
</select>
|
| 531 |
+
<script>
|
| 532 |
+
var element = document.getElementById('<?php echo $form_id.'_'.$sorted_labels_id[$i]; ?>_search');
|
| 533 |
+
element.value = '<?php echo $lists[$form_id.'_'.$sorted_labels_id[$i].'_search']; ?>';
|
| 534 |
+
</script>
|
| 535 |
+
</th>
|
| 536 |
+
<th class="table_large_col payment_info_fc" <?php echo $styleStr2; ?>></th>
|
| 537 |
+
<?php
|
| 538 |
+
break;
|
| 539 |
+
default: ?>
|
| 540 |
+
<th class="<?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
|
| 541 |
+
<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();" >
|
| 542 |
+
</th>
|
| 543 |
+
<?php
|
| 544 |
+
break;
|
| 545 |
+
}
|
| 546 |
+
}
|
| 547 |
+
?>
|
| 548 |
+
</tr>
|
| 549 |
+
</thead>
|
| 550 |
+
<?php
|
| 551 |
+
$k = 0;
|
| 552 |
+
for ($www = 0, $qqq = count($group_id_s); $www < $qqq; $www++) {
|
| 553 |
+
$i = $group_id_s[$www];
|
| 554 |
+
$alternate = (!isset($alternate) || $alternate == 'class="alternate"') ? '' : 'class="alternate"';
|
| 555 |
+
$temp = $this->model->array_for_group_id($group_id_s[$www], $rows);
|
| 556 |
+
$data = $temp[0];
|
| 557 |
+
$userinfo=get_userdata($data->user_id_wd);
|
| 558 |
+
$useremail=$userinfo ? $userinfo->user_email : "";
|
| 559 |
+
$username=$userinfo ? $userinfo->display_name : "";
|
| 560 |
+
?>
|
| 561 |
+
<tr <?php echo $alternate; ?>>
|
| 562 |
+
<?php if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))): ?>
|
| 563 |
+
<td class="table_small_col pdf_col sub-align">
|
| 564 |
+
<?php if($pdf_data && isset($pdf_data[$group_id_s[$www]])): ?>
|
| 565 |
+
<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>
|
| 566 |
+
<?php endif; ?>
|
| 567 |
+
</td>
|
| 568 |
+
<?php endif; ?>
|
| 569 |
+
<td class="table_small_col count_col sub-align"><?php echo $www + 1; ?></td>
|
| 570 |
+
<td class="check-column table_small_col sub-align" style="padding: 0;">
|
| 571 |
+
<input type="checkbox" name="post[]" value="<?php echo $data->group_id; ?>">
|
| 572 |
+
</td>
|
| 573 |
+
<td class="table_small_col sub-align submitid_fc" id="submitid_fc" <?php echo $style_id; ?>>
|
| 574 |
+
<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');" >
|
| 575 |
+
<?php echo $data->group_id; ?>
|
| 576 |
+
</a>
|
| 577 |
+
</td>
|
| 578 |
+
<td class="table_small_col sub-align">
|
| 579 |
+
<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
|
| 580 |
+
</a>
|
| 581 |
+
</td>
|
| 582 |
+
<td class="table_small_col sub-align">
|
| 583 |
+
<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
|
| 584 |
+
</a>
|
| 585 |
+
</td>
|
| 586 |
+
<td class="table_large_col submitdate_fc sub-align" id="submitdate_fc" <?php echo $style_date; ?>>
|
| 587 |
+
<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 ;?>
|
| 588 |
+
</a>
|
| 589 |
+
</td>
|
| 590 |
+
<td class="table_medium_col_uncenter submitterip_fc sub-align" id="submitterip_fc" <?php echo $style_ip; ?>>
|
| 591 |
+
<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>
|
| 592 |
+
</td>
|
| 593 |
+
<td class="table_large_col submitterusername_fc sub-align" id="submitterusername_fc" <?php echo $style_username; ?>>
|
| 594 |
+
<?php echo $username; ?>
|
| 595 |
+
</td>
|
| 596 |
+
<td class="table_large_col submitteremail_fc sub-align" id="submitteremail_fc" <?php echo $style_useremail; ?>>
|
| 597 |
+
<?php echo $useremail; ?>
|
| 598 |
+
</td>
|
| 599 |
+
<?php
|
| 600 |
+
for ($h = 0; $h < $m; $h++) {
|
| 601 |
+
$not_label = TRUE;
|
| 602 |
+
for ($g = 0; $g < count($temp); $g++) {
|
| 603 |
+
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$h]);
|
| 604 |
+
if ($temp[$g]->element_label == $sorted_labels_id[$h]) {
|
| 605 |
+
if (strpos($temp[$g]->element_value, "***map***")) {
|
| 606 |
+
$map_params = explode('***map***', $temp[$g]->element_value);
|
| 607 |
+
?>
|
| 608 |
+
<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; ?>>
|
| 609 |
+
<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>
|
| 610 |
+
</td>
|
| 611 |
+
<?php
|
| 612 |
+
}
|
| 613 |
+
elseif (strpos($temp[$g]->element_value, "*@@url@@*")) {
|
| 614 |
+
?>
|
| 615 |
+
<td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
| 616 |
+
<?php
|
| 617 |
+
$new_files = explode("*@@url@@*", $temp[$g]->element_value);
|
| 618 |
+
foreach ($new_files as $new_file) {
|
| 619 |
+
if ($new_file) {
|
| 620 |
+
$new_filename = explode('/', $new_file);
|
| 621 |
+
$new_filename = $new_filename[count($new_filename) - 1];
|
| 622 |
+
?>
|
| 623 |
+
<a target="_blank" class="fm_fancybox" rel="group_<?php echo $www; ?>" href="<?php echo $new_file; ?>"><?php echo $new_filename; ?></a><br />
|
| 624 |
+
<?php
|
| 625 |
+
}
|
| 626 |
+
}
|
| 627 |
+
?>
|
| 628 |
+
</td>
|
| 629 |
+
<?php
|
| 630 |
+
}
|
| 631 |
+
elseif (strpos($temp[$g]->element_value, "***star_rating***")) {
|
| 632 |
+
$view_star_rating_array = $this->model->view_for_star_rating($temp[$g]->element_value, $temp[$g]->element_label);
|
| 633 |
+
$stars = $view_star_rating_array[0];
|
| 634 |
+
?>
|
| 635 |
+
<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>
|
| 636 |
+
<?php
|
| 637 |
+
}
|
| 638 |
+
elseif (strpos($temp[$g]->element_value, "***matrix***")) {
|
| 639 |
+
?>
|
| 640 |
+
<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; ?>>
|
| 641 |
+
<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>
|
| 642 |
+
</td>
|
| 643 |
+
<?php
|
| 644 |
+
}
|
| 645 |
+
elseif (strpos($temp[$g]->element_value, "@@@") !== FALSE || $temp[$g]->element_value == "@@@" || $temp[$g]->element_value == "@@@@@@@@@") {
|
| 646 |
+
?>
|
| 647 |
+
<td class="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
| 648 |
+
<p><?php echo str_replace("@@@", " ", $temp[$g]->element_value); ?></p>
|
| 649 |
+
</td>
|
| 650 |
+
<?php
|
| 651 |
+
}
|
| 652 |
+
elseif (strpos($temp[$g]->element_value, "***grading***")) {
|
| 653 |
+
$view_grading_array = $this->model->view_for_grading($temp[$g]->element_value);
|
| 654 |
+
$items = $view_grading_array[0];
|
| 655 |
+
?>
|
| 656 |
+
<td class="<?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
| 657 |
+
<p><?php echo $items; ?></p>
|
| 658 |
+
</td>
|
| 659 |
+
<?php
|
| 660 |
+
}
|
| 661 |
+
else {
|
| 662 |
+
if (strpos($temp[$g]->element_value, "***quantity***")) {
|
| 663 |
+
$temp[$g]->element_value = str_replace("***quantity***", " ", $temp[$g]->element_value);
|
| 664 |
+
}
|
| 665 |
+
if (strpos($temp[$g]->element_value, "***property***")) {
|
| 666 |
+
$temp[$g]->element_value = str_replace("***property***", " ", $temp[$g]->element_value);
|
| 667 |
+
}
|
| 668 |
+
|
| 669 |
+
if($sorted_label_types[$h]=="type_submitter_mail"){
|
| 670 |
+
$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]);
|
| 671 |
+
$isverified = $wpdb->get_var($query);
|
| 672 |
+
|
| 673 |
+
if($isverified) { ?>
|
| 674 |
+
<td class="<?php echo $sorted_labels_id[$h];?>_fc" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
| 675 |
+
<p><?php echo $temp[$g]->element_value; ?> <span style="color:#2DA068;">( Verified <img src="<?php echo WD_FMC_URL . '/images/verified.png'; ?>" /> )</span></p>
|
| 676 |
+
</td>
|
| 677 |
+
<?php }
|
| 678 |
+
else {?>
|
| 679 |
+
<td class="<?php echo $sorted_labels_id[$h];?>_fc" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
| 680 |
+
<p><?php echo $temp[$g]->element_value; ?></p>
|
| 681 |
+
</td>
|
| 682 |
+
<?php }
|
| 683 |
+
}
|
| 684 |
+
else{
|
| 685 |
+
?>
|
| 686 |
+
<td class="<?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
|
| 687 |
+
<p><?php echo str_replace("***br***", '<br>', stripslashes($temp[$g]->element_value)) ; ?></p>
|
| 688 |
+
</td>
|
| 689 |
+
<?php
|
| 690 |
+
}
|
| 691 |
+
}
|
| 692 |
+
$not_label = FALSE;
|
| 693 |
+
}
|
| 694 |
+
}
|
| 695 |
+
if ($not_label) {
|
| 696 |
+
?>
|
| 697 |
+
<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>
|
| 698 |
+
<?php
|
| 699 |
+
}
|
| 700 |
+
}
|
| 701 |
+
if ($ispaypal) {
|
| 702 |
+
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], '@payment_info@');
|
| 703 |
+
?>
|
| 704 |
+
<td class="table_large_col payment_info_fc sub-align" id="payment_info_fc" <?php echo $styleStr; ?>>
|
| 705 |
+
<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')); ?>">
|
| 706 |
+
<img src="<?php echo WD_FMC_URL . '/images/info.png'; ?>" />
|
| 707 |
+
</a>
|
| 708 |
+
</td>
|
| 709 |
+
<?php
|
| 710 |
+
}
|
| 711 |
+
?>
|
| 712 |
+
</tr>
|
| 713 |
+
<?php
|
| 714 |
+
$k = 1 - $k;
|
| 715 |
+
}
|
| 716 |
+
?>
|
| 717 |
+
</table>
|
| 718 |
+
</div>
|
| 719 |
+
<?php
|
| 720 |
+
if ($sorted_label_types) {
|
| 721 |
+
foreach ($sorted_label_types as $key => $sorted_label_type) {
|
| 722 |
+
if ($this->model->check_radio_type($sorted_label_type)) {
|
| 723 |
+
$is_stats = true;
|
| 724 |
+
break;
|
| 725 |
+
}
|
| 726 |
+
}
|
| 727 |
+
if ($is_stats) {
|
| 728 |
+
$ajax_nonce = wp_create_nonce( "nonce_fmc_ajax" );
|
| 729 |
+
?>
|
| 730 |
+
<br/>
|
| 731 |
+
<div class="fm-statistics">
|
| 732 |
+
<h1>Statistics</h1>
|
| 733 |
+
<table class="stats">
|
| 734 |
+
<tr>
|
| 735 |
+
<td>
|
| 736 |
+
<label for="sorted_label_key">Select a Field:</label>
|
| 737 |
+
</td>
|
| 738 |
+
<td>
|
| 739 |
+
<select id="sorted_label_key">
|
| 740 |
+
<option value="">Select a Field</option>
|
| 741 |
+
<?php
|
| 742 |
+
foreach ($sorted_label_types as $key => $sorted_label_type) {
|
| 743 |
+
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") {
|
| 744 |
+
?>
|
| 745 |
+
<option value="<?php echo $key; ?>"><?php echo $sorted_label_names_original[$key]; ?></option>
|
| 746 |
+
<?php
|
| 747 |
+
}
|
| 748 |
+
}
|
| 749 |
+
?>
|
| 750 |
+
</select>
|
| 751 |
+
</td>
|
| 752 |
+
<td></td>
|
| 753 |
+
</tr>
|
| 754 |
+
<tr>
|
| 755 |
+
<td>
|
| 756 |
+
<label>Select a Date:</label>
|
| 757 |
+
</td>
|
| 758 |
+
<td>
|
| 759 |
+
From: <input class="inputbox" type="text" name="startstats" id="startstats" size="9" maxlength="9" />
|
| 760 |
+
<input type="reset" class="button" style="width: 22px;" value="..." name="startstats_but" id="startstats_but" onclick="return showCalendar('startstats','%Y-%m-%d');" />
|
| 761 |
+
|
| 762 |
+
To: <input class="inputbox" type="text" name="endstats" id="endstats" size="9" maxlength="9" />
|
| 763 |
+
<input type="reset" class="button" style="width: 22px;" value="..." name="endstats_but" id="endstats_but" onclick="return showCalendar('endstats','%Y-%m-%d');" />
|
| 764 |
+
</td>
|
| 765 |
+
<td>
|
| 766 |
+
<button onclick="show_stats(); return false;">Show</button>
|
| 767 |
+
</td>
|
| 768 |
+
</tr>
|
| 769 |
+
</table>
|
| 770 |
+
|
| 771 |
+
<div id="div_stats"></div>
|
| 772 |
+
</div>
|
| 773 |
+
<script>
|
| 774 |
+
function show_stats() {
|
| 775 |
+
jQuery('#div_stats').html('<div class="fm-loading-container"><div class="fm-loading-content"></div></div>');
|
| 776 |
+
if(jQuery('#sorted_label_key').val()!="") {
|
| 777 |
+
jQuery('#div_stats').load('<?php echo add_query_arg(array('action' => 'get_stats_fmc', 'page' => 'submissions_fmc'), admin_url('admin-ajax.php')); ?>', {
|
| 778 |
+
'task': 'show_stats',
|
| 779 |
+
'form_id' : '<?php echo $form_id; ?>',
|
| 780 |
+
'sorted_label_key' : jQuery('#sorted_label_key').val(),
|
| 781 |
+
'startdate' : jQuery('#startstats').val(),
|
| 782 |
+
'enddate' : jQuery('#endstats').val(),
|
| 783 |
+
'nonce_fmc_ajax': '<?php echo $ajax_nonce; ?>'
|
| 784 |
+
});
|
| 785 |
+
}
|
| 786 |
+
else {
|
| 787 |
+
jQuery('#div_stats').html("<div style='padding:10px 5px; color:red; font-size:14px;'>Please select the field!</div>");
|
| 788 |
+
}
|
| 789 |
+
jQuery("#div_stats").removeClass("fm_loading");
|
| 790 |
+
}
|
| 791 |
+
</script>
|
| 792 |
+
<?php
|
| 793 |
+
}
|
| 794 |
+
}
|
| 795 |
+
?>
|
| 796 |
+
</div>
|
| 797 |
+
</form>
|
| 798 |
+
<script>
|
| 799 |
+
function fm_scroll(element) {
|
| 800 |
+
var scrollbar= document.createElement('div');
|
| 801 |
+
scrollbar.appendChild(document.createElement('div'));
|
| 802 |
+
scrollbar.style.overflow= 'auto';
|
| 803 |
+
scrollbar.style.overflowY= 'hidden';
|
| 804 |
+
scrollbar.firstChild.style.width= element.scrollWidth+'px';
|
| 805 |
+
scrollbar.firstChild.style.paddingTop= '1px';
|
| 806 |
+
scrollbar.firstChild.appendChild(document.createTextNode('\xA0'));
|
| 807 |
+
scrollbar.onscroll= function() {
|
| 808 |
+
element.scrollLeft= scrollbar.scrollLeft;
|
| 809 |
+
};
|
| 810 |
+
element.onscroll= function() {
|
| 811 |
+
scrollbar.scrollLeft= element.scrollLeft;
|
| 812 |
+
};
|
| 813 |
+
element.parentNode.insertBefore(scrollbar, element);
|
| 814 |
+
}
|
| 815 |
+
jQuery(window).load(function() {
|
| 816 |
+
fm_popup();
|
| 817 |
+
fm_scroll(document.getElementById('fm-scroll'));
|
| 818 |
+
if (typeof jQuery().fancybox !== 'undefined' && jQuery.isFunction(jQuery().fancybox)) {
|
| 819 |
+
jQuery(".fm_fancybox").fancybox({
|
| 820 |
+
'maxWidth ' : 600,
|
| 821 |
+
'maxHeight' : 500
|
| 822 |
+
});
|
| 823 |
+
}
|
| 824 |
+
});
|
| 825 |
+
<?php if ($ka_fielderov_search) { ?>
|
| 826 |
+
document.getElementById('fields_filter').style.display = '';
|
| 827 |
+
<?php } ?>
|
| 828 |
+
</script>
|
| 829 |
+
<?php
|
| 830 |
+
}
|
| 831 |
+
|
| 832 |
+
public function show_stats($form_id) {
|
| 833 |
+
$key = (isset($_POST['sorted_label_key']) ? esc_html(stripslashes($_POST['sorted_label_key'])) : '');
|
| 834 |
+
$labels_parameters = $this->model->get_labels_parameters($form_id);
|
| 835 |
+
$where_choices = $labels_parameters[7];
|
| 836 |
+
$sorted_label_names_original = $labels_parameters[4];
|
| 837 |
+
$sorted_labels_id = $labels_parameters[0];
|
| 838 |
+
if(count($sorted_labels_id)!=0 && $key < count($sorted_labels_id) ) {
|
| 839 |
+
$choices_params = $this->model->statistic_for_radio($where_choices, $sorted_labels_id[$key]);
|
| 840 |
+
$sorted_label_name_original = $sorted_label_names_original[$key];
|
| 841 |
+
$choices_count = $choices_params[0];
|
| 842 |
+
$choices_labels = $choices_params[1];
|
| 843 |
+
$unanswered = $choices_params[2];
|
| 844 |
+
$all = $choices_params[3];
|
| 845 |
+
$colors = $choices_params[4];
|
| 846 |
+
$choices_colors = $choices_params[5];
|
| 847 |
+
}
|
| 848 |
+
else {
|
| 849 |
+
$choices_labels = array();
|
| 850 |
+
$sorted_label_name_original = '';
|
| 851 |
+
$unanswered = NULL;
|
| 852 |
+
$all = 0;
|
| 853 |
+
}
|
| 854 |
+
?>
|
| 855 |
+
<br/>
|
| 856 |
+
<br/>
|
| 857 |
+
<div class="field-label"><?php echo stripslashes($sorted_label_name_original); ?></div>
|
| 858 |
+
<table class="adminlist">
|
| 859 |
+
<thead>
|
| 860 |
+
<tr>
|
| 861 |
+
<th width="20%">Choices</th>
|
| 862 |
+
<th>Percentage</th>
|
| 863 |
+
<th width="10%">Count</th>
|
| 864 |
+
</tr>
|
| 865 |
+
</thead>
|
| 866 |
+
<?php
|
| 867 |
+
$k=0;
|
| 868 |
+
foreach ($choices_labels as $key => $choices_label) {
|
| 869 |
+
if (strpos($choices_label, "***quantity***")) {
|
| 870 |
+
$choices_label = str_replace("***quantity***", " ", $choices_label);
|
| 871 |
+
}
|
| 872 |
+
if (strpos($choices_label, "***property***")) {
|
| 873 |
+
$choices_label = str_replace("***property***", " ", $choices_label);
|
| 874 |
+
}
|
| 875 |
+
?>
|
| 876 |
+
<tr>
|
| 877 |
+
<td class="label<?php echo $k; ?>"><?php echo str_replace("***br***",'<br>', $choices_label)?></td>
|
| 878 |
+
<td>
|
| 879 |
+
<div class="bordered" style="width:<?php echo ($choices_count[$key]/($all-$unanswered))*100; ?>%; height:16px; background-color:<?php echo $colors[$key % 2]; ?>; float: left;">
|
| 880 |
+
</div>
|
| 881 |
+
<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;">
|
| 882 |
+
</div>
|
| 883 |
+
</td>
|
| 884 |
+
<td>
|
| 885 |
+
<div>
|
| 886 |
+
<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;">
|
| 887 |
+
</div>
|
| 888 |
+
<div style="background-color:<?php echo $choices_colors[$key % 2]; ?>; height:16px; width:16px; text-align: center; margin-left:8px; color: #fff;">
|
| 889 |
+
<?php echo $choices_count[$key]?>
|
| 890 |
+
</div>
|
| 891 |
+
</div>
|
| 892 |
+
</td>
|
| 893 |
+
</tr>
|
| 894 |
+
<tr>
|
| 895 |
+
<td colspan="3">
|
| 896 |
+
</td>
|
| 897 |
+
</tr>
|
| 898 |
+
<?php
|
| 899 |
+
$k = 1 - $k;
|
| 900 |
+
}
|
| 901 |
+
if($unanswered){
|
| 902 |
+
?>
|
| 903 |
+
<tr>
|
| 904 |
+
<td colspan="2" style="text-align:right; color: #000;">Unanswered</th>
|
| 905 |
+
<td><strong style="margin-left:10px;"><?php echo $unanswered;?></strong></th>
|
| 906 |
+
</tr>
|
| 907 |
+
<?php
|
| 908 |
+
}
|
| 909 |
+
?>
|
| 910 |
+
<tr>
|
| 911 |
+
<td colspan="2" style="text-align:right; color: #000;"><strong>Total</strong></th>
|
| 912 |
+
<td><strong style="margin-left:10px;"><?php echo $all;?></strong></th>
|
| 913 |
+
</tr>
|
| 914 |
+
</table>
|
| 915 |
+
<?php
|
| 916 |
+
die();
|
| 917 |
+
}
|
| 918 |
+
|
| 919 |
+
public function edit($id) {
|
| 920 |
+
$current_id = ((isset($id)) ? $id : 0);
|
| 921 |
+
$params = $this->model->get_data_of_group_id($current_id);
|
| 922 |
+
$rows = $params[0];
|
| 923 |
+
$labels_id = $params[1];
|
| 924 |
+
$labels_name = $params[2];
|
| 925 |
+
$labels_type = $params[3];
|
| 926 |
+
$ispaypal = $params[4];
|
| 927 |
+
$userinfo = get_userdata($rows[0]->user_id_wd);
|
| 928 |
+
$username = $userinfo ? $userinfo->display_name : "";
|
| 929 |
+
$useremail = $userinfo ? $userinfo->user_email : "";
|
| 930 |
+
|
| 931 |
+
?>
|
| 932 |
+
<form action="admin.php?page=submissions_fmc" method="post" id="adminForm" name="adminForm">
|
| 933 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
| 934 |
+
<table width="99%">
|
| 935 |
+
<tbody>
|
| 936 |
+
<tr>
|
| 937 |
+
<td width="100%"><h2>Edit Submission</h2></td>
|
| 938 |
+
<td align="right">
|
| 939 |
+
<input type="button" onclick="fm_set_input_value('task', 'save');
|
| 940 |
+
fm_set_input_value('current_id', <?php echo $current_id; ?>);
|
| 941 |
+
fm_form_submit(event, 'adminForm');" value="Save" class="button-secondary action">
|
| 942 |
+
</td>
|
| 943 |
+
<td align="right">
|
| 944 |
+
<input type="button" onclick="fm_set_input_value('task', 'apply');
|
| 945 |
+
fm_set_input_value('current_id', <?php echo $current_id ;?>);
|
| 946 |
+
fm_form_submit(event, 'adminForm');" value="Apply" class="button-secondary action">
|
| 947 |
+
</td>
|
| 948 |
+
<td align="right">
|
| 949 |
+
<input type="button" onclick="fm_set_input_value('task', '');fm_form_submit(event, 'adminForm');" value="Cancel" class="button-secondary action">
|
| 950 |
+
</td>
|
| 951 |
+
</tr>
|
| 952 |
+
</tbody>
|
| 953 |
+
</table>
|
| 954 |
+
<table class="admintable">
|
| 955 |
+
<tr>
|
| 956 |
+
<td class="key"><label for="ID">ID: </label></td>
|
| 957 |
+
<td><?php echo $rows[0]->group_id; ?></td>
|
| 958 |
+
</tr>
|
| 959 |
+
<tr>
|
| 960 |
+
<td class="key"><label for="Date">Date: </label></td>
|
| 961 |
+
<td><?php echo $rows[0]->date; ?></td>
|
| 962 |
+
</tr>
|
| 963 |
+
<tr>
|
| 964 |
+
<td class="key"><label for="IP">IP: </label></td>
|
| 965 |
+
<td><?php echo $rows[0]->ip; ?></td>
|
| 966 |
+
</tr>
|
| 967 |
+
|
| 968 |
+
|
| 969 |
+
<tr>
|
| 970 |
+
<td class="key"><label for="Submitter's Username">Submitter's Username: </label></td>
|
| 971 |
+
<td><?php echo $username; ?></td>
|
| 972 |
+
</tr>
|
| 973 |
+
<tr>
|
| 974 |
+
<td class="key"><label for="Submitter's Email Address">Submitter's Email Address: </label></td>
|
| 975 |
+
<td><?php echo $useremail; ?></td>
|
| 976 |
+
</tr>
|
| 977 |
+
<?php
|
| 978 |
+
foreach ($labels_id as $key => $label_id) {
|
| 979 |
+
if ($this->model->check_type_for_edit_function($labels_type[$key])) {
|
| 980 |
+
$element_value = $this->model->check_for_submited_label($rows, $label_id);
|
| 981 |
+
if ($element_value == "continue") {
|
| 982 |
+
continue;
|
| 983 |
+
}
|
| 984 |
+
switch ($labels_type[$key]) {
|
| 985 |
+
case 'type_checkbox':
|
| 986 |
+
$choices = explode('***br***', $element_value);
|
| 987 |
+
$choices = array_slice($choices, 0, count($choices) - 1);
|
| 988 |
+
?>
|
| 989 |
+
<tr>
|
| 990 |
+
<td class="key" rowspan="<?php echo count($choices); ?>">
|
| 991 |
+
<label for="title"><?php echo $labels_name[$key]; ?></label>
|
| 992 |
+
</td>
|
| 993 |
+
<?php
|
| 994 |
+
foreach ($choices as $choice_key => $choice) {
|
| 995 |
+
?>
|
| 996 |
+
<td>
|
| 997 |
+
<input type="text" name="submission_<?php echo $label_id.'_'.$choice_key; ?>" id="submission_<?php echo $label_id.'_'.$choice_key; ?>" value="<?php echo $choice; ?>" size="80" />
|
| 998 |
+
</td>
|
| 999 |
+
</tr>
|
| 1000 |
+
<?php
|
| 1001 |
+
}
|
| 1002 |
+
break;
|
| 1003 |
+
case 'type_paypal_payment_status':
|
| 1004 |
+
?>
|
| 1005 |
+
<tr>
|
| 1006 |
+
<td class="key">
|
| 1007 |
+
<label for="title"><?php echo $labels_name[$key]; ?></label>
|
| 1008 |
+
</td>
|
| 1009 |
+
<td>
|
| 1010 |
+
<select name="submission_0" id="submission_0" >
|
| 1011 |
+
<option value=""></option>
|
| 1012 |
+
<option value="Canceled" >Canceled</option>
|
| 1013 |
+
<option value="Cleared" >Cleared</option>
|
| 1014 |
+
<option value="Cleared by payment review" >Cleared by payment review</option>
|
| 1015 |
+
<option value="Completed" >Completed</option>
|
| 1016 |
+
<option value="Denied" >Denied</option>
|
| 1017 |
+
<option value="Failed" >Failed</option>
|
| 1018 |
+
<option value="Held" >Held</option>
|
| 1019 |
+
<option value="In progress" >In progress</option>
|
| 1020 |
+
<option value="On hold" >On hold</option>
|
| 1021 |
+
<option value="Paid" >Paid</option>
|
| 1022 |
+
<option value="Partially refunded" >Partially refunded</option>
|
| 1023 |
+
<option value="Pending verification" >Pending verification</option>
|
| 1024 |
+
<option value="Placed" >Placed</option>
|
| 1025 |
+
<option value="Processing" >Processing</option>
|
| 1026 |
+
<option value="Refunded" >Refunded</option>
|
| 1027 |
+
<option value="Refused" >Refused</option>
|
| 1028 |
+
<option value="Removed" >Removed</option>
|
| 1029 |
+
<option value="Returned" >Returned</option>
|
| 1030 |
+
<option value="Reversed" >Reversed</option>
|
| 1031 |
+
<option value="Temporary hold" >Temporary hold</option>
|
| 1032 |
+
<option value="Unclaimed" >Unclaimed</option>
|
| 1033 |
+
</select>
|
| 1034 |
+
<script>
|
| 1035 |
+
var element = document.getElementById("submission_0");
|
| 1036 |
+
element.value = "<?php echo $element_value; ?>";
|
| 1037 |
+
</script>
|
| 1038 |
+
</td>
|
| 1039 |
+
</tr>
|
| 1040 |
+
<?php
|
| 1041 |
+
break;
|
| 1042 |
+
case 'type_star_rating':
|
| 1043 |
+
$star_rating_array = $this->model->images_for_star_rating($element_value, $label_id);
|
| 1044 |
+
$edit_stars = $star_rating_array[0];
|
| 1045 |
+
$stars_value = $star_rating_array[1];
|
| 1046 |
+
?>
|
| 1047 |
+
<tr>
|
| 1048 |
+
<td class="key">
|
| 1049 |
+
<label for="title"><?php echo $labels_name[$key]; ?></label>
|
| 1050 |
+
</td>
|
| 1051 |
+
<td>
|
| 1052 |
+
<input type="hidden" id="<?php echo $label_id; ?>_star_amountform_id_temp" name="<?php echo $label_id; ?>_star_amountform_id_temp" value="<?php echo $stars_value[0]; ?>">
|
| 1053 |
+
<input type="hidden" name="<?php echo $label_id; ?>_star_colorform_id_temp" id="<?php echo $label_id; ?>_star_colorform_id_temp" value="<?php echo $stars_value[2]; ?>">
|
| 1054 |
+
<input type="hidden" id="<?php echo $label_id; ?>_selected_star_amountform_id_temp" name="<?php echo $label_id; ?>_selected_star_amountform_id_temp" value="<?php echo $stars_value[1]; ?>">
|
| 1055 |
+
<?php echo $edit_stars; ?>
|
| 1056 |
+
<input type="hidden" name="submission_<?php echo $label_id; ?>" id="submission_<?php echo $label_id; ?>" value="<?php echo $element_value; ?>" size="80" />
|
| 1057 |
+
</td>
|
| 1058 |
+
</tr>
|
| 1059 |
+
<?php
|
| 1060 |
+
break;
|
| 1061 |
+
case "type_scale_rating":
|
| 1062 |
+
$scale_rating_array = $this->model->params_for_scale_rating($element_value, $label_id);
|
| 1063 |
+
$scale = $scale_rating_array[0];
|
| 1064 |
+
$scale_radio = $scale_rating_array[1];
|
| 1065 |
+
$checked = $scale_rating_array[2];
|
| 1066 |
+
?>
|
| 1067 |
+
<tr>
|
| 1068 |
+
<td class="key">
|
| 1069 |
+
<label for="title"><?php echo $labels_name[$key]; ?></label>
|
| 1070 |
+
</td>
|
| 1071 |
+
<td>
|
| 1072 |
+
<input type="hidden" id="<?php echo $label_id; ?>_scale_checkedform_id_temp" name="<?php echo $label_id; ?>_scale_checkedform_id_temp" value="<?php echo $scale_radio[1]; ?>">
|
| 1073 |
+
<?php echo $scale; ?>
|
| 1074 |
+
<input type="hidden" name="submission_<?php echo $label_id; ?>" id="submission_<?php echo $label_id; ?>" value="<?php echo $element_value; ?>" size="80" />
|
| 1075 |
+
</td>
|
| 1076 |
+
</tr>
|
| 1077 |
+
<?php
|
| 1078 |
+
break;
|
| 1079 |
+
case 'type_range':
|
| 1080 |
+
$range = $this->model->params_for_type_range($element_value, $label_id);
|
| 1081 |
+
?>
|
| 1082 |
+
<tr>
|
| 1083 |
+
<td class="key">
|
| 1084 |
+
<label for="title"><?php echo $labels_name[$key]; ?></label>
|
| 1085 |
+
</td>
|
| 1086 |
+
<td>
|
| 1087 |
+
<?php echo $range; ?>
|
| 1088 |
+
<input type="hidden" name="submission_<?php echo $label_id; ?>" id="submission_<?php echo $label_id; ?>" value="<?php echo $element_value; ?>" size="80" />
|
| 1089 |
+
</td>
|
| 1090 |
+
</tr>
|
| 1091 |
+
<?php
|
| 1092 |
+
break;
|
| 1093 |
+
case 'type_spinner':
|
| 1094 |
+
?>
|
| 1095 |
+
<tr>
|
| 1096 |
+
<td class="key">
|
| 1097 |
+
<label for="title"><?php echo $labels_name[$key]; ?></label>
|
| 1098 |
+
</td>
|
| 1099 |
+
<td>
|
| 1100 |
+
<input type="text" name="submission_<?php echo $label_id; ?>" id="submission_<?php echo $label_id; ?>" value="<?php echo str_replace("*@@url@@*", '', $element_value); ?>" size="20" />
|
| 1101 |
+
</td>
|
| 1102 |
+
</tr>
|
| 1103 |
+
<?php
|
| 1104 |
+
break;
|
| 1105 |
+
case 'type_grading':
|
| 1106 |
+
$type_grading_array = $this->model->params_for_type_grading($element_value, $label_id);
|
| 1107 |
+
$garding = $type_grading_array[0];
|
| 1108 |
+
$garding_value = $type_grading_array[1];
|
| 1109 |
+
$sum = $type_grading_array[2];
|
| 1110 |
+
$items_count = $type_grading_array[3];
|
| 1111 |
+
$element_value1 = $type_grading_array[4];
|
| 1112 |
+
?>
|
| 1113 |
+
<tr>
|
| 1114 |
+
<td class="key">
|
| 1115 |
+
<label for="title"><?php echo $labels_name[$key]; ?></label>
|
| 1116 |
+
</td>
|
| 1117 |
+
<td>
|
| 1118 |
+
<?php echo $garding; ?>
|
| 1119 |
+
<span id="<?php echo $label_id; ?>_grading_sumform_id_temp"><?php echo $sum; ?></span>/<span id="<?php echo $label_id; ?>_grading_totalform_id_temp"><?php echo $garding_value[$items_count]; ?></span><span id="<?php echo $label_id; ?>_text_elementform_id_temp"></span>
|
| 1120 |
+
<input type="hidden" id="<?php echo $label_id; ?>_element_valueform_id_temp" name="<?php echo $label_id; ?>_element_valueform_id_temp" value="<?php echo $element_value1; ?>" />
|
| 1121 |
+
<input type="hidden" id="<?php echo $label_id; ?>_grading_totalform_id_temp" name="<?php echo $label_id; ?>_grading_totalform_id_temp" value="<?php echo $garding_value[$items_count]; ?>" />
|
| 1122 |
+
<input type="hidden" name="submission_<?php echo $label_id; ?>" id="submission_<?php echo $label_id; ?>" value="<?php echo $element_value; ?>" size="80" />
|
| 1123 |
+
</td>
|
| 1124 |
+
</tr>
|
| 1125 |
+
<?php
|
| 1126 |
+
break;
|
| 1127 |
+
case 'type_matrix':
|
| 1128 |
+
$type_matrix_array = $this->model->params_for_type_matrix($element_value, $label_id);
|
| 1129 |
+
$matrix = $type_matrix_array[0];
|
| 1130 |
+
$new_filename = $type_matrix_array[1];
|
| 1131 |
+
?>
|
| 1132 |
+
<tr>
|
| 1133 |
+
<td class="key">
|
| 1134 |
+
<label for="title"><?php echo $labels_name[$key]; ?></label>
|
| 1135 |
+
</td>
|
| 1136 |
+
<td>
|
| 1137 |
+
<input type="hidden" id="<?php echo $label_id; ?>_matrixform_id_temp" name="<?php echo $label_id; ?>_matrixform_id_temp" value="<?php echo $new_filename; ?>">
|
| 1138 |
+
<?php echo $matrix; ?>
|
| 1139 |
+
<input type="hidden" name="submission_<?php echo $label_id; ?>" id="submission_<?php echo $label_id; ?>" value="<?php echo $element_value; ?>" size="80" />
|
| 1140 |
+
</td>
|
| 1141 |
+
</tr>
|
| 1142 |
+
<?php
|
| 1143 |
+
break;
|
| 1144 |
+
default:
|
| 1145 |
+
?>
|
| 1146 |
+
<tr>
|
| 1147 |
+
<td class="key">
|
| 1148 |
+
<label for="title"><?php echo $labels_name[$key]; ?></label>
|
| 1149 |
+
</td>
|
| 1150 |
+
<td>
|
| 1151 |
+
<input type="text" name="submission_<?php echo $label_id; ?>" id="submission_<?php echo $label_id; ?>" value="<?php echo str_replace("*@@url@@*", '', $element_value); ?>" size="80" />
|
| 1152 |
+
</td>
|
| 1153 |
+
</tr>
|
| 1154 |
+
<?php
|
| 1155 |
+
break;
|
| 1156 |
+
}
|
| 1157 |
+
}
|
| 1158 |
+
}
|
| 1159 |
+
?>
|
| 1160 |
+
</table>
|
| 1161 |
+
<input type="hidden" name="option" value="com_formmaker"/>
|
| 1162 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $rows[0]->group_id; ?>" />
|
| 1163 |
+
<input type="hidden" name="form_id" value="<?php echo $rows[0]->form_id; ?>" />
|
| 1164 |
+
<input type="hidden" name="date" value="<?php echo $rows[0]->date; ?>" />
|
| 1165 |
+
<input type="hidden" name="ip" value="<?php echo $rows[0]->ip; ?>" />
|
| 1166 |
+
<input type="hidden" id="task" name="task" value="" />
|
| 1167 |
+
<input type="hidden" value="<?php echo WD_FMC_URL; ?>" id="form_plugins_url" />
|
| 1168 |
+
<script>
|
| 1169 |
+
plugin_url = document.getElementById('form_plugins_url').value;
|
| 1170 |
+
</script>
|
| 1171 |
+
</form>
|
| 1172 |
+
<?php
|
| 1173 |
+
}
|
| 1174 |
+
|
| 1175 |
+
public function new_edit($id) {
|
| 1176 |
+
$current_id = ((isset($id)) ? $id : 0);
|
| 1177 |
+
$params = $this->model->get_data_of_group_id($current_id);
|
| 1178 |
+
$rows = $params[0];
|
| 1179 |
+
$labels_id = $params[1];
|
| 1180 |
+
$labels_name = $params[2];
|
| 1181 |
+
$labels_type = $params[3];
|
| 1182 |
+
$ispaypal = $params[4];
|
| 1183 |
+
$form = $params[5];
|
| 1184 |
+
$form_theme = $params[6];
|
| 1185 |
+
$userinfo = get_userdata($rows[0]->user_id_wd);
|
| 1186 |
+
$username = $userinfo ? $userinfo->display_name : "";
|
| 1187 |
+
$useremail = $userinfo ? $userinfo->user_email : "";
|
| 1188 |
+
?>
|
| 1189 |
+
<div class="fm-user-manual">
|
| 1190 |
+
This section allows you to edit form submissions.
|
| 1191 |
+
<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>
|
| 1192 |
+
</div>
|
| 1193 |
+
<div class="fm-upgrade-pro">
|
| 1194 |
+
<a target="_blank" href="https://web-dorado.com/files/fromContactForm.php">
|
| 1195 |
+
<div class="fm-upgrade-img">
|
| 1196 |
+
UPGRADE TO PRO VERSION
|
| 1197 |
+
<span></span>
|
| 1198 |
+
</div>
|
| 1199 |
+
</a>
|
| 1200 |
+
</div>
|
| 1201 |
+
<div class="fm-clear"></div>
|
| 1202 |
+
<form action="admin.php?page=submissions_fmc" method="post" id="formform_id_temp" name="formform_id_temp">
|
| 1203 |
+
<?php wp_nonce_field('nonce_fmc', 'nonce_fmc'); ?>
|
| 1204 |
+
<div class="fm-page-header">
|
| 1205 |
+
<div class="fm-page-title">Edit Submission</div>
|
| 1206 |
+
<div class="fm-page-actions">
|
| 1207 |
+
<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');">
|
| 1208 |
+
<span></span>
|
| 1209 |
+
Save
|
| 1210 |
+
</button>
|
| 1211 |
+
<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');">
|
| 1212 |
+
<span></span>
|
| 1213 |
+
Apply
|
| 1214 |
+
</button>
|
| 1215 |
+
<button class="fm-button cancel-button small" onclick="fm_set_input_value('task', '');fm_form_submit(event, 'formform_id_temp');">
|
| 1216 |
+
<span></span>
|
| 1217 |
+
Cancel
|
| 1218 |
+
</button>
|
| 1219 |
+
</div>
|
| 1220 |
+
<div class="fm-clear"></div>
|
| 1221 |
+
</div>
|
| 1222 |
+
<div class="fm-submissins-edit">
|
| 1223 |
+
<table>
|
| 1224 |
+
<tr>
|
| 1225 |
+
<td class="fm-key"><label for="ID">ID: </label></td>
|
| 1226 |
+
<td><?php echo $rows[0]->group_id; ?></td>
|
| 1227 |
+
</tr>
|
| 1228 |
+
<tr>
|
| 1229 |
+
<td class="fm-key"><label for="Date">Date: </label></td>
|
| 1230 |
+
<td><?php echo $rows[0]->date; ?></td>
|
| 1231 |
+
</tr>
|
| 1232 |
+
<tr>
|
| 1233 |
+
<td class="fm-key"><label for="IP">IP: </label></td>
|
| 1234 |
+
<td><?php echo $rows[0]->ip; ?></td>
|
| 1235 |
+
</tr>
|
| 1236 |
+
<tr>
|
| 1237 |
+
<td class="fm-key"><label for="Submitter's Username">Submitter's Username: </label></td>
|
| 1238 |
+
<td><?php echo $username; ?></td>
|
| 1239 |
+
</tr>
|
| 1240 |
+
<tr>
|
| 1241 |
+
<td class="fm-key"><label for="Submitter's Email Address">Submitter's Email Address: </label></td>
|
| 1242 |
+
<td><?php echo $useremail; ?></td>
|
| 1243 |
+
</tr>
|
| 1244 |
+
</table>
|
| 1245 |
+
<?php
|
| 1246 |
+
$css_rep1 = array("[SITE_ROOT]");
|
| 1247 |
+
$css_rep2 = array(WD_FMC_URL);
|
| 1248 |
+
$order = array("\r\n", "\n", "\r");
|
| 1249 |
+
$form_theme = str_replace($order, '', $form_theme);
|
| 1250 |
+
$form_theme = str_replace($css_rep1, $css_rep2, $form_theme);
|
| 1251 |
+
$form_theme = "#form" . $form->id . ' ' . $form_theme;
|
| 1252 |
+
?>
|
| 1253 |
+
<style>
|
| 1254 |
+
<?php
|
| 1255 |
+
echo $form_theme;
|
| 1256 |
+
?>
|
| 1257 |
+
.wdform-page-and-images{
|
| 1258 |
+
width: 50%;
|
| 1259 |
+
}
|
| 1260 |
+
.wdform-page-and-images div {
|
| 1261 |
+
background-color: rgba(0, 0, 0, 0);
|
| 1262 |
+
}
|
| 1263 |
+
</style>
|
| 1264 |
+
<?php
|
| 1265 |
+
$form_currency = '$';
|
| 1266 |
+
$check_js = '';
|
| 1267 |
+
$onload_js = '';
|
| 1268 |
+
$onsubmit_js = '';
|
| 1269 |
+
$currency_code = array('USD', 'EUR', 'GBP', 'JPY', 'CAD', 'MXN', 'HKD', 'HUF', 'NOK', 'NZD', 'SGD', 'SEK', 'PLN', 'AUD', 'DKK', 'CHF', 'CZK', 'ILS', 'BRL', 'TWD', 'MYR', 'PHP', 'THB');
|
| 1270 |
+
$currency_sign = array('$' , '€' , '£' , '¥' , 'C$', 'Mex$', 'HK$', 'Ft' , 'kr' , 'NZ$', 'S$' , 'kr' , 'zl' , 'A$' , 'kr' , 'CHF' , 'Kc', '?' , 'R$' , 'NT$', 'RM' , '?' , '?' );
|
| 1271 |
+
$is_type = array();
|
| 1272 |
+
$id1s = array();
|
| 1273 |
+
$types = array();
|
| 1274 |
+
$labels = array();
|
| 1275 |
+
$paramss = array();
|
| 1276 |
+
$fields = explode('*:*new_field*:*', $form->form_fields);
|
| 1277 |
+
$fields = array_slice($fields, 0, count($fields) - 1);
|
| 1278 |
+
foreach ($fields as $field) {
|
| 1279 |
+
$temp = explode('*:*id*:*',$field);
|
| 1280 |
+
array_push($id1s, $temp[0]);
|
| 1281 |
+
$temp = explode('*:*type*:*', $temp[1]);
|
| 1282 |
+
array_push($types, $temp[0]);
|
| 1283 |
+
$temp = explode('*:*w_field_label*:*', $temp[1]);
|
| 1284 |
+
array_push($labels, $temp[0]);
|
| 1285 |
+
array_push($paramss, $temp[1]);
|
| 1286 |
+
}
|
| 1287 |
+
$form = $form->form_front;
|
| 1288 |
+
$form_id = 'form_id_temp';
|
| 1289 |
+
$start = 0;
|
| 1290 |
+
foreach ($id1s as $id1s_key => $id1) {
|
| 1291 |
+
$label = $labels[$id1s_key];
|
| 1292 |
+
$type = $types[$id1s_key];
|
| 1293 |
+
$params = $paramss[$id1s_key];
|
| 1294 |
+
if ($type != 'type_address') {
|
| 1295 |
+
foreach ($rows as $row) {
|
| 1296 |
+
if ($row->element_label == $id1) {
|
| 1297 |
+
$element_value = $row->element_value;
|
| 1298 |
+
break;
|
| 1299 |
+
}
|
| 1300 |
+
else {
|
| 1301 |
+
$element_value = '';
|
| 1302 |
+
}
|
| 1303 |
+
}
|
| 1304 |
+
}
|
| 1305 |
+
else {
|
| 1306 |
+
for ($i = 0; $i < 6; $i++) {
|
| 1307 |
+
$address_value = '';
|
| 1308 |
+
foreach ($rows as $row) {
|
| 1309 |
+
if ($row->element_label == (string)((int) $id1 + $i)) {
|
| 1310 |
+
$address_value = $row->element_value;
|
| 1311 |
+
}
|
| 1312 |
+
}
|
| 1313 |
+
$elements_of_address[$i] = $address_value;
|
| 1314 |
+
}
|
| 1315 |
+
}
|
| 1316 |
+
if (strpos($form, '%' . $id1 . ' - ' . $label . '%')) {
|
| 1317 |
+
$rep = '';
|
| 1318 |
+
$param = array();
|
| 1319 |
+
$param['attributes'] = '';
|
| 1320 |
+
$is_type[$type] = TRUE;
|
| 1321 |
+
switch ($type) {
|
| 1322 |
+
case 'type_section_break':
|
| 1323 |
+
case 'type_editor':
|
| 1324 |
+
case 'type_file_upload':
|
| 1325 |
+
case 'type_captcha':
|
| 1326 |
+
case 'type_recaptcha':
|
| 1327 |
+
case 'type_mark_map':
|
| 1328 |
+
case 'type_map':
|
| 1329 |
+
case 'type_submit_reset':
|
| 1330 |
+
case 'type_button':
|
| 1331 |
+
case 'type_paypal_total':
|
| 1332 |
+
break;
|
| 1333 |
+
|
| 1334 |
+
case 'type_text': {
|
| 1335 |
+
$params_names = array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required','w_unique');
|
| 1336 |
+
$temp = $params;
|
| 1337 |
+
foreach ($params_names as $params_name ) {
|
| 1338 |
+
$temp = explode('*:*'.$params_name.'*:*', $temp);
|
| 1339 |
+
$param[$params_name] = $temp[0];
|
| 1340 |
+
$temp = $temp[1];
|
| 1341 |
+
}
|
| 1342 |
+
if ($temp) {
|
| 1343 |
+
$temp = explode('*:*w_attr_name*:*', $temp);
|
| 1344 |
+
$attrs = array_slice($temp, 0, count($temp) - 1);
|
| 1345 |
+
foreach ($attrs as $attr) {
|
| 1346 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1347 |
+
}
|
| 1348 |
+
}
|
| 1349 |
+
$wdformfieldsize = ($param['w_field_label_pos'] == "left" ? $param['w_field_label_size']+$param['w_size'] : max($param['w_field_label_size'],$param['w_size']));
|
| 1350 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "float: left;" : "display:block;");
|
| 1351 |
+
$rep ='<div type="type_text" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 1352 |
+
$rep.='</div><div class="wdform-element-section" style="width: '.$param['w_size'].'px;" ><input type="text" class="" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$element_value.'" style="width: 100%;" '.$param['attributes'].'></div></div>';
|
| 1353 |
+
break;
|
| 1354 |
+
}
|
| 1355 |
+
|
| 1356 |
+
case 'type_number': {
|
| 1357 |
+
$params_names = array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required','w_unique','w_class');
|
| 1358 |
+
$temp = $params;
|
| 1359 |
+
foreach ($params_names as $params_name ) {
|
| 1360 |
+
$temp = explode('*:*'.$params_name.'*:*', $temp);
|
| 1361 |
+
$param[$params_name] = $temp[0];
|
| 1362 |
+
$temp = $temp[1];
|
| 1363 |
+
}
|
| 1364 |
+
if ($temp) {
|
| 1365 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 1366 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 1367 |
+
foreach($attrs as $attr)
|
| 1368 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1369 |
+
}
|
| 1370 |
+
|
| 1371 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? $param['w_field_label_size']+$param['w_size'] : max($param['w_field_label_size'],$param['w_size']));
|
| 1372 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 1373 |
+
|
| 1374 |
+
$rep ='<div type="type_number" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" class="'.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 1375 |
+
|
| 1376 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size'].'px;"><input type="text" class="" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$element_value.'" style="width: 100%;" '.$param['attributes'].'></div></div>';
|
| 1377 |
+
|
| 1378 |
+
break;
|
| 1379 |
+
}
|
| 1380 |
+
|
| 1381 |
+
case 'type_password': {
|
| 1382 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_size','w_required','w_unique','w_class');
|
| 1383 |
+
$temp=$params;
|
| 1384 |
+
|
| 1385 |
+
foreach($params_names as $params_name ) {
|
| 1386 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 1387 |
+
$param[$params_name] = $temp[0];
|
| 1388 |
+
$temp=$temp[1];
|
| 1389 |
+
}
|
| 1390 |
+
|
| 1391 |
+
if($temp) {
|
| 1392 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 1393 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 1394 |
+
foreach($attrs as $attr)
|
| 1395 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1396 |
+
}
|
| 1397 |
+
|
| 1398 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? $param['w_field_label_size']+$param['w_size'] : max($param['w_field_label_size'],$param['w_size']));
|
| 1399 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 1400 |
+
|
| 1401 |
+
|
| 1402 |
+
$rep ='<div type="type_password" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" class="'.$param['w_class'].'" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 1403 |
+
|
| 1404 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size'].'px;"><input type="password" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$element_value.'" style="width: 100%;" '.$param['attributes'].'></div></div>';
|
| 1405 |
+
|
| 1406 |
+
|
| 1407 |
+
break;
|
| 1408 |
+
}
|
| 1409 |
+
|
| 1410 |
+
case 'type_textarea': {
|
| 1411 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_size_w','w_size_h','w_first_val','w_title','w_required','w_unique','w_class');
|
| 1412 |
+
$temp=$params;
|
| 1413 |
+
|
| 1414 |
+
foreach($params_names as $params_name ) {
|
| 1415 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 1416 |
+
$param[$params_name] = $temp[0];
|
| 1417 |
+
$temp=$temp[1];
|
| 1418 |
+
}
|
| 1419 |
+
|
| 1420 |
+
|
| 1421 |
+
if($temp) {
|
| 1422 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 1423 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 1424 |
+
foreach($attrs as $attr)
|
| 1425 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1426 |
+
}
|
| 1427 |
+
|
| 1428 |
+
|
| 1429 |
+
|
| 1430 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? $param['w_field_label_size']+$param['w_size_w'] : max($param['w_field_label_size'],$param['w_size_w']));
|
| 1431 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 1432 |
+
|
| 1433 |
+
|
| 1434 |
+
$rep ='<div type="type_textarea" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 1435 |
+
|
| 1436 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size_w'].'px"><textarea class="" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" title="'.$param['w_title'].'" style="width: 100%; height: '.$param['w_size_h'].'px;" '.$param['attributes'].'>'.$element_value.'</textarea></div></div>';
|
| 1437 |
+
|
| 1438 |
+
|
| 1439 |
+
|
| 1440 |
+
break;
|
| 1441 |
+
}
|
| 1442 |
+
|
| 1443 |
+
case 'type_wdeditor': {
|
| 1444 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_size_w','w_size_h','w_title','w_required','w_class');
|
| 1445 |
+
$temp=$params;
|
| 1446 |
+
|
| 1447 |
+
foreach($params_names as $params_name ) {
|
| 1448 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 1449 |
+
$param[$params_name] = $temp[0];
|
| 1450 |
+
$temp=$temp[1];
|
| 1451 |
+
}
|
| 1452 |
+
|
| 1453 |
+
if($temp) {
|
| 1454 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 1455 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 1456 |
+
foreach($attrs as $attr)
|
| 1457 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1458 |
+
}
|
| 1459 |
+
|
| 1460 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? $param['w_field_label_size']+$param['w_size_w']+10 : max($param['w_field_label_size'],$param['w_size_w']));
|
| 1461 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 1462 |
+
|
| 1463 |
+
$rep ='<div type="type_wdeditor" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 1464 |
+
|
| 1465 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size_w'].'px">';
|
| 1466 |
+
|
| 1467 |
+
if(user_can_richedit()) {
|
| 1468 |
+
ob_start();
|
| 1469 |
+
wp_editor($element_value, 'wdform_'.$id1.'_wd_editor'.$form_id, array('teeny' => FALSE, 'media_buttons' => FALSE, 'textarea_rows' => 5));
|
| 1470 |
+
$wd_editor = ob_get_clean();
|
| 1471 |
+
}
|
| 1472 |
+
else {
|
| 1473 |
+
$wd_editor='
|
| 1474 |
+
<textarea class="'.$param['w_class'].'" name="wdform_'.$id1.'_wd_editor'.$form_id.'" id="wdform_'.$id1.'_wd_editor'.$form_id.'" style="width: '.$param['w_size_w'].'px; height: '.$param['w_size_h'].'px; " class="mce_editable" aria-hidden="true">'.$element_value.'</textarea>';
|
| 1475 |
+
}
|
| 1476 |
+
|
| 1477 |
+
$rep.= $wd_editor.'</div></div>';
|
| 1478 |
+
|
| 1479 |
+
break;
|
| 1480 |
+
}
|
| 1481 |
+
|
| 1482 |
+
case 'type_phone': {
|
| 1483 |
+
|
| 1484 |
+
if($element_value=='')
|
| 1485 |
+
$element_value = ' ';
|
| 1486 |
+
|
| 1487 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_mini_labels','w_required','w_unique', 'w_class');
|
| 1488 |
+
$temp=$params;
|
| 1489 |
+
|
| 1490 |
+
foreach($params_names as $params_name ) {
|
| 1491 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 1492 |
+
$param[$params_name] = $temp[0];
|
| 1493 |
+
$temp=$temp[1];
|
| 1494 |
+
}
|
| 1495 |
+
|
| 1496 |
+
if($temp) {
|
| 1497 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 1498 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 1499 |
+
foreach($attrs as $attr)
|
| 1500 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1501 |
+
}
|
| 1502 |
+
|
| 1503 |
+
$element_value = explode(' ',$element_value);
|
| 1504 |
+
|
| 1505 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']+65) : max($param['w_field_label_size'],($param['w_size']+65)));
|
| 1506 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 1507 |
+
|
| 1508 |
+
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
| 1509 |
+
|
| 1510 |
+
$rep ='<div type="type_phone" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label" >'.$label.'</span>';
|
| 1511 |
+
|
| 1512 |
+
$rep.='
|
| 1513 |
+
</div>
|
| 1514 |
+
<div class="wdform-element-section '.$param['w_class'].'" style="width: '.($param['w_size']+65).'px;">
|
| 1515 |
+
<div style="display: table-cell;vertical-align: middle;">
|
| 1516 |
+
<div><input type="text" class="" id="wdform_'.$id1.'_element_first'.$form_id.'" name="wdform_'.$id1.'_element_first'.$form_id.'" value="'.$element_value[0].'" style="width: 50px;" '.$param['attributes'].'></div>
|
| 1517 |
+
<div><label class="mini_label">'.$w_mini_labels[0].'</label></div>
|
| 1518 |
+
</div>
|
| 1519 |
+
<div style="display: table-cell;vertical-align: middle;">
|
| 1520 |
+
<div class="wdform_line" style="margin: 0px 4px 10px 4px; padding: 0px;">-</div>
|
| 1521 |
+
</div>
|
| 1522 |
+
<div style="display: table-cell;vertical-align: middle; width:100%;">
|
| 1523 |
+
<div><input type="text" class="" id="wdform_'.$id1.'_element_last'.$form_id.'" name="wdform_'.$id1.'_element_last'.$form_id.'" value="'.$element_value[1].'" style="width: 100%;" '.$param['attributes'].'></div>
|
| 1524 |
+
<div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
|
| 1525 |
+
</div>
|
| 1526 |
+
</div>
|
| 1527 |
+
</div>';
|
| 1528 |
+
|
| 1529 |
+
break;
|
| 1530 |
+
}
|
| 1531 |
+
|
| 1532 |
+
case 'type_name': {
|
| 1533 |
+
|
| 1534 |
+
if($element_value =='')
|
| 1535 |
+
$element_value = '@@@';
|
| 1536 |
+
|
| 1537 |
+
$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');
|
| 1538 |
+
$temp = $params;
|
| 1539 |
+
if(strpos($temp, 'w_name_fields') > -1)
|
| 1540 |
+
$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');
|
| 1541 |
+
|
| 1542 |
+
foreach($params_names as $params_name ) {
|
| 1543 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 1544 |
+
$param[$params_name] = $temp[0];
|
| 1545 |
+
$temp=$temp[1];
|
| 1546 |
+
}
|
| 1547 |
+
|
| 1548 |
+
|
| 1549 |
+
if($temp) {
|
| 1550 |
+
$temp = explode('*:*w_attr_name*:*',$temp);
|
| 1551 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 1552 |
+
foreach($attrs as $attr)
|
| 1553 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1554 |
+
}
|
| 1555 |
+
|
| 1556 |
+
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
| 1557 |
+
$param['w_name_fields'] = isset($param['w_name_fields']) ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
|
| 1558 |
+
$w_name_fields = explode('***', $param['w_name_fields']);
|
| 1559 |
+
$element_value = explode('@@@', $element_value);
|
| 1560 |
+
|
| 1561 |
+
if($w_name_fields[0]== 'no' && $w_name_fields[1]== 'no' ) {
|
| 1562 |
+
$w_name_format = '
|
| 1563 |
+
<div style="display: table-cell; width:50%">
|
| 1564 |
+
<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>
|
| 1565 |
+
<div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
|
| 1566 |
+
</div>
|
| 1567 |
+
<div style="display:table-cell;"><div style="margin: 0px 8px; padding: 0px;"></div></div>
|
| 1568 |
+
<div style="display: table-cell; width:50%">
|
| 1569 |
+
<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>
|
| 1570 |
+
<div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
|
| 1571 |
+
</div>
|
| 1572 |
+
';
|
| 1573 |
+
$w_size=2*$param['w_size'];
|
| 1574 |
+
}
|
| 1575 |
+
else {
|
| 1576 |
+
$first_last_size = $w_name_fields[0] == 'yes' && $w_name_fields[1] == 'no' ? 45 : 30;
|
| 1577 |
+
$w_name_format = '
|
| 1578 |
+
<div style="display: table-cell; width:30%">
|
| 1579 |
+
<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>
|
| 1580 |
+
<div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
|
| 1581 |
+
</div>
|
| 1582 |
+
<div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
|
| 1583 |
+
<div style="display: table-cell; width:30%">
|
| 1584 |
+
<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>
|
| 1585 |
+
<div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
|
| 1586 |
+
</div>';
|
| 1587 |
+
$w_size = 2*$param['w_size'];
|
| 1588 |
+
|
| 1589 |
+
if($w_name_fields[0] == 'yes') {
|
| 1590 |
+
$w_name_format = '
|
| 1591 |
+
<div style="display: table-cell;">
|
| 1592 |
+
<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>
|
| 1593 |
+
<div><label class="mini_label">'.$w_mini_labels[0].'</label></div>
|
| 1594 |
+
</div>
|
| 1595 |
+
<div style="display:table-cell;"><div style="margin: 0px 1px; padding: 0px;"></div></div>'.$w_name_format;
|
| 1596 |
+
$w_size += 80;
|
| 1597 |
+
}
|
| 1598 |
+
if($w_name_fields[1] == 'yes') {
|
| 1599 |
+
$w_name_format = $w_name_format.'
|
| 1600 |
+
<div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
|
| 1601 |
+
<div style="display: table-cell; width:30%">
|
| 1602 |
+
<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>
|
| 1603 |
+
<div><label class="mini_label">'.$w_mini_labels[3].'</label></div>
|
| 1604 |
+
</div>
|
| 1605 |
+
';
|
| 1606 |
+
$w_size += $param['w_size'];
|
| 1607 |
+
}
|
| 1608 |
+
}
|
| 1609 |
+
|
| 1610 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$w_size) : max($param['w_field_label_size'],$w_size));
|
| 1611 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 1612 |
+
|
| 1613 |
+
$rep ='<div type="type_name" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 1614 |
+
|
| 1615 |
+
$rep.='</div>
|
| 1616 |
+
<div class="wdform-element-section '.$param['w_class'].'" style="width: '.$w_size.'px;">'.$w_name_format.'</div></div>';
|
| 1617 |
+
|
| 1618 |
+
break;
|
| 1619 |
+
}
|
| 1620 |
+
|
| 1621 |
+
case 'type_address': {
|
| 1622 |
+
$params_names = array('w_field_label_size','w_field_label_pos','w_size','w_mini_labels','w_disabled_fields','w_required','w_class');
|
| 1623 |
+
$temp = $params;
|
| 1624 |
+
foreach($params_names as $params_name ) {
|
| 1625 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 1626 |
+
$param[$params_name] = $temp[0];
|
| 1627 |
+
$temp=$temp[1];
|
| 1628 |
+
}
|
| 1629 |
+
|
| 1630 |
+
if($temp) {
|
| 1631 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 1632 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 1633 |
+
foreach($attrs as $attr)
|
| 1634 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1635 |
+
}
|
| 1636 |
+
|
| 1637 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
| 1638 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 1639 |
+
|
| 1640 |
+
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
| 1641 |
+
$w_disabled_fields = explode('***',$param['w_disabled_fields']);
|
| 1642 |
+
|
| 1643 |
+
$rep ='<div type="type_address" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 1644 |
+
|
| 1645 |
+
$address_fields ='';
|
| 1646 |
+
$g=0;
|
| 1647 |
+
if (isset($w_disabled_fields[0]) && $w_disabled_fields[0]=='no') {
|
| 1648 |
+
$g+=2;
|
| 1649 |
+
$address_fields .= '<span style="float: left; width: 100%; padding-bottom: 8px; display: block;"><input type="text" id="wdform_'.$id1.'_street1'.$form_id.'" name="wdform_'.$id1.'_street1'.$form_id.'" value="'.$elements_of_address[0].'" style="width: 100%;" '.$param['attributes'].'><label class="mini_label" >'.$w_mini_labels[0].'</label></span>';
|
| 1650 |
+
}
|
| 1651 |
+
if (isset($w_disabled_fields[1]) && $w_disabled_fields[1]=='no') {
|
| 1652 |
+
$g+=2;
|
| 1653 |
+
$address_fields .= '<span style="float: left; width: 100%; padding-bottom: 8px; display: block;"><input type="text" id="wdform_'.$id1.'_street2'.$form_id.'" name="wdform_'.($id1+1).'_street2'.$form_id.'" value="'.$elements_of_address[1].'" style="width: 100%;" '.$param['attributes'].'><label class="mini_label" >'.$w_mini_labels[1].'</label></span>';
|
| 1654 |
+
}
|
| 1655 |
+
if (isset($w_disabled_fields[2]) && $w_disabled_fields[2]=='no') {
|
| 1656 |
+
$g++;
|
| 1657 |
+
$address_fields .= '<span style="float: left; width: 48%; padding-bottom: 8px;"><input type="text" id="wdform_'.$id1.'_city'.$form_id.'" name="wdform_'.($id1+2).'_city'.$form_id.'" value="'.$elements_of_address[2].'" style="width: 100%;" '.$param['attributes'].'><label class="mini_label" >'.$w_mini_labels[2].'</label></span>';
|
| 1658 |
+
}
|
| 1659 |
+
if (isset($w_disabled_fields[3]) && $w_disabled_fields[3]=='no') {
|
| 1660 |
+
$g++;
|
| 1661 |
+
$w_states = array("","Alabama","Alaska", "Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District Of Columbia","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming");
|
| 1662 |
+
$w_state_options = '';
|
| 1663 |
+
foreach($w_states as $w_state) {
|
| 1664 |
+
if($w_state == $elements_of_address[3])
|
| 1665 |
+
$selected = 'selected=\"selected\"';
|
| 1666 |
+
else
|
| 1667 |
+
$selected = '';
|
| 1668 |
+
$w_state_options .= '<option value="'.$w_state.'" '.$selected.'>'.$w_state.'</option>';
|
| 1669 |
+
}
|
| 1670 |
+
if(isset($w_disabled_fields[5]) && $w_disabled_fields[5]=='yes' && isset($w_disabled_fields[6]) && $w_disabled_fields[6]=='yes') {
|
| 1671 |
+
$address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><select type="text" id="wdform_'.$id1.'_state'.$form_id.'" name="wdform_'.($id1+3).'_state'.$form_id.'" style="width: 100%;" '.$param['attributes'].'>'.$w_state_options.'</select><label class="mini_label" style="display: block;" id="'.$id1.'_mini_label_state">'.$w_mini_labels[3].'</label></span>';
|
| 1672 |
+
}
|
| 1673 |
+
else
|
| 1674 |
+
$address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><input type="text" id="wdform_'.$id1.'_state'.$form_id.'" name="wdform_'.($id1+3).'_state'.$form_id.'" value="'.$elements_of_address[3].'" style="width: 100%;" '.$param['attributes'].'><label class="mini_label">'.$w_mini_labels[3].'</label></span>';
|
| 1675 |
+
}
|
| 1676 |
+
if (isset($w_disabled_fields[4]) && $w_disabled_fields[4]=='no') {
|
| 1677 |
+
$g++;
|
| 1678 |
+
$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>';
|
| 1679 |
+
}
|
| 1680 |
+
$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");
|
| 1681 |
+
$w_options = '';
|
| 1682 |
+
foreach($w_countries as $w_country) {
|
| 1683 |
+
if($w_country == $elements_of_address[5])
|
| 1684 |
+
$selected = 'selected="selected"';
|
| 1685 |
+
else
|
| 1686 |
+
$selected = '';
|
| 1687 |
+
$w_options .= '<option value="'.$w_country.'" '.$selected.'>'.$w_country.'</option>';
|
| 1688 |
+
}
|
| 1689 |
+
|
| 1690 |
+
if (isset($w_disabled_fields[5]) && $w_disabled_fields[5]=='no') {
|
| 1691 |
+
$g++;
|
| 1692 |
+
$address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;display: inline-block;"><select type="text" id="wdform_'.$id1.'_country'.$form_id.'" name="wdform_'.($id1+5).'_country'.$form_id.'" style="width:100%" '.$param['attributes'].'>'.$w_options.'</select><label class="mini_label">'.$w_mini_labels[5].'</span>';
|
| 1693 |
+
}
|
| 1694 |
+
|
| 1695 |
+
|
| 1696 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size'].'px;"><div>
|
| 1697 |
+
'.$address_fields.'</div></div></div>';
|
| 1698 |
+
break;
|
| 1699 |
+
}
|
| 1700 |
+
|
| 1701 |
+
case 'type_submitter_mail': {
|
| 1702 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required','w_unique', 'w_class');
|
| 1703 |
+
$temp=$params;
|
| 1704 |
+
|
| 1705 |
+
foreach($params_names as $params_name ) {
|
| 1706 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 1707 |
+
$param[$params_name] = $temp[0];
|
| 1708 |
+
$temp=$temp[1];
|
| 1709 |
+
}
|
| 1710 |
+
|
| 1711 |
+
|
| 1712 |
+
if($temp) {
|
| 1713 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 1714 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 1715 |
+
foreach($attrs as $attr)
|
| 1716 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1717 |
+
}
|
| 1718 |
+
|
| 1719 |
+
|
| 1720 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
| 1721 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 1722 |
+
|
| 1723 |
+
$rep ='<div type="type_submitter_mail" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 1724 |
+
|
| 1725 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size'].'px;"><input type="text" class="" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$element_value.'" title="'.$param['w_title'].'" style="width: 100%;" '.$param['attributes'].'></div></div>';
|
| 1726 |
+
|
| 1727 |
+
|
| 1728 |
+
|
| 1729 |
+
break;
|
| 1730 |
+
}
|
| 1731 |
+
|
| 1732 |
+
case 'type_checkbox':
|
| 1733 |
+
|
| 1734 |
+
{
|
| 1735 |
+
|
| 1736 |
+
|
| 1737 |
+
|
| 1738 |
+
$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');
|
| 1739 |
+
|
| 1740 |
+
$temp=$params;
|
| 1741 |
+
|
| 1742 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
| 1743 |
+
|
| 1744 |
+
$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');
|
| 1745 |
+
|
| 1746 |
+
|
| 1747 |
+
|
| 1748 |
+
foreach($params_names as $params_name )
|
| 1749 |
+
|
| 1750 |
+
{
|
| 1751 |
+
|
| 1752 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 1753 |
+
|
| 1754 |
+
$param[$params_name] = $temp[0];
|
| 1755 |
+
|
| 1756 |
+
$temp=$temp[1];
|
| 1757 |
+
|
| 1758 |
+
}
|
| 1759 |
+
|
| 1760 |
+
|
| 1761 |
+
|
| 1762 |
+
if($temp)
|
| 1763 |
+
|
| 1764 |
+
{
|
| 1765 |
+
|
| 1766 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 1767 |
+
|
| 1768 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 1769 |
+
|
| 1770 |
+
foreach($attrs as $attr)
|
| 1771 |
+
|
| 1772 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 1773 |
+
|
| 1774 |
+
}
|
| 1775 |
+
|
| 1776 |
+
|
| 1777 |
+
|
| 1778 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 1779 |
+
|
| 1780 |
+
if(!isset($param['w_value_disabled']))
|
| 1781 |
+
|
| 1782 |
+
$param['w_value_disabled'] = 'no';
|
| 1783 |
+
|
| 1784 |
+
|
| 1785 |
+
|
| 1786 |
+
if(!isset($param['w_field_option_pos']))
|
| 1787 |
+
|
| 1788 |
+
$param['w_field_option_pos'] = 'left';
|
| 1789 |
+
|
| 1790 |
+
|
| 1791 |
+
|
| 1792 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
| 1793 |
+
|
| 1794 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
| 1795 |
+
|
| 1796 |
+
|
| 1797 |
+
|
| 1798 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
| 1799 |
+
|
| 1800 |
+
if(isset($param['w_choices_value']))
|
| 1801 |
+
|
| 1802 |
+
{
|
| 1803 |
+
|
| 1804 |
+
$param['w_choices_value'] = explode('***',$param['w_choices_value']);
|
| 1805 |
+
|
| 1806 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
| 1807 |
+
|
| 1808 |
+
}
|
| 1809 |
+
|
| 1810 |
+
|
| 1811 |
+
|
| 1812 |
+
$element_value = explode('***br***',$element_value);
|
| 1813 |
+
|
| 1814 |
+
$element_value = array_slice($element_value,0, count($element_value)-1);
|
| 1815 |
+
|
| 1816 |
+
$is_other=false;
|
| 1817 |
+
|
| 1818 |
+
$other_value = '';
|
| 1819 |
+
|
| 1820 |
+
|
| 1821 |
+
|
| 1822 |
+
foreach($element_value as $key => $value)
|
| 1823 |
+
|
| 1824 |
+
{
|
| 1825 |
+
|
| 1826 |
+
if(!in_array($value, ($param['w_value_disabled']=='no' ? $param['w_choices'] : (isset($param['w_choices_value']) ? $param['w_choices_value'] : array()))))
|
| 1827 |
+
|
| 1828 |
+
{
|
| 1829 |
+
|
| 1830 |
+
$other_value = $value;
|
| 1831 |
+
|
| 1832 |
+
$is_other=true;
|
| 1833 |
+
|
| 1834 |
+
break;
|
| 1835 |
+
|
| 1836 |
+
}
|
| 1837 |
+
|
| 1838 |
+
}
|
| 1839 |
+
|
| 1840 |
+
|
| 1841 |
+
|
| 1842 |
+
$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>';
|
| 1843 |
+
|
| 1844 |
+
|
| 1845 |
+
|
| 1846 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
| 1847 |
+
|
| 1848 |
+
|
| 1849 |
+
|
| 1850 |
+
$rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
| 1851 |
+
|
| 1852 |
+
$total_queries = 0;
|
| 1853 |
+
|
| 1854 |
+
foreach($param['w_choices'] as $key => $choice)
|
| 1855 |
+
|
| 1856 |
+
{
|
| 1857 |
+
|
| 1858 |
+
$key1 = $key + $total_queries;
|
| 1859 |
+
|
| 1860 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
| 1861 |
+
|
| 1862 |
+
{
|
| 1863 |
+
|
| 1864 |
+
$choices_labels =array();
|
| 1865 |
+
$choices_values = array();
|
| 1866 |
+
|
| 1867 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
| 1868 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
| 1869 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
| 1870 |
+
|
| 1871 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
| 1872 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
| 1873 |
+
|
| 1874 |
+
|
| 1875 |
+
|
| 1876 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
| 1877 |
+
|
| 1878 |
+
$table = $label_table_and_column[0];
|
| 1879 |
+
|
| 1880 |
+
$label_column = $label_table_and_column[1];
|
| 1881 |
+
|
| 1882 |
+
if($label_column)
|
| 1883 |
+
|
| 1884 |
+
{
|
| 1885 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
| 1886 |
+
|
| 1887 |
+
}
|
| 1888 |
+
|
| 1889 |
+
|
| 1890 |
+
|
| 1891 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_value'][$key]));
|
| 1892 |
+
|
| 1893 |
+
$value_column = $value_table_and_column[1];
|
| 1894 |
+
|
| 1895 |
+
|
| 1896 |
+
|
| 1897 |
+
if($value_column)
|
| 1898 |
+
|
| 1899 |
+
{
|
| 1900 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
| 1901 |
+
|
| 1902 |
+
}
|
| 1903 |
+
|
| 1904 |
+
$columns_count_checkbox = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
| 1905 |
+
|
| 1906 |
+
|
| 1907 |
+
|
| 1908 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
| 1909 |
+
|
| 1910 |
+
{
|
| 1911 |
+
|
| 1912 |
+
$total_queries = $total_queries + $columns_count_checkbox-1;
|
| 1913 |
+
|
| 1914 |
+
|
| 1915 |
+
|
| 1916 |
+
if(!isset($post_value))
|
| 1917 |
+
|
| 1918 |
+
$param['w_choices_checked'][$key]=($param['w_choices_checked'][$key]=='true' ? 'checked="checked"' : '');
|
| 1919 |
+
|
| 1920 |
+
|
| 1921 |
+
|
| 1922 |
+
for($k=0; $k<$columns_count_checkbox; $k++)
|
| 1923 |
+
|
| 1924 |
+
{
|
| 1925 |
+
|
| 1926 |
+
$choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
|
| 1927 |
+
|
| 1928 |
+
$choice_value = isset($choices_values[$k]) ? $choices_values[$k] : $choice_label;
|
| 1929 |
+
|
| 1930 |
+
if(($key1+$k)%$param['w_rowcol']==0 && ($key1+$k)>0)
|
| 1931 |
+
|
| 1932 |
+
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
| 1933 |
+
|
| 1934 |
+
|
| 1935 |
+
|
| 1936 |
+
$checked=(in_array($choice_value, $element_value) ? 'checked="checked"' : '');
|
| 1937 |
+
|
| 1938 |
+
|
| 1939 |
+
|
| 1940 |
+
$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>';
|
| 1941 |
+
|
| 1942 |
+
|
| 1943 |
+
|
| 1944 |
+
}
|
| 1945 |
+
|
| 1946 |
+
}
|
| 1947 |
+
|
| 1948 |
+
}
|
| 1949 |
+
|
| 1950 |
+
else
|
| 1951 |
+
|
| 1952 |
+
{
|
| 1953 |
+
|
| 1954 |
+
if($key1%$param['w_rowcol']==0 && $key1>0)
|
| 1955 |
+
|
| 1956 |
+
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
| 1957 |
+
|
| 1958 |
+
|
| 1959 |
+
|
| 1960 |
+
$checked=(in_array($choice, $element_value) ? 'checked="checked"' : '');
|
| 1961 |
+
|
| 1962 |
+
|
| 1963 |
+
|
| 1964 |
+
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key && $is_other)
|
| 1965 |
+
|
| 1966 |
+
$checked = 'checked="checked"';
|
| 1967 |
+
|
| 1968 |
+
|
| 1969 |
+
|
| 1970 |
+
|
| 1971 |
+
|
| 1972 |
+
$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>';
|
| 1973 |
+
|
| 1974 |
+
|
| 1975 |
+
|
| 1976 |
+
$param['w_allow_other_num'] = $param['w_allow_other_num']==$key ? $key1 : $param['w_allow_other_num'];
|
| 1977 |
+
|
| 1978 |
+
}
|
| 1979 |
+
|
| 1980 |
+
}
|
| 1981 |
+
|
| 1982 |
+
$rep.='</div>';
|
| 1983 |
+
|
| 1984 |
+
|
| 1985 |
+
|
| 1986 |
+
$rep.='</div></div>';
|
| 1987 |
+
|
| 1988 |
+
|
| 1989 |
+
|
| 1990 |
+
|
| 1991 |
+
|
| 1992 |
+
if($is_other)
|
| 1993 |
+
|
| 1994 |
+
$onload_js .='show_other_input("wdform_'.$id1.'","'.$form_id.'"); jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val("'.$other_value.'");';
|
| 1995 |
+
|
| 1996 |
+
|
| 1997 |
+
|
| 1998 |
+
$onsubmit_js.='
|
| 1999 |
+
|
| 2000 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other'.$form_id.'\" value = \"'.$param['w_allow_other'].'\" />").appendTo("#adminForm");
|
| 2001 |
+
|
| 2002 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other_num'.$form_id.'\" value = \"'.$param['w_allow_other_num'].'\" />").appendTo("#adminForm");
|
| 2003 |
+
|
| 2004 |
+
';
|
| 2005 |
+
|
| 2006 |
+
|
| 2007 |
+
|
| 2008 |
+
break;
|
| 2009 |
+
|
| 2010 |
+
}
|
| 2011 |
+
|
| 2012 |
+
case 'type_radio':
|
| 2013 |
+
|
| 2014 |
+
{
|
| 2015 |
+
|
| 2016 |
+
|
| 2017 |
+
|
| 2018 |
+
|
| 2019 |
+
|
| 2020 |
+
$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');
|
| 2021 |
+
|
| 2022 |
+
$temp=$params;
|
| 2023 |
+
|
| 2024 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
| 2025 |
+
|
| 2026 |
+
$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');
|
| 2027 |
+
|
| 2028 |
+
|
| 2029 |
+
|
| 2030 |
+
foreach($params_names as $params_name )
|
| 2031 |
+
|
| 2032 |
+
{
|
| 2033 |
+
|
| 2034 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 2035 |
+
|
| 2036 |
+
$param[$params_name] = $temp[0];
|
| 2037 |
+
|
| 2038 |
+
$temp=$temp[1];
|
| 2039 |
+
|
| 2040 |
+
}
|
| 2041 |
+
|
| 2042 |
+
|
| 2043 |
+
|
| 2044 |
+
if($temp)
|
| 2045 |
+
|
| 2046 |
+
{
|
| 2047 |
+
|
| 2048 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 2049 |
+
|
| 2050 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 2051 |
+
|
| 2052 |
+
foreach($attrs as $attr)
|
| 2053 |
+
|
| 2054 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 2055 |
+
|
| 2056 |
+
}
|
| 2057 |
+
|
| 2058 |
+
if(!isset($param['w_value_disabled']))
|
| 2059 |
+
|
| 2060 |
+
$param['w_value_disabled'] = 'no';
|
| 2061 |
+
|
| 2062 |
+
|
| 2063 |
+
|
| 2064 |
+
if(!isset($param['w_field_option_pos']))
|
| 2065 |
+
|
| 2066 |
+
$param['w_field_option_pos'] = 'left';
|
| 2067 |
+
|
| 2068 |
+
|
| 2069 |
+
|
| 2070 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 2071 |
+
|
| 2072 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
| 2073 |
+
|
| 2074 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
| 2075 |
+
|
| 2076 |
+
|
| 2077 |
+
|
| 2078 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
| 2079 |
+
|
| 2080 |
+
if(isset($param['w_choices_value']))
|
| 2081 |
+
|
| 2082 |
+
{
|
| 2083 |
+
|
| 2084 |
+
$param['w_choices_value'] = explode('***',$param['w_choices_value']);
|
| 2085 |
+
|
| 2086 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
| 2087 |
+
|
| 2088 |
+
}
|
| 2089 |
+
|
| 2090 |
+
|
| 2091 |
+
|
| 2092 |
+
$is_other=true;
|
| 2093 |
+
|
| 2094 |
+
|
| 2095 |
+
|
| 2096 |
+
foreach($param['w_choices'] as $key => $choice)
|
| 2097 |
+
|
| 2098 |
+
{
|
| 2099 |
+
|
| 2100 |
+
$choice_value = isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice;
|
| 2101 |
+
|
| 2102 |
+
if($choice_value==$element_value)
|
| 2103 |
+
|
| 2104 |
+
{
|
| 2105 |
+
|
| 2106 |
+
$is_other=false;
|
| 2107 |
+
|
| 2108 |
+
break;
|
| 2109 |
+
|
| 2110 |
+
}
|
| 2111 |
+
|
| 2112 |
+
}
|
| 2113 |
+
|
| 2114 |
+
|
| 2115 |
+
|
| 2116 |
+
$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>';
|
| 2117 |
+
|
| 2118 |
+
|
| 2119 |
+
|
| 2120 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
| 2121 |
+
|
| 2122 |
+
|
| 2123 |
+
|
| 2124 |
+
$rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
| 2125 |
+
|
| 2126 |
+
$total_queries =0;
|
| 2127 |
+
|
| 2128 |
+
foreach($param['w_choices'] as $key => $choice)
|
| 2129 |
+
|
| 2130 |
+
{
|
| 2131 |
+
|
| 2132 |
+
$key1 = $key + $total_queries;
|
| 2133 |
+
|
| 2134 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
| 2135 |
+
|
| 2136 |
+
{
|
| 2137 |
+
|
| 2138 |
+
$choices_labels =array();
|
| 2139 |
+
$choices_values =array();
|
| 2140 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
| 2141 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
| 2142 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
| 2143 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
| 2144 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
| 2145 |
+
|
| 2146 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
| 2147 |
+
|
| 2148 |
+
$table = $label_table_and_column[0];
|
| 2149 |
+
|
| 2150 |
+
$label_column = $label_table_and_column[1];
|
| 2151 |
+
|
| 2152 |
+
if($label_column) {
|
| 2153 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
| 2154 |
+
}
|
| 2155 |
+
|
| 2156 |
+
|
| 2157 |
+
|
| 2158 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_value'][$key]));
|
| 2159 |
+
|
| 2160 |
+
$value_column = $value_table_and_column[1];
|
| 2161 |
+
|
| 2162 |
+
|
| 2163 |
+
|
| 2164 |
+
if($value_column) {
|
| 2165 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
| 2166 |
+
}
|
| 2167 |
+
|
| 2168 |
+
|
| 2169 |
+
|
| 2170 |
+
$columns_count_radio = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
| 2171 |
+
|
| 2172 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
| 2173 |
+
|
| 2174 |
+
{
|
| 2175 |
+
|
| 2176 |
+
$total_queries = $total_queries + $columns_count_radio-1;
|
| 2177 |
+
|
| 2178 |
+
|
| 2179 |
+
|
| 2180 |
+
for($k=0; $k<$columns_count_radio; $k++)
|
| 2181 |
+
|
| 2182 |
+
{
|
| 2183 |
+
|
| 2184 |
+
$choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
|
| 2185 |
+
|
| 2186 |
+
$choice_value = isset($choices_values[$k]) ? $choices_values[$k] : $choice_label;
|
| 2187 |
+
|
| 2188 |
+
|
| 2189 |
+
|
| 2190 |
+
if(($key1+$k)%$param['w_rowcol']==0 && ($key1+$k)>0)
|
| 2191 |
+
|
| 2192 |
+
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
| 2193 |
+
|
| 2194 |
+
|
| 2195 |
+
|
| 2196 |
+
$checked =($choice_value==$element_value ? 'checked="checked"' : '');
|
| 2197 |
+
|
| 2198 |
+
if($choice_value==$element_value)
|
| 2199 |
+
|
| 2200 |
+
$is_other=false;
|
| 2201 |
+
|
| 2202 |
+
|
| 2203 |
+
|
| 2204 |
+
$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>';
|
| 2205 |
+
|
| 2206 |
+
|
| 2207 |
+
|
| 2208 |
+
}
|
| 2209 |
+
|
| 2210 |
+
}
|
| 2211 |
+
|
| 2212 |
+
}
|
| 2213 |
+
|
| 2214 |
+
else
|
| 2215 |
+
|
| 2216 |
+
{
|
| 2217 |
+
|
| 2218 |
+
if($key1%$param['w_rowcol']==0 && $key1>0)
|
| 2219 |
+
|
| 2220 |
+
$rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
|
| 2221 |
+
|
| 2222 |
+
|
| 2223 |
+
|
| 2224 |
+
$checked =($choice==$element_value ? 'checked="checked"' : '');
|
| 2225 |
+
|
| 2226 |
+
if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key && $is_other==true && $element_value!='')
|
| 2227 |
+
|
| 2228 |
+
$checked = 'checked="checked"';
|
| 2229 |
+
|
| 2230 |
+
$choice_value = isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice;
|
| 2231 |
+
|
| 2232 |
+
|
| 2233 |
+
|
| 2234 |
+
$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>';
|
| 2235 |
+
|
| 2236 |
+
|
| 2237 |
+
|
| 2238 |
+
$param['w_allow_other_num'] = $param['w_allow_other_num']==$key ? $key1 : $param['w_allow_other_num'];
|
| 2239 |
+
|
| 2240 |
+
}
|
| 2241 |
+
|
| 2242 |
+
}
|
| 2243 |
+
|
| 2244 |
+
$rep.='</div>';
|
| 2245 |
+
|
| 2246 |
+
|
| 2247 |
+
|
| 2248 |
+
$rep.='</div></div>';
|
| 2249 |
+
|
| 2250 |
+
|
| 2251 |
+
|
| 2252 |
+
|
| 2253 |
+
|
| 2254 |
+
if($is_other && $element_value!='')
|
| 2255 |
+
|
| 2256 |
+
$onload_js .='show_other_input("wdform_'.$id1.'","'.$form_id.'"); jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val("'.$element_value.'");';
|
| 2257 |
+
|
| 2258 |
+
|
| 2259 |
+
|
| 2260 |
+
$onsubmit_js.='
|
| 2261 |
+
|
| 2262 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other'.$form_id.'\" value = \"'.$param['w_allow_other'].'\" />").appendTo("#form'.$form_id.'");
|
| 2263 |
+
|
| 2264 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other_num'.$form_id.'\" value = \"'.$param['w_allow_other_num'].'\" />").appendTo("#adminForm");
|
| 2265 |
+
|
| 2266 |
+
';
|
| 2267 |
+
|
| 2268 |
+
|
| 2269 |
+
|
| 2270 |
+
break;
|
| 2271 |
+
|
| 2272 |
+
}
|
| 2273 |
+
|
| 2274 |
+
case 'type_own_select':
|
| 2275 |
+
|
| 2276 |
+
{
|
| 2277 |
+
|
| 2278 |
+
|
| 2279 |
+
|
| 2280 |
+
$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');
|
| 2281 |
+
|
| 2282 |
+
$temp=$params;
|
| 2283 |
+
|
| 2284 |
+
if(strpos($temp, 'w_choices_value') > -1)
|
| 2285 |
+
|
| 2286 |
+
$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');
|
| 2287 |
+
|
| 2288 |
+
|
| 2289 |
+
|
| 2290 |
+
foreach($params_names as $params_name )
|
| 2291 |
+
|
| 2292 |
+
{
|
| 2293 |
+
|
| 2294 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 2295 |
+
|
| 2296 |
+
$param[$params_name] = $temp[0];
|
| 2297 |
+
|
| 2298 |
+
$temp=$temp[1];
|
| 2299 |
+
|
| 2300 |
+
}
|
| 2301 |
+
|
| 2302 |
+
|
| 2303 |
+
|
| 2304 |
+
|
| 2305 |
+
|
| 2306 |
+
if($temp)
|
| 2307 |
+
|
| 2308 |
+
{
|
| 2309 |
+
|
| 2310 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 2311 |
+
|
| 2312 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 2313 |
+
|
| 2314 |
+
foreach($attrs as $attr)
|
| 2315 |
+
|
| 2316 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 2317 |
+
|
| 2318 |
+
}
|
| 2319 |
+
|
| 2320 |
+
|
| 2321 |
+
|
| 2322 |
+
|
| 2323 |
+
|
| 2324 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
| 2325 |
+
|
| 2326 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
| 2327 |
+
|
| 2328 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
| 2329 |
+
|
| 2330 |
+
|
| 2331 |
+
|
| 2332 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
| 2333 |
+
|
| 2334 |
+
$param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
|
| 2335 |
+
|
| 2336 |
+
if(isset($param['w_choices_value']))
|
| 2337 |
+
|
| 2338 |
+
{
|
| 2339 |
+
|
| 2340 |
+
$param['w_choices_value'] = explode('***',$param['w_choices_value']);
|
| 2341 |
+
|
| 2342 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
| 2343 |
+
|
| 2344 |
+
}
|
| 2345 |
+
|
| 2346 |
+
|
| 2347 |
+
|
| 2348 |
+
if(!isset($param['w_value_disabled']))
|
| 2349 |
+
|
| 2350 |
+
$param['w_value_disabled'] = 'no';
|
| 2351 |
+
|
| 2352 |
+
|
| 2353 |
+
|
| 2354 |
+
$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>';
|
| 2355 |
+
|
| 2356 |
+
|
| 2357 |
+
|
| 2358 |
+
$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'].'>';
|
| 2359 |
+
|
| 2360 |
+
foreach($param['w_choices'] as $key => $choice)
|
| 2361 |
+
|
| 2362 |
+
{
|
| 2363 |
+
|
| 2364 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
| 2365 |
+
|
| 2366 |
+
{
|
| 2367 |
+
|
| 2368 |
+
$choices_labels =array();
|
| 2369 |
+
$choices_values = array();
|
| 2370 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
| 2371 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
| 2372 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
| 2373 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
| 2374 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
| 2375 |
+
|
| 2376 |
+
|
| 2377 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
| 2378 |
+
|
| 2379 |
+
$table = $label_table_and_column[0];
|
| 2380 |
+
|
| 2381 |
+
$label_column = $label_table_and_column[1];
|
| 2382 |
+
|
| 2383 |
+
if($label_column)
|
| 2384 |
+
|
| 2385 |
+
{
|
| 2386 |
+
|
| 2387 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
| 2388 |
+
|
| 2389 |
+
}
|
| 2390 |
+
|
| 2391 |
+
|
| 2392 |
+
|
| 2393 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_value'][$key]));
|
| 2394 |
+
|
| 2395 |
+
$value_column = $param['w_choices_disabled'][$key]=="true" ? '' : $value_table_and_column[1];
|
| 2396 |
+
|
| 2397 |
+
|
| 2398 |
+
|
| 2399 |
+
if($value_column)
|
| 2400 |
+
|
| 2401 |
+
{
|
| 2402 |
+
|
| 2403 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
| 2404 |
+
|
| 2405 |
+
}
|
| 2406 |
+
|
| 2407 |
+
|
| 2408 |
+
|
| 2409 |
+
$columns_count = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
| 2410 |
+
|
| 2411 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
| 2412 |
+
|
| 2413 |
+
for($k=0; $k<$columns_count; $k++)
|
| 2414 |
+
|
| 2415 |
+
{
|
| 2416 |
+
|
| 2417 |
+
$choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
|
| 2418 |
+
|
| 2419 |
+
$choice_value = isset($choices_values[$k]) ? $choices_values[$k] : ($param['w_choices_disabled'][$key]=="true" ? '' : $choice_label);
|
| 2420 |
+
|
| 2421 |
+
|
| 2422 |
+
|
| 2423 |
+
$selected=($element_value && htmlspecialchars($choice_value)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
|
| 2424 |
+
|
| 2425 |
+
|
| 2426 |
+
|
| 2427 |
+
$rep.='<option value="'.htmlspecialchars($choice_value).'" '.$selected.'>'.$choice_label.'</option>';
|
| 2428 |
+
|
| 2429 |
+
|
| 2430 |
+
|
| 2431 |
+
}
|
| 2432 |
+
|
| 2433 |
+
}
|
| 2434 |
+
|
| 2435 |
+
else
|
| 2436 |
+
|
| 2437 |
+
{
|
| 2438 |
+
|
| 2439 |
+
$choice_value = $param['w_choices_disabled'][$key]=="true" ? '' : (isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice);
|
| 2440 |
+
|
| 2441 |
+
|
| 2442 |
+
|
| 2443 |
+
$selected=($element_value && htmlspecialchars($choice_value)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
|
| 2444 |
+
|
| 2445 |
+
|
| 2446 |
+
|
| 2447 |
+
$rep.='<option value="'.htmlspecialchars($choice_value).'" '.$selected.'>'.$choice.'</option>';
|
| 2448 |
+
|
| 2449 |
+
}
|
| 2450 |
+
|
| 2451 |
+
}
|
| 2452 |
+
|
| 2453 |
+
$rep.='</select></div></div>';
|
| 2454 |
+
|
| 2455 |
+
|
| 2456 |
+
|
| 2457 |
+
|
| 2458 |
+
|
| 2459 |
+
break;
|
| 2460 |
+
|
| 2461 |
+
}
|
| 2462 |
+
|
| 2463 |
+
case 'type_country': {
|
| 2464 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_size','w_countries','w_required','w_class');
|
| 2465 |
+
$temp=$params;
|
| 2466 |
+
foreach($params_names as $params_name ) {
|
| 2467 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 2468 |
+
$param[$params_name] = $temp[0];
|
| 2469 |
+
$temp=$temp[1];
|
| 2470 |
+
}
|
| 2471 |
+
|
| 2472 |
+
if($temp) {
|
| 2473 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 2474 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 2475 |
+
foreach($attrs as $attr)
|
| 2476 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
| 2477 |
+
}
|
| 2478 |
+
|
| 2479 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
| 2480 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 2481 |
+
|
| 2482 |
+
$param['w_countries'] = explode('***',$param['w_countries']);
|
| 2483 |
+
|
| 2484 |
+
$selected='';
|
| 2485 |
+
|
| 2486 |
+
$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>';
|
| 2487 |
+
|
| 2488 |
+
$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'].'>';
|
| 2489 |
+
foreach($param['w_countries'] as $key => $choice) {
|
| 2490 |
+
|
| 2491 |
+
$selected=(htmlspecialchars($choice)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
|
| 2492 |
+
|
| 2493 |
+
$choice_value=$choice;
|
| 2494 |
+
$rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice.'</option>';
|
| 2495 |
+
}
|
| 2496 |
+
$rep.='</select></div></div>';
|
| 2497 |
+
|
| 2498 |
+
break;
|
| 2499 |
+
}
|
| 2500 |
+
|
| 2501 |
+
case 'type_time': {
|
| 2502 |
+
if($element_value =='')
|
| 2503 |
+
$element_value = ':';
|
| 2504 |
+
|
| 2505 |
+
$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');
|
| 2506 |
+
$temp=$params;
|
| 2507 |
+
|
| 2508 |
+
foreach($params_names as $params_name ) {
|
| 2509 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 2510 |
+
$param[$params_name] = $temp[0];
|
| 2511 |
+
$temp=$temp[1];
|
| 2512 |
+
}
|
| 2513 |
+
|
| 2514 |
+
if($temp) {
|
| 2515 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 2516 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 2517 |
+
foreach($attrs as $attr)
|
| 2518 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 2519 |
+
}
|
| 2520 |
+
|
| 2521 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 2522 |
+
|
| 2523 |
+
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
| 2524 |
+
$element_value = explode(':',$element_value);
|
| 2525 |
+
|
| 2526 |
+
|
| 2527 |
+
$w_sec = '';
|
| 2528 |
+
$w_sec_label='';
|
| 2529 |
+
|
| 2530 |
+
if($param['w_sec']=='1') {
|
| 2531 |
+
$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>';
|
| 2532 |
+
|
| 2533 |
+
$w_sec_label='<div style="display: table-cell;"></div><div style="display: table-cell;"><label class="mini_label">'.$w_mini_labels[2].'</label></div>';
|
| 2534 |
+
}
|
| 2535 |
+
|
| 2536 |
+
|
| 2537 |
+
if($param['w_time_type']=='12') {
|
| 2538 |
+
if(strpos($element_value[2],'pm')!==false) {
|
| 2539 |
+
$am_ = "";
|
| 2540 |
+
$pm_ = "selected=\"selected\"";
|
| 2541 |
+
}
|
| 2542 |
+
else {
|
| 2543 |
+
$am_ = "selected=\"selected\"";
|
| 2544 |
+
$pm_ = "";
|
| 2545 |
+
}
|
| 2546 |
+
|
| 2547 |
+
$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>';
|
| 2548 |
+
|
| 2549 |
+
$w_time_type_label = '<div ><label class="mini_label">'.$w_mini_labels[3].'</label></div>';
|
| 2550 |
+
|
| 2551 |
+
}
|
| 2552 |
+
else {
|
| 2553 |
+
$w_time_type='';
|
| 2554 |
+
$w_time_type_label = '';
|
| 2555 |
+
}
|
| 2556 |
+
|
| 2557 |
+
$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>';
|
| 2558 |
+
|
| 2559 |
+
$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>';
|
| 2560 |
+
|
| 2561 |
+
break;
|
| 2562 |
+
}
|
| 2563 |
+
|
| 2564 |
+
case 'type_date': {
|
| 2565 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_date','w_required','w_class','w_format','w_but_val');
|
| 2566 |
+
$temp = $params;
|
| 2567 |
+
if(strpos($temp, 'w_disable_past_days') > -1)
|
| 2568 |
+
$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');
|
| 2569 |
+
|
| 2570 |
+
foreach($params_names as $params_name ) {
|
| 2571 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 2572 |
+
$param[$params_name] = $temp[0];
|
| 2573 |
+
$temp=$temp[1];
|
| 2574 |
+
}
|
| 2575 |
+
|
| 2576 |
+
if($temp) {
|
| 2577 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 2578 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 2579 |
+
foreach($attrs as $attr)
|
| 2580 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 2581 |
+
}
|
| 2582 |
+
|
| 2583 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 2584 |
+
|
| 2585 |
+
$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>';
|
| 2586 |
+
|
| 2587 |
+
$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>';
|
| 2588 |
+
|
| 2589 |
+
|
| 2590 |
+
// $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});';
|
| 2591 |
+
|
| 2592 |
+
break;
|
| 2593 |
+
}
|
| 2594 |
+
|
| 2595 |
+
case 'type_date_fields': {
|
| 2596 |
+
if($element_value=='')
|
| 2597 |
+
$element_value='--';
|
| 2598 |
+
|
| 2599 |
+
$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');
|
| 2600 |
+
|
| 2601 |
+
$temp=$params;
|
| 2602 |
+
|
| 2603 |
+
foreach($params_names as $params_name ) {
|
| 2604 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 2605 |
+
$param[$params_name] = $temp[0];
|
| 2606 |
+
$temp=$temp[1];
|
| 2607 |
+
}
|
| 2608 |
+
|
| 2609 |
+
|
| 2610 |
+
if($temp) {
|
| 2611 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 2612 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 2613 |
+
foreach($attrs as $attr)
|
| 2614 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 2615 |
+
}
|
| 2616 |
+
|
| 2617 |
+
$element_value = explode('-',$element_value);
|
| 2618 |
+
|
| 2619 |
+
$param['w_day'] = (isset($_POST['wdform_'.$id1."_day".$form_id]) ? esc_html(stripslashes( $_POST['wdform_'.$id1."_day".$form_id])) : $param['w_day']);
|
| 2620 |
+
$param['w_month'] = (isset($_POST['wdform_'.$id1."_month".$form_id]) ? esc_html(stripslashes( $_POST['wdform_'.$id1."_month".$form_id])) : $element_value[1]);//??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
|
| 2621 |
+
$param['w_year'] = (isset($_POST['wdform_'.$id1."w_year".$form_id]) ? esc_html(stripslashes( $_POST['wdform_'.$id1."_year".$form_id])) : $param['w_year']);
|
| 2622 |
+
|
| 2623 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 2624 |
+
|
| 2625 |
+
if($param['w_day_type']=="SELECT") {
|
| 2626 |
+
|
| 2627 |
+
$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>';
|
| 2628 |
+
|
| 2629 |
+
for($k=1; $k<=31; $k++) {
|
| 2630 |
+
|
| 2631 |
+
if($k<10) {
|
| 2632 |
+
if($element_value[0]=='0'.$k)
|
| 2633 |
+
$selected = "selected=\"selected\"";
|
| 2634 |
+
else
|
| 2635 |
+
$selected = "";
|
| 2636 |
+
|
| 2637 |
+
$w_day_type .= '<option value="0'.$k.'" '.$selected.'>0'.$k.'</option>';
|
| 2638 |
+
}
|
| 2639 |
+
else {
|
| 2640 |
+
if($element_value[0]==''.$k)
|
| 2641 |
+
$selected = "selected=\"selected\"";
|
| 2642 |
+
else
|
| 2643 |
+
$selected = "";
|
| 2644 |
+
|
| 2645 |
+
$w_day_type .= '<option value="'.$k.'" '.$selected.'>'.$k.'</option>';
|
| 2646 |
+
}
|
| 2647 |
+
|
| 2648 |
+
}
|
| 2649 |
+
$w_day_type .= '</select>';
|
| 2650 |
+
|
| 2651 |
+
}
|
| 2652 |
+
else {
|
| 2653 |
+
$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'].'>';
|
| 2654 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_day'.$form_id.'").blur(function() {if (jQuery(this).val()=="0") jQuery(this).val(""); else add_0(this)});';
|
| 2655 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_day'.$form_id.'").keypress(function() {return check_day(event, this)});';
|
| 2656 |
+
}
|
| 2657 |
+
|
| 2658 |
+
|
| 2659 |
+
if($param['w_month_type']=="SELECT") {
|
| 2660 |
+
|
| 2661 |
+
$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>';
|
| 2662 |
+
}
|
| 2663 |
+
else {
|
| 2664 |
+
$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'].'>';
|
| 2665 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_month'.$form_id.'").blur(function() {if (jQuery(this).val()=="0") jQuery(this).val(""); else add_0(this)});';
|
| 2666 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_month'.$form_id.'").keypress(function() {return check_month(event, this)});';
|
| 2667 |
+
}
|
| 2668 |
+
|
| 2669 |
+
|
| 2670 |
+
if($param['w_year_type']=="SELECT" ) {
|
| 2671 |
+
$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>';
|
| 2672 |
+
|
| 2673 |
+
for($k=$param['w_to']; $k>=$param['w_from']; $k--) {
|
| 2674 |
+
if($element_value[2]==$k)
|
| 2675 |
+
$selected = "selected=\"selected\"";
|
| 2676 |
+
else
|
| 2677 |
+
$selected = "";
|
| 2678 |
+
|
| 2679 |
+
$w_year_type .= '<option value="'.$k.'" '.$selected.'>'.$k.'</option>';
|
| 2680 |
+
}
|
| 2681 |
+
$w_year_type .= '</select>';
|
| 2682 |
+
}
|
| 2683 |
+
else {
|
| 2684 |
+
$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'].'>';
|
| 2685 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").blur(function() {check_year2(this)});';
|
| 2686 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").keypress(function() {return check_year1(event, this)});';
|
| 2687 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").change(function() {change_year(this)});';
|
| 2688 |
+
}
|
| 2689 |
+
|
| 2690 |
+
$rep ='<div type="type_date_fields" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 2691 |
+
|
| 2692 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';"><div style="display: table;"><div style="display: table-row;"><div style="display: table-cell;">'.$w_day_type.'</div><div style="display: table-cell;"><span class="wdform_separator">'.$param['w_divider'].'</span></div><div style="display: table-cell;">'.$w_month_type.'</div><div style="display: table-cell;"><span class="wdform_separator">'.$param['w_divider'].'</span></div><div style="display: table-cell;">'.$w_year_type.'</div></div><div style="display: table-row;"><div style="display: table-cell;"><label class="mini_label">'.$param['w_day_label'].'</label></div><div style="display: table-cell;"></div><div style="display: table-cell;"><label class="mini_label" >'.$param['w_month_label'].'</label></div><div style="display: table-cell;"></div><div style="display: table-cell;"><label class="mini_label">'.$param['w_year_label'].'</label></div></div></div></div></div>';
|
| 2693 |
+
|
| 2694 |
+
break;
|
| 2695 |
+
}
|
| 2696 |
+
|
| 2697 |
+
|
| 2698 |
+
case 'type_hidden': {
|
| 2699 |
+
$params_names=array('w_name','w_value');
|
| 2700 |
+
$temp=$params;
|
| 2701 |
+
|
| 2702 |
+
foreach($params_names as $params_name ) {
|
| 2703 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 2704 |
+
$param[$params_name] = $temp[0];
|
| 2705 |
+
$temp=$temp[1];
|
| 2706 |
+
}
|
| 2707 |
+
|
| 2708 |
+
if($temp) {
|
| 2709 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 2710 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 2711 |
+
foreach($attrs as $attr)
|
| 2712 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 2713 |
+
}
|
| 2714 |
+
|
| 2715 |
+
$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>';
|
| 2716 |
+
|
| 2717 |
+
break;
|
| 2718 |
+
}
|
| 2719 |
+
|
| 2720 |
+
|
| 2721 |
+
case 'type_paypal_price': {
|
| 2722 |
+
|
| 2723 |
+
$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');
|
| 2724 |
+
$temp=$params;
|
| 2725 |
+
|
| 2726 |
+
foreach($params_names as $params_name ) {
|
| 2727 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 2728 |
+
$param[$params_name] = $temp[0];
|
| 2729 |
+
$temp=$temp[1];
|
| 2730 |
+
}
|
| 2731 |
+
|
| 2732 |
+
|
| 2733 |
+
if($temp) {
|
| 2734 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 2735 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 2736 |
+
foreach($attrs as $attr)
|
| 2737 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 2738 |
+
}
|
| 2739 |
+
|
| 2740 |
+
if (strpos($element_value,'.')!== false)
|
| 2741 |
+
$element = explode('.',$element_value);
|
| 2742 |
+
else {
|
| 2743 |
+
$element = Array();
|
| 2744 |
+
$element[0] = preg_replace("/[^0-9]/","",$element_value);
|
| 2745 |
+
$element[1] = '';
|
| 2746 |
+
}
|
| 2747 |
+
|
| 2748 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 2749 |
+
|
| 2750 |
+
$hide_cents = ($param['w_hide_cents']=="yes" ? "none;" : "table-cell;");
|
| 2751 |
+
|
| 2752 |
+
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
| 2753 |
+
|
| 2754 |
+
$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>';
|
| 2755 |
+
|
| 2756 |
+
$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>';
|
| 2757 |
+
|
| 2758 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_element_cents'.$form_id.'").blur(function() {add_0(this)});';
|
| 2759 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_element_cents'.$form_id.'").keypress(function() {return check_isnum_interval(event,this,0,99)});';
|
| 2760 |
+
|
| 2761 |
+
break;
|
| 2762 |
+
}
|
| 2763 |
+
|
| 2764 |
+
case 'type_paypal_select':
|
| 2765 |
+
|
| 2766 |
+
{
|
| 2767 |
+
|
| 2768 |
+
|
| 2769 |
+
|
| 2770 |
+
if($element_value=='')
|
| 2771 |
+
|
| 2772 |
+
$element_value = ' :';
|
| 2773 |
+
|
| 2774 |
+
|
| 2775 |
+
|
| 2776 |
+
$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');
|
| 2777 |
+
|
| 2778 |
+
$temp=$params;
|
| 2779 |
+
|
| 2780 |
+
|
| 2781 |
+
|
| 2782 |
+
if(strpos($temp, 'w_choices_params') > -1)
|
| 2783 |
+
|
| 2784 |
+
$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');
|
| 2785 |
+
|
| 2786 |
+
|
| 2787 |
+
|
| 2788 |
+
foreach($params_names as $params_name )
|
| 2789 |
+
|
| 2790 |
+
{
|
| 2791 |
+
|
| 2792 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 2793 |
+
|
| 2794 |
+
$param[$params_name] = $temp[0];
|
| 2795 |
+
|
| 2796 |
+
$temp=$temp[1];
|
| 2797 |
+
|
| 2798 |
+
}
|
| 2799 |
+
|
| 2800 |
+
|
| 2801 |
+
|
| 2802 |
+
|
| 2803 |
+
|
| 2804 |
+
if($temp)
|
| 2805 |
+
|
| 2806 |
+
{
|
| 2807 |
+
|
| 2808 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 2809 |
+
|
| 2810 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 2811 |
+
|
| 2812 |
+
foreach($attrs as $attr)
|
| 2813 |
+
|
| 2814 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 2815 |
+
|
| 2816 |
+
}
|
| 2817 |
+
|
| 2818 |
+
|
| 2819 |
+
|
| 2820 |
+
|
| 2821 |
+
|
| 2822 |
+
$wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
|
| 2823 |
+
|
| 2824 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
| 2825 |
+
|
| 2826 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
| 2827 |
+
|
| 2828 |
+
|
| 2829 |
+
|
| 2830 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
| 2831 |
+
|
| 2832 |
+
$param['w_choices_price'] = explode('***',$param['w_choices_price']);
|
| 2833 |
+
|
| 2834 |
+
|
| 2835 |
+
|
| 2836 |
+
$param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
|
| 2837 |
+
|
| 2838 |
+
$param['w_property'] = explode('***',$param['w_property']);
|
| 2839 |
+
|
| 2840 |
+
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
| 2841 |
+
|
| 2842 |
+
if(isset($param['w_choices_params']))
|
| 2843 |
+
|
| 2844 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
| 2845 |
+
|
| 2846 |
+
|
| 2847 |
+
|
| 2848 |
+
|
| 2849 |
+
|
| 2850 |
+
if(strpos($element_value,'***br***') !== false)
|
| 2851 |
+
|
| 2852 |
+
{
|
| 2853 |
+
|
| 2854 |
+
$element_value = explode('***br***',$element_value);
|
| 2855 |
+
|
| 2856 |
+
if(count($element_value)==2)
|
| 2857 |
+
|
| 2858 |
+
{
|
| 2859 |
+
|
| 2860 |
+
if(strpos($element_value[1],'***quantity***') !== false)
|
| 2861 |
+
|
| 2862 |
+
{
|
| 2863 |
+
|
| 2864 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
| 2865 |
+
|
| 2866 |
+
$quantity_value = $quantity_value[1];
|
| 2867 |
+
|
| 2868 |
+
$property_of_select = '';
|
| 2869 |
+
|
| 2870 |
+
}
|
| 2871 |
+
|
| 2872 |
+
else
|
| 2873 |
+
|
| 2874 |
+
{
|
| 2875 |
+
|
| 2876 |
+
$quantity_value = '' ;
|
| 2877 |
+
|
| 2878 |
+
$property_of_select = explode(': ',str_replace("***property***","",$element_value[1]));
|
| 2879 |
+
|
| 2880 |
+
$property_of_select = $property_of_select[1];
|
| 2881 |
+
|
| 2882 |
+
}
|
| 2883 |
+
|
| 2884 |
+
|
| 2885 |
+
|
| 2886 |
+
$element_value = explode(' :',$element_value[0]);
|
| 2887 |
+
|
| 2888 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
| 2889 |
+
|
| 2890 |
+
}
|
| 2891 |
+
|
| 2892 |
+
else
|
| 2893 |
+
|
| 2894 |
+
{
|
| 2895 |
+
|
| 2896 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
| 2897 |
+
|
| 2898 |
+
$quantity_value = $quantity_value[1];
|
| 2899 |
+
|
| 2900 |
+
$property_of_select = explode(': ',str_replace("***property***","",$element_value[2]));
|
| 2901 |
+
|
| 2902 |
+
$property_of_select = $property_of_select[1];
|
| 2903 |
+
|
| 2904 |
+
$element_value = explode(' :',$element_value[0]);
|
| 2905 |
+
|
| 2906 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
| 2907 |
+
|
| 2908 |
+
}
|
| 2909 |
+
|
| 2910 |
+
}
|
| 2911 |
+
|
| 2912 |
+
else
|
| 2913 |
+
|
| 2914 |
+
{
|
| 2915 |
+
|
| 2916 |
+
$element_value = explode(' :',$element_value);
|
| 2917 |
+
|
| 2918 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
| 2919 |
+
|
| 2920 |
+
$quantity_value = '';
|
| 2921 |
+
|
| 2922 |
+
$property_of_select = '';
|
| 2923 |
+
|
| 2924 |
+
}
|
| 2925 |
+
|
| 2926 |
+
|
| 2927 |
+
|
| 2928 |
+
|
| 2929 |
+
|
| 2930 |
+
$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>';
|
| 2931 |
+
|
| 2932 |
+
|
| 2933 |
+
|
| 2934 |
+
$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'].'>';
|
| 2935 |
+
|
| 2936 |
+
foreach($param['w_choices'] as $key => $choice)
|
| 2937 |
+
|
| 2938 |
+
{
|
| 2939 |
+
|
| 2940 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
| 2941 |
+
|
| 2942 |
+
{
|
| 2943 |
+
|
| 2944 |
+
$choices_labels =array();
|
| 2945 |
+
$choices_values =array();
|
| 2946 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
| 2947 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
| 2948 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
| 2949 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
| 2950 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
| 2951 |
+
|
| 2952 |
+
|
| 2953 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
| 2954 |
+
|
| 2955 |
+
$table = $label_table_and_column[0];
|
| 2956 |
+
|
| 2957 |
+
$label_column = $label_table_and_column[1];
|
| 2958 |
+
|
| 2959 |
+
if($label_column)
|
| 2960 |
+
|
| 2961 |
+
{
|
| 2962 |
+
|
| 2963 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
| 2964 |
+
|
| 2965 |
+
}
|
| 2966 |
+
|
| 2967 |
+
|
| 2968 |
+
|
| 2969 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
|
| 2970 |
+
|
| 2971 |
+
$value_column = $param['w_choices_disabled'][$key]=="true" ? '' : $value_table_and_column[1];
|
| 2972 |
+
|
| 2973 |
+
|
| 2974 |
+
|
| 2975 |
+
if($value_column)
|
| 2976 |
+
|
| 2977 |
+
{
|
| 2978 |
+
|
| 2979 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
| 2980 |
+
|
| 2981 |
+
}
|
| 2982 |
+
|
| 2983 |
+
|
| 2984 |
+
|
| 2985 |
+
$columns_count = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
| 2986 |
+
|
| 2987 |
+
|
| 2988 |
+
|
| 2989 |
+
for($k=0; $k<$columns_count; $k++)
|
| 2990 |
+
|
| 2991 |
+
{
|
| 2992 |
+
|
| 2993 |
+
$choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
|
| 2994 |
+
|
| 2995 |
+
$choice_value = isset($choices_values[$k]) ? (float)$choices_values[$k] : '';
|
| 2996 |
+
|
| 2997 |
+
|
| 2998 |
+
|
| 2999 |
+
if($element_value[0] == $choice_label && $choice_value == $choise_value)
|
| 3000 |
+
|
| 3001 |
+
$selected = 'selected="selected"';
|
| 3002 |
+
|
| 3003 |
+
else
|
| 3004 |
+
|
| 3005 |
+
$selected = '';
|
| 3006 |
+
|
| 3007 |
+
|
| 3008 |
+
|
| 3009 |
+
$rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice_label.'</option>';
|
| 3010 |
+
|
| 3011 |
+
}
|
| 3012 |
+
|
| 3013 |
+
}
|
| 3014 |
+
|
| 3015 |
+
else
|
| 3016 |
+
|
| 3017 |
+
{
|
| 3018 |
+
|
| 3019 |
+
if($param['w_choices_disabled'][$key]=="true")
|
| 3020 |
+
|
| 3021 |
+
$choice_value='';
|
| 3022 |
+
|
| 3023 |
+
else
|
| 3024 |
+
|
| 3025 |
+
$choice_value=$param['w_choices_price'][$key];
|
| 3026 |
+
|
| 3027 |
+
|
| 3028 |
+
|
| 3029 |
+
if($element_value[0] == $choice && $param['w_choices_price'][$key] == $choise_value)
|
| 3030 |
+
|
| 3031 |
+
$selected = 'selected="selected"';
|
| 3032 |
+
|
| 3033 |
+
else
|
| 3034 |
+
|
| 3035 |
+
$selected = '';
|
| 3036 |
+
|
| 3037 |
+
|
| 3038 |
+
|
| 3039 |
+
$rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice.'</option>';
|
| 3040 |
+
|
| 3041 |
+
|
| 3042 |
+
|
| 3043 |
+
}
|
| 3044 |
+
|
| 3045 |
+
}
|
| 3046 |
+
|
| 3047 |
+
$rep.='</select><div id="wdform_'.$id1.'_div'.$form_id.'">';
|
| 3048 |
+
|
| 3049 |
+
if($param['w_quantity']=="yes")
|
| 3050 |
+
|
| 3051 |
+
{
|
| 3052 |
+
|
| 3053 |
+
$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>';
|
| 3054 |
+
|
| 3055 |
+
}
|
| 3056 |
+
|
| 3057 |
+
if($param['w_property'][0])
|
| 3058 |
+
|
| 3059 |
+
foreach($param['w_property'] as $key => $property)
|
| 3060 |
+
|
| 3061 |
+
{
|
| 3062 |
+
|
| 3063 |
+
|
| 3064 |
+
|
| 3065 |
+
$rep.='
|
| 3066 |
+
|
| 3067 |
+
<div id="wdform_'.$id1.'_property_'.$key.'" class="paypal-property">
|
| 3068 |
+
|
| 3069 |
+
<div style="width:150px; display:inline-block;">
|
| 3070 |
+
|
| 3071 |
+
<label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
|
| 3072 |
+
|
| 3073 |
+
<select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
|
| 3074 |
+
|
| 3075 |
+
$param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
|
| 3076 |
+
|
| 3077 |
+
$param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
|
| 3078 |
+
|
| 3079 |
+
foreach($param['w_property_values'][$key] as $subkey => $property_value)
|
| 3080 |
+
|
| 3081 |
+
{
|
| 3082 |
+
|
| 3083 |
+
$rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_select==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
|
| 3084 |
+
|
| 3085 |
+
}
|
| 3086 |
+
|
| 3087 |
+
$rep.='</select></div></div>';
|
| 3088 |
+
|
| 3089 |
+
}
|
| 3090 |
+
|
| 3091 |
+
|
| 3092 |
+
|
| 3093 |
+
$rep.='</div></div></div>';
|
| 3094 |
+
|
| 3095 |
+
|
| 3096 |
+
|
| 3097 |
+
|
| 3098 |
+
|
| 3099 |
+
$onsubmit_js.='
|
| 3100 |
+
|
| 3101 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(jQuery("#wdform_'.$id1.'_element'.$form_id.' option:selected").text()).appendTo("#adminForm");
|
| 3102 |
+
|
| 3103 |
+
';
|
| 3104 |
+
|
| 3105 |
+
$onsubmit_js.='
|
| 3106 |
+
|
| 3107 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("Quantity").appendTo("#adminForm");
|
| 3108 |
+
|
| 3109 |
+
';
|
| 3110 |
+
|
| 3111 |
+
$onsubmit_js.='
|
| 3112 |
+
|
| 3113 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.'\" />").val("'.$param['w_property'][0].'").appendTo("#adminForm");
|
| 3114 |
+
|
| 3115 |
+
';
|
| 3116 |
+
|
| 3117 |
+
|
| 3118 |
+
|
| 3119 |
+
|
| 3120 |
+
|
| 3121 |
+
break;
|
| 3122 |
+
|
| 3123 |
+
}
|
| 3124 |
+
|
| 3125 |
+
case 'type_paypal_checkbox':
|
| 3126 |
+
|
| 3127 |
+
{
|
| 3128 |
+
|
| 3129 |
+
|
| 3130 |
+
|
| 3131 |
+
if($element_value == '')
|
| 3132 |
+
|
| 3133 |
+
$element_value =' :';
|
| 3134 |
+
|
| 3135 |
+
|
| 3136 |
+
|
| 3137 |
+
$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');
|
| 3138 |
+
|
| 3139 |
+
$temp=$params;
|
| 3140 |
+
|
| 3141 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
| 3142 |
+
|
| 3143 |
+
$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');
|
| 3144 |
+
|
| 3145 |
+
foreach($params_names as $params_name )
|
| 3146 |
+
|
| 3147 |
+
{
|
| 3148 |
+
|
| 3149 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 3150 |
+
|
| 3151 |
+
$param[$params_name] = $temp[0];
|
| 3152 |
+
|
| 3153 |
+
$temp=$temp[1];
|
| 3154 |
+
|
| 3155 |
+
}
|
| 3156 |
+
|
| 3157 |
+
|
| 3158 |
+
|
| 3159 |
+
|
| 3160 |
+
|
| 3161 |
+
if($temp)
|
| 3162 |
+
|
| 3163 |
+
{
|
| 3164 |
+
|
| 3165 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 3166 |
+
|
| 3167 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 3168 |
+
|
| 3169 |
+
foreach($attrs as $attr)
|
| 3170 |
+
|
| 3171 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 3172 |
+
|
| 3173 |
+
}
|
| 3174 |
+
|
| 3175 |
+
|
| 3176 |
+
|
| 3177 |
+
|
| 3178 |
+
|
| 3179 |
+
if(!isset($param['w_field_option_pos']))
|
| 3180 |
+
|
| 3181 |
+
$param['w_field_option_pos'] = 'left';
|
| 3182 |
+
|
| 3183 |
+
|
| 3184 |
+
|
| 3185 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
| 3186 |
+
|
| 3187 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
| 3188 |
+
|
| 3189 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
| 3190 |
+
|
| 3191 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
| 3192 |
+
|
| 3193 |
+
|
| 3194 |
+
|
| 3195 |
+
|
| 3196 |
+
|
| 3197 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
| 3198 |
+
|
| 3199 |
+
$param['w_choices_price'] = explode('***',$param['w_choices_price']);
|
| 3200 |
+
|
| 3201 |
+
|
| 3202 |
+
|
| 3203 |
+
$param['w_property'] = explode('***',$param['w_property']);
|
| 3204 |
+
|
| 3205 |
+
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
| 3206 |
+
|
| 3207 |
+
if(isset($param['w_choices_params']))
|
| 3208 |
+
|
| 3209 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
| 3210 |
+
|
| 3211 |
+
|
| 3212 |
+
|
| 3213 |
+
$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>';
|
| 3214 |
+
|
| 3215 |
+
|
| 3216 |
+
|
| 3217 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
| 3218 |
+
|
| 3219 |
+
|
| 3220 |
+
|
| 3221 |
+
|
| 3222 |
+
|
| 3223 |
+
if(strpos($element_value,'***br***') !== false)
|
| 3224 |
+
|
| 3225 |
+
{
|
| 3226 |
+
|
| 3227 |
+
$element_value = explode('***br***',$element_value);
|
| 3228 |
+
|
| 3229 |
+
foreach($element_value as $key => $element)
|
| 3230 |
+
|
| 3231 |
+
{
|
| 3232 |
+
|
| 3233 |
+
|
| 3234 |
+
|
| 3235 |
+
if(strpos($element,'***quantity***') !== false)
|
| 3236 |
+
|
| 3237 |
+
{
|
| 3238 |
+
|
| 3239 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element));
|
| 3240 |
+
|
| 3241 |
+
$quantity_value = $quantity_value[1];
|
| 3242 |
+
|
| 3243 |
+
unset($element_value[$key]);
|
| 3244 |
+
|
| 3245 |
+
}
|
| 3246 |
+
|
| 3247 |
+
else
|
| 3248 |
+
|
| 3249 |
+
if(strpos($element,'***property***') !== false)
|
| 3250 |
+
|
| 3251 |
+
{
|
| 3252 |
+
|
| 3253 |
+
$property_of_check = explode(': ',str_replace("***property***","",$element));
|
| 3254 |
+
|
| 3255 |
+
$property_of_check = $property_of_check[1];
|
| 3256 |
+
|
| 3257 |
+
unset($element_value[$key]);
|
| 3258 |
+
|
| 3259 |
+
}
|
| 3260 |
+
|
| 3261 |
+
else
|
| 3262 |
+
|
| 3263 |
+
{
|
| 3264 |
+
|
| 3265 |
+
for($m=0; $m<strlen($element); $m++)
|
| 3266 |
+
|
| 3267 |
+
{
|
| 3268 |
+
|
| 3269 |
+
if(!ctype_digit($element[strlen($element)-1]))
|
| 3270 |
+
|
| 3271 |
+
$element_value[$key] = substr($element,0,-1);
|
| 3272 |
+
|
| 3273 |
+
else
|
| 3274 |
+
|
| 3275 |
+
break;
|
| 3276 |
+
|
| 3277 |
+
}
|
| 3278 |
+
|
| 3279 |
+
$quantity_value = '';
|
| 3280 |
+
|
| 3281 |
+
$property_of_check = '';
|
| 3282 |
+
|
| 3283 |
+
}
|
| 3284 |
+
|
| 3285 |
+
|
| 3286 |
+
|
| 3287 |
+
}
|
| 3288 |
+
|
| 3289 |
+
}
|
| 3290 |
+
|
| 3291 |
+
else
|
| 3292 |
+
|
| 3293 |
+
{
|
| 3294 |
+
|
| 3295 |
+
$element_value = explode(' :',$element_value);
|
| 3296 |
+
|
| 3297 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
| 3298 |
+
|
| 3299 |
+
$quantity_value = '';
|
| 3300 |
+
|
| 3301 |
+
$property_of_check = '';
|
| 3302 |
+
|
| 3303 |
+
}
|
| 3304 |
+
|
| 3305 |
+
|
| 3306 |
+
|
| 3307 |
+
$total_queries = 0;
|
| 3308 |
+
|
| 3309 |
+
foreach($param['w_choices'] as $key => $choice)
|
| 3310 |
+
|
| 3311 |
+
{
|
| 3312 |
+
|
| 3313 |
+
$key1 = $key + $total_queries;
|
| 3314 |
+
|
| 3315 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
| 3316 |
+
|
| 3317 |
+
{
|
| 3318 |
+
|
| 3319 |
+
$choices_labels = array();
|
| 3320 |
+
$choices_values = array();
|
| 3321 |
+
|
| 3322 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
| 3323 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
| 3324 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
| 3325 |
+
|
| 3326 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
| 3327 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
| 3328 |
+
|
| 3329 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
| 3330 |
+
|
| 3331 |
+
$table = $label_table_and_column[0];
|
| 3332 |
+
|
| 3333 |
+
$label_column = $label_table_and_column[1];
|
| 3334 |
+
|
| 3335 |
+
if($label_column)
|
| 3336 |
+
|
| 3337 |
+
{
|
| 3338 |
+
|
| 3339 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
| 3340 |
+
}
|
| 3341 |
+
|
| 3342 |
+
|
| 3343 |
+
|
| 3344 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
|
| 3345 |
+
|
| 3346 |
+
$value_column = $value_table_and_column[1];
|
| 3347 |
+
|
| 3348 |
+
|
| 3349 |
+
|
| 3350 |
+
if($value_column)
|
| 3351 |
+
|
| 3352 |
+
{
|
| 3353 |
+
|
| 3354 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
| 3355 |
+
|
| 3356 |
+
}
|
| 3357 |
+
|
| 3358 |
+
|
| 3359 |
+
|
| 3360 |
+
$columns_count = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
| 3361 |
+
|
| 3362 |
+
|
| 3363 |
+
|
| 3364 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
| 3365 |
+
|
| 3366 |
+
{
|
| 3367 |
+
|
| 3368 |
+
$total_queries = $total_queries + $columns_count-1;
|
| 3369 |
+
|
| 3370 |
+
|
| 3371 |
+
|
| 3372 |
+
|
| 3373 |
+
|
| 3374 |
+
for($k=0; $k<$columns_count; $k++)
|
| 3375 |
+
|
| 3376 |
+
{
|
| 3377 |
+
|
| 3378 |
+
$choice_label = isset($choices_labels) ? $choices_labels[$k] : '';
|
| 3379 |
+
|
| 3380 |
+
$choice_value = isset($choices_values) ? (float)$choices_values[$k] : '';
|
| 3381 |
+
|
| 3382 |
+
|
| 3383 |
+
|
| 3384 |
+
$checked=(in_array($choice_label.' - '.$choice_value, $element_value)=='true' ? 'checked="checked"' : '');
|
| 3385 |
+
|
| 3386 |
+
|
| 3387 |
+
|
| 3388 |
+
$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>';
|
| 3389 |
+
|
| 3390 |
+
|
| 3391 |
+
|
| 3392 |
+
|
| 3393 |
+
|
| 3394 |
+
}
|
| 3395 |
+
|
| 3396 |
+
}
|
| 3397 |
+
|
| 3398 |
+
}
|
| 3399 |
+
|
| 3400 |
+
else
|
| 3401 |
+
|
| 3402 |
+
{
|
| 3403 |
+
|
| 3404 |
+
$checked=(in_array($choice.' - '.$param['w_choices_price'][$key], $element_value)=='true' ? 'checked="checked"' : '');
|
| 3405 |
+
|
| 3406 |
+
|
| 3407 |
+
|
| 3408 |
+
$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>';
|
| 3409 |
+
|
| 3410 |
+
}
|
| 3411 |
+
|
| 3412 |
+
}
|
| 3413 |
+
|
| 3414 |
+
|
| 3415 |
+
|
| 3416 |
+
$rep.='<div id="wdform_'.$id1.'_div'.$form_id.'">';
|
| 3417 |
+
|
| 3418 |
+
if($param['w_quantity']=="yes")
|
| 3419 |
+
|
| 3420 |
+
$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>';
|
| 3421 |
+
|
| 3422 |
+
|
| 3423 |
+
|
| 3424 |
+
if($param['w_property'][0])
|
| 3425 |
+
|
| 3426 |
+
foreach($param['w_property'] as $key => $property)
|
| 3427 |
+
|
| 3428 |
+
{
|
| 3429 |
+
|
| 3430 |
+
|
| 3431 |
+
|
| 3432 |
+
$rep.='
|
| 3433 |
+
|
| 3434 |
+
<div class="paypal-property">
|
| 3435 |
+
|
| 3436 |
+
<div style="width:150px; display:inline-block;">
|
| 3437 |
+
|
| 3438 |
+
<label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
|
| 3439 |
+
|
| 3440 |
+
<select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
|
| 3441 |
+
|
| 3442 |
+
$param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
|
| 3443 |
+
|
| 3444 |
+
$param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
|
| 3445 |
+
|
| 3446 |
+
foreach($param['w_property_values'][$key] as $subkey => $property_value)
|
| 3447 |
+
|
| 3448 |
+
{
|
| 3449 |
+
|
| 3450 |
+
$rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_check==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
|
| 3451 |
+
|
| 3452 |
+
}
|
| 3453 |
+
|
| 3454 |
+
$rep.='</select></div></div>';
|
| 3455 |
+
|
| 3456 |
+
}
|
| 3457 |
+
|
| 3458 |
+
|
| 3459 |
+
|
| 3460 |
+
$rep.='</div></div></div>';
|
| 3461 |
+
|
| 3462 |
+
|
| 3463 |
+
|
| 3464 |
+
$onsubmit_js.='
|
| 3465 |
+
|
| 3466 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("Quantity").appendTo("#adminForm");
|
| 3467 |
+
|
| 3468 |
+
';
|
| 3469 |
+
|
| 3470 |
+
$onsubmit_js.='
|
| 3471 |
+
|
| 3472 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.'\" />").val("'.$param['w_property'][0].'").appendTo("#adminForm");
|
| 3473 |
+
|
| 3474 |
+
';
|
| 3475 |
+
|
| 3476 |
+
|
| 3477 |
+
|
| 3478 |
+
break;
|
| 3479 |
+
|
| 3480 |
+
}
|
| 3481 |
+
|
| 3482 |
+
case 'type_paypal_radio':
|
| 3483 |
+
|
| 3484 |
+
{
|
| 3485 |
+
|
| 3486 |
+
|
| 3487 |
+
|
| 3488 |
+
if($element_value=='')
|
| 3489 |
+
|
| 3490 |
+
$element_value = ' :';
|
| 3491 |
+
|
| 3492 |
+
|
| 3493 |
+
|
| 3494 |
+
$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');
|
| 3495 |
+
|
| 3496 |
+
$temp=$params;
|
| 3497 |
+
|
| 3498 |
+
|
| 3499 |
+
|
| 3500 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
| 3501 |
+
|
| 3502 |
+
$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');
|
| 3503 |
+
|
| 3504 |
+
|
| 3505 |
+
|
| 3506 |
+
foreach($params_names as $params_name )
|
| 3507 |
+
|
| 3508 |
+
{
|
| 3509 |
+
|
| 3510 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 3511 |
+
|
| 3512 |
+
$param[$params_name] = $temp[0];
|
| 3513 |
+
|
| 3514 |
+
$temp=$temp[1];
|
| 3515 |
+
|
| 3516 |
+
}
|
| 3517 |
+
|
| 3518 |
+
|
| 3519 |
+
|
| 3520 |
+
if($temp)
|
| 3521 |
+
|
| 3522 |
+
{
|
| 3523 |
+
|
| 3524 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 3525 |
+
|
| 3526 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 3527 |
+
|
| 3528 |
+
foreach($attrs as $attr)
|
| 3529 |
+
|
| 3530 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 3531 |
+
|
| 3532 |
+
}
|
| 3533 |
+
|
| 3534 |
+
if(!isset($param['w_field_option_pos']))
|
| 3535 |
+
|
| 3536 |
+
$param['w_field_option_pos'] = 'left';
|
| 3537 |
+
|
| 3538 |
+
|
| 3539 |
+
|
| 3540 |
+
$param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
|
| 3541 |
+
|
| 3542 |
+
$param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
|
| 3543 |
+
|
| 3544 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
| 3545 |
+
|
| 3546 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
| 3547 |
+
|
| 3548 |
+
|
| 3549 |
+
|
| 3550 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
| 3551 |
+
|
| 3552 |
+
$param['w_choices_price'] = explode('***',$param['w_choices_price']);
|
| 3553 |
+
|
| 3554 |
+
|
| 3555 |
+
|
| 3556 |
+
$param['w_property'] = explode('***',$param['w_property']);
|
| 3557 |
+
|
| 3558 |
+
$param['w_property_values'] = explode('***',$param['w_property_values']);
|
| 3559 |
+
|
| 3560 |
+
if(isset($param['w_choices_params']))
|
| 3561 |
+
|
| 3562 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
| 3563 |
+
|
| 3564 |
+
|
| 3565 |
+
|
| 3566 |
+
$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>';
|
| 3567 |
+
|
| 3568 |
+
|
| 3569 |
+
|
| 3570 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
| 3571 |
+
|
| 3572 |
+
|
| 3573 |
+
|
| 3574 |
+
if(strpos($element_value,'***br***') !== false)
|
| 3575 |
+
|
| 3576 |
+
{
|
| 3577 |
+
|
| 3578 |
+
$element_value = explode('***br***',$element_value);
|
| 3579 |
+
|
| 3580 |
+
if(count($element_value)==2)
|
| 3581 |
+
|
| 3582 |
+
{
|
| 3583 |
+
|
| 3584 |
+
if(strpos($element_value[1],'***quantity***') !== false)
|
| 3585 |
+
|
| 3586 |
+
{
|
| 3587 |
+
|
| 3588 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
| 3589 |
+
|
| 3590 |
+
$quantity_value = $quantity_value[1];
|
| 3591 |
+
|
| 3592 |
+
$property_of_radio = '';
|
| 3593 |
+
|
| 3594 |
+
}
|
| 3595 |
+
|
| 3596 |
+
else
|
| 3597 |
+
|
| 3598 |
+
{
|
| 3599 |
+
|
| 3600 |
+
$quantity_value = '' ;
|
| 3601 |
+
|
| 3602 |
+
$property_of_radio = explode(': ',str_replace("***property***","",$element_value[1]));
|
| 3603 |
+
|
| 3604 |
+
$property_of_radio = $property_of_radio[1];
|
| 3605 |
+
|
| 3606 |
+
}
|
| 3607 |
+
|
| 3608 |
+
|
| 3609 |
+
|
| 3610 |
+
$element_value = explode(' :',$element_value[0]);
|
| 3611 |
+
|
| 3612 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
| 3613 |
+
|
| 3614 |
+
}
|
| 3615 |
+
|
| 3616 |
+
else
|
| 3617 |
+
|
| 3618 |
+
{
|
| 3619 |
+
|
| 3620 |
+
$quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
|
| 3621 |
+
|
| 3622 |
+
$quantity_value = $quantity_value[1];
|
| 3623 |
+
|
| 3624 |
+
$property_of_radio = explode(': ',str_replace("***property***","",$element_value[2]));
|
| 3625 |
+
|
| 3626 |
+
$property_of_radio = $property_of_radio[1];
|
| 3627 |
+
|
| 3628 |
+
|
| 3629 |
+
|
| 3630 |
+
$element_value = explode(' :',$element_value[0]);
|
| 3631 |
+
|
| 3632 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
| 3633 |
+
|
| 3634 |
+
}
|
| 3635 |
+
|
| 3636 |
+
}
|
| 3637 |
+
|
| 3638 |
+
else
|
| 3639 |
+
|
| 3640 |
+
{
|
| 3641 |
+
|
| 3642 |
+
$element_value = explode(' :',$element_value);
|
| 3643 |
+
|
| 3644 |
+
$choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
|
| 3645 |
+
|
| 3646 |
+
$quantity_value = '';
|
| 3647 |
+
|
| 3648 |
+
$property_of_radio = '';
|
| 3649 |
+
|
| 3650 |
+
}
|
| 3651 |
+
|
| 3652 |
+
$total_queries = 0;
|
| 3653 |
+
|
| 3654 |
+
foreach($param['w_choices'] as $key => $choice)
|
| 3655 |
+
|
| 3656 |
+
{
|
| 3657 |
+
|
| 3658 |
+
$key1 = $key + $total_queries;
|
| 3659 |
+
|
| 3660 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
| 3661 |
+
|
| 3662 |
+
{
|
| 3663 |
+
|
| 3664 |
+
$choices_labels =array();
|
| 3665 |
+
$choices_values =array();
|
| 3666 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
| 3667 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
| 3668 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
| 3669 |
+
|
| 3670 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
| 3671 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
| 3672 |
+
|
| 3673 |
+
|
| 3674 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
| 3675 |
+
|
| 3676 |
+
$table = $label_table_and_column[0];
|
| 3677 |
+
|
| 3678 |
+
$label_column = $label_table_and_column[1];
|
| 3679 |
+
|
| 3680 |
+
if($label_column)
|
| 3681 |
+
|
| 3682 |
+
{
|
| 3683 |
+
|
| 3684 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
| 3685 |
+
}
|
| 3686 |
+
|
| 3687 |
+
|
| 3688 |
+
|
| 3689 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
|
| 3690 |
+
|
| 3691 |
+
$value_column = $value_table_and_column[1];
|
| 3692 |
+
|
| 3693 |
+
|
| 3694 |
+
|
| 3695 |
+
if($value_column)
|
| 3696 |
+
|
| 3697 |
+
{
|
| 3698 |
+
|
| 3699 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
| 3700 |
+
|
| 3701 |
+
}
|
| 3702 |
+
|
| 3703 |
+
|
| 3704 |
+
|
| 3705 |
+
$columns_count_radio = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
| 3706 |
+
|
| 3707 |
+
|
| 3708 |
+
|
| 3709 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
| 3710 |
+
|
| 3711 |
+
{
|
| 3712 |
+
|
| 3713 |
+
$total_queries = $total_queries + $columns_count_radio-1;
|
| 3714 |
+
|
| 3715 |
+
for($k=0; $k<$columns_count_radio; $k++)
|
| 3716 |
+
|
| 3717 |
+
{
|
| 3718 |
+
|
| 3719 |
+
$choice_label = isset($choices_labels) ? $choices_labels[$k] : '';
|
| 3720 |
+
|
| 3721 |
+
$choice_value = isset($choices_values) ? (float)$choices_values[$k] : '';
|
| 3722 |
+
|
| 3723 |
+
|
| 3724 |
+
|
| 3725 |
+
if($element_value[0] == $choice_label && $choice_value == $choise_value)
|
| 3726 |
+
|
| 3727 |
+
$checked = 'checked="checked"';
|
| 3728 |
+
|
| 3729 |
+
else
|
| 3730 |
+
|
| 3731 |
+
$checked = '';
|
| 3732 |
+
|
| 3733 |
+
|
| 3734 |
+
|
| 3735 |
+
|
| 3736 |
+
|
| 3737 |
+
$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>';
|
| 3738 |
+
|
| 3739 |
+
|
| 3740 |
+
|
| 3741 |
+
}
|
| 3742 |
+
|
| 3743 |
+
}
|
| 3744 |
+
|
| 3745 |
+
}
|
| 3746 |
+
|
| 3747 |
+
else
|
| 3748 |
+
|
| 3749 |
+
{
|
| 3750 |
+
|
| 3751 |
+
if($element_value[0] == $choice && $param['w_choices_price'][$key] == $choise_value)
|
| 3752 |
+
|
| 3753 |
+
$checked = 'checked="checked"';
|
| 3754 |
+
|
| 3755 |
+
else
|
| 3756 |
+
|
| 3757 |
+
$checked = '';
|
| 3758 |
+
|
| 3759 |
+
|
| 3760 |
+
|
| 3761 |
+
$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>';
|
| 3762 |
+
|
| 3763 |
+
}
|
| 3764 |
+
|
| 3765 |
+
|
| 3766 |
+
|
| 3767 |
+
}
|
| 3768 |
+
|
| 3769 |
+
|
| 3770 |
+
|
| 3771 |
+
$rep.='<div id="wdform_'.$id1.'_div'.$form_id.'">';
|
| 3772 |
+
|
| 3773 |
+
if($param['w_quantity']=="yes")
|
| 3774 |
+
|
| 3775 |
+
$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>';
|
| 3776 |
+
|
| 3777 |
+
|
| 3778 |
+
|
| 3779 |
+
if($param['w_property'][0])
|
| 3780 |
+
|
| 3781 |
+
foreach($param['w_property'] as $key => $property)
|
| 3782 |
+
|
| 3783 |
+
{
|
| 3784 |
+
|
| 3785 |
+
|
| 3786 |
+
|
| 3787 |
+
$rep.='
|
| 3788 |
+
|
| 3789 |
+
<div class="paypal-property">
|
| 3790 |
+
|
| 3791 |
+
<div style="width:150px; display:inline-block;">
|
| 3792 |
+
|
| 3793 |
+
<label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
|
| 3794 |
+
|
| 3795 |
+
<select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
|
| 3796 |
+
|
| 3797 |
+
$param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
|
| 3798 |
+
|
| 3799 |
+
$param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
|
| 3800 |
+
|
| 3801 |
+
foreach($param['w_property_values'][$key] as $subkey => $property_value)
|
| 3802 |
+
|
| 3803 |
+
{
|
| 3804 |
+
|
| 3805 |
+
$rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_radio==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
|
| 3806 |
+
|
| 3807 |
+
}
|
| 3808 |
+
|
| 3809 |
+
$rep.='</select></div></div>';
|
| 3810 |
+
|
| 3811 |
+
}
|
| 3812 |
+
|
| 3813 |
+
|
| 3814 |
+
|
| 3815 |
+
$rep.='</div></div></div>';
|
| 3816 |
+
|
| 3817 |
+
|
| 3818 |
+
|
| 3819 |
+
|
| 3820 |
+
|
| 3821 |
+
$onsubmit_js.='
|
| 3822 |
+
|
| 3823 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(
|
| 3824 |
+
|
| 3825 |
+
jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$id1.'_element'.$form_id.'\']:checked").prop("id")+"\']").eq(0).text()
|
| 3826 |
+
|
| 3827 |
+
).appendTo("#adminForm");
|
| 3828 |
+
|
| 3829 |
+
|
| 3830 |
+
|
| 3831 |
+
';
|
| 3832 |
+
|
| 3833 |
+
$onsubmit_js.='
|
| 3834 |
+
|
| 3835 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("Quantity").appendTo("#adminForm");
|
| 3836 |
+
|
| 3837 |
+
';
|
| 3838 |
+
|
| 3839 |
+
$onsubmit_js.='
|
| 3840 |
+
|
| 3841 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.'\" />").val("'.$param['w_property'][0].'").appendTo("#adminForm");
|
| 3842 |
+
|
| 3843 |
+
';
|
| 3844 |
+
|
| 3845 |
+
break;
|
| 3846 |
+
|
| 3847 |
+
}
|
| 3848 |
+
|
| 3849 |
+
|
| 3850 |
+
case 'type_paypal_shipping':
|
| 3851 |
+
|
| 3852 |
+
{
|
| 3853 |
+
|
| 3854 |
+
|
| 3855 |
+
|
| 3856 |
+
if($element_value=='')
|
| 3857 |
+
|
| 3858 |
+
$element_value =' - ';
|
| 3859 |
+
|
| 3860 |
+
|
| 3861 |
+
|
| 3862 |
+
$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');
|
| 3863 |
+
|
| 3864 |
+
$temp=$params;
|
| 3865 |
+
|
| 3866 |
+
|
| 3867 |
+
|
| 3868 |
+
if(strpos($temp, 'w_field_option_pos') > -1)
|
| 3869 |
+
|
| 3870 |
+
$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');
|
| 3871 |
+
|
| 3872 |
+
foreach($params_names as $params_name )
|
| 3873 |
+
|
| 3874 |
+
{
|
| 3875 |
+
|
| 3876 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 3877 |
+
|
| 3878 |
+
$param[$params_name] = $temp[0];
|
| 3879 |
+
|
| 3880 |
+
$temp=$temp[1];
|
| 3881 |
+
|
| 3882 |
+
}
|
| 3883 |
+
|
| 3884 |
+
|
| 3885 |
+
|
| 3886 |
+
if($temp)
|
| 3887 |
+
|
| 3888 |
+
{
|
| 3889 |
+
|
| 3890 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 3891 |
+
|
| 3892 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 3893 |
+
|
| 3894 |
+
foreach($attrs as $attr)
|
| 3895 |
+
|
| 3896 |
+
$param['attributes'] = $param['attributes'].' '.$attr;
|
| 3897 |
+
|
| 3898 |
+
}
|
| 3899 |
+
|
| 3900 |
+
|
| 3901 |
+
|
| 3902 |
+
if(!isset($param['w_field_option_pos']))
|
| 3903 |
+
|
| 3904 |
+
$param['w_field_option_pos'] = 'left';
|
| 3905 |
+
|
| 3906 |
+
|
| 3907 |
+
|
| 3908 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 3909 |
+
|
| 3910 |
+
$param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
|
| 3911 |
+
|
| 3912 |
+
$param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
|
| 3913 |
+
|
| 3914 |
+
|
| 3915 |
+
|
| 3916 |
+
|
| 3917 |
+
|
| 3918 |
+
$param['w_choices'] = explode('***',$param['w_choices']);
|
| 3919 |
+
|
| 3920 |
+
$param['w_choices_price'] = explode('***',$param['w_choices_price']);
|
| 3921 |
+
|
| 3922 |
+
if(isset($param['w_choices_params']))
|
| 3923 |
+
|
| 3924 |
+
$param['w_choices_params'] = explode('***',$param['w_choices_params']);
|
| 3925 |
+
|
| 3926 |
+
|
| 3927 |
+
|
| 3928 |
+
|
| 3929 |
+
|
| 3930 |
+
|
| 3931 |
+
|
| 3932 |
+
$element_value = explode(' - ',$element_value);
|
| 3933 |
+
|
| 3934 |
+
$element_value[1] = preg_replace("/[^0-9]/","",$element_value[1]);
|
| 3935 |
+
|
| 3936 |
+
|
| 3937 |
+
|
| 3938 |
+
$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>';
|
| 3939 |
+
|
| 3940 |
+
|
| 3941 |
+
|
| 3942 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
|
| 3943 |
+
|
| 3944 |
+
|
| 3945 |
+
|
| 3946 |
+
$total_queries = 0;
|
| 3947 |
+
|
| 3948 |
+
foreach($param['w_choices'] as $key => $choice)
|
| 3949 |
+
|
| 3950 |
+
{
|
| 3951 |
+
|
| 3952 |
+
$key1 = $key + $total_queries;
|
| 3953 |
+
|
| 3954 |
+
if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
|
| 3955 |
+
|
| 3956 |
+
{
|
| 3957 |
+
|
| 3958 |
+
$choices_labels =array();
|
| 3959 |
+
$choices_values =array();
|
| 3960 |
+
$w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
|
| 3961 |
+
$where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
|
| 3962 |
+
$w_choices_params = explode('[db_info]',$w_choices_params[1]);
|
| 3963 |
+
|
| 3964 |
+
$order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
|
| 3965 |
+
$db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
|
| 3966 |
+
|
| 3967 |
+
|
| 3968 |
+
$label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
|
| 3969 |
+
|
| 3970 |
+
$table = $label_table_and_column[0];
|
| 3971 |
+
|
| 3972 |
+
$label_column = $label_table_and_column[1];
|
| 3973 |
+
|
| 3974 |
+
if($label_column)
|
| 3975 |
+
|
| 3976 |
+
{
|
| 3977 |
+
|
| 3978 |
+
$choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
|
| 3979 |
+
}
|
| 3980 |
+
|
| 3981 |
+
|
| 3982 |
+
|
| 3983 |
+
$value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
|
| 3984 |
+
|
| 3985 |
+
$value_column = $value_table_and_column[1];
|
| 3986 |
+
|
| 3987 |
+
|
| 3988 |
+
|
| 3989 |
+
if($value_column)
|
| 3990 |
+
|
| 3991 |
+
{
|
| 3992 |
+
|
| 3993 |
+
$choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
|
| 3994 |
+
|
| 3995 |
+
}
|
| 3996 |
+
|
| 3997 |
+
|
| 3998 |
+
|
| 3999 |
+
$columns_count_shipping = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
|
| 4000 |
+
|
| 4001 |
+
|
| 4002 |
+
|
| 4003 |
+
if(array_filter($choices_labels) || array_filter($choices_values))
|
| 4004 |
+
|
| 4005 |
+
{
|
| 4006 |
+
|
| 4007 |
+
$total_queries = $total_queries + $columns_count_shipping-1;
|
| 4008 |
+
|
| 4009 |
+
for($k=0; $k<$columns_count_shipping; $k++)
|
| 4010 |
+
|
| 4011 |
+
{
|
| 4012 |
+
|
| 4013 |
+
$choice_label = isset($choices_labels) ? $choices_labels[$k] : '';
|
| 4014 |
+
|
| 4015 |
+
$choice_value = isset($choices_values) ? (float)$choices_values[$k] : '';
|
| 4016 |
+
|
| 4017 |
+
|
| 4018 |
+
|
| 4019 |
+
$checked =(($choice_label==$element_value[0] && $choice_value== $element_value[1]) ? 'checked="checked"' : '');
|
| 4020 |
+
|
| 4021 |
+
|
| 4022 |
+
|
| 4023 |
+
$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>';
|
| 4024 |
+
|
| 4025 |
+
}
|
| 4026 |
+
|
| 4027 |
+
}
|
| 4028 |
+
|
| 4029 |
+
}
|
| 4030 |
+
|
| 4031 |
+
else
|
| 4032 |
+
|
| 4033 |
+
{
|
| 4034 |
+
|
| 4035 |
+
$checked =(($choice==$element_value[0] && $param['w_choices_price'][$key]== $element_value[1]) ? 'checked="checked"' : '');
|
| 4036 |
+
|
| 4037 |
+
|
| 4038 |
+
|
| 4039 |
+
$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>';
|
| 4040 |
+
|
| 4041 |
+
}
|
| 4042 |
+
|
| 4043 |
+
}
|
| 4044 |
+
|
| 4045 |
+
|
| 4046 |
+
|
| 4047 |
+
$rep.='</div></div>';
|
| 4048 |
+
|
| 4049 |
+
|
| 4050 |
+
|
| 4051 |
+
|
| 4052 |
+
|
| 4053 |
+
$onsubmit_js.='
|
| 4054 |
+
|
| 4055 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(
|
| 4056 |
+
|
| 4057 |
+
jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$id1.'_element'.$form_id.'\']:checked").prop("id")+"\']").eq(0).text()
|
| 4058 |
+
|
| 4059 |
+
).appendTo("#adminForm");
|
| 4060 |
+
|
| 4061 |
+
|
| 4062 |
+
|
| 4063 |
+
';
|
| 4064 |
+
|
| 4065 |
+
|
| 4066 |
+
|
| 4067 |
+
break;
|
| 4068 |
+
|
| 4069 |
+
}
|
| 4070 |
+
|
| 4071 |
+
case 'type_star_rating': {
|
| 4072 |
+
if($element_value=='')
|
| 4073 |
+
$element_value = '/';
|
| 4074 |
+
|
| 4075 |
+
$params_names = array('w_field_label_size','w_field_label_pos','w_field_label_col','w_star_amount','w_required','w_class');
|
| 4076 |
+
$temp = $params;
|
| 4077 |
+
foreach($params_names as $params_name ) {
|
| 4078 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 4079 |
+
$param[$params_name] = $temp[0];
|
| 4080 |
+
$temp=$temp[1];
|
| 4081 |
+
}
|
| 4082 |
+
|
| 4083 |
+
if($temp) {
|
| 4084 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 4085 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 4086 |
+
foreach($attrs as $attr)
|
| 4087 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
| 4088 |
+
}
|
| 4089 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 4090 |
+
|
| 4091 |
+
$element_value = explode('/', $element_value);
|
| 4092 |
+
|
| 4093 |
+
$images = '';
|
| 4094 |
+
for($i=0; $i<$element_value[1]; $i++) {
|
| 4095 |
+
$images .= '<img id="wdform_'.$id1.'_star_'.$i.'_'.$form_id.'" src="' . WD_FMC_URL . '/images/star.png" >';
|
| 4096 |
+
|
| 4097 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_star_'.$i.'_'.$form_id.'").mouseover(function() {change_src('.$i.',"wdform_'.$id1.'", "'.$form_id.'", "'.$param['w_field_label_col'].'");});';
|
| 4098 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_star_'.$i.'_'.$form_id.'").mouseout(function() {reset_src('.$i.',"wdform_'.$id1.'", "'.$form_id.'");});';
|
| 4099 |
+
$onload_js .='jQuery("#wdform_'.$id1.'_star_'.$i.'_'.$form_id.'").click(function() {select_star_rating('.$i.',"wdform_'.$id1.'", "'.$form_id.'","'.$param['w_field_label_col'].'", "'.$element_value[1].'");});';
|
| 4100 |
+
$onload_js .='select_star_rating('.($element_value[0]-1).',"wdform_'.$id1.'", "'.$form_id.'","'.$param['w_field_label_col'].'", "'.$element_value[1].'");';
|
| 4101 |
+
}
|
| 4102 |
+
|
| 4103 |
+
$rep ='<div type="type_star_rating" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 4104 |
+
|
| 4105 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" '.$param['attributes'].'>'.$images.'</div><input type="hidden" value="" id="wdform_'.$id1.'_selected_star_amount'.$form_id.'" name="wdform_'.$id1.'_selected_star_amount'.$form_id.'"></div></div>';
|
| 4106 |
+
|
| 4107 |
+
|
| 4108 |
+
$onsubmit_js.='
|
| 4109 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_star_amount'.$form_id.'\" value = \"'.$param['w_star_amount'].'\" />").appendTo("#form'.$form_id.'");
|
| 4110 |
+
';
|
| 4111 |
+
|
| 4112 |
+
break;
|
| 4113 |
+
}
|
| 4114 |
+
case 'type_scale_rating': {
|
| 4115 |
+
|
| 4116 |
+
if($element_value=='')
|
| 4117 |
+
$element_value = '/';
|
| 4118 |
+
|
| 4119 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_mini_labels','w_scale_amount','w_required','w_class');
|
| 4120 |
+
$temp=$params;
|
| 4121 |
+
foreach($params_names as $params_name ) {
|
| 4122 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 4123 |
+
$param[$params_name] = $temp[0];
|
| 4124 |
+
$temp=$temp[1];
|
| 4125 |
+
}
|
| 4126 |
+
|
| 4127 |
+
if($temp) {
|
| 4128 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 4129 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 4130 |
+
foreach($attrs as $attr)
|
| 4131 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
| 4132 |
+
}
|
| 4133 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 4134 |
+
|
| 4135 |
+
$element_value = explode('/',$element_value);
|
| 4136 |
+
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
| 4137 |
+
|
| 4138 |
+
$numbers = '';
|
| 4139 |
+
$radio_buttons = '';
|
| 4140 |
+
$to_check=0;
|
| 4141 |
+
$to_check=$element_value[0];
|
| 4142 |
+
|
| 4143 |
+
for($i=1; $i<=$element_value[1]; $i++) {
|
| 4144 |
+
$numbers.= '<div style="text-align: center; display: table-cell;"><span>'.$i.'</span></div>';
|
| 4145 |
+
$radio_buttons.= '<div style="text-align: center; display: table-cell;"><div class="radio-div"><input id="wdform_'.$id1.'_scale_radio'.$form_id.'_'.$i.'" name="wdform_'.$id1.'_scale_radio'.$form_id.'" value="'.$i.'" type="radio" '.( $to_check==$i ? 'checked="checked"' : '' ).'><label for="wdform_'.$id1.'_scale_radio'.$form_id.'_'.$i.'"></label></div></div>';
|
| 4146 |
+
}
|
| 4147 |
+
|
| 4148 |
+
$rep ='<div type="type_scale_rating" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 4149 |
+
|
| 4150 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" style="float: left;" '.$param['attributes'].'><label class="mini_label">'.$w_mini_labels[0].'</label><div style="display: inline-table; vertical-align: middle;border-spacing: 7px;"><div style="display: table-row;">'.$numbers.'</div><div style="display: table-row;">'.$radio_buttons.'</div></div><label class="mini_label" >'.$w_mini_labels[1].'</label></div></div></div>';
|
| 4151 |
+
|
| 4152 |
+
$onsubmit_js.='
|
| 4153 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_scale_amount'.$form_id.'\" value = \"'.$param['w_scale_amount'].'\" />").appendTo("#form'.$form_id.'");
|
| 4154 |
+
';
|
| 4155 |
+
|
| 4156 |
+
break;
|
| 4157 |
+
}
|
| 4158 |
+
|
| 4159 |
+
case 'type_spinner': {
|
| 4160 |
+
|
| 4161 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_field_width','w_field_min_value','w_field_max_value', 'w_field_step', 'w_field_value', 'w_required','w_class');
|
| 4162 |
+
$temp=$params;
|
| 4163 |
+
foreach($params_names as $params_name ) {
|
| 4164 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 4165 |
+
$param[$params_name] = $temp[0];
|
| 4166 |
+
$temp=$temp[1];
|
| 4167 |
+
}
|
| 4168 |
+
|
| 4169 |
+
if($temp) {
|
| 4170 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 4171 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 4172 |
+
foreach($attrs as $attr)
|
| 4173 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
| 4174 |
+
}
|
| 4175 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 4176 |
+
|
| 4177 |
+
|
| 4178 |
+
$rep ='<div type="type_spinner" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 4179 |
+
|
| 4180 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><input type="text" value="'.($element_value!= 'null' ? $element_value : '').'" name="wdform_'.$id1.'_element'.$form_id.'" id="wdform_'.$id1.'_element'.$form_id.'" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].'></div></div>';
|
| 4181 |
+
|
| 4182 |
+
$onload_js .='
|
| 4183 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'")[0].spin = null;
|
| 4184 |
+
spinner = jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner();
|
| 4185 |
+
spinner.spinner( "value", "'.($element_value!= 'null' ? $element_value : '').'");
|
| 4186 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ min: "'.$param['w_field_min_value'].'"});
|
| 4187 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ max: "'.$param['w_field_max_value'].'"});
|
| 4188 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ step: "'.$param['w_field_step'].'"});
|
| 4189 |
+
';
|
| 4190 |
+
|
| 4191 |
+
break;
|
| 4192 |
+
}
|
| 4193 |
+
|
| 4194 |
+
case 'type_slider': {
|
| 4195 |
+
|
| 4196 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_field_width','w_field_min_value','w_field_max_value', 'w_field_value', 'w_required','w_class');
|
| 4197 |
+
$temp=$params;
|
| 4198 |
+
foreach($params_names as $params_name ) {
|
| 4199 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 4200 |
+
$param[$params_name] = $temp[0];
|
| 4201 |
+
$temp=$temp[1];
|
| 4202 |
+
}
|
| 4203 |
+
|
| 4204 |
+
if($temp) {
|
| 4205 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 4206 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 4207 |
+
foreach($attrs as $attr)
|
| 4208 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
| 4209 |
+
}
|
| 4210 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 4211 |
+
|
| 4212 |
+
|
| 4213 |
+
$rep ='<div type="type_slider" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 4214 |
+
|
| 4215 |
+
|
| 4216 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><input type="hidden" value="'.$element_value.'" id="wdform_'.$id1.'_slider_value'.$form_id.'" name="wdform_'.$id1.'_slider_value'.$form_id.'"><div name="'.$id1.'_element'.$form_id.'" id="wdform_'.$id1.'_element'.$form_id.'" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].'"></div><div align="left" style="display: inline-block; width: 33.3%; text-align: left;"><span id="wdform_'.$id1.'_element_min'.$form_id.'" class="label">'.$param['w_field_min_value'].'</span></div><div align="right" style="display: inline-block; width: 33.3%; text-align: center;"><span id="wdform_'.$id1.'_element_value'.$form_id.'" class="label">'.$element_value.'</span></div><div align="right" style="display: inline-block; width: 33.3%; text-align: right;"><span id="wdform_'.$id1.'_element_max'.$form_id.'" class="label">'.$param['w_field_max_value'].'</span></div></div></div>';
|
| 4217 |
+
|
| 4218 |
+
|
| 4219 |
+
$onload_js .='
|
| 4220 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'")[0].slide = null;
|
| 4221 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'").slider({
|
| 4222 |
+
range: "min",
|
| 4223 |
+
value: eval('.$element_value.'),
|
| 4224 |
+
min: eval('.$param['w_field_min_value'].'),
|
| 4225 |
+
max: eval('.$param['w_field_max_value'].'),
|
| 4226 |
+
slide: function( event, ui ) {
|
| 4227 |
+
|
| 4228 |
+
jQuery("#wdform_'.$id1.'_element_value'.$form_id.'").html("" + ui.value)
|
| 4229 |
+
jQuery("#wdform_'.$id1.'_slider_value'.$form_id.'").val("" + ui.value)
|
| 4230 |
+
|
| 4231 |
+
}
|
| 4232 |
+
});
|
| 4233 |
+
';
|
| 4234 |
+
|
| 4235 |
+
break;
|
| 4236 |
+
}
|
| 4237 |
+
|
| 4238 |
+
|
| 4239 |
+
case 'type_range': {
|
| 4240 |
+
|
| 4241 |
+
if($element_value=='')
|
| 4242 |
+
$element_value = '-';
|
| 4243 |
+
|
| 4244 |
+
$params_names=array('w_field_label_size','w_field_label_pos','w_field_range_width','w_field_range_step','w_field_value1', 'w_field_value2', 'w_mini_labels', 'w_required','w_class');
|
| 4245 |
+
$temp=$params;
|
| 4246 |
+
foreach($params_names as $params_name ) {
|
| 4247 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 4248 |
+
$param[$params_name] = $temp[0];
|
| 4249 |
+
$temp=$temp[1];
|
| 4250 |
+
}
|
| 4251 |
+
|
| 4252 |
+
if($temp) {
|
| 4253 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 4254 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 4255 |
+
foreach($attrs as $attr)
|
| 4256 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
| 4257 |
+
}
|
| 4258 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 4259 |
+
|
| 4260 |
+
$element_value = explode('-',$element_value);
|
| 4261 |
+
|
| 4262 |
+
$w_mini_labels = explode('***',$param['w_mini_labels']);
|
| 4263 |
+
|
| 4264 |
+
$rep ='<div type="type_range" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 4265 |
+
|
| 4266 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><div style="display: table;"><div style="display: table-row;"><div valign="middle" align="left" style="display: table-cell;"><input type="text" value="'.($element_value[0]!= 'null' ? $element_value[0] : '').'" name="wdform_'.$id1.'_element'.$form_id.'0" id="wdform_'.$id1.'_element'.$form_id.'0" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].'></div><div valign="middle" align="left" style="display: table-cell; padding-left: 4px;"><input type="text" value="'.($element_value[1]!= 'null' ? $element_value[1] : '').'" name="wdform_'.$id1.'_element'.$form_id.'1" id="wdform_'.$id1.'_element'.$form_id.'1" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].'></div></div><div style="display: table-row;"><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="wdform_'.$id1.'_mini_label_from">'.$w_mini_labels[0].'</label></div><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="wdform_'.$id1.'_mini_label_to">'.$w_mini_labels[1].'</label></div></div></div></div></div>';
|
| 4267 |
+
|
| 4268 |
+
$onload_js .='
|
| 4269 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'0")[0].spin = null;
|
| 4270 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'1")[0].spin = null;
|
| 4271 |
+
|
| 4272 |
+
spinner0 = jQuery("#wdform_'.$id1.'_element'.$form_id.'0").spinner();
|
| 4273 |
+
spinner0.spinner( "value", "'.($element_value[0]!= 'null' ? $element_value[0] : '').'");
|
| 4274 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ step: '.$param['w_field_range_step'].'});
|
| 4275 |
+
|
| 4276 |
+
spinner1 = jQuery("#wdform_'.$id1.'_element'.$form_id.'1").spinner();
|
| 4277 |
+
spinner1.spinner( "value", "'.($element_value[1]!= 'null' ? $element_value[1] : '').'");
|
| 4278 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ step: '.$param['w_field_range_step'].'});
|
| 4279 |
+
';
|
| 4280 |
+
|
| 4281 |
+
break;
|
| 4282 |
+
}
|
| 4283 |
+
|
| 4284 |
+
case 'type_grading': {
|
| 4285 |
+
$params_names=array('w_field_label_size','w_field_label_pos', 'w_items', 'w_total', 'w_required','w_class');
|
| 4286 |
+
$temp=$params;
|
| 4287 |
+
foreach($params_names as $params_name ) {
|
| 4288 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 4289 |
+
$param[$params_name] = $temp[0];
|
| 4290 |
+
$temp=$temp[1];
|
| 4291 |
+
}
|
| 4292 |
+
|
| 4293 |
+
if($temp) {
|
| 4294 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 4295 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 4296 |
+
foreach($attrs as $attr)
|
| 4297 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
| 4298 |
+
}
|
| 4299 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 4300 |
+
|
| 4301 |
+
|
| 4302 |
+
$element_value = explode(':', $element_value);
|
| 4303 |
+
|
| 4304 |
+
$w_items = explode('***',$param['w_items']);
|
| 4305 |
+
|
| 4306 |
+
$w_items_labels =implode(':',$w_items);
|
| 4307 |
+
|
| 4308 |
+
$grading_items ='';
|
| 4309 |
+
|
| 4310 |
+
|
| 4311 |
+
for($i=0; $i<(count($element_value))/2-1; $i++) {
|
| 4312 |
+
$value=$element_value[$i];
|
| 4313 |
+
|
| 4314 |
+
$grading_items .= '<div class="wdform_grading"><input type="text" id="wdform_'.$id1.'_element'.$form_id.'_'.$i.'" name="wdform_'.$id1.'_element'.$form_id.'_'.$i.'" value="'.$value.'" '.$param['attributes'].'><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.'_'.$i.'">'.$w_items[$i].'</label></div>';
|
| 4315 |
+
|
| 4316 |
+
}
|
| 4317 |
+
|
| 4318 |
+
$rep ='<div type="type_grading" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 4319 |
+
|
| 4320 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><input type="hidden" value="'.$param['w_total'].'" name="wdform_'.$id1.'_grading_total'.$form_id.'" id="wdform_'.$id1.'_grading_total'.$form_id.'"><div id="wdform_'.$id1.'_element'.$form_id.'">'.$grading_items.'<div id="wdform_'.$id1.'_element_total_div'.$form_id.'" class="grading_div">Total: <span id="wdform_'.$id1.'_sum_element'.$form_id.'">0</span>/<span id="wdform_'.$id1.'_total_element'.$form_id.'">'.$param['w_total'].'</span><span id="wdform_'.$id1.'_text_element'.$form_id.'"></span></div></div></div></div>';
|
| 4321 |
+
|
| 4322 |
+
$onload_js.='
|
| 4323 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.' input").change(function() {sum_grading_values("wdform_'.$id1.'","'.$form_id.'");});';
|
| 4324 |
+
|
| 4325 |
+
$onload_js.='
|
| 4326 |
+
jQuery("#wdform_'.$id1.'_element'.$form_id.' input").keyup(function() {sum_grading_values("wdform_'.$id1.'","'.$form_id.'");});';
|
| 4327 |
+
|
| 4328 |
+
|
| 4329 |
+
$onload_js.='
|
| 4330 |
+
sum_grading_values("wdform_'.$id1.'","'.$form_id.'");';
|
| 4331 |
+
|
| 4332 |
+
$onsubmit_js.='
|
| 4333 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_item'.$form_id.'\" value = \"'.$w_items_labels.':'.$param['w_total'].'\" />").appendTo("#form'.$form_id.'");
|
| 4334 |
+
';
|
| 4335 |
+
|
| 4336 |
+
break;
|
| 4337 |
+
}
|
| 4338 |
+
case 'type_matrix': {
|
| 4339 |
+
|
| 4340 |
+
$params_names=array('w_field_label_size','w_field_label_pos', 'w_field_input_type', 'w_rows', 'w_columns', 'w_required','w_class');
|
| 4341 |
+
$temp=$params;
|
| 4342 |
+
foreach($params_names as $params_name ) {
|
| 4343 |
+
$temp=explode('*:*'.$params_name.'*:*',$temp);
|
| 4344 |
+
$param[$params_name] = $temp[0];
|
| 4345 |
+
$temp=$temp[1];
|
| 4346 |
+
}
|
| 4347 |
+
|
| 4348 |
+
if($temp) {
|
| 4349 |
+
$temp =explode('*:*w_attr_name*:*',$temp);
|
| 4350 |
+
$attrs = array_slice($temp,0, count($temp)-1);
|
| 4351 |
+
foreach($attrs as $attr)
|
| 4352 |
+
$param['attributes'] = $param['attributes'].' add_'.$attr;
|
| 4353 |
+
}
|
| 4354 |
+
|
| 4355 |
+
$param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
|
| 4356 |
+
$w_rows = explode('***',$param['w_rows']);
|
| 4357 |
+
$w_columns = explode('***',$param['w_columns']);
|
| 4358 |
+
$element_value = str_replace("******matrix***","",$element_value);
|
| 4359 |
+
$element_value = explode($param['w_field_input_type'].'***', $element_value);
|
| 4360 |
+
$element_value = explode('***', $element_value[1]);
|
| 4361 |
+
$column_labels ='';
|
| 4362 |
+
|
| 4363 |
+
for($i=1; $i<count($w_columns); $i++) {
|
| 4364 |
+
$column_labels .= '<div><label class="wdform-ch-rad-label">'.$w_columns[$i].'</label></div>';
|
| 4365 |
+
}
|
| 4366 |
+
|
| 4367 |
+
$rows_columns = '';
|
| 4368 |
+
$for_matrix =0;
|
| 4369 |
+
for($i=1; $i<count($w_rows); $i++) {
|
| 4370 |
+
|
| 4371 |
+
$rows_columns .= '<div class="wdform-matrix-row'.($i%2).'"><div class="wdform-matrix-column"><label class="wdform-ch-rad-label" >'.$w_rows[$i].'</label></div>';
|
| 4372 |
+
|
| 4373 |
+
|
| 4374 |
+
for($k=1; $k<count($w_columns); $k++) {
|
| 4375 |
+
$rows_columns .= '<div class="wdform-matrix-cell">';
|
| 4376 |
+
if($param['w_field_input_type']=='radio') {
|
| 4377 |
+
if (array_key_exists($i-1,$element_value))
|
| 4378 |
+
$to_check=$element_value[$i-1];
|
| 4379 |
+
else
|
| 4380 |
+
$to_check= '' ;
|
| 4381 |
+
|
| 4382 |
+
$rows_columns .= '<div class="radio-div"><input id="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" type="radio" name="wdform_'.$id1.'_input_element'.$form_id.''.$i.'" value="'.$i.'_'.$k.'" '.($to_check==$i.'_'.$k ? 'checked="checked"' : '').'><label for="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'"></label></div>';
|
| 4383 |
+
|
| 4384 |
+
}
|
| 4385 |
+
else
|
| 4386 |
+
if($param['w_field_input_type']=='checkbox') {
|
| 4387 |
+
|
| 4388 |
+
if (array_key_exists($for_matrix,$element_value))
|
| 4389 |
+
$to_check=$element_value[$for_matrix];
|
| 4390 |
+
else
|
| 4391 |
+
$to_check= '' ;
|
| 4392 |
+
|
| 4393 |
+
$rows_columns .= '<div class="checkbox-div"><input id="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" type="checkbox" name="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" value="1" '.($to_check=="1" ? 'checked="checked"' : '').'><label for="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'"></label></div>';
|
| 4394 |
+
|
| 4395 |
+
$for_matrix++;
|
| 4396 |
+
}
|
| 4397 |
+
else
|
| 4398 |
+
if($param['w_field_input_type']=='text') {
|
| 4399 |
+
$rows_columns .= '<input id="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" type="text" name="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" value="'.(array_key_exists($for_matrix,$element_value) ? $element_value[$for_matrix] : '').'">';
|
| 4400 |
+
|
| 4401 |
+
$for_matrix++;
|
| 4402 |
+
}
|
| 4403 |
+
else
|
| 4404 |
+
if($param['w_field_input_type']=='select') {
|
| 4405 |
+
$rows_columns .= '<select id="wdform_'.$id1.'_select_yes_no'.$form_id.''.$i.'_'.$k.'" name="wdform_'.$id1.'_select_yes_no'.$form_id.''.$i.'_'.$k.'" ><option value="" '.(array_key_exists($for_matrix,$element_value) ? ($element_value[$for_matrix]=="" ? "selected=\"selected\"": "") : '').'> </option><option value="yes" '.(array_key_exists($for_matrix,$element_value) ? ($element_value[$for_matrix]=="yes" ? "selected=\"selected\"": "") : '').'>Yes</option><option value="no" '.(array_key_exists($for_matrix,$element_value) ? ($element_value[$for_matrix]=="no" ? "selected=\"selected\"": "") : '').'>No</option></select>';
|
| 4406 |
+
|
| 4407 |
+
$for_matrix++;
|
| 4408 |
+
}
|
| 4409 |
+
$rows_columns.='</div>';
|
| 4410 |
+
}
|
| 4411 |
+
|
| 4412 |
+
$rows_columns .= '</div>';
|
| 4413 |
+
}
|
| 4414 |
+
|
| 4415 |
+
$rep ='<div type="type_matrix" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
|
| 4416 |
+
|
| 4417 |
+
$rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" class="wdform-matrix-table" '.$param['attributes'].'><div style="display: table-row-group;"><div class="wdform-matrix-head"><div style="display: table-cell;"></div>'.$column_labels.'</div>'.$rows_columns.'</div></div></div></div>';
|
| 4418 |
+
|
| 4419 |
+
$onsubmit_js.='
|
| 4420 |
+
jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_input_type'.$form_id.'\" value = \"'.$param['w_field_input_type'].'\" /><input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_row'.$form_id.'\" value = \"'.$param['w_rows'].'\" /><input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_column'.$form_id.'\" value = \"'.$param['w_columns'].'\" />").appendTo("#form'.$form_id.'");
|
| 4421 |
+
';
|
| 4422 |
+
|
| 4423 |
+
break;
|
| 4424 |
+
}
|
| 4425 |
+
}
|
| 4426 |
+
$form = str_replace('%'.$id1.' - '.$labels[$id1s_key].'%', $rep, $form);
|
| 4427 |
+
}
|
| 4428 |
+
}
|
| 4429 |
+
echo $form;
|
| 4430 |
+
?>
|
| 4431 |
+
|
| 4432 |
+
</div>
|
| 4433 |
+
<input type="hidden" name="option" value="com_formmaker"/>
|
| 4434 |
+
<input type="hidden" id="current_id" name="current_id" value="<?php echo $rows[0]->group_id; ?>" />
|
| 4435 |
+
<input type="hidden" name="form_id" value="<?php echo $rows[0]->form_id; ?>" />
|
| 4436 |
+
<input type="hidden" name="date" value="<?php echo $rows[0]->date; ?>" />
|
| 4437 |
+
<input type="hidden" name="ip" value="<?php echo $rows[0]->ip; ?>" />
|
| 4438 |
+
<input type="hidden" id="task" name="task" value="" />
|
| 4439 |
+
<input type="hidden" value="<?php echo WD_FMC_URL; ?>" id="form_plugins_url" />
|
| 4440 |
+
<script type="text/javascript">
|
| 4441 |
+
function pressbutton() {
|
| 4442 |
+
<?php echo $onsubmit_js; ?>;
|
| 4443 |
+
}
|
| 4444 |
+
jQuery("div[type='type_number'] input, div[type='type_phone'] input, div[type='type_spinner'] input, div[type='type_range'] input, .wdform-quantity").keypress(function(evt) {
|
| 4445 |
+
return check_isnum(evt);
|
| 4446 |
+
});
|
| 4447 |
+
jQuery("div[type='type_grading'] input").keypress(function() {
|
| 4448 |
+
return check_isnum_or_minus(event);
|
| 4449 |
+
});
|
| 4450 |
+
plugin_url = '<?php echo WD_FMC_URL; ?>';
|
| 4451 |
+
<?php
|
| 4452 |
+
if ($onload_js) {
|
| 4453 |
+
?>
|
| 4454 |
+
jQuery(window).load(function () {
|
| 4455 |
+
<?php echo $onload_js; ?>;
|
| 4456 |
+
});
|
| 4457 |
+
<?php
|
| 4458 |
+
}
|
| 4459 |
+
?>
|
| 4460 |
+
</script>
|
| 4461 |
+
</form>
|
| 4462 |
+
<?php
|
| 4463 |
+
}
|
| 4464 |
+
}
|
| 4465 |
+
|
| 4466 |
+
?>
|
contact-form-maker.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Plugin Name: Contact Form Maker
|
| 4 |
* Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
| 5 |
* Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
|
| 6 |
-
* Version: 1.8.
|
| 7 |
* Author: WebDorado
|
| 8 |
* Author URI: http://web-dorado.com/
|
| 9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
|
@@ -207,7 +207,7 @@ add_shortcode('email_verification', 'fmc_email_verification_shortcode');
|
|
| 207 |
function fmc_email_verification_shortcode() {
|
| 208 |
require_once(WD_FMC_DIR . '/framework/WDW_FMC_Library.php');
|
| 209 |
require_once(WD_FMC_DIR . '/frontend/controllers/FMControllerVerify_email_fmc.php');
|
| 210 |
-
$controller_class = '
|
| 211 |
$controller = new $controller_class();
|
| 212 |
$controller->execute();
|
| 213 |
}
|
|
@@ -249,9 +249,10 @@ function register_fmcemailverification_cpt(){
|
|
| 249 |
// Activate plugin.
|
| 250 |
function form_maker_activate_cfm() {
|
| 251 |
$version = get_option("wd_form_maker_version");
|
| 252 |
-
$new_version = '1.8.
|
| 253 |
global $wpdb;
|
| 254 |
if (!$version) {
|
|
|
|
| 255 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
| 256 |
if ($wpdb->get_var("SHOW TABLES LIKE '" . $wpdb->prefix . "formmaker'") == $wpdb->prefix . "formmaker") {
|
| 257 |
$recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
|
|
@@ -268,22 +269,17 @@ function form_maker_activate_cfm() {
|
|
| 268 |
contact_form_maker_update('');
|
| 269 |
}
|
| 270 |
else {
|
| 271 |
-
|
| 272 |
require_once WD_FMC_DIR . "/contact_form_maker_insert.php";
|
| 273 |
contact_from_maker_insert();
|
| 274 |
add_option("wd_cfield_limit", '9', '', 'no');
|
|
|
|
| 275 |
$cf_email_verification_post = array(
|
| 276 |
'post_title' => 'Email Verification',
|
| 277 |
'post_content' => '[email_verification]',
|
| 278 |
'post_status' => 'publish',
|
| 279 |
'post_author' => 1,
|
| 280 |
-
'post_type' => '
|
| 281 |
);
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
add_option('fmc_settings', array('public_key' => '', 'private_key' => '', 'csv_delimiter' => ','));
|
| 285 |
-
|
| 286 |
-
|
| 287 |
$cf_mail_verification_post_id = wp_insert_post( $cf_email_verification_post );
|
| 288 |
$wpdb->update($wpdb->prefix . "formmaker", array(
|
| 289 |
'mail_verification_post_id' => $cf_mail_verification_post_id,
|
|
@@ -293,16 +289,46 @@ function form_maker_activate_cfm() {
|
|
| 293 |
}
|
| 294 |
}
|
| 295 |
elseif (version_compare($version, $new_version, '<')) {
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
}
|
| 307 |
|
| 308 |
require_once WD_FMC_DIR . "/contact_form_maker_insert.php";
|
| 3 |
* Plugin Name: Contact Form Maker
|
| 4 |
* Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
| 5 |
* Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
|
| 6 |
+
* Version: 1.8.39
|
| 7 |
* Author: WebDorado
|
| 8 |
* Author URI: http://web-dorado.com/
|
| 9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
| 207 |
function fmc_email_verification_shortcode() {
|
| 208 |
require_once(WD_FMC_DIR . '/framework/WDW_FMC_Library.php');
|
| 209 |
require_once(WD_FMC_DIR . '/frontend/controllers/FMControllerVerify_email_fmc.php');
|
| 210 |
+
$controller_class = 'FMControllerVerify_email_fmc';
|
| 211 |
$controller = new $controller_class();
|
| 212 |
$controller->execute();
|
| 213 |
}
|
| 249 |
// Activate plugin.
|
| 250 |
function form_maker_activate_cfm() {
|
| 251 |
$version = get_option("wd_form_maker_version");
|
| 252 |
+
$new_version = '1.8.39';
|
| 253 |
global $wpdb;
|
| 254 |
if (!$version) {
|
| 255 |
+
|
| 256 |
add_option("wd_form_maker_version", $new_version, '', 'no');
|
| 257 |
if ($wpdb->get_var("SHOW TABLES LIKE '" . $wpdb->prefix . "formmaker'") == $wpdb->prefix . "formmaker") {
|
| 258 |
$recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
|
| 269 |
contact_form_maker_update('');
|
| 270 |
}
|
| 271 |
else {
|
|
|
|
| 272 |
require_once WD_FMC_DIR . "/contact_form_maker_insert.php";
|
| 273 |
contact_from_maker_insert();
|
| 274 |
add_option("wd_cfield_limit", '9', '', 'no');
|
| 275 |
+
add_option('fmc_settings', array('public_key' => '', 'private_key' => '', 'csv_delimiter' => ','));
|
| 276 |
$cf_email_verification_post = array(
|
| 277 |
'post_title' => 'Email Verification',
|
| 278 |
'post_content' => '[email_verification]',
|
| 279 |
'post_status' => 'publish',
|
| 280 |
'post_author' => 1,
|
| 281 |
+
'post_type' => 'cfmemailverification',
|
| 282 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
$cf_mail_verification_post_id = wp_insert_post( $cf_email_verification_post );
|
| 284 |
$wpdb->update($wpdb->prefix . "formmaker", array(
|
| 285 |
'mail_verification_post_id' => $cf_mail_verification_post_id,
|
| 289 |
}
|
| 290 |
}
|
| 291 |
elseif (version_compare($version, $new_version, '<')) {
|
| 292 |
+
require_once WD_FMC_DIR . "/contact_form_maker_update.php";
|
| 293 |
+
|
| 294 |
+
$mail_verification_post_ids = $wpdb->get_results($wpdb->prepare('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE mail_verification_post_id!="%d"',0));
|
| 295 |
+
if($mail_verification_post_ids){
|
| 296 |
+
foreach($mail_verification_post_ids as $mail_verification_post_id) {
|
| 297 |
+
$update_email_ver_post_type = array(
|
| 298 |
+
'ID' => (int)$mail_verification_post_id->mail_verification_post_id,
|
| 299 |
+
'post_type' => 'cfmemailverification',
|
| 300 |
+
);
|
| 301 |
+
|
| 302 |
+
wp_update_post( $update_email_ver_post_type );
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
else{
|
| 306 |
+
$email_verification_post = array(
|
| 307 |
+
'post_title' => 'Email Verification',
|
| 308 |
+
'post_content' => '[email_verification]',
|
| 309 |
+
'post_status' => 'publish',
|
| 310 |
+
'post_author' => 1,
|
| 311 |
+
'post_type' => 'cfmemailverification',
|
| 312 |
+
);
|
| 313 |
+
$mail_verification_post_id = wp_insert_post( $email_verification_post );
|
| 314 |
+
|
| 315 |
+
add_option('fm_settings', array('public_key' => '', 'private_key' => '', 'csv_delimiter' => ',', 'map_key' => ''));
|
| 316 |
+
$wpdb->update($wpdb->prefix . "formmaker", array(
|
| 317 |
+
'mail_verification_post_id' => $mail_verification_post_id,
|
| 318 |
+
), array('id' => 1), array(
|
| 319 |
+
'%d',
|
| 320 |
+
), array('%d'));
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
contact_form_maker_update($version);
|
| 324 |
+
update_option("wd_form_maker_version", $new_version);
|
| 325 |
+
$recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
|
| 326 |
+
$public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
|
| 327 |
+
$private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
|
| 328 |
+
|
| 329 |
+
if (FALSE === $fmc_settings = get_option('fmc_settings')) {
|
| 330 |
+
add_option('fmc_settings', array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ','));
|
| 331 |
+
}
|
| 332 |
}
|
| 333 |
|
| 334 |
require_once WD_FMC_DIR . "/contact_form_maker_insert.php";
|
frontend/models/FMModelForm_maker_fmc.php
CHANGED
|
@@ -1,4706 +1,4708 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class FMModelForm_maker_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 showform($id) {
|
| 22 |
-
global $wpdb;
|
| 23 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
| 24 |
-
if (!$row || !$row->published) {
|
| 25 |
-
return FALSE;
|
| 26 |
-
}
|
| 27 |
-
if (isset($_GET['test_theme']) && (esc_html(stripslashes($_GET['test_theme'])) != '')) {
|
| 28 |
-
/* From preview.*/
|
| 29 |
-
$theme_id = esc_html(stripslashes($_GET['test_theme']));
|
| 30 |
-
}
|
| 31 |
-
else {
|
| 32 |
-
$theme_id = $row->theme;
|
| 33 |
-
}
|
| 34 |
-
$form_theme = $wpdb->get_var($wpdb->prepare('SELECT css FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id));
|
| 35 |
-
if (!$form_theme) {
|
| 36 |
-
$form_theme = $wpdb->get_var('SELECT css FROM ' . $wpdb->prefix . 'formmaker_themes');
|
| 37 |
-
if (!$form_theme) {
|
| 38 |
-
return FALSE;
|
| 39 |
-
}
|
| 40 |
-
}
|
| 41 |
-
$label_id = array();
|
| 42 |
-
$label_type = array();
|
| 43 |
-
$label_all = explode('#****#', $row->label_order);
|
| 44 |
-
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 45 |
-
foreach ($label_all as $key => $label_each) {
|
| 46 |
-
$label_id_each = explode('#**id**#', $label_each);
|
| 47 |
-
array_push($label_id, $label_id_each[0]);
|
| 48 |
-
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
| 49 |
-
array_push($label_type, $label_order_each[1]);
|
| 50 |
-
}
|
| 51 |
-
return array(
|
| 52 |
-
$row,
|
| 53 |
-
1,
|
| 54 |
-
$label_id,
|
| 55 |
-
$label_type,
|
| 56 |
-
$form_theme
|
| 57 |
-
);
|
| 58 |
-
}
|
| 59 |
-
|
| 60 |
-
public function savedata($form, $id) {
|
| 61 |
-
$fmc_settings = get_option('fmc_settings');
|
| 62 |
-
$all_files = array();
|
| 63 |
-
$correct = FALSE;
|
| 64 |
-
$id_for_old = $id;
|
| 65 |
-
if (!$form->form_front) {
|
| 66 |
-
$id = '';
|
| 67 |
-
}
|
| 68 |
-
if (isset($_POST["counter" . $id])) {
|
| 69 |
-
$counter = esc_html($_POST["counter" . $id]);
|
| 70 |
-
if (isset($_POST["captcha_input"])) {
|
| 71 |
-
$captcha_input = esc_html($_POST["captcha_input"]);
|
| 72 |
-
$session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
|
| 73 |
-
if (md5($captcha_input) == $session_wd_captcha_code) {
|
| 74 |
-
$correct = TRUE;
|
| 75 |
-
}
|
| 76 |
-
else {
|
| 77 |
-
?>
|
| 78 |
-
<script>alert("<?php echo addslashes(__('Error, incorrect Security code.', 'form_maker')); ?>");</script>
|
| 79 |
-
<?php
|
| 80 |
-
}
|
| 81 |
-
}
|
| 82 |
-
elseif (isset($_POST["arithmetic_captcha_input"])) {
|
| 83 |
-
$arithmetic_captcha_input = esc_html($_POST["arithmetic_captcha_input"]);
|
| 84 |
-
$session_wd_arithmetic_captcha_code = isset($_SESSION[$id . '_wd_arithmetic_captcha_code']) ? $_SESSION[$id . '_wd_arithmetic_captcha_code'] : '-';
|
| 85 |
-
if (md5($arithmetic_captcha_input) == $session_wd_arithmetic_captcha_code) {
|
| 86 |
-
$correct = TRUE;
|
| 87 |
-
}
|
| 88 |
-
else {
|
| 89 |
-
?>
|
| 90 |
-
<script>alert("<?php echo addslashes(__('Error, incorrect Security code.', 'form_maker')); ?>");</script>
|
| 91 |
-
<?php
|
| 92 |
-
}
|
| 93 |
-
}
|
| 94 |
-
elseif (isset($_POST["g-recaptcha-response"])){
|
| 95 |
-
$privatekey= isset($fmc_settings['private_key']) ? $fmc_settings['private_key'] : '';
|
| 96 |
-
$captcha = $_POST['g-recaptcha-response'];
|
| 97 |
-
$url = 'https://www.google.com/recaptcha/api/siteverify';
|
| 98 |
-
$data = array(
|
| 99 |
-
'secret' => $privatekey,
|
| 100 |
-
'response' => $captcha,
|
| 101 |
-
'remoteip' => $_SERVER['REMOTE_ADDR']
|
| 102 |
-
);
|
| 103 |
-
|
| 104 |
-
$curlConfig = array(
|
| 105 |
-
CURLOPT_URL => $url,
|
| 106 |
-
CURLOPT_POST => true,
|
| 107 |
-
CURLOPT_RETURNTRANSFER => true,
|
| 108 |
-
CURLOPT_POSTFIELDS => $data
|
| 109 |
-
);
|
| 110 |
-
|
| 111 |
-
$ch = curl_init();
|
| 112 |
-
curl_setopt_array($ch, $curlConfig);
|
| 113 |
-
$response = curl_exec($ch);
|
| 114 |
-
curl_close($ch);
|
| 115 |
-
|
| 116 |
-
$jsonResponse = json_decode($response);
|
| 117 |
-
|
| 118 |
-
if ($jsonResponse->success == "true")
|
| 119 |
-
$correct = TRUE;
|
| 120 |
-
else {
|
| 121 |
-
?>
|
| 122 |
-
<script>alert("<?php echo addslashes(__('Error, incorrect Security code.', 'form_maker')); ?>");</script>
|
| 123 |
-
<?php
|
| 124 |
-
}
|
| 125 |
-
}
|
| 126 |
-
else {
|
| 127 |
-
$correct = TRUE;
|
| 128 |
-
}
|
| 129 |
-
if ($correct) {
|
| 130 |
-
|
| 131 |
-
$ip=$_SERVER['REMOTE_ADDR'];
|
| 132 |
-
|
| 133 |
-
global $wpdb;
|
| 134 |
-
$blocked_ip = $wpdb->get_var($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip));
|
| 135 |
-
if ($blocked_ip) {
|
| 136 |
-
$_SESSION['massage_after_submit' . $id] = addslashes(__('Your ip is blacklisted. Please contact the website administrator.', 'form_maker'));
|
| 137 |
-
wp_redirect($_SERVER["REQUEST_URI"]);//to be checked
|
| 138 |
-
exit;
|
| 139 |
-
}
|
| 140 |
-
|
| 141 |
-
$result_temp = $this->save_db($counter, $id_for_old);
|
| 142 |
-
$all_files = $result_temp[0];
|
| 143 |
-
if (is_numeric($all_files)) {
|
| 144 |
-
$this->remove($all_files, $id_for_old);
|
| 145 |
-
}
|
| 146 |
-
elseif (isset($counter)) {
|
| 147 |
-
$this->gen_mail($counter, $all_files, $id_for_old, $result_temp[1]);
|
| 148 |
-
}
|
| 149 |
-
|
| 150 |
-
}
|
| 151 |
-
return $all_files;
|
| 152 |
-
}
|
| 153 |
-
|
| 154 |
-
return $all_files;
|
| 155 |
-
}
|
| 156 |
-
|
| 157 |
-
public function select_data_from_db_for_labels($db_info,$label_column, $table, $where, $order_by) {
|
| 158 |
-
global $wpdb;
|
| 159 |
-
|
| 160 |
-
$query = "SELECT `".$label_column."` FROM ".$table.$where." ORDER BY ".$order_by;
|
| 161 |
-
if($db_info)
|
| 162 |
-
{
|
| 163 |
-
|
| 164 |
-
$temp = explode('@@@wdfhostwdf@@@',$db_info);
|
| 165 |
-
$host = $temp[0];
|
| 166 |
-
$temp = explode('@@@wdfportwdf@@@',$temp[1]);
|
| 167 |
-
$port = $temp[0];
|
| 168 |
-
$temp = explode('@@@wdfusernamewdf@@@',$temp[1]);
|
| 169 |
-
$username = $temp[0];
|
| 170 |
-
$temp = explode('@@@wdfpasswordwdf@@@',$temp[1]);
|
| 171 |
-
$password = $temp[0];
|
| 172 |
-
$temp = explode('@@@wdfdatabasewdf@@@',$temp[1]);
|
| 173 |
-
$database = $temp[0];
|
| 174 |
-
|
| 175 |
-
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
| 176 |
-
$choices_labels = $wpdb_temp->get_results($query,ARRAY_N);
|
| 177 |
-
}
|
| 178 |
-
else{
|
| 179 |
-
$choices_labels = $wpdb->get_results($query,ARRAY_N);
|
| 180 |
-
}
|
| 181 |
-
return $choices_labels;
|
| 182 |
-
}
|
| 183 |
-
|
| 184 |
-
public function select_data_from_db_for_values($db_info,$value_column, $table, $where, $order_by) {
|
| 185 |
-
global $wpdb;
|
| 186 |
-
|
| 187 |
-
$query = "SELECT `".$value_column."` FROM ".$table.$where." ORDER BY ".$order_by;
|
| 188 |
-
if($db_info)
|
| 189 |
-
{
|
| 190 |
-
$temp = explode('@@@wdfhostwdf@@@',$db_info);
|
| 191 |
-
$host = $temp[0];
|
| 192 |
-
$temp = explode('@@@wdfportwdf@@@',$temp[1]);
|
| 193 |
-
$port = $temp[0];
|
| 194 |
-
$temp = explode('@@@wdfusernamewdf@@@',$temp[1]);
|
| 195 |
-
$username = $temp[0];
|
| 196 |
-
$temp = explode('@@@wdfpasswordwdf@@@',$temp[1]);
|
| 197 |
-
$password = $temp[0];
|
| 198 |
-
$temp = explode('@@@wdfdatabasewdf@@@',$temp[1]);
|
| 199 |
-
$database = $temp[0];
|
| 200 |
-
|
| 201 |
-
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
| 202 |
-
$choices_values = $wpdb_temp->get_results($query,ARRAY_N);
|
| 203 |
-
}
|
| 204 |
-
else{
|
| 205 |
-
$choices_values = $wpdb->get_results($query,ARRAY_N);
|
| 206 |
-
}
|
| 207 |
-
return $choices_values;
|
| 208 |
-
}
|
| 209 |
-
|
| 210 |
-
public function save_db($counter, $id) {
|
| 211 |
-
global $wpdb;
|
| 212 |
-
$current_user = wp_get_current_user();
|
| 213 |
-
if ($current_user->ID != 0)
|
| 214 |
-
{
|
| 215 |
-
$wp_userid = $current_user->ID;
|
| 216 |
-
$wp_username = $current_user->display_name;
|
| 217 |
-
$wp_useremail = $current_user->user_email;
|
| 218 |
-
}
|
| 219 |
-
else
|
| 220 |
-
{
|
| 221 |
-
$wp_userid = '';
|
| 222 |
-
$wp_username = '';
|
| 223 |
-
$wp_useremail = '';
|
| 224 |
-
}
|
| 225 |
-
$ip = $_SERVER['REMOTE_ADDR'];
|
| 226 |
-
|
| 227 |
-
$chgnac = TRUE;
|
| 228 |
-
$all_files = array();
|
| 229 |
-
$paypal = array();
|
| 230 |
-
$paypal['item_name'] = array();
|
| 231 |
-
$paypal['quantity'] = array();
|
| 232 |
-
$paypal['amount'] = array();
|
| 233 |
-
$is_amount=false;
|
| 234 |
-
$paypal['on_os'] = array();
|
| 235 |
-
$total = 0;
|
| 236 |
-
$form_currency = '$';
|
| 237 |
-
$currency_code = array('USD', 'EUR', 'GBP', 'JPY', 'CAD', 'MXN', 'HKD', 'HUF', 'NOK', 'NZD', 'SGD', 'SEK', 'PLN', 'AUD', 'DKK', 'CHF', 'CZK', 'ILS', 'BRL', 'TWD', 'MYR', 'PHP', 'THB');
|
| 238 |
-
$currency_sign = array('$', '€', '£', '¥', 'C$', 'Mex$', 'HK$', 'Ft', 'kr', 'NZ$', 'S$', 'kr', 'zl', 'A$', 'kr', 'CHF', 'Kc', '₪', 'R$', 'NT$', 'RM', '₱', '฿');
|
| 239 |
-
$form = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id));
|
| 240 |
-
$id_old = $id;
|
| 241 |
-
if (!$form->form_front) {
|
| 242 |
-
$id = '';
|
| 243 |
-
}
|
| 244 |
-
if ($form->payment_currency) {
|
| 245 |
-
$form_currency = $currency_sign[array_search($form->payment_currency, $currency_code)];
|
| 246 |
-
}
|
| 247 |
-
$old = false;
|
| 248 |
-
if(isset($form->form)) {
|
| 249 |
-
$old = true;
|
| 250 |
-
}
|
| 251 |
-
$label_id = array();
|
| 252 |
-
$label_label = array();
|
| 253 |
-
$label_type = array();
|
| 254 |
-
|
| 255 |
-
$disabled_fields = explode(',', (isset($_REQUEST["disabled_fields".$id]) ? $_REQUEST["disabled_fields".$id] : ""));
|
| 256 |
-
$disabled_fields = array_slice($disabled_fields,0, count($disabled_fields)-1);
|
| 257 |
-
|
| 258 |
-
if($old == false || ($old == true && $form->form=='')) {
|
| 259 |
-
$label_all = explode('#****#',$form->label_order_current);
|
| 260 |
-
}
|
| 261 |
-
else {
|
| 262 |
-
$label_all = explode('#****#',$form->label_order);
|
| 263 |
-
}
|
| 264 |
-
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 265 |
-
foreach ($label_all as $key => $label_each) {
|
| 266 |
-
$label_id_each = explode('#**id**#', $label_each);
|
| 267 |
-
array_push($label_id, $label_id_each[0]);
|
| 268 |
-
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
| 269 |
-
array_push($label_label, $label_order_each[0]);
|
| 270 |
-
array_push($label_type, $label_order_each[1]);
|
| 271 |
-
}
|
| 272 |
-
$max = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
|
| 273 |
-
$fvals=array();
|
| 274 |
-
if ($old == FALSE || ($old == TRUE && $form->form == '')) {
|
| 275 |
-
foreach ($label_type as $key => $type) {
|
| 276 |
-
$value = '';
|
| 277 |
-
if ($type == "type_submit_reset" or $type == "type_map" or $type == "type_editor" or $type == "type_captcha" or $type == "type_arithmetic_captcha" or $type == "type_recaptcha" or $type == "type_button" or $type == "type_paypal_total" or $type == "type_send_copy")
|
| 278 |
-
continue;
|
| 279 |
-
|
| 280 |
-
$i = $label_id[$key];
|
| 281 |
-
if(!in_array($i,$disabled_fields)) {
|
| 282 |
-
switch ($type) {
|
| 283 |
-
case 'type_text':
|
| 284 |
-
case 'type_password':
|
| 285 |
-
case 'type_textarea':
|
| 286 |
-
case "type_submitter_mail":
|
| 287 |
-
case "type_date":
|
| 288 |
-
case "type_own_select":
|
| 289 |
-
case "type_country":
|
| 290 |
-
case "type_number": {
|
| 291 |
-
$value = isset($_POST['wdform_'.$i."_element".$id]) ? esc_html($_POST['wdform_'.$i."_element".$id]) : "";
|
| 292 |
-
break;
|
| 293 |
-
}
|
| 294 |
-
case "type_wdeditor": {
|
| 295 |
-
$value = isset($_POST['wdform_'.$i.'_wd_editor'.$id]) ? esc_html($_POST['wdform_'.$i.'_wd_editor'.$id]) : "";
|
| 296 |
-
break;
|
| 297 |
-
}
|
| 298 |
-
case "type_mark_map": {
|
| 299 |
-
$value = (isset($_POST['wdform_'.$i."_long".$id]) ? $_POST['wdform_'.$i."_long".$id] : "") . '***map***' . (isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "");
|
| 300 |
-
break;
|
| 301 |
-
}
|
| 302 |
-
case "type_date_fields": {
|
| 303 |
-
$value = (isset($_POST['wdform_'.$i."_day".$id]) ? $_POST['wdform_'.$i."_day".$id] : "") . '-' . (isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : "") . '-' . (isset($_POST['wdform_'.$i."_year".$id]) ? $_POST['wdform_'.$i."_year".$id] : "");
|
| 304 |
-
break;
|
| 305 |
-
}
|
| 306 |
-
case "type_time": {
|
| 307 |
-
$ss = isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : NULL;
|
| 308 |
-
if(isset($ss)) {
|
| 309 |
-
$value = (isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : "");
|
| 310 |
-
}
|
| 311 |
-
else {
|
| 312 |
-
$value = (isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
| 313 |
-
}
|
| 314 |
-
$am_pm = isset($_POST['wdform_'.$i."_am_pm".$id]) ? $_POST['wdform_'.$i."_am_pm".$id] : NULL;
|
| 315 |
-
if(isset($am_pm)) {
|
| 316 |
-
$value = $value . ' ' . $am_pm;
|
| 317 |
-
}
|
| 318 |
-
break;
|
| 319 |
-
}
|
| 320 |
-
case "type_phone": {
|
| 321 |
-
$value = (isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : "") . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "");
|
| 322 |
-
break;
|
| 323 |
-
}
|
| 324 |
-
case "type_name": {
|
| 325 |
-
$element_title = isset($_POST['wdform_'.$i."_element_title".$id]) ? esc_html($_POST['wdform_'.$i."_element_title".$id]) : NULL;
|
| 326 |
-
$element_middle = isset($_POST['wdform_'.$i."_element_middle".$id]) ? esc_html($_POST['wdform_'.$i."_element_middle".$id]) : NULL;
|
| 327 |
-
if(isset($element_title) || isset($element_middle)) {
|
| 328 |
-
$value = (isset($_POST['wdform_'.$i."_element_title".$id]) ? esc_html($_POST['wdform_'.$i."_element_title".$id]) : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_first".$id]) ? esc_html($_POST['wdform_'.$i."_element_first".$id]) : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? esc_html($_POST['wdform_'.$i."_element_last".$id]) : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_middle".$id]) ? esc_html($_POST['wdform_'.$i."_element_middle".$id]) : "");
|
| 329 |
-
}
|
| 330 |
-
else {
|
| 331 |
-
$value = (isset($_POST['wdform_'.$i."_element_first".$id]) ? esc_html($_POST['wdform_'.$i."_element_first".$id]) : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? esc_html($_POST['wdform_'.$i."_element_last".$id]) : "");
|
| 332 |
-
}
|
| 333 |
-
break;
|
| 334 |
-
}
|
| 335 |
-
case "type_file_upload": {
|
| 336 |
-
$files = isset($_FILES['wdform_'.$i.'_file'.$id]) ? $_FILES['wdform_'.$i.'_file'.$id] : NULL;
|
| 337 |
-
foreach($files['name'] as $file_key => $file_name) {
|
| 338 |
-
if($file_name) {
|
| 339 |
-
$untilupload = $form->form_fields;
|
| 340 |
-
$untilupload = substr($untilupload, strpos($untilupload,$i.'*:*id*:*type_file_upload'), -1);
|
| 341 |
-
$untilupload = substr($untilupload, 0, strpos($untilupload,'*:*new_field*:'));
|
| 342 |
-
$untilupload = explode('*:*w_field_label_pos*:*',$untilupload);
|
| 343 |
-
$untilupload = $untilupload[1];
|
| 344 |
-
$untilupload = explode('*:*w_destination*:*',$untilupload);
|
| 345 |
-
$destination = $untilupload[0];
|
| 346 |
-
$destination = str_replace(site_url() . '/', '', $destination);
|
| 347 |
-
$untilupload = $untilupload[1];
|
| 348 |
-
$untilupload = explode('*:*w_extension*:*',$untilupload);
|
| 349 |
-
$extension = $untilupload[0];
|
| 350 |
-
$untilupload = $untilupload[1];
|
| 351 |
-
$untilupload = explode('*:*w_max_size*:*',$untilupload);
|
| 352 |
-
$max_size = $untilupload[0];
|
| 353 |
-
$untilupload = $untilupload[1];
|
| 354 |
-
$fileName = $files['name'][$file_key];
|
| 355 |
-
$fileSize = $files['size'][$file_key];
|
| 356 |
-
|
| 357 |
-
if($fileSize > $max_size * 1024) {
|
| 358 |
-
echo "<script> alert('" . addslashes(__('The file exceeds the allowed size of', 'form_maker')) . $max_size . " KB');</script>";
|
| 359 |
-
return array($max+1);
|
| 360 |
-
}
|
| 361 |
-
|
| 362 |
-
$uploadedFileNameParts = explode('.',$fileName);
|
| 363 |
-
$uploadedFileExtension = array_pop($uploadedFileNameParts);
|
| 364 |
-
$to = strlen($fileName) - strlen($uploadedFileExtension) - 1;
|
| 365 |
-
|
| 366 |
-
$fileNameFree = substr($fileName, 0, $to);
|
| 367 |
-
$invalidFileExts = explode(',', $extension);
|
| 368 |
-
$extOk = false;
|
| 369 |
-
|
| 370 |
-
foreach($invalidFileExts as $key => $valuee) {
|
| 371 |
-
if(is_numeric(strpos(strtolower($valuee), strtolower($uploadedFileExtension)))) {
|
| 372 |
-
$extOk = true;
|
| 373 |
-
}
|
| 374 |
-
}
|
| 375 |
-
|
| 376 |
-
if ($extOk == false) {
|
| 377 |
-
echo "<script> alert('" . addslashes(__('Sorry, you are not allowed to upload this type of file.', 'form_maker')) . "');</script>";
|
| 378 |
-
return array($max+1);
|
| 379 |
-
}
|
| 380 |
-
|
| 381 |
-
$fileTemp = $files['tmp_name'][$file_key];
|
| 382 |
-
$p = 1;
|
| 383 |
-
|
| 384 |
-
if(!file_exists($destination))
|
| 385 |
-
mkdir($destination , 0777);
|
| 386 |
-
if (file_exists($destination . "/" . $fileName)) {
|
| 387 |
-
$fileName1 = $fileName;
|
| 388 |
-
while (file_exists($destination . "/" . $fileName1)) {
|
| 389 |
-
$to = strlen($file_name) - strlen($uploadedFileExtension) - 1;
|
| 390 |
-
$fileName1 = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
|
| 391 |
-
// $file['name'] = $fileName;
|
| 392 |
-
$p++;
|
| 393 |
-
}
|
| 394 |
-
$fileName = $fileName1;
|
| 395 |
-
}
|
| 396 |
-
|
| 397 |
-
// for dropbox & google drive integration addons
|
| 398 |
-
$check_both = 0;
|
| 399 |
-
if($form->save_uploads == 0){
|
| 400 |
-
if(defined('WD_FM_DBOX_INT') && is_plugin_active(constant('WD_FM_DBOX_INT'))){
|
| 401 |
-
$enable = $wpdb->get_var("SELECT enable FROM " . $wpdb->prefix ."formmaker_dbox_int WHERE form_id=" . $form->id);
|
| 402 |
-
if($enable == 1){
|
| 403 |
-
$selectable_upload = $wpdb->get_var("SELECT selectable_upload FROM " . $wpdb->prefix ."formmaker_dbox_int WHERE form_id=" . $form->id);
|
| 404 |
-
|
| 405 |
-
if((int)$selectable_upload == 1){
|
| 406 |
-
$temp_dir_dbox = explode('\\', $fileTemp);
|
| 407 |
-
$temp_dir_dbox = implode('%%', $temp_dir_dbox);
|
| 408 |
-
|
| 409 |
-
$value.= $temp_dir_dbox . '*@@url@@*' . $fileName;
|
| 410 |
-
}
|
| 411 |
-
else{
|
| 412 |
-
$dlink_dbox = '<a href="'.add_query_arg(array('action' => 'WD_FM_DBOX_INT', 'addon_task' => 'upload_dbox_file', 'id' => $form->id), admin_url('admin-ajax.php')).'&dbox_file_name=' . $fileName . '&dbox_folder_name=/'.$form->title.'" >' . $fileName . '</a>';
|
| 413 |
-
|
| 414 |
-
$value.= $dlink_dbox;
|
| 415 |
-
}
|
| 416 |
-
|
| 417 |
-
$files['tmp_name'][$file_key]=$fileTemp;
|
| 418 |
-
$temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 419 |
-
}
|
| 420 |
-
else
|
| 421 |
-
$check_both ++;
|
| 422 |
-
|
| 423 |
-
}
|
| 424 |
-
else
|
| 425 |
-
$check_both ++;
|
| 426 |
-
if(defined('WD_FM_GDRIVE_INT') && is_plugin_active(constant('WD_FM_GDRIVE_INT'))){
|
| 427 |
-
$enable = $wpdb->get_var("SELECT enable FROM " . $wpdb->prefix ."formmaker_gdrive_int WHERE form_id=" . $form->id);
|
| 428 |
-
if($enable == 1){
|
| 429 |
-
$selectable_upload = $wpdb->get_var("SELECT selectable_upload FROM " . $wpdb->prefix ."formmaker_gdrive_int WHERE form_id=" . $form->id);
|
| 430 |
-
|
| 431 |
-
if((int)$selectable_upload == 1){
|
| 432 |
-
$temp_dir_dbox = explode('\\', $fileTemp);
|
| 433 |
-
$temp_dir_dbox = implode('%%', $temp_dir_dbox);
|
| 434 |
-
$value.= 'wdCloudAddon' . $temp_dir_dbox . '*@@url@@*' . $fileName . '*@@url@@*' . $files['type'][$file_key];
|
| 435 |
-
}
|
| 436 |
-
else{
|
| 437 |
-
$dlink_dbox = '<a target="_blank" href="'.add_query_arg(array('action' => 'WD_FM_GDRIVE_INT', 'addon_task' => 'create_drive_link', 'id' => $form->id), admin_url('admin-ajax.php')).'&gdrive_file_name=' . $fileName . '&gdrive_folder_name='.$form->title.'" >' . $fileName . '</a>';
|
| 438 |
-
$value.= $dlink_dbox;
|
| 439 |
-
}
|
| 440 |
-
|
| 441 |
-
$files['tmp_name'][$file_key]=$fileTemp;
|
| 442 |
-
$temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 443 |
-
}
|
| 444 |
-
else
|
| 445 |
-
$check_both ++;
|
| 446 |
-
|
| 447 |
-
}
|
| 448 |
-
else
|
| 449 |
-
$check_both ++;
|
| 450 |
-
|
| 451 |
-
}
|
| 452 |
-
//
|
| 453 |
-
if($check_both != 0){
|
| 454 |
-
$value.= '';
|
| 455 |
-
$files['tmp_name'][$file_key]=$fileTemp;
|
| 456 |
-
$temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 457 |
-
}
|
| 458 |
-
// dropbox and google drive integration addons
|
| 459 |
-
if($form->save_uploads == 1){
|
| 460 |
-
if(!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
|
| 461 |
-
echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
|
| 462 |
-
return array($max+1);
|
| 463 |
-
}
|
| 464 |
-
$value.= site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
|
| 465 |
-
$files['tmp_name'][$file_key]=$destination . "/" . $fileName;
|
| 466 |
-
$temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 467 |
-
|
| 468 |
-
}
|
| 469 |
-
array_push($all_files,$temp_file);
|
| 470 |
-
}
|
| 471 |
-
}
|
| 472 |
-
break;
|
| 473 |
-
}
|
| 474 |
-
|
| 475 |
-
case 'type_address': {
|
| 476 |
-
$value = '*#*#*#';
|
| 477 |
-
$element = isset($_POST['wdform_'.$i."_street1".$id]) ? esc_html($_POST['wdform_'.$i."_street1".$id]) : NULL;
|
| 478 |
-
if(isset($element)) {
|
| 479 |
-
$value = $element;
|
| 480 |
-
break;
|
| 481 |
-
}
|
| 482 |
-
|
| 483 |
-
$element = isset($_POST['wdform_'.$i."_street2".$id]) ? esc_html($_POST['wdform_'.$i."_street2".$id]) : NULL;
|
| 484 |
-
if(isset($element)) {
|
| 485 |
-
$value = $element;
|
| 486 |
-
break;
|
| 487 |
-
}
|
| 488 |
-
|
| 489 |
-
$element = isset($_POST['wdform_'.$i."_city".$id]) ? esc_html($_POST['wdform_'.$i."_city".$id]) : NULL;
|
| 490 |
-
if(isset($element)) {
|
| 491 |
-
$value = $element;
|
| 492 |
-
break;
|
| 493 |
-
}
|
| 494 |
-
|
| 495 |
-
$element = isset($_POST['wdform_'.$i."_state".$id]) ? esc_html($_POST['wdform_'.$i."_state".$id]) : NULL;
|
| 496 |
-
if(isset($element)) {
|
| 497 |
-
$value = $element;
|
| 498 |
-
break;
|
| 499 |
-
}
|
| 500 |
-
|
| 501 |
-
$element = isset($_POST['wdform_'.$i."_postal".$id]) ? esc_html($_POST['wdform_'.$i."_postal".$id]) : NULL;
|
| 502 |
-
if(isset($element)) {
|
| 503 |
-
$value = $element;
|
| 504 |
-
break;
|
| 505 |
-
}
|
| 506 |
-
|
| 507 |
-
$element = isset($_POST['wdform_'.$i."_country".$id]) ? esc_html($_POST['wdform_'.$i."_country".$id]) : NULL;
|
| 508 |
-
if(isset($element)) {
|
| 509 |
-
$value = $element;
|
| 510 |
-
break;
|
| 511 |
-
}
|
| 512 |
-
break;
|
| 513 |
-
}
|
| 514 |
-
|
| 515 |
-
case "type_hidden": {
|
| 516 |
-
$value = isset($_POST[$label_label[$key]]) ? esc_html($_POST[$label_label[$key]]) : "";
|
| 517 |
-
break;
|
| 518 |
-
}
|
| 519 |
-
|
| 520 |
-
case "type_radio": {
|
| 521 |
-
$element = isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : NULL;
|
| 522 |
-
if(isset($element)) {
|
| 523 |
-
$value = $element;
|
| 524 |
-
break;
|
| 525 |
-
}
|
| 526 |
-
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
| 527 |
-
break;
|
| 528 |
-
}
|
| 529 |
-
|
| 530 |
-
case "type_checkbox": {
|
| 531 |
-
$start = -1;
|
| 532 |
-
$value = '';
|
| 533 |
-
for($j = 0; $j < 100; $j++) {
|
| 534 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 535 |
-
if(isset($element)) {
|
| 536 |
-
$start = $j;
|
| 537 |
-
break;
|
| 538 |
-
}
|
| 539 |
-
}
|
| 540 |
-
|
| 541 |
-
$other_element_id = -1;
|
| 542 |
-
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
| 543 |
-
if($is_other == "yes") {
|
| 544 |
-
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
| 545 |
-
}
|
| 546 |
-
|
| 547 |
-
if($start != -1) {
|
| 548 |
-
for($j = $start; $j < 100; $j++) {
|
| 549 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 550 |
-
if(isset($element)) {
|
| 551 |
-
if($j == $other_element_id) {
|
| 552 |
-
$value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '***br***';
|
| 553 |
-
}
|
| 554 |
-
else {
|
| 555 |
-
$value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "") . '***br***';
|
| 556 |
-
}
|
| 557 |
-
}
|
| 558 |
-
}
|
| 559 |
-
}
|
| 560 |
-
break;
|
| 561 |
-
}
|
| 562 |
-
|
| 563 |
-
case "type_paypal_price": {
|
| 564 |
-
$value = isset($_POST['wdform_'.$i."_element_dollars".$id]) ? $_POST['wdform_'.$i."_element_dollars".$id] : 0;
|
| 565 |
-
|
| 566 |
-
$value = (int) preg_replace('/\D/', '', $value);
|
| 567 |
-
|
| 568 |
-
if(isset($_POST['wdform_'.$i."_element_cents".$id])) {
|
| 569 |
-
$value = $value . '.' . ( preg_replace('/\D/', '', $_POST['wdform_'.$i."_element_cents".$id]));
|
| 570 |
-
}
|
| 571 |
-
|
| 572 |
-
$total += (float)($value);
|
| 573 |
-
$paypal_option = array();
|
| 574 |
-
|
| 575 |
-
if($value != 0) {
|
| 576 |
-
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
| 577 |
-
array_push ($paypal['item_name'], $label_label[$key]);
|
| 578 |
-
array_push ($paypal['quantity'], $quantity);
|
| 579 |
-
array_push ($paypal['amount'], $value);
|
| 580 |
-
$is_amount=true;
|
| 581 |
-
array_push ($paypal['on_os'], $paypal_option);
|
| 582 |
-
}
|
| 583 |
-
$value = $value . $form_currency;
|
| 584 |
-
break;
|
| 585 |
-
}
|
| 586 |
-
|
| 587 |
-
case "type_paypal_select": {
|
| 588 |
-
if(isset($_POST['wdform_'.$i."_element_label".$id]) && $_POST['wdform_'.$i."_element".$id] !='') {
|
| 589 |
-
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 590 |
-
}
|
| 591 |
-
else {
|
| 592 |
-
$value = '';
|
| 593 |
-
}
|
| 594 |
-
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
| 595 |
-
$total += (float)(isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0) * $quantity;
|
| 596 |
-
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : ""));
|
| 597 |
-
array_push ($paypal['quantity'], $quantity);
|
| 598 |
-
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : ""));
|
| 599 |
-
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] != 0) {
|
| 600 |
-
$is_amount=true;
|
| 601 |
-
}
|
| 602 |
-
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 603 |
-
if(isset($element_quantity) && $value != '') {
|
| 604 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
| 605 |
-
}
|
| 606 |
-
$paypal_option = array();
|
| 607 |
-
$paypal_option['on'] = array();
|
| 608 |
-
$paypal_option['os'] = array();
|
| 609 |
-
|
| 610 |
-
for($k = 0; $k < 50; $k++) {
|
| 611 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 612 |
-
if(isset($temp_val) && $value != '') {
|
| 613 |
-
array_push ($paypal_option['on'], (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : ""));
|
| 614 |
-
array_push ($paypal_option['os'], (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : ""));
|
| 615 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : "") . '***property***';
|
| 616 |
-
}
|
| 617 |
-
}
|
| 618 |
-
array_push ($paypal['on_os'], $paypal_option);
|
| 619 |
-
break;
|
| 620 |
-
}
|
| 621 |
-
|
| 622 |
-
case "type_paypal_radio": {
|
| 623 |
-
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
| 624 |
-
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 625 |
-
}
|
| 626 |
-
else {
|
| 627 |
-
$value = '';
|
| 628 |
-
}
|
| 629 |
-
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
| 630 |
-
$total += (float)(isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0) * $quantity;
|
| 631 |
-
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : ""));
|
| 632 |
-
array_push ($paypal['quantity'], $quantity);
|
| 633 |
-
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0));
|
| 634 |
-
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] != 0) {
|
| 635 |
-
$is_amount=true;
|
| 636 |
-
}
|
| 637 |
-
|
| 638 |
-
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 639 |
-
if(isset($element_quantity) && $value != '') {
|
| 640 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
| 641 |
-
}
|
| 642 |
-
|
| 643 |
-
$paypal_option = array();
|
| 644 |
-
$paypal_option['on'] = array();
|
| 645 |
-
$paypal_option['os'] = array();
|
| 646 |
-
|
| 647 |
-
for($k = 0; $k < 50; $k++) {
|
| 648 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 649 |
-
if(isset($temp_val) && $value != '') {
|
| 650 |
-
array_push ($paypal_option['on'], (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : ""));
|
| 651 |
-
array_push ($paypal_option['os'], $_POST['wdform_'.$i."_property".$id.$k]);
|
| 652 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $_POST['wdform_'.$i."_property".$id.$k] . '***property***';
|
| 653 |
-
}
|
| 654 |
-
}
|
| 655 |
-
array_push ($paypal['on_os'], $paypal_option);
|
| 656 |
-
break;
|
| 657 |
-
}
|
| 658 |
-
|
| 659 |
-
case "type_paypal_shipping": {
|
| 660 |
-
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
| 661 |
-
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 662 |
-
}
|
| 663 |
-
else {
|
| 664 |
-
$value = '';
|
| 665 |
-
}
|
| 666 |
-
$value = (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : "") . ' - ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 667 |
-
$paypal['shipping'] = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
| 668 |
-
break;
|
| 669 |
-
}
|
| 670 |
-
|
| 671 |
-
case "type_paypal_checkbox": {
|
| 672 |
-
$start = -1;
|
| 673 |
-
$value = '';
|
| 674 |
-
for($j = 0; $j < 100; $j++) {
|
| 675 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 676 |
-
if(isset($element)) {
|
| 677 |
-
$start = $j;
|
| 678 |
-
break;
|
| 679 |
-
}
|
| 680 |
-
}
|
| 681 |
-
|
| 682 |
-
$other_element_id = -1;
|
| 683 |
-
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
| 684 |
-
if($is_other == "yes") {
|
| 685 |
-
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
| 686 |
-
}
|
| 687 |
-
|
| 688 |
-
if($start != -1) {
|
| 689 |
-
for($j = $start; $j < 100; $j++) {
|
| 690 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 691 |
-
if(isset($element)) {
|
| 692 |
-
if($j == $other_element_id) {
|
| 693 |
-
$value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '***br***';
|
| 694 |
-
}
|
| 695 |
-
else {
|
| 696 |
-
$value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "") . ' - ' . (isset($_POST['wdform_'.$i."_element".$id.$j]) && $_POST['wdform_'.$i."_element".$id.$j] == '' ? '0' : (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "")) . $form_currency . '***br***';
|
| 697 |
-
$quantity = ((isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && ($_POST['wdform_' . $i . "_element_quantity" . $id] >= 1)) ? $_POST['wdform_'.$i . "_element_quantity" . $id] : 1);
|
| 698 |
-
$total += (float)(isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : 0) * (float)($quantity);
|
| 699 |
-
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : ""));
|
| 700 |
-
array_push ($paypal['quantity'], $quantity);
|
| 701 |
-
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id.$j]) ? ($_POST['wdform_'.$i."_element".$id.$j] == '' ? '0' : $_POST['wdform_'.$i."_element".$id.$j]) : ""));
|
| 702 |
-
if (isset($_POST['wdform_'.$i."_element".$id.$j]) && $_POST['wdform_'.$i."_element".$id.$j] != 0) {
|
| 703 |
-
$is_amount = TRUE;
|
| 704 |
-
}
|
| 705 |
-
$paypal_option = array();
|
| 706 |
-
$paypal_option['on'] = array();
|
| 707 |
-
$paypal_option['os'] = array();
|
| 708 |
-
|
| 709 |
-
for($k = 0; $k < 50; $k++) {
|
| 710 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 711 |
-
if(isset($temp_val)) {
|
| 712 |
-
array_push ($paypal_option['on'], isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "");
|
| 713 |
-
array_push ($paypal_option['os'], $_POST['wdform_'.$i."_property".$id.$k]);
|
| 714 |
-
}
|
| 715 |
-
}
|
| 716 |
-
array_push ($paypal['on_os'], $paypal_option);
|
| 717 |
-
}
|
| 718 |
-
}
|
| 719 |
-
}
|
| 720 |
-
|
| 721 |
-
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 722 |
-
if(isset($element_quantity)) {
|
| 723 |
-
$value .= (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
| 724 |
-
}
|
| 725 |
-
for($k = 0; $k < 50; $k++) {
|
| 726 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 727 |
-
if(isset($temp_val)) {
|
| 728 |
-
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $_POST['wdform_'.$i."_property".$id.$k] . '***property***';
|
| 729 |
-
}
|
| 730 |
-
}
|
| 731 |
-
}
|
| 732 |
-
break;
|
| 733 |
-
}
|
| 734 |
-
|
| 735 |
-
case "type_star_rating": {
|
| 736 |
-
if(isset($_POST['wdform_'.$i."_selected_star_amount".$id]) && $_POST['wdform_'.$i."_selected_star_amount".$id] == "") {
|
| 737 |
-
$selected_star_amount = 0;
|
| 738 |
-
}
|
| 739 |
-
else {
|
| 740 |
-
$selected_star_amount = isset($_POST['wdform_'.$i."_selected_star_amount".$id]) ? $_POST['wdform_'.$i."_selected_star_amount".$id] : 0;
|
| 741 |
-
}
|
| 742 |
-
$value = $selected_star_amount . '/' . (isset($_POST['wdform_'.$i."_star_amount".$id]) ? $_POST['wdform_'.$i."_star_amount".$id] : "");
|
| 743 |
-
break;
|
| 744 |
-
}
|
| 745 |
-
|
| 746 |
-
case "type_scale_rating": {
|
| 747 |
-
$value = (isset($_POST['wdform_'.$i."_scale_radio".$id]) ? $_POST['wdform_'.$i."_scale_radio".$id] : 0) . '/' . (isset($_POST['wdform_'.$i."_scale_amount".$id]) ? $_POST['wdform_'.$i."_scale_amount".$id] : "");
|
| 748 |
-
break;
|
| 749 |
-
}
|
| 750 |
-
|
| 751 |
-
case "type_spinner": {
|
| 752 |
-
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
| 753 |
-
break;
|
| 754 |
-
}
|
| 755 |
-
|
| 756 |
-
case "type_slider": {
|
| 757 |
-
$value = isset($_POST['wdform_'.$i."_slider_value".$id]) ? $_POST['wdform_'.$i."_slider_value".$id] : "";
|
| 758 |
-
break;
|
| 759 |
-
}
|
| 760 |
-
|
| 761 |
-
case "type_range": {
|
| 762 |
-
$value = (isset($_POST['wdform_'.$i."_element".$id.'0']) ? $_POST['wdform_'.$i."_element".$id.'0'] : "") . '-' . (isset($_POST['wdform_'.$i."_element".$id.'1']) ? $_POST['wdform_'.$i."_element".$id.'1'] : "");
|
| 763 |
-
break;
|
| 764 |
-
}
|
| 765 |
-
|
| 766 |
-
case "type_grading": {
|
| 767 |
-
$value = "";
|
| 768 |
-
$items = explode(":", isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "");
|
| 769 |
-
for($k = 0; $k < sizeof($items) - 1; $k++) {
|
| 770 |
-
$value .= (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : "") . ':';
|
| 771 |
-
}
|
| 772 |
-
$value .= (isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "") . '***grading***';
|
| 773 |
-
break;
|
| 774 |
-
}
|
| 775 |
-
|
| 776 |
-
case "type_matrix": {
|
| 777 |
-
$rows_of_matrix = explode("***", isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "");
|
| 778 |
-
$rows_count = sizeof($rows_of_matrix) - 1;
|
| 779 |
-
$column_of_matrix = explode("***", isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "");
|
| 780 |
-
$columns_count = sizeof($column_of_matrix) - 1;
|
| 781 |
-
|
| 782 |
-
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "radio") {
|
| 783 |
-
$input_value = "";
|
| 784 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
| 785 |
-
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k]) ? $_POST['wdform_'.$i."_input_element".$id.$k] : 0) . "***";
|
| 786 |
-
}
|
| 787 |
-
}
|
| 788 |
-
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "checkbox") {
|
| 789 |
-
$input_value = "";
|
| 790 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
| 791 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
| 792 |
-
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : 0)."***";
|
| 793 |
-
}
|
| 794 |
-
}
|
| 795 |
-
}
|
| 796 |
-
|
| 797 |
-
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "text") {
|
| 798 |
-
$input_value = "";
|
| 799 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
| 800 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
| 801 |
-
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? esc_html($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) : "") . "***";
|
| 802 |
-
}
|
| 803 |
-
}
|
| 804 |
-
}
|
| 805 |
-
|
| 806 |
-
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "select") {
|
| 807 |
-
$input_value = "";
|
| 808 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
| 809 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
| 810 |
-
$input_value .= (isset($_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j] : "") . "***";
|
| 811 |
-
}
|
| 812 |
-
}
|
| 813 |
-
}
|
| 814 |
-
|
| 815 |
-
$value = $rows_count . (isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "") . '***' . $columns_count . (isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "") . '***' . (isset($_POST['wdform_'.$i."_input_type".$id]) ? $_POST['wdform_'.$i."_input_type".$id] : "") . '***' . $input_value . '***matrix***';
|
| 816 |
-
break;
|
| 817 |
-
}
|
| 818 |
-
|
| 819 |
-
}
|
| 820 |
-
|
| 821 |
-
if($type == "type_address") {
|
| 822 |
-
if( $value == '*#*#*#') {
|
| 823 |
-
continue;
|
| 824 |
-
}
|
| 825 |
-
}
|
| 826 |
-
if($type == "type_text" or $type == "type_password" or $type == "type_textarea" or $type == "type_name" or $type == "type_submitter_mail" or $type == "type_number" or $type == "type_phone")
|
| 827 |
-
{
|
| 828 |
-
$untilupload = $form->form_fields;
|
| 829 |
-
$untilupload = substr($untilupload, strpos($untilupload, $i.'*:*id*:*'.$type), -1);
|
| 830 |
-
$untilupload = substr($untilupload, 0, strpos($untilupload, '*:*new_field*:'));
|
| 831 |
-
$untilupload = explode('*:*w_required*:*', $untilupload);
|
| 832 |
-
$untilupload = $untilupload[1];
|
| 833 |
-
$untilupload = explode('*:*w_unique*:*', $untilupload);
|
| 834 |
-
$unique_element = $untilupload[0];
|
| 835 |
-
if(strlen($unique_element)>3)
|
| 836 |
-
$unique_element = substr($unique_element, -3);
|
| 837 |
-
|
| 838 |
-
if($unique_element == 'yes') {
|
| 839 |
-
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes($value)));
|
| 840 |
-
if ($unique) {
|
| 841 |
-
echo "<script> alert('" . addslashes(__('This field %s requires a unique entry and this value was already submitted.', 'form_maker')) . "'.replace('%s','" . $label_label[$key] . "'));</script>";
|
| 842 |
-
return array($max + 1);
|
| 843 |
-
}
|
| 844 |
-
}
|
| 845 |
-
}
|
| 846 |
-
$save_or_no = TRUE;
|
| 847 |
-
$fvals['{'.$i.'}']=str_replace(array("***map***", "*@@url@@*", "@@@@@@@@@", "@@@", "***grading***", "***br***"), array(" ", "", " ", " ", " ", ", "), addslashes($value));
|
| 848 |
-
if ($form->savedb) {
|
| 849 |
-
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 850 |
-
'form_id' => $id,
|
| 851 |
-
'element_label' => $i,
|
| 852 |
-
'element_value' => stripslashes($value),
|
| 853 |
-
'group_id' => ($max + 1),
|
| 854 |
-
'date' => date('Y-m-d H:i:s'),
|
| 855 |
-
'ip' => $_SERVER['REMOTE_ADDR'],
|
| 856 |
-
'user_id_wd' => $current_user->ID,
|
| 857 |
-
), array(
|
| 858 |
-
'%d',
|
| 859 |
-
'%s',
|
| 860 |
-
'%s',
|
| 861 |
-
'%d',
|
| 862 |
-
'%s',
|
| 863 |
-
'%s',
|
| 864 |
-
'%d'
|
| 865 |
-
));
|
| 866 |
-
}
|
| 867 |
-
if (!$save_or_no) {
|
| 868 |
-
return FALSE;
|
| 869 |
-
}
|
| 870 |
-
$chgnac = FALSE;
|
| 871 |
-
}
|
| 872 |
-
else{
|
| 873 |
-
$fvals['{'.$i.'}']='';
|
| 874 |
-
}
|
| 875 |
-
}
|
| 876 |
-
}
|
| 877 |
-
else {
|
| 878 |
-
foreach ($label_type as $key => $type) {
|
| 879 |
-
$value = '';
|
| 880 |
-
if ($type == "type_submit_reset" or $type == "type_map" or $type == "type_editor" or $type == "type_captcha" or $type == "type_arithmetic_captcha" or $type == "type_recaptcha" or $type == "type_button" or $type=="type_paypal_total")
|
| 881 |
-
continue;
|
| 882 |
-
$i = $label_id[$key];
|
| 883 |
-
if ($type != "type_address") {
|
| 884 |
-
$deleted = isset($_POST[$i . "_type" . $id]) ? $_POST[$i . "_type" . $id] : NULL;
|
| 885 |
-
if (!isset($deleted))
|
| 886 |
-
break;
|
| 887 |
-
}
|
| 888 |
-
if ($type == 'type_paypal_total') {
|
| 889 |
-
continue;
|
| 890 |
-
}
|
| 891 |
-
switch ($type) {
|
| 892 |
-
case 'type_text':
|
| 893 |
-
case 'type_password':
|
| 894 |
-
case 'type_textarea':
|
| 895 |
-
case "type_submitter_mail":
|
| 896 |
-
case "type_date":
|
| 897 |
-
case "type_own_select":
|
| 898 |
-
case "type_country":
|
| 899 |
-
case "type_number": {
|
| 900 |
-
$value = isset($_POST[$i . "_element" . $id]) ? esc_html($_POST[$i . "_element" . $id]) : "";
|
| 901 |
-
break;
|
| 902 |
-
}
|
| 903 |
-
case "type_mark_map": {
|
| 904 |
-
$value = (isset($_POST[$i . "_long" . $id]) ? $_POST[$i . "_long" . $id] : "") . '***map***' . (isset($_POST[$i . "_lat" . $id]) ? $_POST[$i . "_lat" . $id] : "");
|
| 905 |
-
break;
|
| 906 |
-
}
|
| 907 |
-
case "type_date_fields": {
|
| 908 |
-
$value = (isset($_POST[$i . "_day" . $id]) ? $_POST[$i . "_day" . $id] : "") . '-' . (isset($_POST[$i . "_month" . $id]) ? $_POST[$i . "_month" . $id] : "") . '-' . (isset($_POST[$i . "_year" . $id]) ? $_POST[$i . "_year" . $id] : "");
|
| 909 |
-
break;
|
| 910 |
-
}
|
| 911 |
-
case "type_time": {
|
| 912 |
-
$ss = isset($_POST[$i . "_ss" . $id]) ? $_POST[$i . "_ss" . $id] : NULL;
|
| 913 |
-
if (isset($ss)) {
|
| 914 |
-
$value = (isset($_POST[$i . "_hh" . $id]) ? $_POST[$i . "_hh" . $id] : "") . ':' . (isset($_POST[$i . "_mm" . $id]) ? $_POST[$i . "_mm" . $id] : "") . ':' . $ss;
|
| 915 |
-
}
|
| 916 |
-
else {
|
| 917 |
-
$value = (isset($_POST[$i . "_hh" . $id]) ? $_POST[$i . "_hh" . $id] : "") . ':' . (isset($_POST[$i . "_mm" . $id]) ? $_POST[$i . "_mm" . $id] : "");
|
| 918 |
-
}
|
| 919 |
-
$am_pm = isset($_POST[$i . "_am_pm" . $id]) ? $_POST[$i . "_am_pm" . $id] : NULL;
|
| 920 |
-
if (isset($am_pm))
|
| 921 |
-
$value = $value . ' ' . $am_pm;
|
| 922 |
-
break;
|
| 923 |
-
}
|
| 924 |
-
case "type_phone": {
|
| 925 |
-
$value = (isset($_POST[$i . "_element_first" . $id]) ? $_POST[$i . "_element_first" . $id] : "") . ' ' . (isset($_POST[$i . "_element_last" . $id]) ? $_POST[$i . "_element_last" . $id] : "");
|
| 926 |
-
break;
|
| 927 |
-
}
|
| 928 |
-
case "type_name": {
|
| 929 |
-
$element_title = isset($_POST[$i . "_element_title" . $id]) ? esc_html($_POST[$i . "_element_title" . $id]) : NULL;
|
| 930 |
-
if (isset($element_title)) {
|
| 931 |
-
$value = $element_title . ' ' . (isset($_POST[$i . "_element_first" . $id]) ? esc_html($_POST[$i . "_element_first" . $id]) : "") . ' ' . (isset($_POST[$i . "_element_last" . $id]) ? esc_html($_POST[$i . "_element_last" . $id]) : "") . ' ' . (isset($_POST[$i . "_element_middle" . $id]) ? esc_html($_POST[$i . "_element_middle" . $id]) : "");
|
| 932 |
-
}
|
| 933 |
-
else {
|
| 934 |
-
$value = (isset($_POST[$i . "_element_first" . $id]) ? esc_html($_POST[$i . "_element_first" . $id]) : "") . ' ' . (isset($_POST[$i . "_element_last" . $id]) ? esc_html($_POST[$i . "_element_last" . $id]) : "");
|
| 935 |
-
}
|
| 936 |
-
break;
|
| 937 |
-
}
|
| 938 |
-
case "type_file_upload": {
|
| 939 |
-
$file = isset($_FILES[$i . '_file' . $id]) ? $_FILES[$i . '_file' . $id] : NULL;
|
| 940 |
-
if ($file['name']) {
|
| 941 |
-
$untilupload = $form->form;
|
| 942 |
-
$pos1 = strpos($untilupload, "***destinationskizb" . $i . "***");
|
| 943 |
-
$pos2 = strpos($untilupload, "***destinationverj" . $i . "***");
|
| 944 |
-
$destination = substr($untilupload, $pos1 + (23 + (strlen($i) - 1)), $pos2 - $pos1 - (23 + (strlen($i) - 1)));
|
| 945 |
-
$pos1 = strpos($untilupload, "***extensionskizb" . $i . "***");
|
| 946 |
-
$pos2 = strpos($untilupload, "***extensionverj" . $i . "***");
|
| 947 |
-
$extension = substr($untilupload, $pos1 + (21 + (strlen($i) - 1)), $pos2 - $pos1 - (21 + (strlen($i) - 1)));
|
| 948 |
-
$pos1 = strpos($untilupload, "***max_sizeskizb" . $i . "***");
|
| 949 |
-
$pos2 = strpos($untilupload, "***max_sizeverj" . $i . "***");
|
| 950 |
-
$max_size = substr($untilupload, $pos1 + (20 + (strlen($i) - 1)), $pos2 - $pos1 - (20 + (strlen($i) - 1)));
|
| 951 |
-
$fileName = $file['name'];
|
| 952 |
-
$destination = str_replace(site_url() . '/', '', $destination);
|
| 953 |
-
$fileSize = $file['size'];
|
| 954 |
-
if ($fileSize > $max_size * 1024) {
|
| 955 |
-
echo "<script> alert('" . addslashes(__('The file exceeds the allowed size of', 'form_maker')) . $max_size . " KB');</script>";
|
| 956 |
-
return array($max + 1);
|
| 957 |
-
}
|
| 958 |
-
$uploadedFileNameParts = explode('.', $fileName);
|
| 959 |
-
$uploadedFileExtension = array_pop($uploadedFileNameParts);
|
| 960 |
-
$to = strlen($fileName) - strlen($uploadedFileExtension) - 1;
|
| 961 |
-
$fileNameFree = substr($fileName, 0, $to);
|
| 962 |
-
$invalidFileExts = explode(',', $extension);
|
| 963 |
-
$extOk = FALSE;
|
| 964 |
-
foreach ($invalidFileExts as $key => $value) {
|
| 965 |
-
if (is_numeric(strpos(strtolower($value), strtolower($uploadedFileExtension)))) {
|
| 966 |
-
$extOk = TRUE;
|
| 967 |
-
}
|
| 968 |
-
}
|
| 969 |
-
if ($extOk == FALSE) {
|
| 970 |
-
echo "<script> alert('" . addslashes(__('Sorry, you are not allowed to upload this type of file.', 'form_maker')) . "');</script>";
|
| 971 |
-
return array($max + 1);
|
| 972 |
-
}
|
| 973 |
-
$fileTemp = $file['tmp_name'];
|
| 974 |
-
$p = 1;
|
| 975 |
-
|
| 976 |
-
if(!file_exists($destination))
|
| 977 |
-
mkdir($destination , 0777);
|
| 978 |
-
|
| 979 |
-
if (file_exists($destination . "/" . $fileName)) {
|
| 980 |
-
$fileName1 = $filename;
|
| 981 |
-
while (file_exists($destination . "/" . $fileName1)) {
|
| 982 |
-
$to = strlen($file['name']) - strlen($uploadedFileExtension) - 1;
|
| 983 |
-
$fileName1 = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
|
| 984 |
-
$file['name'] = $fileName;
|
| 985 |
-
$p++;
|
| 986 |
-
}
|
| 987 |
-
$fileName = $fileName1;
|
| 988 |
-
}
|
| 989 |
-
if (is_dir(ABSPATH . $destination)) {
|
| 990 |
-
if (!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
|
| 991 |
-
echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
|
| 992 |
-
return array($max + 1);
|
| 993 |
-
}
|
| 994 |
-
}
|
| 995 |
-
else {
|
| 996 |
-
echo "<script> alert('" . addslashes(__('Error, file destination does not exist.', 'form_maker')) . "');</script>";
|
| 997 |
-
return array($max + 1);
|
| 998 |
-
}
|
| 999 |
-
$value = site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
|
| 1000 |
-
$file['tmp_name'] = $destination . "/" . $fileName;
|
| 1001 |
-
$file['name'] = ABSPATH . $destination . "/" . $fileName;
|
| 1002 |
-
// $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 1003 |
-
array_push($all_files, $file);
|
| 1004 |
-
}
|
| 1005 |
-
break;
|
| 1006 |
-
}
|
| 1007 |
-
case 'type_address': {
|
| 1008 |
-
$value = '*#*#*#';
|
| 1009 |
-
if (isset($_POST[$i . "_street1" . $id])) {
|
| 1010 |
-
$value = esc_html($_POST[$i . "_street1" . $id]);
|
| 1011 |
-
break;
|
| 1012 |
-
}
|
| 1013 |
-
if (isset($_POST[$i . "_street2" . $id])) {
|
| 1014 |
-
$value = esc_html($_POST[$i . "_street2" . $id]);
|
| 1015 |
-
break;
|
| 1016 |
-
}
|
| 1017 |
-
if (isset($_POST[$i . "_city" . $id])) {
|
| 1018 |
-
$value = esc_html($_POST[$i . "_city" . $id]);
|
| 1019 |
-
break;
|
| 1020 |
-
}
|
| 1021 |
-
if (isset($_POST[$i . "_state" . $id])) {
|
| 1022 |
-
$value = esc_html($_POST[$i . "_state" . $id]);
|
| 1023 |
-
break;
|
| 1024 |
-
}
|
| 1025 |
-
if (isset($_POST[$i . "_postal" . $id])) {
|
| 1026 |
-
$value = esc_html($_POST[$i . "_postal" . $id]);
|
| 1027 |
-
break;
|
| 1028 |
-
}
|
| 1029 |
-
if (isset($_POST[$i . "_country" . $id])) {
|
| 1030 |
-
$value = esc_html($_POST[$i . "_country" . $id]);
|
| 1031 |
-
break;
|
| 1032 |
-
}
|
| 1033 |
-
break;
|
| 1034 |
-
}
|
| 1035 |
-
case "type_hidden": {
|
| 1036 |
-
$value = isset($_POST[$label_label[$key]]) ? $_POST[$label_label[$key]] : "";
|
| 1037 |
-
break;
|
| 1038 |
-
}
|
| 1039 |
-
case "type_radio": {
|
| 1040 |
-
$element = isset($_POST[$i . "_other_input" . $id]) ? $_POST[$i . "_other_input" . $id] : NULL;
|
| 1041 |
-
if (isset($element)) {
|
| 1042 |
-
$value = $element;
|
| 1043 |
-
break;
|
| 1044 |
-
}
|
| 1045 |
-
$value = isset($_POST[$i . "_element" . $id]) ? $_POST[$i . "_element" . $id] : "";
|
| 1046 |
-
break;
|
| 1047 |
-
}
|
| 1048 |
-
case "type_checkbox": {
|
| 1049 |
-
$start = -1;
|
| 1050 |
-
$value = '';
|
| 1051 |
-
for ($j = 0; $j < 100; $j++) {
|
| 1052 |
-
if (isset($_POST[$i . "_element" . $id . $j])) {
|
| 1053 |
-
$start = $j;
|
| 1054 |
-
break;
|
| 1055 |
-
}
|
| 1056 |
-
}
|
| 1057 |
-
$other_element_id = -1;
|
| 1058 |
-
$is_other = isset($_POST[$i . "_allow_other" . $id]) ? $_POST[$i . "_allow_other" . $id] : "";
|
| 1059 |
-
if ($is_other == "yes") {
|
| 1060 |
-
$other_element_id = isset($_POST[$i . "_allow_other_num" . $id]) ? $_POST[$i . "_allow_other_num" . $id] : "";
|
| 1061 |
-
}
|
| 1062 |
-
if ($start != -1) {
|
| 1063 |
-
for ($j = $start; $j < 100; $j++) {
|
| 1064 |
-
if (isset($_POST[$i . "_element" . $id . $j])) {
|
| 1065 |
-
if ($j == $other_element_id) {
|
| 1066 |
-
$value = $value . (isset($_POST[$i . "_other_input" . $id]) ? $_POST[$i . "_other_input" . $id] : "") . '***br***';
|
| 1067 |
-
}
|
| 1068 |
-
else {
|
| 1069 |
-
$value = $value . $_POST[$i . "_element" . $id . $j] . '***br***';
|
| 1070 |
-
}
|
| 1071 |
-
}
|
| 1072 |
-
}
|
| 1073 |
-
}
|
| 1074 |
-
break;
|
| 1075 |
-
}
|
| 1076 |
-
case "type_paypal_price": {
|
| 1077 |
-
$value = 0;
|
| 1078 |
-
if (isset($_POST[$i."_element_dollars".$id])) {
|
| 1079 |
-
$value = $_POST[$i . "_element_dollars" . $id];
|
| 1080 |
-
}
|
| 1081 |
-
$value = (int) preg_replace('/\D/', '', $value);
|
| 1082 |
-
if (isset($_POST[$i . "_element_cents" . $id])) {
|
| 1083 |
-
$value = $value . '.' . (preg_replace('/\D/', '', $_POST[$i . "_element_cents" . $id]));
|
| 1084 |
-
}
|
| 1085 |
-
$total += (float)($value);
|
| 1086 |
-
$paypal_option = array();
|
| 1087 |
-
if ($value != 0) {
|
| 1088 |
-
array_push($paypal['item_name'], $label_label[$key]);
|
| 1089 |
-
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1090 |
-
array_push($paypal['quantity'], $quantity);
|
| 1091 |
-
array_push($paypal['amount'], $value);
|
| 1092 |
-
$is_amount=true;
|
| 1093 |
-
array_push($paypal['on_os'], $paypal_option);
|
| 1094 |
-
}
|
| 1095 |
-
$value = $value . $form_currency;
|
| 1096 |
-
break;
|
| 1097 |
-
}
|
| 1098 |
-
case "type_paypal_select": {
|
| 1099 |
-
$value = '';
|
| 1100 |
-
$value = (isset($_POST[$i . "_element_label" . $id]) ? $_POST[$i . "_element_label" . $id] : "") . ' : ' . (isset($_POST[$i . "_element" . $id]) ? $_POST[$i . "_element" . $id] : "") . $form_currency;
|
| 1101 |
-
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1102 |
-
$total += (float)(isset($_POST[$i . "_element" . $id]) ? $_POST[$i . "_element" . $id] : 0) * (float)($quantity);
|
| 1103 |
-
array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST[$i."_element_label".$id]) ? $_POST[$i."_element_label".$id] : ""));
|
| 1104 |
-
array_push($paypal['quantity'], $quantity);
|
| 1105 |
-
array_push($paypal['amount'], isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "");
|
| 1106 |
-
if(isset($_POST[$i."_element".$id]) && $_POST[$i."_element".$id] != 0) {
|
| 1107 |
-
$is_amount=true;
|
| 1108 |
-
}
|
| 1109 |
-
$element_quantity_label = isset($_POST[$i."_element_quantity_label".$id]) ? $_POST[$i."_element_quantity_label".$id] : NULL;
|
| 1110 |
-
if (isset($element_quantity_label)) {
|
| 1111 |
-
$value .= '***br***' . $element_quantity_label . ': ' . $quantity;
|
| 1112 |
-
}
|
| 1113 |
-
$paypal_option=array();
|
| 1114 |
-
$paypal_option['on']=array();
|
| 1115 |
-
$paypal_option['os']=array();
|
| 1116 |
-
for($k=0; $k<50; $k++) {
|
| 1117 |
-
$temp_val = isset($_POST[$i."_element_property_value".$id.$k]) ? $_POST[$i."_element_property_value".$id.$k] : NULL;
|
| 1118 |
-
if(isset($temp_val)) {
|
| 1119 |
-
array_push($paypal_option['on'], isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "");
|
| 1120 |
-
array_push($paypal_option['os'], $temp_val);
|
| 1121 |
-
$value .= '***br***' . (isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 1122 |
-
}
|
| 1123 |
-
}
|
| 1124 |
-
array_push($paypal['on_os'], $paypal_option);
|
| 1125 |
-
break;
|
| 1126 |
-
}
|
| 1127 |
-
case "type_paypal_radio": {
|
| 1128 |
-
$value = '';
|
| 1129 |
-
if (isset($_POST[$i."_element_label".$id]) && ($_POST[$i."_element_label".$id] != '')) {
|
| 1130 |
-
$value = $_POST[$i."_element_label".$id] . ' - ' . (isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "") . $form_currency;
|
| 1131 |
-
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1132 |
-
$total+=(float)(isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : 0)*(float)($quantity);
|
| 1133 |
-
array_push($paypal['item_name'], $label_label[$key] . ' ' . $_POST[$i."_element_label".$id]);
|
| 1134 |
-
array_push($paypal['quantity'], $quantity);
|
| 1135 |
-
array_push($paypal['amount'], isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "");
|
| 1136 |
-
if(isset($_POST[$i."_element".$id]) && $_POST[$i."_element".$id] != 0) {
|
| 1137 |
-
$is_amount=true;
|
| 1138 |
-
}
|
| 1139 |
-
$element_quantity_label = isset($_POST[$i."_element_quantity_label".$id]) ? $_POST[$i."_element_quantity_label".$id] : NULL;
|
| 1140 |
-
if (isset($element_quantity_label)) {
|
| 1141 |
-
$value .= '***br***' . $element_quantity_label . ': ' . $quantity;
|
| 1142 |
-
}
|
| 1143 |
-
$paypal_option = array();
|
| 1144 |
-
$paypal_option['on'] = array();
|
| 1145 |
-
$paypal_option['os'] = array();
|
| 1146 |
-
for ($k = 0; $k < 50; $k++) {
|
| 1147 |
-
$temp_val = isset($_POST[$i."_element_property_value".$id.$k]) ? $_POST[$i."_element_property_value".$id.$k] : NULL;
|
| 1148 |
-
if(isset($temp_val)) {
|
| 1149 |
-
array_push ($paypal_option['on'], isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "");
|
| 1150 |
-
array_push ($paypal_option['os'], $temp_val);
|
| 1151 |
-
$value .= '***br***' . (isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 1152 |
-
}
|
| 1153 |
-
}
|
| 1154 |
-
array_push ($paypal['on_os'], $paypal_option);
|
| 1155 |
-
}
|
| 1156 |
-
break;
|
| 1157 |
-
}
|
| 1158 |
-
case "type_paypal_shipping": {
|
| 1159 |
-
$value = '';
|
| 1160 |
-
if (isset($_POST[$i."_element_label".$id]) && ($_POST[$i."_element_label".$id] != '')) {
|
| 1161 |
-
$value = $_POST[$i."_element_label".$id] . ' - ' . (isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "") . $form_currency;
|
| 1162 |
-
$paypal['shipping'] = isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "";
|
| 1163 |
-
}
|
| 1164 |
-
break;
|
| 1165 |
-
}
|
| 1166 |
-
case "type_paypal_checkbox": {
|
| 1167 |
-
$start = -1;
|
| 1168 |
-
$value = '';
|
| 1169 |
-
for ($j = 0; $j < 100; $j++) {
|
| 1170 |
-
if (isset($_POST[$i."_element".$id.$j])) {
|
| 1171 |
-
$start = $j;
|
| 1172 |
-
break;
|
| 1173 |
-
}
|
| 1174 |
-
}
|
| 1175 |
-
$other_element_id = -1;
|
| 1176 |
-
$is_other = isset($_POST[$i."_allow_other".$id]) ? $_POST[$i."_allow_other".$id] : "";
|
| 1177 |
-
if ($is_other == "yes") {
|
| 1178 |
-
$other_element_id = isset($_POST[$i."_allow_other_num".$id]) ? $_POST[$i."_allow_other_num".$id] : "";
|
| 1179 |
-
}
|
| 1180 |
-
if ($start != -1) {
|
| 1181 |
-
for ($j = $start; $j < 100; $j++) {
|
| 1182 |
-
if (isset($_POST[$i."_element".$id.$j])) {
|
| 1183 |
-
if ($j == $other_element_id) {
|
| 1184 |
-
$value = $value . (isset($_POST[$i."_other_input".$id]) ? $_POST[$i."_other_input".$id] : "") . '***br***';
|
| 1185 |
-
}
|
| 1186 |
-
else {
|
| 1187 |
-
$value = $value . (isset($_POST[$i."_element".$id.$j."_label"]) ? $_POST[$i."_element".$id.$j."_label"] : "") . ' - ' . ($_POST[$i."_element".$id.$j] == '' ? '0' : $_POST[$i."_element".$id.$j]) . $form_currency . '***br***';
|
| 1188 |
-
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1189 |
-
$total += (float)(isset($_POST[$i."_element".$id.$j]) ? $_POST[$i."_element".$id.$j] : 0) * (float)($quantity);
|
| 1190 |
-
array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST[$i."_element".$id.$j."_label"]) ? $_POST[$i."_element".$id.$j."_label"] : ""));
|
| 1191 |
-
array_push($paypal['quantity'], $quantity);
|
| 1192 |
-
array_push($paypal['amount'], ($_POST[$i."_element".$id.$j] == '') ? '0' : $_POST[$i."_element".$id.$j]);
|
| 1193 |
-
if (isset($_POST[$i."_element".$id.$j]) && $_POST[$i."_element".$id.$j] != 0) {
|
| 1194 |
-
$is_amount = TRUE;
|
| 1195 |
-
}
|
| 1196 |
-
$paypal_option = array();
|
| 1197 |
-
$paypal_option['on'] = array();
|
| 1198 |
-
$paypal_option['os'] = array();
|
| 1199 |
-
for ($k = 0; $k < 50; $k++) {
|
| 1200 |
-
$temp_val = isset($_POST[$i."_element_property_value".$id.$k]) ? $_POST[$i."_element_property_value".$id.$k] : NULL;
|
| 1201 |
-
if (isset($temp_val)) {
|
| 1202 |
-
array_push ($paypal_option['on'], isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "");
|
| 1203 |
-
array_push ($paypal_option['os'], $temp_val);
|
| 1204 |
-
}
|
| 1205 |
-
}
|
| 1206 |
-
array_push ($paypal['on_os'], $paypal_option);
|
| 1207 |
-
}
|
| 1208 |
-
}
|
| 1209 |
-
}
|
| 1210 |
-
$element_quantity_label = isset($_POST[$i."_element_quantity_label".$id]) ? $_POST[$i."_element_quantity_label".$id] : NULL;
|
| 1211 |
-
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1212 |
-
if (isset($element_quantity_label)) {
|
| 1213 |
-
$value .= $element_quantity_label . ': ' . $quantity . '***br***';
|
| 1214 |
-
}
|
| 1215 |
-
for ($k = 0; $k < 50; $k++) {
|
| 1216 |
-
$temp_val = isset($_POST[$i."_element_property_value".$id.$k]) ? $_POST[$i."_element_property_value".$id.$k] : NULL;
|
| 1217 |
-
if (isset($temp_val)) {
|
| 1218 |
-
$value .= (isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val . '***br***';
|
| 1219 |
-
}
|
| 1220 |
-
}
|
| 1221 |
-
}
|
| 1222 |
-
break;
|
| 1223 |
-
}
|
| 1224 |
-
case "type_star_rating": {
|
| 1225 |
-
if (isset($_POST[$i."_selected_star_amount".$id]) && $_POST[$i."_selected_star_amount".$id] != "") {
|
| 1226 |
-
$selected_star_amount = $_POST[$i."_selected_star_amount".$id];
|
| 1227 |
-
}
|
| 1228 |
-
else {
|
| 1229 |
-
$selected_star_amount = 0;
|
| 1230 |
-
}
|
| 1231 |
-
$value = (isset($_POST[$i."_star_amount".$id]) ? $_POST[$i."_star_amount".$id] : '').'***'.$selected_star_amount.'***'.(isset($_POST[$i."_star_color".$id]) ? $_POST[$i."_star_color".$id] : '').'***star_rating***';
|
| 1232 |
-
break;
|
| 1233 |
-
}
|
| 1234 |
-
case "type_scale_rating": {
|
| 1235 |
-
$value = (isset($_POST[$i."_scale_radio".$id]) ? $_POST[$i."_scale_radio".$id] : 0).'/'.(isset($_POST[$i."_scale_amount".$id]) ? $_POST[$i."_scale_amount".$id] : '');
|
| 1236 |
-
break;
|
| 1237 |
-
}
|
| 1238 |
-
case "type_spinner": {
|
| 1239 |
-
$value = (isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : '');
|
| 1240 |
-
break;
|
| 1241 |
-
}
|
| 1242 |
-
case "type_slider": {
|
| 1243 |
-
$value = (isset($_POST[$i."_slider_value".$id]) ? $_POST[$i."_slider_value".$id] : '');
|
| 1244 |
-
break;
|
| 1245 |
-
}
|
| 1246 |
-
case "type_range": {
|
| 1247 |
-
$value = (isset($_POST[$i."_element".$id . '0']) ? $_POST[$i."_element".$id . '0'] : '') .'-'.(isset($_POST[$i."_element".$id.'1']) ? $_POST[$i."_element".$id.'1'] : '');
|
| 1248 |
-
break;
|
| 1249 |
-
}
|
| 1250 |
-
case "type_grading": {
|
| 1251 |
-
$value = "";
|
| 1252 |
-
if (isset($_POST[$i."_hidden_item".$id])) {
|
| 1253 |
-
$items = explode(":", $_POST[$i."_hidden_item".$id]);
|
| 1254 |
-
for ($k = 0; $k < sizeof($items) - 1; $k++) {
|
| 1255 |
-
if (isset($_POST[$i."_element".$id.$k])) {
|
| 1256 |
-
$value .= $_POST[$i."_element".$id.$k].':';
|
| 1257 |
-
}
|
| 1258 |
-
}
|
| 1259 |
-
$value .= $_POST[$i."_hidden_item".$id].'***grading***';
|
| 1260 |
-
}
|
| 1261 |
-
break;
|
| 1262 |
-
}
|
| 1263 |
-
case "type_matrix": {
|
| 1264 |
-
$rows_of_matrix = explode("***", isset($_POST[$i."_hidden_row".$id]) ? $_POST[$i."_hidden_row".$id] : "");
|
| 1265 |
-
$rows_count = sizeof($rows_of_matrix) - 1;
|
| 1266 |
-
$column_of_matrix = explode("***", isset($_POST[$i."_hidden_column".$id]) ? $_POST[$i."_hidden_column".$id] : "");
|
| 1267 |
-
$columns_count = sizeof($column_of_matrix) - 1;
|
| 1268 |
-
$row_ids = explode(",", substr(isset($_POST[$i."_row_ids".$id]) ? $_POST[$i."_row_ids".$id] : "", 0, -1));
|
| 1269 |
-
$column_ids = explode(",", substr(isset($_POST[$i."_column_ids".$id]) ? $_POST[$i."_column_ids".$id] : "", 0, -1));
|
| 1270 |
-
if (isset($_POST[$i."_input_type".$id]) && $_POST[$i."_input_type".$id] == "radio") {
|
| 1271 |
-
$input_value="";
|
| 1272 |
-
foreach($row_ids as $row_id) {
|
| 1273 |
-
$input_value.=(isset($_POST[$i."_input_element".$id.$row_id]) ? $_POST[$i."_input_element".$id.$row_id] : 0)."***";
|
| 1274 |
-
}
|
| 1275 |
-
}
|
| 1276 |
-
if (isset($_POST[$i."_input_type".$id]) && $_POST[$i."_input_type".$id] == "checkbox") {
|
| 1277 |
-
$input_value="";
|
| 1278 |
-
foreach($row_ids as $row_id)
|
| 1279 |
-
foreach($column_ids as $column_id)
|
| 1280 |
-
$input_value .= (isset($_POST[$i."_input_element".$id.$row_id.'_'.$column_id]) ? $_POST[$i."_input_element".$id.$row_id.'_'.$column_id] : 0)."***";
|
| 1281 |
-
}
|
| 1282 |
-
if (isset($_POST[$i."_input_type".$id]) && $_POST[$i."_input_type".$id] == "text") {
|
| 1283 |
-
$input_value="";
|
| 1284 |
-
foreach($row_ids as $row_id)
|
| 1285 |
-
foreach($column_ids as $column_id)
|
| 1286 |
-
$input_value .= (isset($_POST[$i."_input_element".$id.$row_id.'_'.$column_id]) ? esc_html($_POST[$i."_input_element".$id.$row_id.'_'.$column_id]) : "")."***";
|
| 1287 |
-
}
|
| 1288 |
-
if (isset($_POST[$i."_input_type".$id]) && $_POST[$i."_input_type".$id] == "select") {
|
| 1289 |
-
$input_value="";
|
| 1290 |
-
foreach($row_ids as $row_id)
|
| 1291 |
-
foreach($column_ids as $column_id)
|
| 1292 |
-
$input_value .= (isset($_POST[$i."_select_yes_no".$id.$row_id.'_'.$column_id]) ? $_POST[$i."_select_yes_no".$id.$row_id.'_'.$column_id] : "")."***";
|
| 1293 |
-
}
|
| 1294 |
-
$value = $rows_count . '***' . (isset($_POST[$i."_hidden_row".$id]) ? $_POST[$i."_hidden_row".$id] : "") . $columns_count . '***' . (isset($_POST[$i."_hidden_column".$id]) ? $_POST[$i."_hidden_column".$id] : "") . (isset($_POST[$i."_input_type".$id]) ? $_POST[$i."_input_type".$id] : "") . '***' .$input_value . '***matrix***';
|
| 1295 |
-
break;
|
| 1296 |
-
}
|
| 1297 |
-
}
|
| 1298 |
-
if ($type == "type_address") {
|
| 1299 |
-
if ($value == '*#*#*#') {
|
| 1300 |
-
// break; ?????????????????????????????????????????????????????
|
| 1301 |
-
continue;
|
| 1302 |
-
}
|
| 1303 |
-
}
|
| 1304 |
-
$unique_element = isset($_POST[$i . "_unique" . $id]) ? $_POST[$i . "_unique" . $id] : "";
|
| 1305 |
-
if ($unique_element == 'yes') {
|
| 1306 |
-
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id_old, $i, addslashes($value)));
|
| 1307 |
-
if ($unique) {
|
| 1308 |
-
echo "<script> alert('" . addslashes(__('This field %s requires a unique entry and this value was already submitted.', 'form_maker')) . "'.replace('%s','" . $label_label[$key] . "'));</script>";
|
| 1309 |
-
return array($max + 1);
|
| 1310 |
-
}
|
| 1311 |
-
}
|
| 1312 |
-
|
| 1313 |
-
$r = $wpdb->prefix . "formmaker_submits";
|
| 1314 |
-
|
| 1315 |
-
$save_or_no = $wpdb->insert($r, array(
|
| 1316 |
-
'form_id' => $id_old,
|
| 1317 |
-
'element_label' => $i,
|
| 1318 |
-
'element_value' => stripslashes($value),
|
| 1319 |
-
'group_id' => ($max + 1),
|
| 1320 |
-
'date' => date('Y-m-d H:i:s'),
|
| 1321 |
-
'ip' => $ip,
|
| 1322 |
-
'user_id_wd' => $current_user->ID,
|
| 1323 |
-
), array(
|
| 1324 |
-
'%d',
|
| 1325 |
-
'%s',
|
| 1326 |
-
'%s',
|
| 1327 |
-
'%d',
|
| 1328 |
-
'%s',
|
| 1329 |
-
'%s',
|
| 1330 |
-
'%d'
|
| 1331 |
-
));
|
| 1332 |
-
if (!$save_or_no) {
|
| 1333 |
-
return FALSE;
|
| 1334 |
-
}
|
| 1335 |
-
$chgnac = FALSE;
|
| 1336 |
-
}
|
| 1337 |
-
}
|
| 1338 |
-
|
| 1339 |
-
|
| 1340 |
-
$subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix ."formmaker_submits" );
|
| 1341 |
-
$user_fields = array("subid"=>$subid, "ip"=>$ip, "userid"=>$wp_userid, "username"=>$wp_username, "useremail"=>$wp_useremail);
|
| 1342 |
-
|
| 1343 |
-
$queries = $wpdb->get_results( $wpdb->prepare("SELECT * FROM " .$wpdb->prefix. "formmaker_query WHERE form_id=%d",(int)$id ));
|
| 1344 |
-
if($queries)
|
| 1345 |
-
{
|
| 1346 |
-
foreach($queries as $query)
|
| 1347 |
-
{
|
| 1348 |
-
$temp = explode('***wdfcon_typewdf***',$query->details);
|
| 1349 |
-
$con_type = $temp[0];
|
| 1350 |
-
$temp = explode('***wdfcon_methodwdf***',$temp[1]);
|
| 1351 |
-
$con_method = $temp[0];
|
| 1352 |
-
$temp = explode('***wdftablewdf***',$temp[1]);
|
| 1353 |
-
$table_cur = $temp[0];
|
| 1354 |
-
$temp = explode('***wdfhostwdf***',$temp[1]);
|
| 1355 |
-
$host = $temp[0];
|
| 1356 |
-
$temp = explode('***wdfportwdf***',$temp[1]);
|
| 1357 |
-
$port = $temp[0];
|
| 1358 |
-
$temp = explode('***wdfusernamewdf***',$temp[1]);
|
| 1359 |
-
$username = $temp[0];
|
| 1360 |
-
$temp = explode('***wdfpasswordwdf***',$temp[1]);
|
| 1361 |
-
$password = $temp[0];
|
| 1362 |
-
$temp = explode('***wdfdatabasewdf***',$temp[1]);
|
| 1363 |
-
$database = $temp[0];
|
| 1364 |
-
|
| 1365 |
-
$query=str_replace(array_keys($fvals), $fvals ,$query->query);
|
| 1366 |
-
foreach($user_fields as $user_key=>$user_field)
|
| 1367 |
-
$query=str_replace('{'.$user_key.'}', $user_field , $query);
|
| 1368 |
-
|
| 1369 |
-
if($con_type == 'remote')
|
| 1370 |
-
{
|
| 1371 |
-
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
| 1372 |
-
$wpdb_temp->query($query);
|
| 1373 |
-
}
|
| 1374 |
-
else {
|
| 1375 |
-
$wpdb->query($query);
|
| 1376 |
-
}
|
| 1377 |
-
}
|
| 1378 |
-
// $wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
|
| 1379 |
-
}
|
| 1380 |
-
|
| 1381 |
-
$addons = array('WD_FM_MAILCHIMP' => 'MailChimp', 'WD_FM_REG' => 'Registration');
|
| 1382 |
-
foreach($addons as $addon => $addon_name)
|
| 1383 |
-
{
|
| 1384 |
-
if (defined($addon) && is_plugin_active(constant($addon))) {
|
| 1385 |
-
$_GET['addon_task']='frontend';
|
| 1386 |
-
$_GET['form_id']=$id;
|
| 1387 |
-
$GLOBALS['fvals']=$fvals;
|
| 1388 |
-
do_action($addon.'_init');
|
| 1389 |
-
}
|
| 1390 |
-
}
|
| 1391 |
-
|
| 1392 |
-
$str = '';
|
| 1393 |
-
|
| 1394 |
-
if ($form->paypal_mode) {
|
| 1395 |
-
if ($paypal['item_name']) {
|
| 1396 |
-
if ($is_amount) {
|
| 1397 |
-
$tax = $form->tax;
|
| 1398 |
-
$currency = $form->payment_currency;
|
| 1399 |
-
$business = $form->paypal_email;
|
| 1400 |
-
$ip = $_SERVER['REMOTE_ADDR'];
|
| 1401 |
-
$total2 = round($total, 2);
|
| 1402 |
-
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 1403 |
-
'form_id' => $id,
|
| 1404 |
-
'element_label' => 'item_total',
|
| 1405 |
-
'element_value' => $total2 . $form_currency,
|
| 1406 |
-
'group_id' => ($max + 1),
|
| 1407 |
-
'date' => date('Y-m-d H:i:s'),
|
| 1408 |
-
'ip' => $ip,
|
| 1409 |
-
'user_id_wd' => $current_user->ID,
|
| 1410 |
-
), array(
|
| 1411 |
-
'%d',
|
| 1412 |
-
'%s',
|
| 1413 |
-
'%s',
|
| 1414 |
-
'%d',
|
| 1415 |
-
'%s',
|
| 1416 |
-
'%s',
|
| 1417 |
-
'%d'
|
| 1418 |
-
));
|
| 1419 |
-
if (!$save_or_no) {
|
| 1420 |
-
return false;
|
| 1421 |
-
}
|
| 1422 |
-
$total = $total + ($total * $tax) / 100;
|
| 1423 |
-
if (isset($paypal['shipping'])) {
|
| 1424 |
-
$total = $total + $paypal['shipping'];
|
| 1425 |
-
}
|
| 1426 |
-
$total = round($total, 2);
|
| 1427 |
-
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 1428 |
-
'form_id' => $id,
|
| 1429 |
-
'element_label' => 'total',
|
| 1430 |
-
'element_value' => $total . $form_currency,
|
| 1431 |
-
'group_id' => ($max + 1),
|
| 1432 |
-
'date' => date('Y-m-d H:i:s'),
|
| 1433 |
-
'ip' => $ip,
|
| 1434 |
-
'user_id_wd' => $current_user->ID,
|
| 1435 |
-
), array(
|
| 1436 |
-
'%d',
|
| 1437 |
-
'%s',
|
| 1438 |
-
'%s',
|
| 1439 |
-
'%d',
|
| 1440 |
-
'%s',
|
| 1441 |
-
'%s',
|
| 1442 |
-
'%d'
|
| 1443 |
-
));
|
| 1444 |
-
if (!$save_or_no) {
|
| 1445 |
-
return false;
|
| 1446 |
-
}
|
| 1447 |
-
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 1448 |
-
'form_id' => $id,
|
| 1449 |
-
'element_label' => '0',
|
| 1450 |
-
'element_value' => 'In progress',
|
| 1451 |
-
'group_id' => ($max + 1),
|
| 1452 |
-
'date' => date('Y-m-d H:i:s'),
|
| 1453 |
-
'ip' => $ip,
|
| 1454 |
-
'user_id_wd' => $current_user->ID,
|
| 1455 |
-
), array(
|
| 1456 |
-
'%d',
|
| 1457 |
-
'%s',
|
| 1458 |
-
'%s',
|
| 1459 |
-
'%d',
|
| 1460 |
-
'%s',
|
| 1461 |
-
'%s',
|
| 1462 |
-
'%d'
|
| 1463 |
-
));
|
| 1464 |
-
if (!$save_or_no) {
|
| 1465 |
-
return false;
|
| 1466 |
-
}
|
| 1467 |
-
$str = '';
|
| 1468 |
-
if ($form->checkout_mode==1 || $form->checkout_mode == "production") {
|
| 1469 |
-
$str .= "https://www.paypal.com/cgi-bin/webscr?";
|
| 1470 |
-
}
|
| 1471 |
-
else {
|
| 1472 |
-
$str .= "https://www.sandbox.paypal.com/cgi-bin/webscr?";
|
| 1473 |
-
}
|
| 1474 |
-
$str .= "currency_code=" . $currency;
|
| 1475 |
-
$str .= "&business=" . urlencode($business);
|
| 1476 |
-
$str .= "&cmd=" . "_cart";
|
| 1477 |
-
$str .= "¬ify_url=" . admin_url('admin-ajax.php?action=checkpaypal%26form_id=' . $id . '%26group_id=' . ($max + 1));
|
| 1478 |
-
$str .= "&upload=" . "1";
|
| 1479 |
-
$str .= "&charset=UTF-8";
|
| 1480 |
-
if (isset($paypal['shipping'])) {
|
| 1481 |
-
$str = $str . "&shipping_1=" . $paypal['shipping'];
|
| 1482 |
-
// $str=$str."&weight_cart=".$paypal['shipping'];
|
| 1483 |
-
// $str=$str."&shipping2=3".$paypal['shipping'];
|
| 1484 |
-
$str = $str."&no_shipping=2";
|
| 1485 |
-
}
|
| 1486 |
-
$i=0;
|
| 1487 |
-
foreach ($paypal['item_name'] as $pkey => $pitem_name) {
|
| 1488 |
-
if($paypal['amount'][$pkey]) {
|
| 1489 |
-
$i++;
|
| 1490 |
-
$str = $str."&item_name_".$i."=".urlencode($pitem_name);
|
| 1491 |
-
$str = $str."&amount_".$i."=".$paypal['amount'][$pkey];
|
| 1492 |
-
$str = $str."&quantity_".$i."=".$paypal['quantity'][$pkey];
|
| 1493 |
-
if ($tax) {
|
| 1494 |
-
$str = $str . "&tax_rate_" . $i . "=" . $tax;
|
| 1495 |
-
}
|
| 1496 |
-
if ($paypal['on_os'][$pkey]) {
|
| 1497 |
-
foreach ($paypal['on_os'][$pkey]['on'] as $on_os_key => $on_item_name) {
|
| 1498 |
-
$str = $str."&on".$on_os_key."_".$i."=".$on_item_name;
|
| 1499 |
-
$str = $str."&os".$on_os_key."_".$i."=".$paypal['on_os'][$pkey]['os'][$on_os_key];
|
| 1500 |
-
}
|
| 1501 |
-
}
|
| 1502 |
-
}
|
| 1503 |
-
}
|
| 1504 |
-
}
|
| 1505 |
-
}
|
| 1506 |
-
}
|
| 1507 |
-
|
| 1508 |
-
if($form->mail_verify){
|
| 1509 |
-
unset($_SESSION['hash']);
|
| 1510 |
-
unset($_SESSION['gid']);
|
| 1511 |
-
$ip = $_SERVER['REMOTE_ADDR'];
|
| 1512 |
-
$_SESSION['gid'] = $max+1;
|
| 1513 |
-
$send_tos = explode('**',$form->send_to);
|
| 1514 |
-
if($send_tos){
|
| 1515 |
-
foreach($send_tos as $send_index => $send_to)
|
| 1516 |
-
{
|
| 1517 |
-
$_SESSION['hash'][] = md5($ip.time().rand());
|
| 1518 |
-
$send_to = str_replace('*', '',$send_to);
|
| 1519 |
-
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 1520 |
-
'form_id' => $id,
|
| 1521 |
-
'element_label' => 'verifyInfo@'.$send_to,
|
| 1522 |
-
'element_value' => $_SESSION['hash'][$send_index]."**".$form->mail_verify_expiretime."**".$send_to,
|
| 1523 |
-
'group_id' => ($max + 1),
|
| 1524 |
-
'date' => date('Y-m-d H:i:s'),
|
| 1525 |
-
'ip' => $ip,
|
| 1526 |
-
'user_id_wd' => $current_user->ID,
|
| 1527 |
-
), array(
|
| 1528 |
-
'%d',
|
| 1529 |
-
'%s',
|
| 1530 |
-
'%s',
|
| 1531 |
-
'%d',
|
| 1532 |
-
'%s',
|
| 1533 |
-
'%s',
|
| 1534 |
-
'%d'
|
| 1535 |
-
));
|
| 1536 |
-
if (!$save_or_no) {
|
| 1537 |
-
return false;
|
| 1538 |
-
}
|
| 1539 |
-
}
|
| 1540 |
-
}
|
| 1541 |
-
}
|
| 1542 |
-
|
| 1543 |
-
|
| 1544 |
-
if ($chgnac) {
|
| 1545 |
-
global $wpdb;
|
| 1546 |
-
if ($form->submit_text_type != 4) {
|
| 1547 |
-
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Nothing was submitted.', 'form_maker')));
|
| 1548 |
-
}
|
| 1549 |
-
$_SESSION['error_or_no' . $id] = 1;
|
| 1550 |
-
$_SESSION['form_submit_type' . $id] = $form->submit_text_type . "," . $form->id;
|
| 1551 |
-
wp_redirect($_SERVER["REQUEST_URI"]);
|
| 1552 |
-
exit;
|
| 1553 |
-
}
|
| 1554 |
-
|
| 1555 |
-
$addons = array('WD_FM_GDRIVE_INT' => 'GDriveInt', 'WD_FM_DBOX_INT' => 'DboxInt', 'WD_FM_POST_GEN' => 'PostGen', 'WD_FM_PUSHOVER' => 'Pushover'); // the sequence is important for google drive and drop box addons !!!!!!!!!!
|
| 1556 |
-
foreach($addons as $addon => $addon_name) {
|
| 1557 |
-
if (defined($addon) && is_plugin_active(constant($addon))) {
|
| 1558 |
-
$_GET['addon_task'] = 'frontend';
|
| 1559 |
-
$_GET['form_id'] = $id;
|
| 1560 |
-
$GLOBALS['all_files'] = json_encode($all_files);
|
| 1561 |
-
$GLOBALS['form_currency'] = $form_currency;
|
| 1562 |
-
do_action($addon.'_init');
|
| 1563 |
-
}
|
| 1564 |
-
}
|
| 1565 |
-
return array($all_files, $str);
|
| 1566 |
-
}
|
| 1567 |
-
|
| 1568 |
-
public function remove($group_id) {
|
| 1569 |
-
global $wpdb;
|
| 1570 |
-
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id));
|
| 1571 |
-
}
|
| 1572 |
-
|
| 1573 |
-
public function get_after_submission_text($form_id) {
|
| 1574 |
-
global $wpdb;
|
| 1575 |
-
$submit_text = $wpdb->get_var("SELECT submit_text FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
|
| 1576 |
-
$current_user = wp_get_current_user();
|
| 1577 |
-
if ($current_user->ID != 0){
|
| 1578 |
-
$userid = $current_user->ID;
|
| 1579 |
-
$username = $current_user->display_name;
|
| 1580 |
-
$useremail = $current_user->user_email;
|
| 1581 |
-
} else{
|
| 1582 |
-
$userid = '';
|
| 1583 |
-
$username = '';
|
| 1584 |
-
$useremail = '';
|
| 1585 |
-
}
|
| 1586 |
-
$ip = $_SERVER['REMOTE_ADDR'];
|
| 1587 |
-
$subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix ."formmaker_submits" );
|
| 1588 |
-
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $form_id));
|
| 1589 |
-
|
| 1590 |
-
$old = false;
|
| 1591 |
-
if(isset($row->form)) {
|
| 1592 |
-
$old = true;
|
| 1593 |
-
}
|
| 1594 |
-
$label_order_original = array();
|
| 1595 |
-
$label_order_ids = array();
|
| 1596 |
-
$submission_array = array();
|
| 1597 |
-
if($old == false || ($old == true && $row->form == '')) {
|
| 1598 |
-
$label_all = explode('#****#',$row->label_order_current);
|
| 1599 |
-
} else {
|
| 1600 |
-
$label_all = explode('#****#',$row->label_order);
|
| 1601 |
-
}
|
| 1602 |
-
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 1603 |
-
foreach ($label_all as $key => $label_each) {
|
| 1604 |
-
$label_id_each = explode('#**id**#', $label_each);
|
| 1605 |
-
$label_id = $label_id_each[0];
|
| 1606 |
-
array_push($label_order_ids, $label_id);
|
| 1607 |
-
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
| 1608 |
-
$label_order_original[$label_id] = $label_order_each[0];
|
| 1609 |
-
}
|
| 1610 |
-
|
| 1611 |
-
$submissions_row = $wpdb->get_results($wpdb->prepare("SELECT `element_label`, `element_value` FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=%d AND group_id=%d", $form_id, $subid));
|
| 1612 |
-
foreach ($submissions_row as $sub_row){
|
| 1613 |
-
$submission_array[$sub_row->element_label] = $sub_row->element_value;
|
| 1614 |
-
}
|
| 1615 |
-
|
| 1616 |
-
foreach($label_order_original as $key => $label_each) {
|
| 1617 |
-
if(strpos($submit_text, "%".$label_each."%")>-1) {
|
| 1618 |
-
$submit_text = str_replace("%".$label_each."%", $submission_array[$key], $submit_text);
|
| 1619 |
-
}
|
| 1620 |
-
}
|
| 1621 |
-
|
| 1622 |
-
$custom_fields = array( "subid"=>$subid, "ip"=>$ip, "userid"=>$userid, "username"=>$username, "useremail"=>$useremail);
|
| 1623 |
-
foreach($custom_fields as $key=>$custom_field)
|
| 1624 |
-
{
|
| 1625 |
-
if(strpos($submit_text, "%".$key."%")>-1)
|
| 1626 |
-
$submit_text = str_replace("%".$key."%", $custom_field, $submit_text);
|
| 1627 |
-
}
|
| 1628 |
-
$submit_text = str_replace(array("***map***", "*@@url@@*", "@@@@@@@@@", "@@@", "***grading***", "***br***", "***star_rating***"), array(" ", "", " ", " ", " ", ", ", " "), $submit_text);
|
| 1629 |
-
|
| 1630 |
-
return $submit_text;
|
| 1631 |
-
}
|
| 1632 |
-
|
| 1633 |
-
public function increment_views_count($id) {
|
| 1634 |
-
global $wpdb;
|
| 1635 |
-
$vives_form = $wpdb->get_var($wpdb->prepare("SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id));
|
| 1636 |
-
if (isset($vives_form)) {
|
| 1637 |
-
$vives_form = $vives_form + 1;
|
| 1638 |
-
$wpdb->update($wpdb->prefix . "formmaker_views", array(
|
| 1639 |
-
'views' => $vives_form,
|
| 1640 |
-
), array('form_id' => $id), array(
|
| 1641 |
-
'%d',
|
| 1642 |
-
), array('%d'));
|
| 1643 |
-
}
|
| 1644 |
-
else {
|
| 1645 |
-
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
| 1646 |
-
'form_id' => $id,
|
| 1647 |
-
'views' => 1
|
| 1648 |
-
), array(
|
| 1649 |
-
'%d',
|
| 1650 |
-
'%d'
|
| 1651 |
-
));
|
| 1652 |
-
}
|
| 1653 |
-
}
|
| 1654 |
-
|
| 1655 |
-
public function gen_mail($counter, $all_files, $id, $str) {
|
| 1656 |
-
// checking save uploads option
|
| 1657 |
-
global $wpdb;
|
| 1658 |
-
$save_uploads = $wpdb->get_var("SELECT save_uploads FROM " . $wpdb->prefix ."formmaker WHERE id=" . $id);
|
| 1659 |
-
if($save_uploads == 0){
|
| 1660 |
-
$destination = 'wp-content/uploads/tmpAddon';
|
| 1661 |
-
if(!file_exists($destination))
|
| 1662 |
-
mkdir($destination , 0777);
|
| 1663 |
-
|
| 1664 |
-
foreach($all_files as &$all_file){
|
| 1665 |
-
$fileTemp = $all_file['tmp_name'];
|
| 1666 |
-
$fileName = $all_file['name'];
|
| 1667 |
-
if(!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
|
| 1668 |
-
echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
|
| 1669 |
-
return array($max+1);
|
| 1670 |
-
}
|
| 1671 |
-
|
| 1672 |
-
$all_file['tmp_name'] = $destination . "/" . $fileName;
|
| 1673 |
-
}
|
| 1674 |
-
}
|
| 1675 |
-
$ip = $_SERVER['REMOTE_ADDR'];
|
| 1676 |
-
$replyto = '';
|
| 1677 |
-
global $wpdb;
|
| 1678 |
-
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id));
|
| 1679 |
-
if (!$row->form_front) {
|
| 1680 |
-
$id = '';
|
| 1681 |
-
}
|
| 1682 |
-
|
| 1683 |
-
$custom_fields = array('ip', 'useremail', 'username', 'subid', 'all' );
|
| 1684 |
-
$subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix ."formmaker_submits" );
|
| 1685 |
-
|
| 1686 |
-
$current_user = wp_get_current_user();
|
| 1687 |
-
if ($current_user->ID != 0)
|
| 1688 |
-
{
|
| 1689 |
-
$username = $current_user->display_name;
|
| 1690 |
-
$useremail = $current_user->user_email;
|
| 1691 |
-
}
|
| 1692 |
-
else
|
| 1693 |
-
{
|
| 1694 |
-
$username = '';
|
| 1695 |
-
$useremail = '';
|
| 1696 |
-
}
|
| 1697 |
-
|
| 1698 |
-
$label_order_original = array();
|
| 1699 |
-
$label_order_ids = array();
|
| 1700 |
-
$label_label = array();
|
| 1701 |
-
$label_type = array();
|
| 1702 |
-
$total = 0;
|
| 1703 |
-
$form_currency = '$';
|
| 1704 |
-
$currency_code = array('USD', 'EUR', 'GBP', 'JPY', 'CAD', 'MXN', 'HKD', 'HUF', 'NOK', 'NZD', 'SGD', 'SEK', 'PLN', 'AUD', 'DKK', 'CHF', 'CZK', 'ILS', 'BRL', 'TWD', 'MYR', 'PHP', 'THB');
|
| 1705 |
-
$currency_sign = array('$', '€', '£', '¥', 'C$', 'Mex$', 'HK$', 'Ft', 'kr', 'NZ$', 'S$', 'kr', 'zl', 'A$', 'kr', 'CHF', 'Kc', '₪', 'R$', 'NT$', 'RM', '₱', '฿');
|
| 1706 |
-
if ($row->payment_currency) {
|
| 1707 |
-
$form_currency = $currency_sign[array_search($row->payment_currency, $currency_code)];
|
| 1708 |
-
}
|
| 1709 |
-
|
| 1710 |
-
$old = false;
|
| 1711 |
-
if(isset($row->form)) {
|
| 1712 |
-
$old = true;
|
| 1713 |
-
}
|
| 1714 |
-
|
| 1715 |
-
$cc = array();
|
| 1716 |
-
$row_mail_one_time = 1;
|
| 1717 |
-
$label_type = array();
|
| 1718 |
-
|
| 1719 |
-
if($old == false || ($old == true && $row->form == '')) {
|
| 1720 |
-
$label_all = explode('#****#',$row->label_order_current);
|
| 1721 |
-
}
|
| 1722 |
-
else {
|
| 1723 |
-
$label_all = explode('#****#',$row->label_order);
|
| 1724 |
-
}
|
| 1725 |
-
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 1726 |
-
foreach ($label_all as $key => $label_each) {
|
| 1727 |
-
$label_id_each = explode('#**id**#', $label_each);
|
| 1728 |
-
$label_id = $label_id_each[0];
|
| 1729 |
-
array_push($label_order_ids, $label_id);
|
| 1730 |
-
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
| 1731 |
-
$label_order_original[$label_id] = $label_order_each[0];
|
| 1732 |
-
$label_type[$label_id] = $label_order_each[1];
|
| 1733 |
-
array_push($label_label, $label_order_each[0]);
|
| 1734 |
-
array_push($label_type, $label_order_each[1]);
|
| 1735 |
-
}
|
| 1736 |
-
|
| 1737 |
-
$disabled_fields = explode(',', isset($_REQUEST["disabled_fields".$id]) ? $_REQUEST["disabled_fields".$id] : "");
|
| 1738 |
-
$disabled_fields = array_slice($disabled_fields,0, count($disabled_fields)-1);
|
| 1739 |
-
|
| 1740 |
-
$list='<table border="1" cellpadding="3" cellspacing="0" style="width:600px;">';
|
| 1741 |
-
$list_text_mode = '';
|
| 1742 |
-
if($old == false || ($old == true && $row->form == '')) {
|
| 1743 |
-
foreach($label_order_ids as $key => $label_order_id) {
|
| 1744 |
-
$i = $label_order_id;
|
| 1745 |
-
$type = $label_type[$i];
|
| 1746 |
-
|
| 1747 |
-
if($type != "type_map" and $type != "type_submit_reset" and $type != "type_editor" and $type != "type_captcha" and $type != "type_arithmetic_captcha" and $type != "type_recaptcha" and $type != "type_button") {
|
| 1748 |
-
$element_label=$label_order_original[$i];
|
| 1749 |
-
if(!in_array($i,$disabled_fields)) {
|
| 1750 |
-
switch ($type) {
|
| 1751 |
-
case 'type_text':
|
| 1752 |
-
case 'type_password':
|
| 1753 |
-
case 'type_textarea':
|
| 1754 |
-
case "type_date":
|
| 1755 |
-
case "type_own_select":
|
| 1756 |
-
case "type_country":
|
| 1757 |
-
case "type_number": {
|
| 1758 |
-
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
| 1759 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1760 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
|
| 1761 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1762 |
-
}
|
| 1763 |
-
|
| 1764 |
-
break;
|
| 1765 |
-
}
|
| 1766 |
-
case "type_hidden": {
|
| 1767 |
-
$element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
|
| 1768 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1769 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
|
| 1770 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1771 |
-
}
|
| 1772 |
-
break;
|
| 1773 |
-
}
|
| 1774 |
-
case "type_mark_map": {
|
| 1775 |
-
$element = isset($_POST['wdform_'.$i."_long".$id]) ? $_POST['wdform_'.$i."_long".$id] : NULL;
|
| 1776 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1777 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "") . '</td></tr>';
|
| 1778 |
-
$list_text_mode=$list_text_mode.$element_label.' - Longitude:'.$element.' Latitude:'.(isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "")."\r\n";
|
| 1779 |
-
}
|
| 1780 |
-
break;
|
| 1781 |
-
}
|
| 1782 |
-
case "type_submitter_mail": {
|
| 1783 |
-
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
| 1784 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1785 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 1786 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1787 |
-
}
|
| 1788 |
-
break;
|
| 1789 |
-
}
|
| 1790 |
-
|
| 1791 |
-
case "type_time": {
|
| 1792 |
-
$hh = isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : NULL;
|
| 1793 |
-
if(isset($hh) && ($this->empty_field($hh, $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_mm".$id], $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_ss".$id], $row->mail_emptyfields))) {
|
| 1794 |
-
$ss = isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : NULL;
|
| 1795 |
-
if(isset($ss)) {
|
| 1796 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "") . ':' . $ss;
|
| 1797 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$hh.':'.(isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "").':'.$ss;
|
| 1798 |
-
}
|
| 1799 |
-
else {
|
| 1800 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
| 1801 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$hh.':'.(isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
| 1802 |
-
}
|
| 1803 |
-
$am_pm = isset($_POST['wdform_'.$i."_am_pm".$id]) ? $_POST['wdform_'.$i."_am_pm".$id] : NULL;
|
| 1804 |
-
if(isset($am_pm)) {
|
| 1805 |
-
$list = $list . ' ' . $am_pm . '</td></tr>';
|
| 1806 |
-
$list_text_mode=$list_text_mode.$am_pm."\r\n";
|
| 1807 |
-
}
|
| 1808 |
-
else {
|
| 1809 |
-
$list = $list.'</td></tr>';
|
| 1810 |
-
$list_text_mode=$list_text_mode."\r\n";
|
| 1811 |
-
}
|
| 1812 |
-
}
|
| 1813 |
-
break;
|
| 1814 |
-
}
|
| 1815 |
-
|
| 1816 |
-
case "type_phone": {
|
| 1817 |
-
$element_first = isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : NULL;
|
| 1818 |
-
if(isset($element_first) && $this->empty_field($element_first, $row->mail_emptyfields)) {
|
| 1819 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . '</td></tr>';
|
| 1820 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element_first.' '.(isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "")."\r\n";
|
| 1821 |
-
}
|
| 1822 |
-
break;
|
| 1823 |
-
}
|
| 1824 |
-
|
| 1825 |
-
case "type_name": {
|
| 1826 |
-
$element_first = isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : NULL;
|
| 1827 |
-
if(isset($element_first)) {
|
| 1828 |
-
$element_title = isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : NULL;
|
| 1829 |
-
$element_middle = isset($_POST['wdform_'.$i."_element_middle".$id]) ? esc_html($_POST['wdform_'.$i."_element_middle".$id]) : NULL;
|
| 1830 |
-
if((isset($element_title) || isset($element_middle)) && ($this->empty_field($element_title, $row->mail_emptyfields) || $this->empty_field($element_first, $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_element_last".$id], $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_element_middle".$id], $row->mail_emptyfields))) {
|
| 1831 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . (isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : '') . ' ' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . ' ' . (isset($_POST['wdform_'.$i."_element_middle".$id]) ? $_POST['wdform_'.$i."_element_middle".$id] : "") . '</td></tr>';
|
| 1832 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.(isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : '').' '.$element_first.' '.(isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "").' '.(isset($_POST['wdform_'.$i."_element_middle".$id]) ? $_POST['wdform_'.$i."_element_middle".$id] : "")."\r\n";
|
| 1833 |
-
}
|
| 1834 |
-
else {
|
| 1835 |
-
if($this->empty_field($element_first, $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_element_last".$id], $row->mail_emptyfields)) {
|
| 1836 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . '</td></tr>';
|
| 1837 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element_first.' '.(isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "")."\r\n";
|
| 1838 |
-
}
|
| 1839 |
-
}
|
| 1840 |
-
}
|
| 1841 |
-
break;
|
| 1842 |
-
}
|
| 1843 |
-
|
| 1844 |
-
case "type_address": {
|
| 1845 |
-
$element = isset($_POST['wdform_'.$i."_street1".$id]) ? $_POST['wdform_'.$i."_street1".$id] : NULL;
|
| 1846 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1847 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1848 |
-
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1849 |
-
break;
|
| 1850 |
-
}
|
| 1851 |
-
$element = isset($_POST['wdform_'.$i."_street2".$id]) ? $_POST['wdform_'.$i."_street2".$id] : NULL;
|
| 1852 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1853 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1854 |
-
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1855 |
-
break;
|
| 1856 |
-
}
|
| 1857 |
-
$element = isset($_POST['wdform_'.$i."_city".$id]) ? $_POST['wdform_'.$i."_city".$id] : NULL;
|
| 1858 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1859 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1860 |
-
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1861 |
-
break;
|
| 1862 |
-
}
|
| 1863 |
-
$element = isset($_POST['wdform_'.$i."_state".$id]) ? $_POST['wdform_'.$i."_state".$id] : NULL;
|
| 1864 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1865 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1866 |
-
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1867 |
-
break;
|
| 1868 |
-
}
|
| 1869 |
-
$element = isset($_POST['wdform_'.$i."_postal".$id]) ? $_POST['wdform_'.$i."_postal".$id] : NULL;
|
| 1870 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1871 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1872 |
-
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1873 |
-
break;
|
| 1874 |
-
}
|
| 1875 |
-
$element = isset($_POST['wdform_'.$i."_country".$id]) ? $_POST['wdform_'.$i."_country".$id] : NULL;
|
| 1876 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1877 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1878 |
-
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1879 |
-
break;
|
| 1880 |
-
}
|
| 1881 |
-
break;
|
| 1882 |
-
}
|
| 1883 |
-
|
| 1884 |
-
case "type_date_fields": {
|
| 1885 |
-
$day = isset($_POST['wdform_'.$i."_day".$id]) ? $_POST['wdform_'.$i."_day".$id] : NULL;
|
| 1886 |
-
$month = isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : "";
|
| 1887 |
-
$year = isset($_POST['wdform_'.$i."_year".$id]) ? $_POST['wdform_'.$i."_year".$id] : "";
|
| 1888 |
-
if(isset($day) && $this->empty_field($day, $row->mail_emptyfields)) {
|
| 1889 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' .(($day || $month || $year) ? $day . '-' . $month . '-' . $year : '' ). '</td></tr>';
|
| 1890 |
-
$list_text_mode=$list_text_mode.$element_label.(($day || $month || $year) ? $day.'-'.$month.'-'.$year : '')."\r\n";
|
| 1891 |
-
}
|
| 1892 |
-
break;
|
| 1893 |
-
}
|
| 1894 |
-
|
| 1895 |
-
case "type_radio": {
|
| 1896 |
-
$element = isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : NULL;
|
| 1897 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1898 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 1899 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1900 |
-
break;
|
| 1901 |
-
}
|
| 1902 |
-
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
| 1903 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1904 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 1905 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1906 |
-
}
|
| 1907 |
-
break;
|
| 1908 |
-
}
|
| 1909 |
-
|
| 1910 |
-
case "type_checkbox": {
|
| 1911 |
-
$start = -1;
|
| 1912 |
-
for($j = 0; $j < 100; $j++) {
|
| 1913 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 1914 |
-
if(isset($element)) {
|
| 1915 |
-
$start = $j;
|
| 1916 |
-
break;
|
| 1917 |
-
}
|
| 1918 |
-
}
|
| 1919 |
-
$other_element_id = -1;
|
| 1920 |
-
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
| 1921 |
-
if($is_other == "yes") {
|
| 1922 |
-
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
| 1923 |
-
}
|
| 1924 |
-
|
| 1925 |
-
if($start != -1 || ($start == -1 && $row->mail_emptyfields))
|
| 1926 |
-
{
|
| 1927 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
|
| 1928 |
-
$list_text_mode=$list_text_mode.$element_label.' - ';
|
| 1929 |
-
}
|
| 1930 |
-
|
| 1931 |
-
if($start != -1) {
|
| 1932 |
-
for($j = $start; $j < 100; $j++) {
|
| 1933 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 1934 |
-
if(isset($element)) {
|
| 1935 |
-
if($j == $other_element_id) {
|
| 1936 |
-
$list = $list . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '<br>';
|
| 1937 |
-
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "").', ';
|
| 1938 |
-
}
|
| 1939 |
-
else {
|
| 1940 |
-
$list = $list . (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "") . '<br>';
|
| 1941 |
-
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "").', ';
|
| 1942 |
-
}
|
| 1943 |
-
}
|
| 1944 |
-
}
|
| 1945 |
-
}
|
| 1946 |
-
|
| 1947 |
-
if($start != -1 || ($start == -1 && $row->mail_emptyfields))
|
| 1948 |
-
{
|
| 1949 |
-
$list = $list . '</td></tr>';
|
| 1950 |
-
$list_text_mode=$list_text_mode."\r\n";
|
| 1951 |
-
}
|
| 1952 |
-
break;
|
| 1953 |
-
}
|
| 1954 |
-
|
| 1955 |
-
case "type_paypal_price": {
|
| 1956 |
-
$value = 0;
|
| 1957 |
-
if(isset($_POST['wdform_'.$i."_element_dollars".$id])) {
|
| 1958 |
-
$value = $_POST['wdform_'.$i."_element_dollars".$id];
|
| 1959 |
-
}
|
| 1960 |
-
if(isset($_POST['wdform_'.$i."_element_cents".$id]) && $_POST['wdform_'.$i."_element_cents".$id]) {
|
| 1961 |
-
$value = $value . '.' . $_POST['wdform_'.$i."_element_cents".$id];
|
| 1962 |
-
}
|
| 1963 |
-
|
| 1964 |
-
if($this->empty_field($value, $row->mail_emptyfields) && $value!='.')
|
| 1965 |
-
{
|
| 1966 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . $form_currency . '</td></tr>';
|
| 1967 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$value.$form_currency."\r\n";
|
| 1968 |
-
}
|
| 1969 |
-
break;
|
| 1970 |
-
}
|
| 1971 |
-
|
| 1972 |
-
case "type_paypal_select": {
|
| 1973 |
-
if(isset($_POST['wdform_'.$i."_element_label".$id]) && $_POST['wdform_'.$i."_element".$id] != '') {
|
| 1974 |
-
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 1975 |
-
}
|
| 1976 |
-
else {
|
| 1977 |
-
$value='';
|
| 1978 |
-
}
|
| 1979 |
-
$element_quantity_label = (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) && $_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
| 1980 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 1981 |
-
if($value != '' && isset($element_quantity)) {
|
| 1982 |
-
$value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
| 1983 |
-
}
|
| 1984 |
-
for($k = 0; $k < 50; $k++) {
|
| 1985 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 1986 |
-
if(isset($temp_val)) {
|
| 1987 |
-
$value .= '<br/>' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 1988 |
-
}
|
| 1989 |
-
}
|
| 1990 |
-
|
| 1991 |
-
if($this->empty_field($value, $row->mail_emptyfields))
|
| 1992 |
-
{
|
| 1993 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
|
| 1994 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.str_replace('<br/>',', ',$value)."\r\n";
|
| 1995 |
-
}
|
| 1996 |
-
break;
|
| 1997 |
-
}
|
| 1998 |
-
|
| 1999 |
-
case "type_paypal_radio": {
|
| 2000 |
-
if(isset($_POST['wdform_'.$i."_element".$id])) {
|
| 2001 |
-
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 2002 |
-
|
| 2003 |
-
$element_quantity_label = isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
| 2004 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 2005 |
-
if (isset($element_quantity)) {
|
| 2006 |
-
$value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
| 2007 |
-
}
|
| 2008 |
-
for($k = 0; $k < 50; $k++) {
|
| 2009 |
-
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 2010 |
-
if(isset($temp_val)) {
|
| 2011 |
-
$value .= '<br/>' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 2012 |
-
}
|
| 2013 |
-
}
|
| 2014 |
-
}
|
| 2015 |
-
else {
|
| 2016 |
-
$value='';
|
| 2017 |
-
}
|
| 2018 |
-
|
| 2019 |
-
if($this->empty_field($value, $row->mail_emptyfields))
|
| 2020 |
-
{
|
| 2021 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
|
| 2022 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.str_replace('<br/>',', ',$value)."\r\n";
|
| 2023 |
-
}
|
| 2024 |
-
break;
|
| 2025 |
-
}
|
| 2026 |
-
|
| 2027 |
-
case "type_paypal_shipping": {
|
| 2028 |
-
if(isset($_POST['wdform_'.$i."_element".$id])) {
|
| 2029 |
-
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 2030 |
-
|
| 2031 |
-
if($this->empty_field($value, $row->mail_emptyfields))
|
| 2032 |
-
{
|
| 2033 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
|
| 2034 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$value."\r\n";
|
| 2035 |
-
}
|
| 2036 |
-
}
|
| 2037 |
-
else {
|
| 2038 |
-
$value='';
|
| 2039 |
-
}
|
| 2040 |
-
|
| 2041 |
-
break;
|
| 2042 |
-
}
|
| 2043 |
-
|
| 2044 |
-
case "type_paypal_checkbox": {
|
| 2045 |
-
|
| 2046 |
-
$start = -1;
|
| 2047 |
-
for($j = 0; $j < 100; $j++) {
|
| 2048 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 2049 |
-
if(isset($element)) {
|
| 2050 |
-
$start=$j;
|
| 2051 |
-
break;
|
| 2052 |
-
}
|
| 2053 |
-
}
|
| 2054 |
-
|
| 2055 |
-
if($start != -1 || ($start == -1 && $row->mail_emptyfields))
|
| 2056 |
-
{
|
| 2057 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
|
| 2058 |
-
$list_text_mode=$list_text_mode.$element_label.' - ';
|
| 2059 |
-
}
|
| 2060 |
-
if($start!=-1) {
|
| 2061 |
-
for($j = $start; $j < 100; $j++) {
|
| 2062 |
-
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 2063 |
-
if(isset($element)) {
|
| 2064 |
-
$list = $list . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . '<br>';
|
| 2065 |
-
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "").' - '.($element == '' ? '0' . $form_currency : $element).$form_currency.', ';
|
| 2066 |
-
}
|
| 2067 |
-
}
|
| 2068 |
-
}
|
| 2069 |
-
$element_quantity_label = isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
| 2070 |
-
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 2071 |
-
if (isset($element_quantity)) {
|
| 2072 |
-
$list = $list . '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
| 2073 |
-
$list_text_mode=$list_text_mode.$element_quantity_label . ': ' . $element_quantity.', ';
|
| 2074 |
-
}
|
| 2075 |
-
for($k = 0; $k < 50; $k++) {
|
| 2076 |
-
$temp_val = isset($_POST['wdform_'.$i."_element_property_value".$id.$k]) ? $_POST['wdform_'.$i."_element_property_value".$id.$k] : NULL;
|
| 2077 |
-
if(isset($temp_val)) {
|
| 2078 |
-
$list = $list . '<br/>' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 2079 |
-
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val.', ';
|
| 2080 |
-
}
|
| 2081 |
-
}
|
| 2082 |
-
if($start != -1 || ($start == -1 && $row->mail_emptyfields))
|
| 2083 |
-
{
|
| 2084 |
-
$list = $list . '</td></tr>';
|
| 2085 |
-
$list_text_mode=$list_text_mode."\r\n";
|
| 2086 |
-
}
|
| 2087 |
-
break;
|
| 2088 |
-
}
|
| 2089 |
-
|
| 2090 |
-
case "type_paypal_total": {
|
| 2091 |
-
$element = isset($_POST['wdform_'.$i."_paypal_total".$id]) ? $_POST['wdform_'.$i."_paypal_total".$id] : "";
|
| 2092 |
-
if($this->empty_field($element, $row->mail_emptyfields))
|
| 2093 |
-
{
|
| 2094 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 2095 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 2096 |
-
}
|
| 2097 |
-
break;
|
| 2098 |
-
}
|
| 2099 |
-
|
| 2100 |
-
case "type_star_rating": {
|
| 2101 |
-
$element = isset($_POST['wdform_'.$i."_star_amount".$id]) ? $_POST['wdform_'.$i."_star_amount".$id] : NULL;
|
| 2102 |
-
$selected = isset($_POST['wdform_'.$i."_selected_star_amount".$id]) ? $_POST['wdform_'.$i."_selected_star_amount".$id] : 0;
|
| 2103 |
-
if(isset($element) && $this->empty_field($selected, $row->mail_emptyfields)) {
|
| 2104 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
|
| 2105 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$selected.'/'.$element."\r\n";
|
| 2106 |
-
}
|
| 2107 |
-
break;
|
| 2108 |
-
}
|
| 2109 |
-
|
| 2110 |
-
case "type_scale_rating": {
|
| 2111 |
-
$element = isset($_POST['wdform_'.$i."_scale_amount".$id]) ? $_POST['wdform_'.$i."_scale_amount".$id] : NULL;
|
| 2112 |
-
$selected = isset($_POST['wdform_'.$i."_scale_radio".$id]) ? $_POST['wdform_'.$i."_scale_radio".$id] : 0;
|
| 2113 |
-
if(isset($element) && $this->empty_field($selected, $row->mail_emptyfields)) {
|
| 2114 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
|
| 2115 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$selected.'/'.$element."\r\n";
|
| 2116 |
-
}
|
| 2117 |
-
break;
|
| 2118 |
-
}
|
| 2119 |
-
|
| 2120 |
-
case "type_spinner": {
|
| 2121 |
-
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
| 2122 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 2123 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 2124 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 2125 |
-
}
|
| 2126 |
-
break;
|
| 2127 |
-
}
|
| 2128 |
-
|
| 2129 |
-
case "type_slider": {
|
| 2130 |
-
$element = isset($_POST['wdform_'.$i."_slider_value".$id]) ? $_POST['wdform_'.$i."_slider_value".$id] : NULL;
|
| 2131 |
-
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 2132 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 2133 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 2134 |
-
}
|
| 2135 |
-
break;
|
| 2136 |
-
}
|
| 2137 |
-
|
| 2138 |
-
case "type_range": {
|
| 2139 |
-
$element0 = isset($_POST['wdform_'.$i."_element".$id.'0']) ? $_POST['wdform_'.$i."_element".$id.'0'] : NULL;
|
| 2140 |
-
$element1 = isset($_POST['wdform_'.$i."_element".$id.'1']) ? $_POST['wdform_'.$i."_element".$id.'1'] : NULL;
|
| 2141 |
-
if((isset($element0) && $this->empty_field($element0, $row->mail_emptyfields)) || (isset($element1) && $this->empty_field($element1, $row->mail_emptyfields))) {
|
| 2142 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >From:' . $element0 . '<span style="margin-left:6px">To</span>:' . $element1 . '</td></tr>';
|
| 2143 |
-
$list_text_mode=$list_text_mode.$element_label.' - From:'.$element0.' To:'.$element1."\r\n";
|
| 2144 |
-
}
|
| 2145 |
-
break;
|
| 2146 |
-
}
|
| 2147 |
-
|
| 2148 |
-
case "type_grading": {
|
| 2149 |
-
$element = isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "";
|
| 2150 |
-
$grading = explode(":", $element);
|
| 2151 |
-
$items_count = sizeof($grading) - 1;
|
| 2152 |
-
$element = "";
|
| 2153 |
-
$total = "";
|
| 2154 |
-
$form_empty_field = 1;
|
| 2155 |
-
for($k = 0;$k < $items_count; $k++) {
|
| 2156 |
-
$element .= $grading[$k] . ":" . (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : "") . " ";
|
| 2157 |
-
$total += (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : 0);
|
| 2158 |
-
if(isset($_POST['wdform_'.$i."_element".$id.'_'.$k]))
|
| 2159 |
-
$form_empty_field = 0;
|
| 2160 |
-
}
|
| 2161 |
-
$element .= "Total:" . $total;
|
| 2162 |
-
if(isset($element) && $this->empty_field($form_empty_field, $row->mail_emptyfields)) {
|
| 2163 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 2164 |
-
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 2165 |
-
}
|
| 2166 |
-
break;
|
| 2167 |
-
}
|
| 2168 |
-
|
| 2169 |
-
case "type_matrix": {
|
| 2170 |
-
$input_type = isset($_POST['wdform_'.$i."_input_type".$id]) ? $_POST['wdform_'.$i."_input_type".$id] : "";
|
| 2171 |
-
$mat_rows = explode("***", isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "");
|
| 2172 |
-
$rows_count = sizeof($mat_rows) - 1;
|
| 2173 |
-
$mat_columns = explode("***", isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "");
|
| 2174 |
-
$columns_count = sizeof($mat_columns) - 1;
|
| 2175 |
-
$matrix = "<table>";
|
| 2176 |
-
$matrix .= '<tr><td></td>';
|
| 2177 |
-
for($k = 1; $k < count($mat_columns); $k++) {
|
| 2178 |
-
$matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[$k] . '</td>';
|
| 2179 |
-
}
|
| 2180 |
-
$matrix .= '</tr>';
|
| 2181 |
-
$aaa = Array();
|
| 2182 |
-
for($k = 1; $k <= $rows_count; $k++) {
|
| 2183 |
-
$matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[$k] . '</td>';
|
| 2184 |
-
if($input_type == "radio") {
|
| 2185 |
-
$mat_radio = isset($_POST['wdform_'.$i."_input_element".$id.$k]) ? $_POST['wdform_'.$i."_input_element".$id.$k] : 0;
|
| 2186 |
-
if($mat_radio == 0) {
|
| 2187 |
-
$checked = "";
|
| 2188 |
-
$aaa[1] = "";
|
| 2189 |
-
}
|
| 2190 |
-
else {
|
| 2191 |
-
$aaa = explode("_", $mat_radio);
|
| 2192 |
-
}
|
| 2193 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
| 2194 |
-
if($aaa[1] == $j) {
|
| 2195 |
-
$checked = "checked";
|
| 2196 |
-
}
|
| 2197 |
-
else {
|
| 2198 |
-
$checked = "";
|
| 2199 |
-
}
|
| 2200 |
-
$matrix .= '<td style="text-align:center"><input type="radio" ' . $checked . ' disabled /></td>';
|
| 2201 |
-
}
|
| 2202 |
-
}
|
| 2203 |
-
else {
|
| 2204 |
-
if($input_type == "checkbox") {
|
| 2205 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
| 2206 |
-
$checked = isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "";
|
| 2207 |
-
if($checked == 1) {
|
| 2208 |
-
$checked = "checked";
|
| 2209 |
-
}
|
| 2210 |
-
else {
|
| 2211 |
-
$checked = "";
|
| 2212 |
-
}
|
| 2213 |
-
$matrix .= '<td style="text-align:center"><input type="checkbox" ' . $checked . ' disabled /></td>';
|
| 2214 |
-
}
|
| 2215 |
-
}
|
| 2216 |
-
else {
|
| 2217 |
-
if($input_type == "text") {
|
| 2218 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
| 2219 |
-
$checked = isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "";
|
| 2220 |
-
$matrix .= '<td style="text-align:center"><input type="text" value="' . $checked . '" disabled /></td>';
|
| 2221 |
-
}
|
| 2222 |
-
}
|
| 2223 |
-
else {
|
| 2224 |
-
for($j = 1; $j <= $columns_count; $j++) {
|
| 2225 |
-
$checked = isset($_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j] : "";
|
| 2226 |
-
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
| 2227 |
-
}
|
| 2228 |
-
}
|
| 2229 |
-
}
|
| 2230 |
-
}
|
| 2231 |
-
$matrix .= '</tr>';
|
| 2232 |
-
}
|
| 2233 |
-
$matrix .= '</table>';
|
| 2234 |
-
if(isset($matrix)) {
|
| 2235 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $matrix . '</td></tr>';
|
| 2236 |
-
}
|
| 2237 |
-
break;
|
| 2238 |
-
}
|
| 2239 |
-
default: break;
|
| 2240 |
-
}
|
| 2241 |
-
}
|
| 2242 |
-
}
|
| 2243 |
-
}
|
| 2244 |
-
|
| 2245 |
-
$list = $list . '</table>';
|
| 2246 |
-
if($row->sendemail) {
|
| 2247 |
-
$fromname = $row->mail_from_name_user;
|
| 2248 |
-
if($row->mail_subject_user)
|
| 2249 |
-
$subject = $row->mail_subject_user;
|
| 2250 |
-
else
|
| 2251 |
-
$subject = $row->title;
|
| 2252 |
-
if($row->reply_to_user) {
|
| 2253 |
-
$replyto = $row->reply_to_user;
|
| 2254 |
-
}
|
| 2255 |
-
$attachment_user = array();
|
| 2256 |
-
if ($row->mail_attachment_user) {
|
| 2257 |
-
for ($k = 0; $k < count($all_files); $k++) {
|
| 2258 |
-
if (isset($all_files[$k]['tmp_name'])) {
|
| 2259 |
-
$attachment_user[$k] = $all_files[$k]['tmp_name'];
|
| 2260 |
-
}
|
| 2261 |
-
}
|
| 2262 |
-
}
|
| 2263 |
-
|
| 2264 |
-
if ($row->mail_mode_user) {
|
| 2265 |
-
$content_type = "text/html";
|
| 2266 |
-
$mode = 1;
|
| 2267 |
-
$list_user = wordwrap($list, 70, "\n", true);
|
| 2268 |
-
$new_script = wpautop($row->script_mail_user);
|
| 2269 |
-
}
|
| 2270 |
-
else {
|
| 2271 |
-
$content_type = "text/plain";
|
| 2272 |
-
$mode = 0;
|
| 2273 |
-
$list_user = wordwrap($list_text_mode, 1000, "\n", true);
|
| 2274 |
-
$new_script = str_replace(array('<p>','</p>'),'',$row->script_mail_user);
|
| 2275 |
-
}
|
| 2276 |
-
|
| 2277 |
-
foreach($label_order_original as $key => $label_each) {
|
| 2278 |
-
$type=$label_type[$key];
|
| 2279 |
-
|
| 2280 |
-
|
| 2281 |
-
$
|
| 2282 |
-
|
| 2283 |
-
|
| 2284 |
-
|
| 2285 |
-
|
| 2286 |
-
|
| 2287 |
-
|
| 2288 |
-
|
| 2289 |
-
|
| 2290 |
-
|
| 2291 |
-
|
| 2292 |
-
|
| 2293 |
-
|
| 2294 |
-
|
| 2295 |
-
|
| 2296 |
-
|
| 2297 |
-
|
| 2298 |
-
|
| 2299 |
-
|
| 2300 |
-
|
| 2301 |
-
|
| 2302 |
-
$
|
| 2303 |
-
$
|
| 2304 |
-
|
| 2305 |
-
|
| 2306 |
-
|
| 2307 |
-
|
| 2308 |
-
|
| 2309 |
-
|
| 2310 |
-
|
| 2311 |
-
|
| 2312 |
-
|
| 2313 |
-
|
| 2314 |
-
|
| 2315 |
-
|
| 2316 |
-
|
| 2317 |
-
|
| 2318 |
-
|
| 2319 |
-
|
| 2320 |
-
|
| 2321 |
-
|
| 2322 |
-
|
| 2323 |
-
|
| 2324 |
-
|
| 2325 |
-
|
| 2326 |
-
|
| 2327 |
-
|
| 2328 |
-
|
| 2329 |
-
|
| 2330 |
-
|
| 2331 |
-
$new_script
|
| 2332 |
-
|
| 2333 |
-
|
| 2334 |
-
|
| 2335 |
-
|
| 2336 |
-
|
| 2337 |
-
|
| 2338 |
-
|
| 2339 |
-
|
| 2340 |
-
|
| 2341 |
-
|
| 2342 |
-
|
| 2343 |
-
$
|
| 2344 |
-
$GLOBALS['
|
| 2345 |
-
|
| 2346 |
-
|
| 2347 |
-
$_GET['
|
| 2348 |
-
$_GET['
|
| 2349 |
-
$
|
| 2350 |
-
|
| 2351 |
-
|
| 2352 |
-
|
| 2353 |
-
|
| 2354 |
-
|
| 2355 |
-
|
| 2356 |
-
|
| 2357 |
-
$
|
| 2358 |
-
|
| 2359 |
-
|
| 2360 |
-
|
| 2361 |
-
|
| 2362 |
-
|
| 2363 |
-
$
|
| 2364 |
-
|
| 2365 |
-
|
| 2366 |
-
|
| 2367 |
-
|
| 2368 |
-
|
| 2369 |
-
|
| 2370 |
-
|
| 2371 |
-
|
| 2372 |
-
|
| 2373 |
-
|
| 2374 |
-
|
| 2375 |
-
|
| 2376 |
-
|
| 2377 |
-
|
| 2378 |
-
|
| 2379 |
-
|
| 2380 |
-
|
| 2381 |
-
|
| 2382 |
-
|
| 2383 |
-
|
| 2384 |
-
|
| 2385 |
-
|
| 2386 |
-
|
| 2387 |
-
|
| 2388 |
-
|
| 2389 |
-
|
| 2390 |
-
|
| 2391 |
-
|
| 2392 |
-
|
| 2393 |
-
|
| 2394 |
-
|
| 2395 |
-
|
| 2396 |
-
|
| 2397 |
-
|
| 2398 |
-
|
| 2399 |
-
|
| 2400 |
-
|
| 2401 |
-
|
| 2402 |
-
|
| 2403 |
-
|
| 2404 |
-
|
| 2405 |
-
|
| 2406 |
-
|
| 2407 |
-
|
| 2408 |
-
|
| 2409 |
-
|
| 2410 |
-
|
| 2411 |
-
|
| 2412 |
-
|
| 2413 |
-
|
| 2414 |
-
|
| 2415 |
-
$
|
| 2416 |
-
$
|
| 2417 |
-
$
|
| 2418 |
-
|
| 2419 |
-
|
| 2420 |
-
|
| 2421 |
-
$
|
| 2422 |
-
$
|
| 2423 |
-
$list =
|
| 2424 |
-
$
|
| 2425 |
-
|
| 2426 |
-
|
| 2427 |
-
|
| 2428 |
-
|
| 2429 |
-
|
| 2430 |
-
|
| 2431 |
-
|
| 2432 |
-
|
| 2433 |
-
|
| 2434 |
-
|
| 2435 |
-
|
| 2436 |
-
|
| 2437 |
-
|
| 2438 |
-
|
| 2439 |
-
|
| 2440 |
-
|
| 2441 |
-
|
| 2442 |
-
|
| 2443 |
-
|
| 2444 |
-
|
| 2445 |
-
|
| 2446 |
-
|
| 2447 |
-
|
| 2448 |
-
|
| 2449 |
-
|
| 2450 |
-
|
| 2451 |
-
|
| 2452 |
-
|
| 2453 |
-
|
| 2454 |
-
|
| 2455 |
-
|
| 2456 |
-
|
| 2457 |
-
|
| 2458 |
-
|
| 2459 |
-
|
| 2460 |
-
|
| 2461 |
-
|
| 2462 |
-
|
| 2463 |
-
|
| 2464 |
-
|
| 2465 |
-
|
| 2466 |
-
|
| 2467 |
-
|
| 2468 |
-
|
| 2469 |
-
|
| 2470 |
-
|
| 2471 |
-
|
| 2472 |
-
|
| 2473 |
-
|
| 2474 |
-
|
| 2475 |
-
|
| 2476 |
-
|
| 2477 |
-
|
| 2478 |
-
|
| 2479 |
-
|
| 2480 |
-
|
| 2481 |
-
|
| 2482 |
-
|
| 2483 |
-
|
| 2484 |
-
|
| 2485 |
-
|
| 2486 |
-
|
| 2487 |
-
|
| 2488 |
-
|
| 2489 |
-
|
| 2490 |
-
|
| 2491 |
-
|
| 2492 |
-
|
| 2493 |
-
|
| 2494 |
-
|
| 2495 |
-
|
| 2496 |
-
|
| 2497 |
-
|
| 2498 |
-
|
| 2499 |
-
|
| 2500 |
-
|
| 2501 |
-
|
| 2502 |
-
$
|
| 2503 |
-
|
| 2504 |
-
|
| 2505 |
-
|
| 2506 |
-
|
| 2507 |
-
|
| 2508 |
-
|
| 2509 |
-
|
| 2510 |
-
$
|
| 2511 |
-
|
| 2512 |
-
|
| 2513 |
-
|
| 2514 |
-
|
| 2515 |
-
|
| 2516 |
-
|
| 2517 |
-
|
| 2518 |
-
|
| 2519 |
-
|
| 2520 |
-
|
| 2521 |
-
$
|
| 2522 |
-
|
| 2523 |
-
|
| 2524 |
-
|
| 2525 |
-
|
| 2526 |
-
|
| 2527 |
-
$
|
| 2528 |
-
$
|
| 2529 |
-
$GLOBALS['
|
| 2530 |
-
|
| 2531 |
-
|
| 2532 |
-
|
| 2533 |
-
|
| 2534 |
-
|
| 2535 |
-
|
| 2536 |
-
|
| 2537 |
-
|
| 2538 |
-
|
| 2539 |
-
|
| 2540 |
-
|
| 2541 |
-
|
| 2542 |
-
|
| 2543 |
-
|
| 2544 |
-
case '
|
| 2545 |
-
case
|
| 2546 |
-
case
|
| 2547 |
-
case "
|
| 2548 |
-
case "
|
| 2549 |
-
|
| 2550 |
-
|
| 2551 |
-
|
| 2552 |
-
|
| 2553 |
-
|
| 2554 |
-
|
| 2555 |
-
|
| 2556 |
-
|
| 2557 |
-
|
| 2558 |
-
|
| 2559 |
-
|
| 2560 |
-
|
| 2561 |
-
|
| 2562 |
-
|
| 2563 |
-
|
| 2564 |
-
|
| 2565 |
-
|
| 2566 |
-
|
| 2567 |
-
|
| 2568 |
-
|
| 2569 |
-
|
| 2570 |
-
|
| 2571 |
-
|
| 2572 |
-
|
| 2573 |
-
|
| 2574 |
-
|
| 2575 |
-
|
| 2576 |
-
|
| 2577 |
-
|
| 2578 |
-
|
| 2579 |
-
|
| 2580 |
-
|
| 2581 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $_POST[$i . "_hh" . $id] . ':' . $_POST[$i . "_mm" . $id];
|
| 2582 |
-
|
| 2583 |
-
|
| 2584 |
-
|
| 2585 |
-
|
| 2586 |
-
$list = $list . '</td></tr>';
|
| 2587 |
-
|
| 2588 |
-
|
| 2589 |
-
|
| 2590 |
-
|
| 2591 |
-
|
| 2592 |
-
|
| 2593 |
-
|
| 2594 |
-
|
| 2595 |
-
|
| 2596 |
-
|
| 2597 |
-
|
| 2598 |
-
|
| 2599 |
-
|
| 2600 |
-
|
| 2601 |
-
|
| 2602 |
-
|
| 2603 |
-
|
| 2604 |
-
|
| 2605 |
-
|
| 2606 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $_POST[$i . "_element_first" . $id] . ' ' . $_POST[$i . "_element_last" . $id] . '</td></tr>';
|
| 2607 |
-
|
| 2608 |
-
|
| 2609 |
-
|
| 2610 |
-
|
| 2611 |
-
|
| 2612 |
-
|
| 2613 |
-
|
| 2614 |
-
|
| 2615 |
-
|
| 2616 |
-
|
| 2617 |
-
|
| 2618 |
-
|
| 2619 |
-
|
| 2620 |
-
|
| 2621 |
-
$i
|
| 2622 |
-
|
| 2623 |
-
|
| 2624 |
-
$i
|
| 2625 |
-
|
| 2626 |
-
|
| 2627 |
-
$i
|
| 2628 |
-
|
| 2629 |
-
|
| 2630 |
-
$i
|
| 2631 |
-
|
| 2632 |
-
|
| 2633 |
-
$i
|
| 2634 |
-
|
| 2635 |
-
|
| 2636 |
-
$i
|
| 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 |
-
|
| 2730 |
-
|
| 2731 |
-
|
| 2732 |
-
|
| 2733 |
-
|
| 2734 |
-
|
| 2735 |
-
|
| 2736 |
-
|
| 2737 |
-
|
| 2738 |
-
|
| 2739 |
-
|
| 2740 |
-
|
| 2741 |
-
|
| 2742 |
-
|
| 2743 |
-
|
| 2744 |
-
|
| 2745 |
-
|
| 2746 |
-
|
| 2747 |
-
|
| 2748 |
-
|
| 2749 |
-
|
| 2750 |
-
|
| 2751 |
-
|
| 2752 |
-
|
| 2753 |
-
|
| 2754 |
-
|
| 2755 |
-
|
| 2756 |
-
|
| 2757 |
-
|
| 2758 |
-
|
| 2759 |
-
|
| 2760 |
-
|
| 2761 |
-
|
| 2762 |
-
|
| 2763 |
-
|
| 2764 |
-
|
| 2765 |
-
|
| 2766 |
-
|
| 2767 |
-
|
| 2768 |
-
|
| 2769 |
-
|
| 2770 |
-
|
| 2771 |
-
|
| 2772 |
-
|
| 2773 |
-
|
| 2774 |
-
|
| 2775 |
-
|
| 2776 |
-
|
| 2777 |
-
|
| 2778 |
-
|
| 2779 |
-
|
| 2780 |
-
|
| 2781 |
-
|
| 2782 |
-
|
| 2783 |
-
|
| 2784 |
-
|
| 2785 |
-
|
| 2786 |
-
|
| 2787 |
-
|
| 2788 |
-
|
| 2789 |
-
|
| 2790 |
-
|
| 2791 |
-
|
| 2792 |
-
|
| 2793 |
-
|
| 2794 |
-
|
| 2795 |
-
|
| 2796 |
-
|
| 2797 |
-
|
| 2798 |
-
|
| 2799 |
-
|
| 2800 |
-
|
| 2801 |
-
|
| 2802 |
-
|
| 2803 |
-
|
| 2804 |
-
|
| 2805 |
-
$
|
| 2806 |
-
$
|
| 2807 |
-
|
| 2808 |
-
|
| 2809 |
-
|
| 2810 |
-
|
| 2811 |
-
|
| 2812 |
-
|
| 2813 |
-
|
| 2814 |
-
|
| 2815 |
-
|
| 2816 |
-
|
| 2817 |
-
|
| 2818 |
-
|
| 2819 |
-
|
| 2820 |
-
|
| 2821 |
-
$
|
| 2822 |
-
$mat_rows =
|
| 2823 |
-
$
|
| 2824 |
-
$
|
| 2825 |
-
$mat_columns =
|
| 2826 |
-
$
|
| 2827 |
-
$
|
| 2828 |
-
$
|
| 2829 |
-
$
|
| 2830 |
-
|
| 2831 |
-
|
| 2832 |
-
|
| 2833 |
-
|
| 2834 |
-
|
| 2835 |
-
$
|
| 2836 |
-
|
| 2837 |
-
|
| 2838 |
-
|
| 2839 |
-
|
| 2840 |
-
|
| 2841 |
-
|
| 2842 |
-
|
| 2843 |
-
|
| 2844 |
-
|
| 2845 |
-
|
| 2846 |
-
|
| 2847 |
-
|
| 2848 |
-
|
| 2849 |
-
|
| 2850 |
-
|
| 2851 |
-
|
| 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 |
-
|
| 2909 |
-
|
| 2910 |
-
|
| 2911 |
-
|
| 2912 |
-
|
| 2913 |
-
|
| 2914 |
-
|
| 2915 |
-
|
| 2916 |
-
|
| 2917 |
-
|
| 2918 |
-
|
| 2919 |
-
|
| 2920 |
-
|
| 2921 |
-
|
| 2922 |
-
|
| 2923 |
-
$
|
| 2924 |
-
|
| 2925 |
-
|
| 2926 |
-
|
| 2927 |
-
|
| 2928 |
-
|
| 2929 |
-
|
| 2930 |
-
|
| 2931 |
-
|
| 2932 |
-
case '
|
| 2933 |
-
case
|
| 2934 |
-
case
|
| 2935 |
-
case "
|
| 2936 |
-
case "
|
| 2937 |
-
|
| 2938 |
-
|
| 2939 |
-
|
| 2940 |
-
|
| 2941 |
-
|
| 2942 |
-
|
| 2943 |
-
|
| 2944 |
-
|
| 2945 |
-
|
| 2946 |
-
|
| 2947 |
-
|
| 2948 |
-
|
| 2949 |
-
|
| 2950 |
-
|
| 2951 |
-
|
| 2952 |
-
|
| 2953 |
-
|
| 2954 |
-
|
| 2955 |
-
|
| 2956 |
-
|
| 2957 |
-
|
| 2958 |
-
|
| 2959 |
-
|
| 2960 |
-
|
| 2961 |
-
|
| 2962 |
-
|
| 2963 |
-
|
| 2964 |
-
|
| 2965 |
-
|
| 2966 |
-
|
| 2967 |
-
|
| 2968 |
-
|
| 2969 |
-
|
| 2970 |
-
|
| 2971 |
-
|
| 2972 |
-
|
| 2973 |
-
|
| 2974 |
-
|
| 2975 |
-
|
| 2976 |
-
|
| 2977 |
-
|
| 2978 |
-
|
| 2979 |
-
|
| 2980 |
-
|
| 2981 |
-
|
| 2982 |
-
|
| 2983 |
-
|
| 2984 |
-
|
| 2985 |
-
|
| 2986 |
-
|
| 2987 |
-
|
| 2988 |
-
|
| 2989 |
-
|
| 2990 |
-
|
| 2991 |
-
|
| 2992 |
-
|
| 2993 |
-
|
| 2994 |
-
|
| 2995 |
-
|
| 2996 |
-
|
| 2997 |
-
|
| 2998 |
-
|
| 2999 |
-
|
| 3000 |
-
|
| 3001 |
-
|
| 3002 |
-
|
| 3003 |
-
|
| 3004 |
-
|
| 3005 |
-
|
| 3006 |
-
|
| 3007 |
-
|
| 3008 |
-
|
| 3009 |
-
|
| 3010 |
-
|
| 3011 |
-
|
| 3012 |
-
|
| 3013 |
-
|
| 3014 |
-
|
| 3015 |
-
|
| 3016 |
-
|
| 3017 |
-
|
| 3018 |
-
|
| 3019 |
-
|
| 3020 |
-
|
| 3021 |
-
|
| 3022 |
-
|
| 3023 |
-
|
| 3024 |
-
|
| 3025 |
-
|
| 3026 |
-
|
| 3027 |
-
|
| 3028 |
-
|
| 3029 |
-
|
| 3030 |
-
|
| 3031 |
-
|
| 3032 |
-
|
| 3033 |
-
|
| 3034 |
-
|
| 3035 |
-
|
| 3036 |
-
|
| 3037 |
-
|
| 3038 |
-
|
| 3039 |
-
|
| 3040 |
-
|
| 3041 |
-
|
| 3042 |
-
|
| 3043 |
-
|
| 3044 |
-
|
| 3045 |
-
|
| 3046 |
-
|
| 3047 |
-
|
| 3048 |
-
|
| 3049 |
-
|
| 3050 |
-
|
| 3051 |
-
|
| 3052 |
-
|
| 3053 |
-
|
| 3054 |
-
|
| 3055 |
-
|
| 3056 |
-
|
| 3057 |
-
|
| 3058 |
-
|
| 3059 |
-
|
| 3060 |
-
|
| 3061 |
-
|
| 3062 |
-
|
| 3063 |
-
|
| 3064 |
-
|
| 3065 |
-
|
| 3066 |
-
|
| 3067 |
-
|
| 3068 |
-
|
| 3069 |
-
|
| 3070 |
-
|
| 3071 |
-
|
| 3072 |
-
|
| 3073 |
-
|
| 3074 |
-
|
| 3075 |
-
|
| 3076 |
-
|
| 3077 |
-
|
| 3078 |
-
|
| 3079 |
-
|
| 3080 |
-
|
| 3081 |
-
|
| 3082 |
-
|
| 3083 |
-
|
| 3084 |
-
|
| 3085 |
-
|
| 3086 |
-
|
| 3087 |
-
|
| 3088 |
-
|
| 3089 |
-
|
| 3090 |
-
|
| 3091 |
-
|
| 3092 |
-
|
| 3093 |
-
|
| 3094 |
-
|
| 3095 |
-
|
| 3096 |
-
|
| 3097 |
-
|
| 3098 |
-
|
| 3099 |
-
|
| 3100 |
-
|
| 3101 |
-
|
| 3102 |
-
|
| 3103 |
-
|
| 3104 |
-
|
| 3105 |
-
|
| 3106 |
-
|
| 3107 |
-
|
| 3108 |
-
|
| 3109 |
-
|
| 3110 |
-
|
| 3111 |
-
|
| 3112 |
-
|
| 3113 |
-
|
| 3114 |
-
|
| 3115 |
-
|
| 3116 |
-
|
| 3117 |
-
|
| 3118 |
-
|
| 3119 |
-
|
| 3120 |
-
|
| 3121 |
-
|
| 3122 |
-
|
| 3123 |
-
|
| 3124 |
-
|
| 3125 |
-
|
| 3126 |
-
|
| 3127 |
-
|
| 3128 |
-
|
| 3129 |
-
|
| 3130 |
-
|
| 3131 |
-
|
| 3132 |
-
|
| 3133 |
-
|
| 3134 |
-
|
| 3135 |
-
|
| 3136 |
-
|
| 3137 |
-
|
| 3138 |
-
|
| 3139 |
-
|
| 3140 |
-
|
| 3141 |
-
|
| 3142 |
-
|
| 3143 |
-
|
| 3144 |
-
|
| 3145 |
-
|
| 3146 |
-
|
| 3147 |
-
|
| 3148 |
-
|
| 3149 |
-
|
| 3150 |
-
|
| 3151 |
-
|
| 3152 |
-
|
| 3153 |
-
|
| 3154 |
-
|
| 3155 |
-
|
| 3156 |
-
|
| 3157 |
-
|
| 3158 |
-
|
| 3159 |
-
|
| 3160 |
-
|
| 3161 |
-
|
| 3162 |
-
|
| 3163 |
-
|
| 3164 |
-
|
| 3165 |
-
|
| 3166 |
-
|
| 3167 |
-
|
| 3168 |
-
|
| 3169 |
-
|
| 3170 |
-
|
| 3171 |
-
|
| 3172 |
-
|
| 3173 |
-
|
| 3174 |
-
|
| 3175 |
-
|
| 3176 |
-
|
| 3177 |
-
|
| 3178 |
-
|
| 3179 |
-
|
| 3180 |
-
|
| 3181 |
-
|
| 3182 |
-
|
| 3183 |
-
|
| 3184 |
-
|
| 3185 |
-
|
| 3186 |
-
|
| 3187 |
-
|
| 3188 |
-
|
| 3189 |
-
|
| 3190 |
-
|
| 3191 |
-
|
| 3192 |
-
|
| 3193 |
-
|
| 3194 |
-
|
| 3195 |
-
|
| 3196 |
-
|
| 3197 |
-
|
| 3198 |
-
|
| 3199 |
-
|
| 3200 |
-
|
| 3201 |
-
|
| 3202 |
-
|
| 3203 |
-
|
| 3204 |
-
|
| 3205 |
-
|
| 3206 |
-
|
| 3207 |
-
|
| 3208 |
-
|
| 3209 |
-
|
| 3210 |
-
|
| 3211 |
-
|
| 3212 |
-
$
|
| 3213 |
-
|
| 3214 |
-
$
|
| 3215 |
-
|
| 3216 |
-
|
| 3217 |
-
|
| 3218 |
-
|
| 3219 |
-
|
| 3220 |
-
|
| 3221 |
-
|
| 3222 |
-
|
| 3223 |
-
|
| 3224 |
-
|
| 3225 |
-
|
| 3226 |
-
|
| 3227 |
-
|
| 3228 |
-
|
| 3229 |
-
|
| 3230 |
-
|
| 3231 |
-
|
| 3232 |
-
|
| 3233 |
-
|
| 3234 |
-
|
| 3235 |
-
|
| 3236 |
-
|
| 3237 |
-
|
| 3238 |
-
|
| 3239 |
-
|
| 3240 |
-
$
|
| 3241 |
-
|
| 3242 |
-
$mat_rows =
|
| 3243 |
-
|
| 3244 |
-
$
|
| 3245 |
-
|
| 3246 |
-
$mat_columns =
|
| 3247 |
-
|
| 3248 |
-
$
|
| 3249 |
-
|
| 3250 |
-
|
| 3251 |
-
|
| 3252 |
-
|
| 3253 |
-
|
| 3254 |
-
|
| 3255 |
-
|
| 3256 |
-
|
| 3257 |
-
|
| 3258 |
-
|
| 3259 |
-
|
| 3260 |
-
|
| 3261 |
-
|
| 3262 |
-
|
| 3263 |
-
|
| 3264 |
-
|
| 3265 |
-
|
| 3266 |
-
|
| 3267 |
-
|
| 3268 |
-
|
| 3269 |
-
|
| 3270 |
-
|
| 3271 |
-
|
| 3272 |
-
|
| 3273 |
-
|
| 3274 |
-
|
| 3275 |
-
|
| 3276 |
-
|
| 3277 |
-
|
| 3278 |
-
|
| 3279 |
-
|
| 3280 |
-
$checked="";
|
| 3281 |
-
|
| 3282 |
-
|
| 3283 |
-
|
| 3284 |
-
|
| 3285 |
-
|
| 3286 |
-
|
| 3287 |
-
|
| 3288 |
-
{
|
| 3289 |
-
|
| 3290 |
-
|
| 3291 |
-
|
| 3292 |
-
$checked = "
|
| 3293 |
-
|
| 3294 |
-
$checked = "";
|
| 3295 |
-
|
| 3296 |
-
|
| 3297 |
-
|
| 3298 |
-
|
| 3299 |
-
|
| 3300 |
-
}
|
| 3301 |
-
|
| 3302 |
-
|
| 3303 |
-
|
| 3304 |
-
{
|
| 3305 |
-
|
| 3306 |
-
|
| 3307 |
-
|
| 3308 |
-
|
| 3309 |
-
|
| 3310 |
-
|
| 3311 |
-
|
| 3312 |
-
|
| 3313 |
-
}
|
| 3314 |
-
|
| 3315 |
-
|
| 3316 |
-
|
| 3317 |
-
|
| 3318 |
-
|
| 3319 |
-
|
| 3320 |
-
|
| 3321 |
-
|
| 3322 |
-
|
| 3323 |
-
|
| 3324 |
-
}
|
| 3325 |
-
|
| 3326 |
-
}
|
| 3327 |
-
|
| 3328 |
-
|
| 3329 |
-
|
| 3330 |
-
|
| 3331 |
-
|
| 3332 |
-
|
| 3333 |
-
|
| 3334 |
-
|
| 3335 |
-
|
| 3336 |
-
|
| 3337 |
-
|
| 3338 |
-
|
| 3339 |
-
|
| 3340 |
-
|
| 3341 |
-
|
| 3342 |
-
|
| 3343 |
-
|
| 3344 |
-
|
| 3345 |
-
|
| 3346 |
-
|
| 3347 |
-
|
| 3348 |
-
|
| 3349 |
-
|
| 3350 |
-
|
| 3351 |
-
|
| 3352 |
-
|
| 3353 |
-
|
| 3354 |
-
|
| 3355 |
-
|
| 3356 |
-
|
| 3357 |
-
|
| 3358 |
-
|
| 3359 |
-
|
| 3360 |
-
|
| 3361 |
-
|
| 3362 |
-
//
|
| 3363 |
-
|
| 3364 |
-
|
| 3365 |
-
|
| 3366 |
-
$
|
| 3367 |
-
|
| 3368 |
-
|
| 3369 |
-
|
| 3370 |
-
|
| 3371 |
-
|
| 3372 |
-
|
| 3373 |
-
|
| 3374 |
-
|
| 3375 |
-
case '
|
| 3376 |
-
case
|
| 3377 |
-
case
|
| 3378 |
-
case "
|
| 3379 |
-
case "
|
| 3380 |
-
|
| 3381 |
-
|
| 3382 |
-
|
| 3383 |
-
|
| 3384 |
-
|
| 3385 |
-
|
| 3386 |
-
|
| 3387 |
-
|
| 3388 |
-
|
| 3389 |
-
|
| 3390 |
-
|
| 3391 |
-
|
| 3392 |
-
|
| 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 |
-
|
| 3457 |
-
|
| 3458 |
-
|
| 3459 |
-
|
| 3460 |
-
|
| 3461 |
-
|
| 3462 |
-
|
| 3463 |
-
|
| 3464 |
-
|
| 3465 |
-
|
| 3466 |
-
|
| 3467 |
-
|
| 3468 |
-
|
| 3469 |
-
|
| 3470 |
-
|
| 3471 |
-
|
| 3472 |
-
|
| 3473 |
-
|
| 3474 |
-
|
| 3475 |
-
|
| 3476 |
-
|
| 3477 |
-
|
| 3478 |
-
|
| 3479 |
-
|
| 3480 |
-
|
| 3481 |
-
|
| 3482 |
-
|
| 3483 |
-
|
| 3484 |
-
|
| 3485 |
-
|
| 3486 |
-
|
| 3487 |
-
|
| 3488 |
-
|
| 3489 |
-
|
| 3490 |
-
|
| 3491 |
-
|
| 3492 |
-
|
| 3493 |
-
|
| 3494 |
-
|
| 3495 |
-
|
| 3496 |
-
|
| 3497 |
-
|
| 3498 |
-
|
| 3499 |
-
|
| 3500 |
-
|
| 3501 |
-
|
| 3502 |
-
|
| 3503 |
-
|
| 3504 |
-
|
| 3505 |
-
|
| 3506 |
-
|
| 3507 |
-
|
| 3508 |
-
|
| 3509 |
-
|
| 3510 |
-
|
| 3511 |
-
|
| 3512 |
-
|
| 3513 |
-
|
| 3514 |
-
|
| 3515 |
-
|
| 3516 |
-
|
| 3517 |
-
|
| 3518 |
-
|
| 3519 |
-
|
| 3520 |
-
|
| 3521 |
-
|
| 3522 |
-
|
| 3523 |
-
|
| 3524 |
-
|
| 3525 |
-
|
| 3526 |
-
|
| 3527 |
-
|
| 3528 |
-
|
| 3529 |
-
|
| 3530 |
-
|
| 3531 |
-
|
| 3532 |
-
|
| 3533 |
-
|
| 3534 |
-
|
| 3535 |
-
|
| 3536 |
-
|
| 3537 |
-
|
| 3538 |
-
|
| 3539 |
-
|
| 3540 |
-
|
| 3541 |
-
|
| 3542 |
-
|
| 3543 |
-
|
| 3544 |
-
|
| 3545 |
-
|
| 3546 |
-
|
| 3547 |
-
|
| 3548 |
-
|
| 3549 |
-
|
| 3550 |
-
|
| 3551 |
-
|
| 3552 |
-
|
| 3553 |
-
|
| 3554 |
-
|
| 3555 |
-
|
| 3556 |
-
|
| 3557 |
-
|
| 3558 |
-
|
| 3559 |
-
|
| 3560 |
-
|
| 3561 |
-
|
| 3562 |
-
|
| 3563 |
-
|
| 3564 |
-
|
| 3565 |
-
|
| 3566 |
-
|
| 3567 |
-
|
| 3568 |
-
|
| 3569 |
-
|
| 3570 |
-
|
| 3571 |
-
|
| 3572 |
-
|
| 3573 |
-
|
| 3574 |
-
|
| 3575 |
-
|
| 3576 |
-
|
| 3577 |
-
|
| 3578 |
-
|
| 3579 |
-
|
| 3580 |
-
|
| 3581 |
-
|
| 3582 |
-
|
| 3583 |
-
|
| 3584 |
-
|
| 3585 |
-
|
| 3586 |
-
|
| 3587 |
-
|
| 3588 |
-
|
| 3589 |
-
|
| 3590 |
-
|
| 3591 |
-
|
| 3592 |
-
|
| 3593 |
-
|
| 3594 |
-
|
| 3595 |
-
|
| 3596 |
-
|
| 3597 |
-
|
| 3598 |
-
|
| 3599 |
-
|
| 3600 |
-
|
| 3601 |
-
|
| 3602 |
-
|
| 3603 |
-
|
| 3604 |
-
|
| 3605 |
-
|
| 3606 |
-
|
| 3607 |
-
|
| 3608 |
-
|
| 3609 |
-
|
| 3610 |
-
|
| 3611 |
-
|
| 3612 |
-
|
| 3613 |
-
|
| 3614 |
-
|
| 3615 |
-
|
| 3616 |
-
|
| 3617 |
-
|
| 3618 |
-
|
| 3619 |
-
|
| 3620 |
-
|
| 3621 |
-
|
| 3622 |
-
|
| 3623 |
-
|
| 3624 |
-
|
| 3625 |
-
|
| 3626 |
-
|
| 3627 |
-
|
| 3628 |
-
|
| 3629 |
-
|
| 3630 |
-
|
| 3631 |
-
|
| 3632 |
-
$
|
| 3633 |
-
|
| 3634 |
-
$
|
| 3635 |
-
|
| 3636 |
-
|
| 3637 |
-
|
| 3638 |
-
|
| 3639 |
-
|
| 3640 |
-
|
| 3641 |
-
|
| 3642 |
-
|
| 3643 |
-
|
| 3644 |
-
|
| 3645 |
-
|
| 3646 |
-
|
| 3647 |
-
|
| 3648 |
-
|
| 3649 |
-
|
| 3650 |
-
|
| 3651 |
-
|
| 3652 |
-
|
| 3653 |
-
|
| 3654 |
-
|
| 3655 |
-
|
| 3656 |
-
|
| 3657 |
-
|
| 3658 |
-
$
|
| 3659 |
-
|
| 3660 |
-
$mat_rows =
|
| 3661 |
-
|
| 3662 |
-
$
|
| 3663 |
-
|
| 3664 |
-
$mat_columns =
|
| 3665 |
-
|
| 3666 |
-
$
|
| 3667 |
-
|
| 3668 |
-
$
|
| 3669 |
-
|
| 3670 |
-
$matrix
|
| 3671 |
-
|
| 3672 |
-
|
| 3673 |
-
|
| 3674 |
-
|
| 3675 |
-
|
| 3676 |
-
|
| 3677 |
-
|
| 3678 |
-
|
| 3679 |
-
|
| 3680 |
-
|
| 3681 |
-
|
| 3682 |
-
|
| 3683 |
-
|
| 3684 |
-
|
| 3685 |
-
|
| 3686 |
-
|
| 3687 |
-
|
| 3688 |
-
|
| 3689 |
-
|
| 3690 |
-
|
| 3691 |
-
|
| 3692 |
-
|
| 3693 |
-
|
| 3694 |
-
|
| 3695 |
-
|
| 3696 |
-
$checked="";
|
| 3697 |
-
|
| 3698 |
-
|
| 3699 |
-
|
| 3700 |
-
|
| 3701 |
-
|
| 3702 |
-
|
| 3703 |
-
|
| 3704 |
-
{
|
| 3705 |
-
|
| 3706 |
-
|
| 3707 |
-
|
| 3708 |
-
$checked = "
|
| 3709 |
-
|
| 3710 |
-
$checked = "";
|
| 3711 |
-
|
| 3712 |
-
|
| 3713 |
-
|
| 3714 |
-
|
| 3715 |
-
|
| 3716 |
-
}
|
| 3717 |
-
|
| 3718 |
-
|
| 3719 |
-
|
| 3720 |
-
{
|
| 3721 |
-
|
| 3722 |
-
|
| 3723 |
-
|
| 3724 |
-
|
| 3725 |
-
|
| 3726 |
-
|
| 3727 |
-
|
| 3728 |
-
|
| 3729 |
-
}
|
| 3730 |
-
|
| 3731 |
-
|
| 3732 |
-
|
| 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 |
-
|
| 3767 |
-
|
| 3768 |
-
|
| 3769 |
-
|
| 3770 |
-
$
|
| 3771 |
-
$
|
| 3772 |
-
|
| 3773 |
-
|
| 3774 |
-
|
| 3775 |
-
|
| 3776 |
-
|
| 3777 |
-
|
| 3778 |
-
|
| 3779 |
-
|
| 3780 |
-
$
|
| 3781 |
-
|
| 3782 |
-
|
| 3783 |
-
|
| 3784 |
-
|
| 3785 |
-
|
| 3786 |
-
|
| 3787 |
-
|
| 3788 |
-
|
| 3789 |
-
case '
|
| 3790 |
-
case
|
| 3791 |
-
case
|
| 3792 |
-
case "
|
| 3793 |
-
case "
|
| 3794 |
-
|
| 3795 |
-
|
| 3796 |
-
|
| 3797 |
-
|
| 3798 |
-
|
| 3799 |
-
|
| 3800 |
-
|
| 3801 |
-
|
| 3802 |
-
|
| 3803 |
-
|
| 3804 |
-
|
| 3805 |
-
|
| 3806 |
-
|
| 3807 |
-
|
| 3808 |
-
|
| 3809 |
-
|
| 3810 |
-
|
| 3811 |
-
|
| 3812 |
-
|
| 3813 |
-
|
| 3814 |
-
|
| 3815 |
-
|
| 3816 |
-
|
| 3817 |
-
|
| 3818 |
-
|
| 3819 |
-
|
| 3820 |
-
|
| 3821 |
-
|
| 3822 |
-
|
| 3823 |
-
|
| 3824 |
-
|
| 3825 |
-
|
| 3826 |
-
|
| 3827 |
-
|
| 3828 |
-
|
| 3829 |
-
|
| 3830 |
-
|
| 3831 |
-
|
| 3832 |
-
|
| 3833 |
-
|
| 3834 |
-
|
| 3835 |
-
|
| 3836 |
-
|
| 3837 |
-
|
| 3838 |
-
|
| 3839 |
-
|
| 3840 |
-
|
| 3841 |
-
|
| 3842 |
-
|
| 3843 |
-
|
| 3844 |
-
|
| 3845 |
-
|
| 3846 |
-
|
| 3847 |
-
|
| 3848 |
-
|
| 3849 |
-
|
| 3850 |
-
|
| 3851 |
-
|
| 3852 |
-
|
| 3853 |
-
|
| 3854 |
-
|
| 3855 |
-
|
| 3856 |
-
|
| 3857 |
-
|
| 3858 |
-
|
| 3859 |
-
|
| 3860 |
-
|
| 3861 |
-
|
| 3862 |
-
|
| 3863 |
-
|
| 3864 |
-
|
| 3865 |
-
|
| 3866 |
-
|
| 3867 |
-
|
| 3868 |
-
|
| 3869 |
-
|
| 3870 |
-
|
| 3871 |
-
|
| 3872 |
-
|
| 3873 |
-
|
| 3874 |
-
|
| 3875 |
-
|
| 3876 |
-
|
| 3877 |
-
|
| 3878 |
-
|
| 3879 |
-
|
| 3880 |
-
|
| 3881 |
-
|
| 3882 |
-
|
| 3883 |
-
|
| 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 |
-
|
| 4068 |
-
$
|
| 4069 |
-
|
| 4070 |
-
$
|
| 4071 |
-
|
| 4072 |
-
|
| 4073 |
-
|
| 4074 |
-
|
| 4075 |
-
|
| 4076 |
-
|
| 4077 |
-
|
| 4078 |
-
|
| 4079 |
-
|
| 4080 |
-
|
| 4081 |
-
|
| 4082 |
-
|
| 4083 |
-
|
| 4084 |
-
|
| 4085 |
-
|
| 4086 |
-
|
| 4087 |
-
|
| 4088 |
-
|
| 4089 |
-
|
| 4090 |
-
|
| 4091 |
-
|
| 4092 |
-
|
| 4093 |
-
|
| 4094 |
-
|
| 4095 |
-
|
| 4096 |
-
$
|
| 4097 |
-
|
| 4098 |
-
$mat_rows =
|
| 4099 |
-
|
| 4100 |
-
$
|
| 4101 |
-
|
| 4102 |
-
$mat_columns =
|
| 4103 |
-
|
| 4104 |
-
$
|
| 4105 |
-
|
| 4106 |
-
|
| 4107 |
-
|
| 4108 |
-
|
| 4109 |
-
|
| 4110 |
-
|
| 4111 |
-
|
| 4112 |
-
|
| 4113 |
-
|
| 4114 |
-
|
| 4115 |
-
|
| 4116 |
-
|
| 4117 |
-
|
| 4118 |
-
|
| 4119 |
-
|
| 4120 |
-
$
|
| 4121 |
-
|
| 4122 |
-
|
| 4123 |
-
|
| 4124 |
-
|
| 4125 |
-
|
| 4126 |
-
|
| 4127 |
-
|
| 4128 |
-
|
| 4129 |
-
|
| 4130 |
-
|
| 4131 |
-
|
| 4132 |
-
|
| 4133 |
-
|
| 4134 |
-
|
| 4135 |
-
|
| 4136 |
-
|
| 4137 |
-
$checked="";
|
| 4138 |
-
|
| 4139 |
-
|
| 4140 |
-
|
| 4141 |
-
|
| 4142 |
-
|
| 4143 |
-
|
| 4144 |
-
|
| 4145 |
-
{
|
| 4146 |
-
|
| 4147 |
-
|
| 4148 |
-
|
| 4149 |
-
$checked = "
|
| 4150 |
-
|
| 4151 |
-
$checked = "";
|
| 4152 |
-
|
| 4153 |
-
|
| 4154 |
-
|
| 4155 |
-
|
| 4156 |
-
|
| 4157 |
-
}
|
| 4158 |
-
|
| 4159 |
-
|
| 4160 |
-
|
| 4161 |
-
{
|
| 4162 |
-
|
| 4163 |
-
|
| 4164 |
-
|
| 4165 |
-
|
| 4166 |
-
|
| 4167 |
-
|
| 4168 |
-
|
| 4169 |
-
|
| 4170 |
-
}
|
| 4171 |
-
|
| 4172 |
-
|
| 4173 |
-
|
| 4174 |
-
|
| 4175 |
-
|
| 4176 |
-
|
| 4177 |
-
|
| 4178 |
-
|
| 4179 |
-
|
| 4180 |
-
|
| 4181 |
-
}
|
| 4182 |
-
|
| 4183 |
-
}
|
| 4184 |
-
|
| 4185 |
-
|
| 4186 |
-
|
| 4187 |
-
|
| 4188 |
-
|
| 4189 |
-
|
| 4190 |
-
|
| 4191 |
-
|
| 4192 |
-
|
| 4193 |
-
|
| 4194 |
-
|
| 4195 |
-
|
| 4196 |
-
|
| 4197 |
-
|
| 4198 |
-
|
| 4199 |
-
|
| 4200 |
-
|
| 4201 |
-
|
| 4202 |
-
|
| 4203 |
-
|
| 4204 |
-
|
| 4205 |
-
|
| 4206 |
-
|
| 4207 |
-
|
| 4208 |
-
|
| 4209 |
-
|
| 4210 |
-
|
| 4211 |
-
|
| 4212 |
-
|
| 4213 |
-
|
| 4214 |
-
|
| 4215 |
-
|
| 4216 |
-
|
| 4217 |
-
|
| 4218 |
-
|
| 4219 |
-
|
| 4220 |
-
|
| 4221 |
-
|
| 4222 |
-
|
| 4223 |
-
|
| 4224 |
-
|
| 4225 |
-
|
| 4226 |
-
|
| 4227 |
-
|
| 4228 |
-
|
| 4229 |
-
|
| 4230 |
-
|
| 4231 |
-
|
| 4232 |
-
|
| 4233 |
-
|
| 4234 |
-
|
| 4235 |
-
|
| 4236 |
-
|
| 4237 |
-
|
| 4238 |
-
|
| 4239 |
-
|
| 4240 |
-
|
| 4241 |
-
|
| 4242 |
-
|
| 4243 |
-
|
| 4244 |
-
|
| 4245 |
-
|
| 4246 |
-
|
| 4247 |
-
|
| 4248 |
-
|
| 4249 |
-
|
| 4250 |
-
|
| 4251 |
-
|
| 4252 |
-
|
| 4253 |
-
|
| 4254 |
-
|
| 4255 |
-
|
| 4256 |
-
|
| 4257 |
-
|
| 4258 |
-
|
| 4259 |
-
|
| 4260 |
-
|
| 4261 |
-
|
| 4262 |
-
|
| 4263 |
-
|
| 4264 |
-
|
| 4265 |
-
|
| 4266 |
-
|
| 4267 |
-
|
| 4268 |
-
|
| 4269 |
-
|
| 4270 |
-
|
| 4271 |
-
|
| 4272 |
-
|
| 4273 |
-
|
| 4274 |
-
|
| 4275 |
-
|
| 4276 |
-
|
| 4277 |
-
|
| 4278 |
-
|
| 4279 |
-
|
| 4280 |
-
|
| 4281 |
-
|
| 4282 |
-
|
| 4283 |
-
|
| 4284 |
-
|
| 4285 |
-
|
| 4286 |
-
$
|
| 4287 |
-
|
| 4288 |
-
|
| 4289 |
-
|
| 4290 |
-
|
| 4291 |
-
|
| 4292 |
-
|
| 4293 |
-
|
| 4294 |
-
|
| 4295 |
-
|
| 4296 |
-
$
|
| 4297 |
-
|
| 4298 |
-
|
| 4299 |
-
|
| 4300 |
-
|
| 4301 |
-
|
| 4302 |
-
|
| 4303 |
-
case '
|
| 4304 |
-
case
|
| 4305 |
-
case
|
| 4306 |
-
case "
|
| 4307 |
-
case "
|
| 4308 |
-
|
| 4309 |
-
|
| 4310 |
-
|
| 4311 |
-
|
| 4312 |
-
|
| 4313 |
-
|
| 4314 |
-
|
| 4315 |
-
|
| 4316 |
-
|
| 4317 |
-
|
| 4318 |
-
|
| 4319 |
-
|
| 4320 |
-
|
| 4321 |
-
$
|
| 4322 |
-
|
| 4323 |
-
|
| 4324 |
-
|
| 4325 |
-
|
| 4326 |
-
|
| 4327 |
-
|
| 4328 |
-
|
| 4329 |
-
|
| 4330 |
-
|
| 4331 |
-
|
| 4332 |
-
|
| 4333 |
-
|
| 4334 |
-
|
| 4335 |
-
|
| 4336 |
-
|
| 4337 |
-
|
| 4338 |
-
|
| 4339 |
-
|
| 4340 |
-
|
| 4341 |
-
|
| 4342 |
-
|
| 4343 |
-
|
| 4344 |
-
|
| 4345 |
-
|
| 4346 |
-
|
| 4347 |
-
|
| 4348 |
-
|
| 4349 |
-
|
| 4350 |
-
|
| 4351 |
-
|
| 4352 |
-
|
| 4353 |
-
|
| 4354 |
-
|
| 4355 |
-
|
| 4356 |
-
|
| 4357 |
-
|
| 4358 |
-
|
| 4359 |
-
|
| 4360 |
-
|
| 4361 |
-
|
| 4362 |
-
|
| 4363 |
-
|
| 4364 |
-
|
| 4365 |
-
|
| 4366 |
-
|
| 4367 |
-
|
| 4368 |
-
|
| 4369 |
-
|
| 4370 |
-
|
| 4371 |
-
|
| 4372 |
-
|
| 4373 |
-
|
| 4374 |
-
|
| 4375 |
-
|
| 4376 |
-
|
| 4377 |
-
|
| 4378 |
-
|
| 4379 |
-
|
| 4380 |
-
|
| 4381 |
-
|
| 4382 |
-
|
| 4383 |
-
|
| 4384 |
-
|
| 4385 |
-
|
| 4386 |
-
|
| 4387 |
-
|
| 4388 |
-
|
| 4389 |
-
|
| 4390 |
-
|
| 4391 |
-
|
| 4392 |
-
|
| 4393 |
-
|
| 4394 |
-
|
| 4395 |
-
|
| 4396 |
-
|
| 4397 |
-
|
| 4398 |
-
|
| 4399 |
-
|
| 4400 |
-
|
| 4401 |
-
|
| 4402 |
-
|
| 4403 |
-
|
| 4404 |
-
|
| 4405 |
-
|
| 4406 |
-
|
| 4407 |
-
|
| 4408 |
-
|
| 4409 |
-
|
| 4410 |
-
|
| 4411 |
-
|
| 4412 |
-
|
| 4413 |
-
|
| 4414 |
-
|
| 4415 |
-
|
| 4416 |
-
|
| 4417 |
-
|
| 4418 |
-
|
| 4419 |
-
|
| 4420 |
-
|
| 4421 |
-
|
| 4422 |
-
|
| 4423 |
-
|
| 4424 |
-
|
| 4425 |
-
|
| 4426 |
-
|
| 4427 |
-
|
| 4428 |
-
|
| 4429 |
-
|
| 4430 |
-
|
| 4431 |
-
|
| 4432 |
-
|
| 4433 |
-
|
| 4434 |
-
|
| 4435 |
-
|
| 4436 |
-
|
| 4437 |
-
|
| 4438 |
-
|
| 4439 |
-
|
| 4440 |
-
|
| 4441 |
-
|
| 4442 |
-
|
| 4443 |
-
|
| 4444 |
-
|
| 4445 |
-
|
| 4446 |
-
|
| 4447 |
-
|
| 4448 |
-
|
| 4449 |
-
|
| 4450 |
-
|
| 4451 |
-
|
| 4452 |
-
|
| 4453 |
-
|
| 4454 |
-
|
| 4455 |
-
|
| 4456 |
-
|
| 4457 |
-
|
| 4458 |
-
|
| 4459 |
-
|
| 4460 |
-
|
| 4461 |
-
|
| 4462 |
-
|
| 4463 |
-
|
| 4464 |
-
|
| 4465 |
-
|
| 4466 |
-
|
| 4467 |
-
|
| 4468 |
-
|
| 4469 |
-
|
| 4470 |
-
|
| 4471 |
-
|
| 4472 |
-
|
| 4473 |
-
|
| 4474 |
-
|
| 4475 |
-
|
| 4476 |
-
|
| 4477 |
-
|
| 4478 |
-
|
| 4479 |
-
|
| 4480 |
-
|
| 4481 |
-
|
| 4482 |
-
|
| 4483 |
-
|
| 4484 |
-
|
| 4485 |
-
|
| 4486 |
-
|
| 4487 |
-
|
| 4488 |
-
|
| 4489 |
-
|
| 4490 |
-
|
| 4491 |
-
$
|
| 4492 |
-
|
| 4493 |
-
|
| 4494 |
-
|
| 4495 |
-
|
| 4496 |
-
|
| 4497 |
-
|
| 4498 |
-
|
| 4499 |
-
|
| 4500 |
-
|
| 4501 |
-
|
| 4502 |
-
|
| 4503 |
-
|
| 4504 |
-
|
| 4505 |
-
|
| 4506 |
-
$
|
| 4507 |
-
|
| 4508 |
-
|
| 4509 |
-
|
| 4510 |
-
|
| 4511 |
-
|
| 4512 |
-
|
| 4513 |
-
|
| 4514 |
-
|
| 4515 |
-
|
| 4516 |
-
|
| 4517 |
-
|
| 4518 |
-
|
| 4519 |
-
|
| 4520 |
-
|
| 4521 |
-
|
| 4522 |
-
|
| 4523 |
-
|
| 4524 |
-
|
| 4525 |
-
|
| 4526 |
-
|
| 4527 |
-
|
| 4528 |
-
|
| 4529 |
-
|
| 4530 |
-
|
| 4531 |
-
|
| 4532 |
-
|
| 4533 |
-
|
| 4534 |
-
|
| 4535 |
-
|
| 4536 |
-
|
| 4537 |
-
|
| 4538 |
-
|
| 4539 |
-
|
| 4540 |
-
|
| 4541 |
-
|
| 4542 |
-
|
| 4543 |
-
|
| 4544 |
-
|
| 4545 |
-
|
| 4546 |
-
|
| 4547 |
-
|
| 4548 |
-
|
| 4549 |
-
|
| 4550 |
-
|
| 4551 |
-
|
| 4552 |
-
|
| 4553 |
-
|
| 4554 |
-
|
| 4555 |
-
|
| 4556 |
-
|
| 4557 |
-
|
| 4558 |
-
|
| 4559 |
-
|
| 4560 |
-
|
| 4561 |
-
|
| 4562 |
-
|
| 4563 |
-
|
| 4564 |
-
|
| 4565 |
-
|
| 4566 |
-
|
| 4567 |
-
|
| 4568 |
-
|
| 4569 |
-
|
| 4570 |
-
|
| 4571 |
-
|
| 4572 |
-
|
| 4573 |
-
|
| 4574 |
-
|
| 4575 |
-
|
| 4576 |
-
|
| 4577 |
-
|
| 4578 |
-
|
| 4579 |
-
|
| 4580 |
-
|
| 4581 |
-
|
| 4582 |
-
|
| 4583 |
-
|
| 4584 |
-
|
| 4585 |
-
|
| 4586 |
-
|
| 4587 |
-
|
| 4588 |
-
|
| 4589 |
-
|
| 4590 |
-
|
| 4591 |
-
|
| 4592 |
-
|
| 4593 |
-
|
| 4594 |
-
|
| 4595 |
-
|
| 4596 |
-
|
| 4597 |
-
|
| 4598 |
-
$
|
| 4599 |
-
$
|
| 4600 |
-
$
|
| 4601 |
-
|
| 4602 |
-
|
| 4603 |
-
|
| 4604 |
-
|
| 4605 |
-
|
| 4606 |
-
|
| 4607 |
-
|
| 4608 |
-
|
| 4609 |
-
|
| 4610 |
-
|
| 4611 |
-
|
| 4612 |
-
|
| 4613 |
-
|
| 4614 |
-
$
|
| 4615 |
-
$
|
| 4616 |
-
$
|
| 4617 |
-
$
|
| 4618 |
-
$
|
| 4619 |
-
|
| 4620 |
-
|
| 4621 |
-
|
| 4622 |
-
|
| 4623 |
-
|
| 4624 |
-
|
| 4625 |
-
|
| 4626 |
-
|
| 4627 |
-
|
| 4628 |
-
|
| 4629 |
-
|
| 4630 |
-
|
| 4631 |
-
|
| 4632 |
-
|
| 4633 |
-
|
| 4634 |
-
|
| 4635 |
-
|
| 4636 |
-
|
| 4637 |
-
|
| 4638 |
-
|
| 4639 |
-
|
| 4640 |
-
|
| 4641 |
-
|
| 4642 |
-
|
| 4643 |
-
|
| 4644 |
-
|
| 4645 |
-
|
| 4646 |
-
|
| 4647 |
-
|
| 4648 |
-
|
| 4649 |
-
|
| 4650 |
-
|
| 4651 |
-
|
| 4652 |
-
|
| 4653 |
-
|
| 4654 |
-
|
| 4655 |
-
|
| 4656 |
-
|
| 4657 |
-
|
| 4658 |
-
|
| 4659 |
-
|
| 4660 |
-
|
| 4661 |
-
|
| 4662 |
-
|
| 4663 |
-
|
| 4664 |
-
|
| 4665 |
-
|
| 4666 |
-
|
| 4667 |
-
|
| 4668 |
-
|
| 4669 |
-
|
| 4670 |
-
|
| 4671 |
-
|
| 4672 |
-
|
| 4673 |
-
|
| 4674 |
-
|
| 4675 |
-
|
| 4676 |
-
|
| 4677 |
-
|
| 4678 |
-
|
| 4679 |
-
|
| 4680 |
-
|
| 4681 |
-
|
| 4682 |
-
|
| 4683 |
-
|
| 4684 |
-
|
| 4685 |
-
|
| 4686 |
-
|
| 4687 |
-
|
| 4688 |
-
|
| 4689 |
-
|
| 4690 |
-
|
| 4691 |
-
|
| 4692 |
-
|
| 4693 |
-
|
| 4694 |
-
|
| 4695 |
-
|
| 4696 |
-
|
| 4697 |
-
|
| 4698 |
-
|
| 4699 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 4700 |
-
|
| 4701 |
-
|
| 4702 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
| 4703 |
-
|
| 4704 |
-
|
| 4705 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
| 4706 |
}
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class FMModelForm_maker_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 showform($id) {
|
| 22 |
+
global $wpdb;
|
| 23 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
| 24 |
+
if (!$row || !$row->published) {
|
| 25 |
+
return FALSE;
|
| 26 |
+
}
|
| 27 |
+
if (isset($_GET['test_theme']) && (esc_html(stripslashes($_GET['test_theme'])) != '')) {
|
| 28 |
+
/* From preview.*/
|
| 29 |
+
$theme_id = esc_html(stripslashes($_GET['test_theme']));
|
| 30 |
+
}
|
| 31 |
+
else {
|
| 32 |
+
$theme_id = $row->theme;
|
| 33 |
+
}
|
| 34 |
+
$form_theme = $wpdb->get_var($wpdb->prepare('SELECT css FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id));
|
| 35 |
+
if (!$form_theme) {
|
| 36 |
+
$form_theme = $wpdb->get_var('SELECT css FROM ' . $wpdb->prefix . 'formmaker_themes');
|
| 37 |
+
if (!$form_theme) {
|
| 38 |
+
return FALSE;
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
$label_id = array();
|
| 42 |
+
$label_type = array();
|
| 43 |
+
$label_all = explode('#****#', $row->label_order);
|
| 44 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 45 |
+
foreach ($label_all as $key => $label_each) {
|
| 46 |
+
$label_id_each = explode('#**id**#', $label_each);
|
| 47 |
+
array_push($label_id, $label_id_each[0]);
|
| 48 |
+
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
| 49 |
+
array_push($label_type, $label_order_each[1]);
|
| 50 |
+
}
|
| 51 |
+
return array(
|
| 52 |
+
$row,
|
| 53 |
+
1,
|
| 54 |
+
$label_id,
|
| 55 |
+
$label_type,
|
| 56 |
+
$form_theme
|
| 57 |
+
);
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
public function savedata($form, $id) {
|
| 61 |
+
$fmc_settings = get_option('fmc_settings');
|
| 62 |
+
$all_files = array();
|
| 63 |
+
$correct = FALSE;
|
| 64 |
+
$id_for_old = $id;
|
| 65 |
+
if (!$form->form_front) {
|
| 66 |
+
$id = '';
|
| 67 |
+
}
|
| 68 |
+
if (isset($_POST["counter" . $id])) {
|
| 69 |
+
$counter = esc_html($_POST["counter" . $id]);
|
| 70 |
+
if (isset($_POST["captcha_input"])) {
|
| 71 |
+
$captcha_input = esc_html($_POST["captcha_input"]);
|
| 72 |
+
$session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
|
| 73 |
+
if (md5($captcha_input) == $session_wd_captcha_code) {
|
| 74 |
+
$correct = TRUE;
|
| 75 |
+
}
|
| 76 |
+
else {
|
| 77 |
+
?>
|
| 78 |
+
<script>alert("<?php echo addslashes(__('Error, incorrect Security code.', 'form_maker')); ?>");</script>
|
| 79 |
+
<?php
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
elseif (isset($_POST["arithmetic_captcha_input"])) {
|
| 83 |
+
$arithmetic_captcha_input = esc_html($_POST["arithmetic_captcha_input"]);
|
| 84 |
+
$session_wd_arithmetic_captcha_code = isset($_SESSION[$id . '_wd_arithmetic_captcha_code']) ? $_SESSION[$id . '_wd_arithmetic_captcha_code'] : '-';
|
| 85 |
+
if (md5($arithmetic_captcha_input) == $session_wd_arithmetic_captcha_code) {
|
| 86 |
+
$correct = TRUE;
|
| 87 |
+
}
|
| 88 |
+
else {
|
| 89 |
+
?>
|
| 90 |
+
<script>alert("<?php echo addslashes(__('Error, incorrect Security code.', 'form_maker')); ?>");</script>
|
| 91 |
+
<?php
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
elseif (isset($_POST["g-recaptcha-response"])){
|
| 95 |
+
$privatekey= isset($fmc_settings['private_key']) ? $fmc_settings['private_key'] : '';
|
| 96 |
+
$captcha = $_POST['g-recaptcha-response'];
|
| 97 |
+
$url = 'https://www.google.com/recaptcha/api/siteverify';
|
| 98 |
+
$data = array(
|
| 99 |
+
'secret' => $privatekey,
|
| 100 |
+
'response' => $captcha,
|
| 101 |
+
'remoteip' => $_SERVER['REMOTE_ADDR']
|
| 102 |
+
);
|
| 103 |
+
|
| 104 |
+
$curlConfig = array(
|
| 105 |
+
CURLOPT_URL => $url,
|
| 106 |
+
CURLOPT_POST => true,
|
| 107 |
+
CURLOPT_RETURNTRANSFER => true,
|
| 108 |
+
CURLOPT_POSTFIELDS => $data
|
| 109 |
+
);
|
| 110 |
+
|
| 111 |
+
$ch = curl_init();
|
| 112 |
+
curl_setopt_array($ch, $curlConfig);
|
| 113 |
+
$response = curl_exec($ch);
|
| 114 |
+
curl_close($ch);
|
| 115 |
+
|
| 116 |
+
$jsonResponse = json_decode($response);
|
| 117 |
+
|
| 118 |
+
if ($jsonResponse->success == "true")
|
| 119 |
+
$correct = TRUE;
|
| 120 |
+
else {
|
| 121 |
+
?>
|
| 122 |
+
<script>alert("<?php echo addslashes(__('Error, incorrect Security code.', 'form_maker')); ?>");</script>
|
| 123 |
+
<?php
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
else {
|
| 127 |
+
$correct = TRUE;
|
| 128 |
+
}
|
| 129 |
+
if ($correct) {
|
| 130 |
+
|
| 131 |
+
$ip=$_SERVER['REMOTE_ADDR'];
|
| 132 |
+
|
| 133 |
+
global $wpdb;
|
| 134 |
+
$blocked_ip = $wpdb->get_var($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip));
|
| 135 |
+
if ($blocked_ip) {
|
| 136 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(__('Your ip is blacklisted. Please contact the website administrator.', 'form_maker'));
|
| 137 |
+
wp_redirect($_SERVER["REQUEST_URI"]);//to be checked
|
| 138 |
+
exit;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
$result_temp = $this->save_db($counter, $id_for_old);
|
| 142 |
+
$all_files = $result_temp[0];
|
| 143 |
+
if (is_numeric($all_files)) {
|
| 144 |
+
$this->remove($all_files, $id_for_old);
|
| 145 |
+
}
|
| 146 |
+
elseif (isset($counter)) {
|
| 147 |
+
$this->gen_mail($counter, $all_files, $id_for_old, $result_temp[1]);
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
}
|
| 151 |
+
return $all_files;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
return $all_files;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
public function select_data_from_db_for_labels($db_info,$label_column, $table, $where, $order_by) {
|
| 158 |
+
global $wpdb;
|
| 159 |
+
|
| 160 |
+
$query = "SELECT `".$label_column."` FROM ".$table.$where." ORDER BY ".$order_by;
|
| 161 |
+
if($db_info)
|
| 162 |
+
{
|
| 163 |
+
|
| 164 |
+
$temp = explode('@@@wdfhostwdf@@@',$db_info);
|
| 165 |
+
$host = $temp[0];
|
| 166 |
+
$temp = explode('@@@wdfportwdf@@@',$temp[1]);
|
| 167 |
+
$port = $temp[0];
|
| 168 |
+
$temp = explode('@@@wdfusernamewdf@@@',$temp[1]);
|
| 169 |
+
$username = $temp[0];
|
| 170 |
+
$temp = explode('@@@wdfpasswordwdf@@@',$temp[1]);
|
| 171 |
+
$password = $temp[0];
|
| 172 |
+
$temp = explode('@@@wdfdatabasewdf@@@',$temp[1]);
|
| 173 |
+
$database = $temp[0];
|
| 174 |
+
|
| 175 |
+
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
| 176 |
+
$choices_labels = $wpdb_temp->get_results($query,ARRAY_N);
|
| 177 |
+
}
|
| 178 |
+
else{
|
| 179 |
+
$choices_labels = $wpdb->get_results($query,ARRAY_N);
|
| 180 |
+
}
|
| 181 |
+
return $choices_labels;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
public function select_data_from_db_for_values($db_info,$value_column, $table, $where, $order_by) {
|
| 185 |
+
global $wpdb;
|
| 186 |
+
|
| 187 |
+
$query = "SELECT `".$value_column."` FROM ".$table.$where." ORDER BY ".$order_by;
|
| 188 |
+
if($db_info)
|
| 189 |
+
{
|
| 190 |
+
$temp = explode('@@@wdfhostwdf@@@',$db_info);
|
| 191 |
+
$host = $temp[0];
|
| 192 |
+
$temp = explode('@@@wdfportwdf@@@',$temp[1]);
|
| 193 |
+
$port = $temp[0];
|
| 194 |
+
$temp = explode('@@@wdfusernamewdf@@@',$temp[1]);
|
| 195 |
+
$username = $temp[0];
|
| 196 |
+
$temp = explode('@@@wdfpasswordwdf@@@',$temp[1]);
|
| 197 |
+
$password = $temp[0];
|
| 198 |
+
$temp = explode('@@@wdfdatabasewdf@@@',$temp[1]);
|
| 199 |
+
$database = $temp[0];
|
| 200 |
+
|
| 201 |
+
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
| 202 |
+
$choices_values = $wpdb_temp->get_results($query,ARRAY_N);
|
| 203 |
+
}
|
| 204 |
+
else{
|
| 205 |
+
$choices_values = $wpdb->get_results($query,ARRAY_N);
|
| 206 |
+
}
|
| 207 |
+
return $choices_values;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
public function save_db($counter, $id) {
|
| 211 |
+
global $wpdb;
|
| 212 |
+
$current_user = wp_get_current_user();
|
| 213 |
+
if ($current_user->ID != 0)
|
| 214 |
+
{
|
| 215 |
+
$wp_userid = $current_user->ID;
|
| 216 |
+
$wp_username = $current_user->display_name;
|
| 217 |
+
$wp_useremail = $current_user->user_email;
|
| 218 |
+
}
|
| 219 |
+
else
|
| 220 |
+
{
|
| 221 |
+
$wp_userid = '';
|
| 222 |
+
$wp_username = '';
|
| 223 |
+
$wp_useremail = '';
|
| 224 |
+
}
|
| 225 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
| 226 |
+
|
| 227 |
+
$chgnac = TRUE;
|
| 228 |
+
$all_files = array();
|
| 229 |
+
$paypal = array();
|
| 230 |
+
$paypal['item_name'] = array();
|
| 231 |
+
$paypal['quantity'] = array();
|
| 232 |
+
$paypal['amount'] = array();
|
| 233 |
+
$is_amount=false;
|
| 234 |
+
$paypal['on_os'] = array();
|
| 235 |
+
$total = 0;
|
| 236 |
+
$form_currency = '$';
|
| 237 |
+
$currency_code = array('USD', 'EUR', 'GBP', 'JPY', 'CAD', 'MXN', 'HKD', 'HUF', 'NOK', 'NZD', 'SGD', 'SEK', 'PLN', 'AUD', 'DKK', 'CHF', 'CZK', 'ILS', 'BRL', 'TWD', 'MYR', 'PHP', 'THB');
|
| 238 |
+
$currency_sign = array('$', '€', '£', '¥', 'C$', 'Mex$', 'HK$', 'Ft', 'kr', 'NZ$', 'S$', 'kr', 'zl', 'A$', 'kr', 'CHF', 'Kc', '₪', 'R$', 'NT$', 'RM', '₱', '฿');
|
| 239 |
+
$form = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id));
|
| 240 |
+
$id_old = $id;
|
| 241 |
+
if (!$form->form_front) {
|
| 242 |
+
$id = '';
|
| 243 |
+
}
|
| 244 |
+
if ($form->payment_currency) {
|
| 245 |
+
$form_currency = $currency_sign[array_search($form->payment_currency, $currency_code)];
|
| 246 |
+
}
|
| 247 |
+
$old = false;
|
| 248 |
+
if(isset($form->form)) {
|
| 249 |
+
$old = true;
|
| 250 |
+
}
|
| 251 |
+
$label_id = array();
|
| 252 |
+
$label_label = array();
|
| 253 |
+
$label_type = array();
|
| 254 |
+
|
| 255 |
+
$disabled_fields = explode(',', (isset($_REQUEST["disabled_fields".$id]) ? $_REQUEST["disabled_fields".$id] : ""));
|
| 256 |
+
$disabled_fields = array_slice($disabled_fields,0, count($disabled_fields)-1);
|
| 257 |
+
|
| 258 |
+
if($old == false || ($old == true && $form->form=='')) {
|
| 259 |
+
$label_all = explode('#****#',$form->label_order_current);
|
| 260 |
+
}
|
| 261 |
+
else {
|
| 262 |
+
$label_all = explode('#****#',$form->label_order);
|
| 263 |
+
}
|
| 264 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 265 |
+
foreach ($label_all as $key => $label_each) {
|
| 266 |
+
$label_id_each = explode('#**id**#', $label_each);
|
| 267 |
+
array_push($label_id, $label_id_each[0]);
|
| 268 |
+
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
| 269 |
+
array_push($label_label, $label_order_each[0]);
|
| 270 |
+
array_push($label_type, $label_order_each[1]);
|
| 271 |
+
}
|
| 272 |
+
$max = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
|
| 273 |
+
$fvals=array();
|
| 274 |
+
if ($old == FALSE || ($old == TRUE && $form->form == '')) {
|
| 275 |
+
foreach ($label_type as $key => $type) {
|
| 276 |
+
$value = '';
|
| 277 |
+
if ($type == "type_submit_reset" or $type == "type_map" or $type == "type_editor" or $type == "type_captcha" or $type == "type_arithmetic_captcha" or $type == "type_recaptcha" or $type == "type_button" or $type == "type_paypal_total" or $type == "type_send_copy")
|
| 278 |
+
continue;
|
| 279 |
+
|
| 280 |
+
$i = $label_id[$key];
|
| 281 |
+
if(!in_array($i,$disabled_fields)) {
|
| 282 |
+
switch ($type) {
|
| 283 |
+
case 'type_text':
|
| 284 |
+
case 'type_password':
|
| 285 |
+
case 'type_textarea':
|
| 286 |
+
case "type_submitter_mail":
|
| 287 |
+
case "type_date":
|
| 288 |
+
case "type_own_select":
|
| 289 |
+
case "type_country":
|
| 290 |
+
case "type_number": {
|
| 291 |
+
$value = isset($_POST['wdform_'.$i."_element".$id]) ? esc_html($_POST['wdform_'.$i."_element".$id]) : "";
|
| 292 |
+
break;
|
| 293 |
+
}
|
| 294 |
+
case "type_wdeditor": {
|
| 295 |
+
$value = isset($_POST['wdform_'.$i.'_wd_editor'.$id]) ? esc_html($_POST['wdform_'.$i.'_wd_editor'.$id]) : "";
|
| 296 |
+
break;
|
| 297 |
+
}
|
| 298 |
+
case "type_mark_map": {
|
| 299 |
+
$value = (isset($_POST['wdform_'.$i."_long".$id]) ? $_POST['wdform_'.$i."_long".$id] : "") . '***map***' . (isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "");
|
| 300 |
+
break;
|
| 301 |
+
}
|
| 302 |
+
case "type_date_fields": {
|
| 303 |
+
$value = (isset($_POST['wdform_'.$i."_day".$id]) ? $_POST['wdform_'.$i."_day".$id] : "") . '-' . (isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : "") . '-' . (isset($_POST['wdform_'.$i."_year".$id]) ? $_POST['wdform_'.$i."_year".$id] : "");
|
| 304 |
+
break;
|
| 305 |
+
}
|
| 306 |
+
case "type_time": {
|
| 307 |
+
$ss = isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : NULL;
|
| 308 |
+
if(isset($ss)) {
|
| 309 |
+
$value = (isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : "");
|
| 310 |
+
}
|
| 311 |
+
else {
|
| 312 |
+
$value = (isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : "") . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
| 313 |
+
}
|
| 314 |
+
$am_pm = isset($_POST['wdform_'.$i."_am_pm".$id]) ? $_POST['wdform_'.$i."_am_pm".$id] : NULL;
|
| 315 |
+
if(isset($am_pm)) {
|
| 316 |
+
$value = $value . ' ' . $am_pm;
|
| 317 |
+
}
|
| 318 |
+
break;
|
| 319 |
+
}
|
| 320 |
+
case "type_phone": {
|
| 321 |
+
$value = (isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : "") . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "");
|
| 322 |
+
break;
|
| 323 |
+
}
|
| 324 |
+
case "type_name": {
|
| 325 |
+
$element_title = isset($_POST['wdform_'.$i."_element_title".$id]) ? esc_html($_POST['wdform_'.$i."_element_title".$id]) : NULL;
|
| 326 |
+
$element_middle = isset($_POST['wdform_'.$i."_element_middle".$id]) ? esc_html($_POST['wdform_'.$i."_element_middle".$id]) : NULL;
|
| 327 |
+
if(isset($element_title) || isset($element_middle)) {
|
| 328 |
+
$value = (isset($_POST['wdform_'.$i."_element_title".$id]) ? esc_html($_POST['wdform_'.$i."_element_title".$id]) : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_first".$id]) ? esc_html($_POST['wdform_'.$i."_element_first".$id]) : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? esc_html($_POST['wdform_'.$i."_element_last".$id]) : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_middle".$id]) ? esc_html($_POST['wdform_'.$i."_element_middle".$id]) : "");
|
| 329 |
+
}
|
| 330 |
+
else {
|
| 331 |
+
$value = (isset($_POST['wdform_'.$i."_element_first".$id]) ? esc_html($_POST['wdform_'.$i."_element_first".$id]) : "") . '@@@' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? esc_html($_POST['wdform_'.$i."_element_last".$id]) : "");
|
| 332 |
+
}
|
| 333 |
+
break;
|
| 334 |
+
}
|
| 335 |
+
case "type_file_upload": {
|
| 336 |
+
$files = isset($_FILES['wdform_'.$i.'_file'.$id]) ? $_FILES['wdform_'.$i.'_file'.$id] : NULL;
|
| 337 |
+
foreach($files['name'] as $file_key => $file_name) {
|
| 338 |
+
if($file_name) {
|
| 339 |
+
$untilupload = $form->form_fields;
|
| 340 |
+
$untilupload = substr($untilupload, strpos($untilupload,$i.'*:*id*:*type_file_upload'), -1);
|
| 341 |
+
$untilupload = substr($untilupload, 0, strpos($untilupload,'*:*new_field*:'));
|
| 342 |
+
$untilupload = explode('*:*w_field_label_pos*:*',$untilupload);
|
| 343 |
+
$untilupload = $untilupload[1];
|
| 344 |
+
$untilupload = explode('*:*w_destination*:*',$untilupload);
|
| 345 |
+
$destination = $untilupload[0];
|
| 346 |
+
$destination = str_replace(site_url() . '/', '', $destination);
|
| 347 |
+
$untilupload = $untilupload[1];
|
| 348 |
+
$untilupload = explode('*:*w_extension*:*',$untilupload);
|
| 349 |
+
$extension = $untilupload[0];
|
| 350 |
+
$untilupload = $untilupload[1];
|
| 351 |
+
$untilupload = explode('*:*w_max_size*:*',$untilupload);
|
| 352 |
+
$max_size = $untilupload[0];
|
| 353 |
+
$untilupload = $untilupload[1];
|
| 354 |
+
$fileName = $files['name'][$file_key];
|
| 355 |
+
$fileSize = $files['size'][$file_key];
|
| 356 |
+
|
| 357 |
+
if($fileSize > $max_size * 1024) {
|
| 358 |
+
echo "<script> alert('" . addslashes(__('The file exceeds the allowed size of', 'form_maker')) . $max_size . " KB');</script>";
|
| 359 |
+
return array($max+1);
|
| 360 |
+
}
|
| 361 |
+
|
| 362 |
+
$uploadedFileNameParts = explode('.',$fileName);
|
| 363 |
+
$uploadedFileExtension = array_pop($uploadedFileNameParts);
|
| 364 |
+
$to = strlen($fileName) - strlen($uploadedFileExtension) - 1;
|
| 365 |
+
|
| 366 |
+
$fileNameFree = substr($fileName, 0, $to);
|
| 367 |
+
$invalidFileExts = explode(',', $extension);
|
| 368 |
+
$extOk = false;
|
| 369 |
+
|
| 370 |
+
foreach($invalidFileExts as $key => $valuee) {
|
| 371 |
+
if(is_numeric(strpos(strtolower($valuee), strtolower($uploadedFileExtension)))) {
|
| 372 |
+
$extOk = true;
|
| 373 |
+
}
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
if ($extOk == false) {
|
| 377 |
+
echo "<script> alert('" . addslashes(__('Sorry, you are not allowed to upload this type of file.', 'form_maker')) . "');</script>";
|
| 378 |
+
return array($max+1);
|
| 379 |
+
}
|
| 380 |
+
|
| 381 |
+
$fileTemp = $files['tmp_name'][$file_key];
|
| 382 |
+
$p = 1;
|
| 383 |
+
|
| 384 |
+
if(!file_exists($destination))
|
| 385 |
+
mkdir($destination , 0777);
|
| 386 |
+
if (file_exists($destination . "/" . $fileName)) {
|
| 387 |
+
$fileName1 = $fileName;
|
| 388 |
+
while (file_exists($destination . "/" . $fileName1)) {
|
| 389 |
+
$to = strlen($file_name) - strlen($uploadedFileExtension) - 1;
|
| 390 |
+
$fileName1 = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
|
| 391 |
+
// $file['name'] = $fileName;
|
| 392 |
+
$p++;
|
| 393 |
+
}
|
| 394 |
+
$fileName = $fileName1;
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
// for dropbox & google drive integration addons
|
| 398 |
+
$check_both = 0;
|
| 399 |
+
if($form->save_uploads == 0){
|
| 400 |
+
if(defined('WD_FM_DBOX_INT') && is_plugin_active(constant('WD_FM_DBOX_INT'))){
|
| 401 |
+
$enable = $wpdb->get_var("SELECT enable FROM " . $wpdb->prefix ."formmaker_dbox_int WHERE form_id=" . $form->id);
|
| 402 |
+
if($enable == 1){
|
| 403 |
+
$selectable_upload = $wpdb->get_var("SELECT selectable_upload FROM " . $wpdb->prefix ."formmaker_dbox_int WHERE form_id=" . $form->id);
|
| 404 |
+
|
| 405 |
+
if((int)$selectable_upload == 1){
|
| 406 |
+
$temp_dir_dbox = explode('\\', $fileTemp);
|
| 407 |
+
$temp_dir_dbox = implode('%%', $temp_dir_dbox);
|
| 408 |
+
|
| 409 |
+
$value.= $temp_dir_dbox . '*@@url@@*' . $fileName;
|
| 410 |
+
}
|
| 411 |
+
else{
|
| 412 |
+
$dlink_dbox = '<a href="'.add_query_arg(array('action' => 'WD_FM_DBOX_INT', 'addon_task' => 'upload_dbox_file', 'id' => $form->id), admin_url('admin-ajax.php')).'&dbox_file_name=' . $fileName . '&dbox_folder_name=/'.$form->title.'" >' . $fileName . '</a>';
|
| 413 |
+
|
| 414 |
+
$value.= $dlink_dbox;
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
$files['tmp_name'][$file_key]=$fileTemp;
|
| 418 |
+
$temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 419 |
+
}
|
| 420 |
+
else
|
| 421 |
+
$check_both ++;
|
| 422 |
+
|
| 423 |
+
}
|
| 424 |
+
else
|
| 425 |
+
$check_both ++;
|
| 426 |
+
if(defined('WD_FM_GDRIVE_INT') && is_plugin_active(constant('WD_FM_GDRIVE_INT'))){
|
| 427 |
+
$enable = $wpdb->get_var("SELECT enable FROM " . $wpdb->prefix ."formmaker_gdrive_int WHERE form_id=" . $form->id);
|
| 428 |
+
if($enable == 1){
|
| 429 |
+
$selectable_upload = $wpdb->get_var("SELECT selectable_upload FROM " . $wpdb->prefix ."formmaker_gdrive_int WHERE form_id=" . $form->id);
|
| 430 |
+
|
| 431 |
+
if((int)$selectable_upload == 1){
|
| 432 |
+
$temp_dir_dbox = explode('\\', $fileTemp);
|
| 433 |
+
$temp_dir_dbox = implode('%%', $temp_dir_dbox);
|
| 434 |
+
$value.= 'wdCloudAddon' . $temp_dir_dbox . '*@@url@@*' . $fileName . '*@@url@@*' . $files['type'][$file_key];
|
| 435 |
+
}
|
| 436 |
+
else{
|
| 437 |
+
$dlink_dbox = '<a target="_blank" href="'.add_query_arg(array('action' => 'WD_FM_GDRIVE_INT', 'addon_task' => 'create_drive_link', 'id' => $form->id), admin_url('admin-ajax.php')).'&gdrive_file_name=' . $fileName . '&gdrive_folder_name='.$form->title.'" >' . $fileName . '</a>';
|
| 438 |
+
$value.= $dlink_dbox;
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
$files['tmp_name'][$file_key]=$fileTemp;
|
| 442 |
+
$temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 443 |
+
}
|
| 444 |
+
else
|
| 445 |
+
$check_both ++;
|
| 446 |
+
|
| 447 |
+
}
|
| 448 |
+
else
|
| 449 |
+
$check_both ++;
|
| 450 |
+
|
| 451 |
+
}
|
| 452 |
+
//
|
| 453 |
+
if($check_both != 0){
|
| 454 |
+
$value.= '';
|
| 455 |
+
$files['tmp_name'][$file_key]=$fileTemp;
|
| 456 |
+
$temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 457 |
+
}
|
| 458 |
+
// dropbox and google drive integration addons
|
| 459 |
+
if($form->save_uploads == 1){
|
| 460 |
+
if(!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
|
| 461 |
+
echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
|
| 462 |
+
return array($max+1);
|
| 463 |
+
}
|
| 464 |
+
$value.= site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
|
| 465 |
+
$files['tmp_name'][$file_key]=$destination . "/" . $fileName;
|
| 466 |
+
$temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 467 |
+
|
| 468 |
+
}
|
| 469 |
+
array_push($all_files,$temp_file);
|
| 470 |
+
}
|
| 471 |
+
}
|
| 472 |
+
break;
|
| 473 |
+
}
|
| 474 |
+
|
| 475 |
+
case 'type_address': {
|
| 476 |
+
$value = '*#*#*#';
|
| 477 |
+
$element = isset($_POST['wdform_'.$i."_street1".$id]) ? esc_html($_POST['wdform_'.$i."_street1".$id]) : NULL;
|
| 478 |
+
if(isset($element)) {
|
| 479 |
+
$value = $element;
|
| 480 |
+
break;
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
$element = isset($_POST['wdform_'.$i."_street2".$id]) ? esc_html($_POST['wdform_'.$i."_street2".$id]) : NULL;
|
| 484 |
+
if(isset($element)) {
|
| 485 |
+
$value = $element;
|
| 486 |
+
break;
|
| 487 |
+
}
|
| 488 |
+
|
| 489 |
+
$element = isset($_POST['wdform_'.$i."_city".$id]) ? esc_html($_POST['wdform_'.$i."_city".$id]) : NULL;
|
| 490 |
+
if(isset($element)) {
|
| 491 |
+
$value = $element;
|
| 492 |
+
break;
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
$element = isset($_POST['wdform_'.$i."_state".$id]) ? esc_html($_POST['wdform_'.$i."_state".$id]) : NULL;
|
| 496 |
+
if(isset($element)) {
|
| 497 |
+
$value = $element;
|
| 498 |
+
break;
|
| 499 |
+
}
|
| 500 |
+
|
| 501 |
+
$element = isset($_POST['wdform_'.$i."_postal".$id]) ? esc_html($_POST['wdform_'.$i."_postal".$id]) : NULL;
|
| 502 |
+
if(isset($element)) {
|
| 503 |
+
$value = $element;
|
| 504 |
+
break;
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
$element = isset($_POST['wdform_'.$i."_country".$id]) ? esc_html($_POST['wdform_'.$i."_country".$id]) : NULL;
|
| 508 |
+
if(isset($element)) {
|
| 509 |
+
$value = $element;
|
| 510 |
+
break;
|
| 511 |
+
}
|
| 512 |
+
break;
|
| 513 |
+
}
|
| 514 |
+
|
| 515 |
+
case "type_hidden": {
|
| 516 |
+
$value = isset($_POST[$label_label[$key]]) ? esc_html($_POST[$label_label[$key]]) : "";
|
| 517 |
+
break;
|
| 518 |
+
}
|
| 519 |
+
|
| 520 |
+
case "type_radio": {
|
| 521 |
+
$element = isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : NULL;
|
| 522 |
+
if(isset($element)) {
|
| 523 |
+
$value = $element;
|
| 524 |
+
break;
|
| 525 |
+
}
|
| 526 |
+
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
| 527 |
+
break;
|
| 528 |
+
}
|
| 529 |
+
|
| 530 |
+
case "type_checkbox": {
|
| 531 |
+
$start = -1;
|
| 532 |
+
$value = '';
|
| 533 |
+
for($j = 0; $j < 100; $j++) {
|
| 534 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 535 |
+
if(isset($element)) {
|
| 536 |
+
$start = $j;
|
| 537 |
+
break;
|
| 538 |
+
}
|
| 539 |
+
}
|
| 540 |
+
|
| 541 |
+
$other_element_id = -1;
|
| 542 |
+
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
| 543 |
+
if($is_other == "yes") {
|
| 544 |
+
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
| 545 |
+
}
|
| 546 |
+
|
| 547 |
+
if($start != -1) {
|
| 548 |
+
for($j = $start; $j < 100; $j++) {
|
| 549 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 550 |
+
if(isset($element)) {
|
| 551 |
+
if($j == $other_element_id) {
|
| 552 |
+
$value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '***br***';
|
| 553 |
+
}
|
| 554 |
+
else {
|
| 555 |
+
$value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "") . '***br***';
|
| 556 |
+
}
|
| 557 |
+
}
|
| 558 |
+
}
|
| 559 |
+
}
|
| 560 |
+
break;
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
case "type_paypal_price": {
|
| 564 |
+
$value = isset($_POST['wdform_'.$i."_element_dollars".$id]) ? $_POST['wdform_'.$i."_element_dollars".$id] : 0;
|
| 565 |
+
|
| 566 |
+
$value = (int) preg_replace('/\D/', '', $value);
|
| 567 |
+
|
| 568 |
+
if(isset($_POST['wdform_'.$i."_element_cents".$id])) {
|
| 569 |
+
$value = $value . '.' . ( preg_replace('/\D/', '', $_POST['wdform_'.$i."_element_cents".$id]));
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
$total += (float)($value);
|
| 573 |
+
$paypal_option = array();
|
| 574 |
+
|
| 575 |
+
if($value != 0) {
|
| 576 |
+
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
| 577 |
+
array_push ($paypal['item_name'], $label_label[$key]);
|
| 578 |
+
array_push ($paypal['quantity'], $quantity);
|
| 579 |
+
array_push ($paypal['amount'], $value);
|
| 580 |
+
$is_amount=true;
|
| 581 |
+
array_push ($paypal['on_os'], $paypal_option);
|
| 582 |
+
}
|
| 583 |
+
$value = $value . $form_currency;
|
| 584 |
+
break;
|
| 585 |
+
}
|
| 586 |
+
|
| 587 |
+
case "type_paypal_select": {
|
| 588 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id]) && $_POST['wdform_'.$i."_element".$id] !='') {
|
| 589 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 590 |
+
}
|
| 591 |
+
else {
|
| 592 |
+
$value = '';
|
| 593 |
+
}
|
| 594 |
+
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
| 595 |
+
$total += (float)(isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0) * $quantity;
|
| 596 |
+
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : ""));
|
| 597 |
+
array_push ($paypal['quantity'], $quantity);
|
| 598 |
+
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : ""));
|
| 599 |
+
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] != 0) {
|
| 600 |
+
$is_amount=true;
|
| 601 |
+
}
|
| 602 |
+
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 603 |
+
if(isset($element_quantity) && $value != '') {
|
| 604 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
| 605 |
+
}
|
| 606 |
+
$paypal_option = array();
|
| 607 |
+
$paypal_option['on'] = array();
|
| 608 |
+
$paypal_option['os'] = array();
|
| 609 |
+
|
| 610 |
+
for($k = 0; $k < 50; $k++) {
|
| 611 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 612 |
+
if(isset($temp_val) && $value != '') {
|
| 613 |
+
array_push ($paypal_option['on'], (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : ""));
|
| 614 |
+
array_push ($paypal_option['os'], (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : ""));
|
| 615 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : "") . '***property***';
|
| 616 |
+
}
|
| 617 |
+
}
|
| 618 |
+
array_push ($paypal['on_os'], $paypal_option);
|
| 619 |
+
break;
|
| 620 |
+
}
|
| 621 |
+
|
| 622 |
+
case "type_paypal_radio": {
|
| 623 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
| 624 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 625 |
+
}
|
| 626 |
+
else {
|
| 627 |
+
$value = '';
|
| 628 |
+
}
|
| 629 |
+
$quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : 1);
|
| 630 |
+
$total += (float)(isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0) * $quantity;
|
| 631 |
+
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : ""));
|
| 632 |
+
array_push ($paypal['quantity'], $quantity);
|
| 633 |
+
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : 0));
|
| 634 |
+
if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id] != 0) {
|
| 635 |
+
$is_amount=true;
|
| 636 |
+
}
|
| 637 |
+
|
| 638 |
+
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 639 |
+
if(isset($element_quantity) && $value != '') {
|
| 640 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
| 641 |
+
}
|
| 642 |
+
|
| 643 |
+
$paypal_option = array();
|
| 644 |
+
$paypal_option['on'] = array();
|
| 645 |
+
$paypal_option['os'] = array();
|
| 646 |
+
|
| 647 |
+
for($k = 0; $k < 50; $k++) {
|
| 648 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 649 |
+
if(isset($temp_val) && $value != '') {
|
| 650 |
+
array_push ($paypal_option['on'], (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : ""));
|
| 651 |
+
array_push ($paypal_option['os'], $_POST['wdform_'.$i."_property".$id.$k]);
|
| 652 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $_POST['wdform_'.$i."_property".$id.$k] . '***property***';
|
| 653 |
+
}
|
| 654 |
+
}
|
| 655 |
+
array_push ($paypal['on_os'], $paypal_option);
|
| 656 |
+
break;
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
case "type_paypal_shipping": {
|
| 660 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id])) {
|
| 661 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 662 |
+
}
|
| 663 |
+
else {
|
| 664 |
+
$value = '';
|
| 665 |
+
}
|
| 666 |
+
$value = (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : "") . ' - ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 667 |
+
$paypal['shipping'] = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
| 668 |
+
break;
|
| 669 |
+
}
|
| 670 |
+
|
| 671 |
+
case "type_paypal_checkbox": {
|
| 672 |
+
$start = -1;
|
| 673 |
+
$value = '';
|
| 674 |
+
for($j = 0; $j < 100; $j++) {
|
| 675 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 676 |
+
if(isset($element)) {
|
| 677 |
+
$start = $j;
|
| 678 |
+
break;
|
| 679 |
+
}
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
$other_element_id = -1;
|
| 683 |
+
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
| 684 |
+
if($is_other == "yes") {
|
| 685 |
+
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
if($start != -1) {
|
| 689 |
+
for($j = $start; $j < 100; $j++) {
|
| 690 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 691 |
+
if(isset($element)) {
|
| 692 |
+
if($j == $other_element_id) {
|
| 693 |
+
$value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '***br***';
|
| 694 |
+
}
|
| 695 |
+
else {
|
| 696 |
+
$value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "") . ' - ' . (isset($_POST['wdform_'.$i."_element".$id.$j]) && $_POST['wdform_'.$i."_element".$id.$j] == '' ? '0' : (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "")) . $form_currency . '***br***';
|
| 697 |
+
$quantity = ((isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && ($_POST['wdform_' . $i . "_element_quantity" . $id] >= 1)) ? $_POST['wdform_'.$i . "_element_quantity" . $id] : 1);
|
| 698 |
+
$total += (float)(isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : 0) * (float)($quantity);
|
| 699 |
+
array_push ($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : ""));
|
| 700 |
+
array_push ($paypal['quantity'], $quantity);
|
| 701 |
+
array_push ($paypal['amount'], (isset($_POST['wdform_'.$i."_element".$id.$j]) ? ($_POST['wdform_'.$i."_element".$id.$j] == '' ? '0' : $_POST['wdform_'.$i."_element".$id.$j]) : ""));
|
| 702 |
+
if (isset($_POST['wdform_'.$i."_element".$id.$j]) && $_POST['wdform_'.$i."_element".$id.$j] != 0) {
|
| 703 |
+
$is_amount = TRUE;
|
| 704 |
+
}
|
| 705 |
+
$paypal_option = array();
|
| 706 |
+
$paypal_option['on'] = array();
|
| 707 |
+
$paypal_option['os'] = array();
|
| 708 |
+
|
| 709 |
+
for($k = 0; $k < 50; $k++) {
|
| 710 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 711 |
+
if(isset($temp_val)) {
|
| 712 |
+
array_push ($paypal_option['on'], isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "");
|
| 713 |
+
array_push ($paypal_option['os'], $_POST['wdform_'.$i."_property".$id.$k]);
|
| 714 |
+
}
|
| 715 |
+
}
|
| 716 |
+
array_push ($paypal['on_os'], $paypal_option);
|
| 717 |
+
}
|
| 718 |
+
}
|
| 719 |
+
}
|
| 720 |
+
|
| 721 |
+
$element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 722 |
+
if(isset($element_quantity)) {
|
| 723 |
+
$value .= (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
|
| 724 |
+
}
|
| 725 |
+
for($k = 0; $k < 50; $k++) {
|
| 726 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 727 |
+
if(isset($temp_val)) {
|
| 728 |
+
$value .= '***br***' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $_POST['wdform_'.$i."_property".$id.$k] . '***property***';
|
| 729 |
+
}
|
| 730 |
+
}
|
| 731 |
+
}
|
| 732 |
+
break;
|
| 733 |
+
}
|
| 734 |
+
|
| 735 |
+
case "type_star_rating": {
|
| 736 |
+
if(isset($_POST['wdform_'.$i."_selected_star_amount".$id]) && $_POST['wdform_'.$i."_selected_star_amount".$id] == "") {
|
| 737 |
+
$selected_star_amount = 0;
|
| 738 |
+
}
|
| 739 |
+
else {
|
| 740 |
+
$selected_star_amount = isset($_POST['wdform_'.$i."_selected_star_amount".$id]) ? $_POST['wdform_'.$i."_selected_star_amount".$id] : 0;
|
| 741 |
+
}
|
| 742 |
+
$value = $selected_star_amount . '/' . (isset($_POST['wdform_'.$i."_star_amount".$id]) ? $_POST['wdform_'.$i."_star_amount".$id] : "");
|
| 743 |
+
break;
|
| 744 |
+
}
|
| 745 |
+
|
| 746 |
+
case "type_scale_rating": {
|
| 747 |
+
$value = (isset($_POST['wdform_'.$i."_scale_radio".$id]) ? $_POST['wdform_'.$i."_scale_radio".$id] : 0) . '/' . (isset($_POST['wdform_'.$i."_scale_amount".$id]) ? $_POST['wdform_'.$i."_scale_amount".$id] : "");
|
| 748 |
+
break;
|
| 749 |
+
}
|
| 750 |
+
|
| 751 |
+
case "type_spinner": {
|
| 752 |
+
$value = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "";
|
| 753 |
+
break;
|
| 754 |
+
}
|
| 755 |
+
|
| 756 |
+
case "type_slider": {
|
| 757 |
+
$value = isset($_POST['wdform_'.$i."_slider_value".$id]) ? $_POST['wdform_'.$i."_slider_value".$id] : "";
|
| 758 |
+
break;
|
| 759 |
+
}
|
| 760 |
+
|
| 761 |
+
case "type_range": {
|
| 762 |
+
$value = (isset($_POST['wdform_'.$i."_element".$id.'0']) ? $_POST['wdform_'.$i."_element".$id.'0'] : "") . '-' . (isset($_POST['wdform_'.$i."_element".$id.'1']) ? $_POST['wdform_'.$i."_element".$id.'1'] : "");
|
| 763 |
+
break;
|
| 764 |
+
}
|
| 765 |
+
|
| 766 |
+
case "type_grading": {
|
| 767 |
+
$value = "";
|
| 768 |
+
$items = explode(":", isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "");
|
| 769 |
+
for($k = 0; $k < sizeof($items) - 1; $k++) {
|
| 770 |
+
$value .= (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : "") . ':';
|
| 771 |
+
}
|
| 772 |
+
$value .= (isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "") . '***grading***';
|
| 773 |
+
break;
|
| 774 |
+
}
|
| 775 |
+
|
| 776 |
+
case "type_matrix": {
|
| 777 |
+
$rows_of_matrix = explode("***", isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "");
|
| 778 |
+
$rows_count = sizeof($rows_of_matrix) - 1;
|
| 779 |
+
$column_of_matrix = explode("***", isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "");
|
| 780 |
+
$columns_count = sizeof($column_of_matrix) - 1;
|
| 781 |
+
|
| 782 |
+
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "radio") {
|
| 783 |
+
$input_value = "";
|
| 784 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
| 785 |
+
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k]) ? $_POST['wdform_'.$i."_input_element".$id.$k] : 0) . "***";
|
| 786 |
+
}
|
| 787 |
+
}
|
| 788 |
+
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "checkbox") {
|
| 789 |
+
$input_value = "";
|
| 790 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
| 791 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 792 |
+
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : 0)."***";
|
| 793 |
+
}
|
| 794 |
+
}
|
| 795 |
+
}
|
| 796 |
+
|
| 797 |
+
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "text") {
|
| 798 |
+
$input_value = "";
|
| 799 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
| 800 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 801 |
+
$input_value .= (isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? esc_html($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) : "") . "***";
|
| 802 |
+
}
|
| 803 |
+
}
|
| 804 |
+
}
|
| 805 |
+
|
| 806 |
+
if(isset($_POST['wdform_'.$i."_input_type".$id]) && $_POST['wdform_'.$i."_input_type".$id] == "select") {
|
| 807 |
+
$input_value = "";
|
| 808 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
| 809 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 810 |
+
$input_value .= (isset($_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j] : "") . "***";
|
| 811 |
+
}
|
| 812 |
+
}
|
| 813 |
+
}
|
| 814 |
+
|
| 815 |
+
$value = $rows_count . (isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "") . '***' . $columns_count . (isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "") . '***' . (isset($_POST['wdform_'.$i."_input_type".$id]) ? $_POST['wdform_'.$i."_input_type".$id] : "") . '***' . $input_value . '***matrix***';
|
| 816 |
+
break;
|
| 817 |
+
}
|
| 818 |
+
|
| 819 |
+
}
|
| 820 |
+
|
| 821 |
+
if($type == "type_address") {
|
| 822 |
+
if( $value == '*#*#*#') {
|
| 823 |
+
continue;
|
| 824 |
+
}
|
| 825 |
+
}
|
| 826 |
+
if($type == "type_text" or $type == "type_password" or $type == "type_textarea" or $type == "type_name" or $type == "type_submitter_mail" or $type == "type_number" or $type == "type_phone")
|
| 827 |
+
{
|
| 828 |
+
$untilupload = $form->form_fields;
|
| 829 |
+
$untilupload = substr($untilupload, strpos($untilupload, $i.'*:*id*:*'.$type), -1);
|
| 830 |
+
$untilupload = substr($untilupload, 0, strpos($untilupload, '*:*new_field*:'));
|
| 831 |
+
$untilupload = explode('*:*w_required*:*', $untilupload);
|
| 832 |
+
$untilupload = $untilupload[1];
|
| 833 |
+
$untilupload = explode('*:*w_unique*:*', $untilupload);
|
| 834 |
+
$unique_element = $untilupload[0];
|
| 835 |
+
if(strlen($unique_element)>3)
|
| 836 |
+
$unique_element = substr($unique_element, -3);
|
| 837 |
+
|
| 838 |
+
if($unique_element == 'yes') {
|
| 839 |
+
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes($value)));
|
| 840 |
+
if ($unique) {
|
| 841 |
+
echo "<script> alert('" . addslashes(__('This field %s requires a unique entry and this value was already submitted.', 'form_maker')) . "'.replace('%s','" . $label_label[$key] . "'));</script>";
|
| 842 |
+
return array($max + 1);
|
| 843 |
+
}
|
| 844 |
+
}
|
| 845 |
+
}
|
| 846 |
+
$save_or_no = TRUE;
|
| 847 |
+
$fvals['{'.$i.'}']=str_replace(array("***map***", "*@@url@@*", "@@@@@@@@@", "@@@", "***grading***", "***br***"), array(" ", "", " ", " ", " ", ", "), addslashes($value));
|
| 848 |
+
if ($form->savedb) {
|
| 849 |
+
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 850 |
+
'form_id' => $id,
|
| 851 |
+
'element_label' => $i,
|
| 852 |
+
'element_value' => stripslashes($value),
|
| 853 |
+
'group_id' => ($max + 1),
|
| 854 |
+
'date' => date('Y-m-d H:i:s'),
|
| 855 |
+
'ip' => $_SERVER['REMOTE_ADDR'],
|
| 856 |
+
'user_id_wd' => $current_user->ID,
|
| 857 |
+
), array(
|
| 858 |
+
'%d',
|
| 859 |
+
'%s',
|
| 860 |
+
'%s',
|
| 861 |
+
'%d',
|
| 862 |
+
'%s',
|
| 863 |
+
'%s',
|
| 864 |
+
'%d'
|
| 865 |
+
));
|
| 866 |
+
}
|
| 867 |
+
if (!$save_or_no) {
|
| 868 |
+
return FALSE;
|
| 869 |
+
}
|
| 870 |
+
$chgnac = FALSE;
|
| 871 |
+
}
|
| 872 |
+
else{
|
| 873 |
+
$fvals['{'.$i.'}']='';
|
| 874 |
+
}
|
| 875 |
+
}
|
| 876 |
+
}
|
| 877 |
+
else {
|
| 878 |
+
foreach ($label_type as $key => $type) {
|
| 879 |
+
$value = '';
|
| 880 |
+
if ($type == "type_submit_reset" or $type == "type_map" or $type == "type_editor" or $type == "type_captcha" or $type == "type_arithmetic_captcha" or $type == "type_recaptcha" or $type == "type_button" or $type=="type_paypal_total")
|
| 881 |
+
continue;
|
| 882 |
+
$i = $label_id[$key];
|
| 883 |
+
if ($type != "type_address") {
|
| 884 |
+
$deleted = isset($_POST[$i . "_type" . $id]) ? $_POST[$i . "_type" . $id] : NULL;
|
| 885 |
+
if (!isset($deleted))
|
| 886 |
+
break;
|
| 887 |
+
}
|
| 888 |
+
if ($type == 'type_paypal_total') {
|
| 889 |
+
continue;
|
| 890 |
+
}
|
| 891 |
+
switch ($type) {
|
| 892 |
+
case 'type_text':
|
| 893 |
+
case 'type_password':
|
| 894 |
+
case 'type_textarea':
|
| 895 |
+
case "type_submitter_mail":
|
| 896 |
+
case "type_date":
|
| 897 |
+
case "type_own_select":
|
| 898 |
+
case "type_country":
|
| 899 |
+
case "type_number": {
|
| 900 |
+
$value = isset($_POST[$i . "_element" . $id]) ? esc_html($_POST[$i . "_element" . $id]) : "";
|
| 901 |
+
break;
|
| 902 |
+
}
|
| 903 |
+
case "type_mark_map": {
|
| 904 |
+
$value = (isset($_POST[$i . "_long" . $id]) ? $_POST[$i . "_long" . $id] : "") . '***map***' . (isset($_POST[$i . "_lat" . $id]) ? $_POST[$i . "_lat" . $id] : "");
|
| 905 |
+
break;
|
| 906 |
+
}
|
| 907 |
+
case "type_date_fields": {
|
| 908 |
+
$value = (isset($_POST[$i . "_day" . $id]) ? $_POST[$i . "_day" . $id] : "") . '-' . (isset($_POST[$i . "_month" . $id]) ? $_POST[$i . "_month" . $id] : "") . '-' . (isset($_POST[$i . "_year" . $id]) ? $_POST[$i . "_year" . $id] : "");
|
| 909 |
+
break;
|
| 910 |
+
}
|
| 911 |
+
case "type_time": {
|
| 912 |
+
$ss = isset($_POST[$i . "_ss" . $id]) ? $_POST[$i . "_ss" . $id] : NULL;
|
| 913 |
+
if (isset($ss)) {
|
| 914 |
+
$value = (isset($_POST[$i . "_hh" . $id]) ? $_POST[$i . "_hh" . $id] : "") . ':' . (isset($_POST[$i . "_mm" . $id]) ? $_POST[$i . "_mm" . $id] : "") . ':' . $ss;
|
| 915 |
+
}
|
| 916 |
+
else {
|
| 917 |
+
$value = (isset($_POST[$i . "_hh" . $id]) ? $_POST[$i . "_hh" . $id] : "") . ':' . (isset($_POST[$i . "_mm" . $id]) ? $_POST[$i . "_mm" . $id] : "");
|
| 918 |
+
}
|
| 919 |
+
$am_pm = isset($_POST[$i . "_am_pm" . $id]) ? $_POST[$i . "_am_pm" . $id] : NULL;
|
| 920 |
+
if (isset($am_pm))
|
| 921 |
+
$value = $value . ' ' . $am_pm;
|
| 922 |
+
break;
|
| 923 |
+
}
|
| 924 |
+
case "type_phone": {
|
| 925 |
+
$value = (isset($_POST[$i . "_element_first" . $id]) ? $_POST[$i . "_element_first" . $id] : "") . ' ' . (isset($_POST[$i . "_element_last" . $id]) ? $_POST[$i . "_element_last" . $id] : "");
|
| 926 |
+
break;
|
| 927 |
+
}
|
| 928 |
+
case "type_name": {
|
| 929 |
+
$element_title = isset($_POST[$i . "_element_title" . $id]) ? esc_html($_POST[$i . "_element_title" . $id]) : NULL;
|
| 930 |
+
if (isset($element_title)) {
|
| 931 |
+
$value = $element_title . ' ' . (isset($_POST[$i . "_element_first" . $id]) ? esc_html($_POST[$i . "_element_first" . $id]) : "") . ' ' . (isset($_POST[$i . "_element_last" . $id]) ? esc_html($_POST[$i . "_element_last" . $id]) : "") . ' ' . (isset($_POST[$i . "_element_middle" . $id]) ? esc_html($_POST[$i . "_element_middle" . $id]) : "");
|
| 932 |
+
}
|
| 933 |
+
else {
|
| 934 |
+
$value = (isset($_POST[$i . "_element_first" . $id]) ? esc_html($_POST[$i . "_element_first" . $id]) : "") . ' ' . (isset($_POST[$i . "_element_last" . $id]) ? esc_html($_POST[$i . "_element_last" . $id]) : "");
|
| 935 |
+
}
|
| 936 |
+
break;
|
| 937 |
+
}
|
| 938 |
+
case "type_file_upload": {
|
| 939 |
+
$file = isset($_FILES[$i . '_file' . $id]) ? $_FILES[$i . '_file' . $id] : NULL;
|
| 940 |
+
if ($file['name']) {
|
| 941 |
+
$untilupload = $form->form;
|
| 942 |
+
$pos1 = strpos($untilupload, "***destinationskizb" . $i . "***");
|
| 943 |
+
$pos2 = strpos($untilupload, "***destinationverj" . $i . "***");
|
| 944 |
+
$destination = substr($untilupload, $pos1 + (23 + (strlen($i) - 1)), $pos2 - $pos1 - (23 + (strlen($i) - 1)));
|
| 945 |
+
$pos1 = strpos($untilupload, "***extensionskizb" . $i . "***");
|
| 946 |
+
$pos2 = strpos($untilupload, "***extensionverj" . $i . "***");
|
| 947 |
+
$extension = substr($untilupload, $pos1 + (21 + (strlen($i) - 1)), $pos2 - $pos1 - (21 + (strlen($i) - 1)));
|
| 948 |
+
$pos1 = strpos($untilupload, "***max_sizeskizb" . $i . "***");
|
| 949 |
+
$pos2 = strpos($untilupload, "***max_sizeverj" . $i . "***");
|
| 950 |
+
$max_size = substr($untilupload, $pos1 + (20 + (strlen($i) - 1)), $pos2 - $pos1 - (20 + (strlen($i) - 1)));
|
| 951 |
+
$fileName = $file['name'];
|
| 952 |
+
$destination = str_replace(site_url() . '/', '', $destination);
|
| 953 |
+
$fileSize = $file['size'];
|
| 954 |
+
if ($fileSize > $max_size * 1024) {
|
| 955 |
+
echo "<script> alert('" . addslashes(__('The file exceeds the allowed size of', 'form_maker')) . $max_size . " KB');</script>";
|
| 956 |
+
return array($max + 1);
|
| 957 |
+
}
|
| 958 |
+
$uploadedFileNameParts = explode('.', $fileName);
|
| 959 |
+
$uploadedFileExtension = array_pop($uploadedFileNameParts);
|
| 960 |
+
$to = strlen($fileName) - strlen($uploadedFileExtension) - 1;
|
| 961 |
+
$fileNameFree = substr($fileName, 0, $to);
|
| 962 |
+
$invalidFileExts = explode(',', $extension);
|
| 963 |
+
$extOk = FALSE;
|
| 964 |
+
foreach ($invalidFileExts as $key => $value) {
|
| 965 |
+
if (is_numeric(strpos(strtolower($value), strtolower($uploadedFileExtension)))) {
|
| 966 |
+
$extOk = TRUE;
|
| 967 |
+
}
|
| 968 |
+
}
|
| 969 |
+
if ($extOk == FALSE) {
|
| 970 |
+
echo "<script> alert('" . addslashes(__('Sorry, you are not allowed to upload this type of file.', 'form_maker')) . "');</script>";
|
| 971 |
+
return array($max + 1);
|
| 972 |
+
}
|
| 973 |
+
$fileTemp = $file['tmp_name'];
|
| 974 |
+
$p = 1;
|
| 975 |
+
|
| 976 |
+
if(!file_exists($destination))
|
| 977 |
+
mkdir($destination , 0777);
|
| 978 |
+
|
| 979 |
+
if (file_exists($destination . "/" . $fileName)) {
|
| 980 |
+
$fileName1 = $filename;
|
| 981 |
+
while (file_exists($destination . "/" . $fileName1)) {
|
| 982 |
+
$to = strlen($file['name']) - strlen($uploadedFileExtension) - 1;
|
| 983 |
+
$fileName1 = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
|
| 984 |
+
$file['name'] = $fileName;
|
| 985 |
+
$p++;
|
| 986 |
+
}
|
| 987 |
+
$fileName = $fileName1;
|
| 988 |
+
}
|
| 989 |
+
if (is_dir(ABSPATH . $destination)) {
|
| 990 |
+
if (!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
|
| 991 |
+
echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
|
| 992 |
+
return array($max + 1);
|
| 993 |
+
}
|
| 994 |
+
}
|
| 995 |
+
else {
|
| 996 |
+
echo "<script> alert('" . addslashes(__('Error, file destination does not exist.', 'form_maker')) . "');</script>";
|
| 997 |
+
return array($max + 1);
|
| 998 |
+
}
|
| 999 |
+
$value = site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
|
| 1000 |
+
$file['tmp_name'] = $destination . "/" . $fileName;
|
| 1001 |
+
$file['name'] = ABSPATH . $destination . "/" . $fileName;
|
| 1002 |
+
// $temp_file = array( "name" => $files['name'][$file_key], "type" => $files['type'][$file_key], "tmp_name" => $files['tmp_name'][$file_key]);
|
| 1003 |
+
array_push($all_files, $file);
|
| 1004 |
+
}
|
| 1005 |
+
break;
|
| 1006 |
+
}
|
| 1007 |
+
case 'type_address': {
|
| 1008 |
+
$value = '*#*#*#';
|
| 1009 |
+
if (isset($_POST[$i . "_street1" . $id])) {
|
| 1010 |
+
$value = esc_html($_POST[$i . "_street1" . $id]);
|
| 1011 |
+
break;
|
| 1012 |
+
}
|
| 1013 |
+
if (isset($_POST[$i . "_street2" . $id])) {
|
| 1014 |
+
$value = esc_html($_POST[$i . "_street2" . $id]);
|
| 1015 |
+
break;
|
| 1016 |
+
}
|
| 1017 |
+
if (isset($_POST[$i . "_city" . $id])) {
|
| 1018 |
+
$value = esc_html($_POST[$i . "_city" . $id]);
|
| 1019 |
+
break;
|
| 1020 |
+
}
|
| 1021 |
+
if (isset($_POST[$i . "_state" . $id])) {
|
| 1022 |
+
$value = esc_html($_POST[$i . "_state" . $id]);
|
| 1023 |
+
break;
|
| 1024 |
+
}
|
| 1025 |
+
if (isset($_POST[$i . "_postal" . $id])) {
|
| 1026 |
+
$value = esc_html($_POST[$i . "_postal" . $id]);
|
| 1027 |
+
break;
|
| 1028 |
+
}
|
| 1029 |
+
if (isset($_POST[$i . "_country" . $id])) {
|
| 1030 |
+
$value = esc_html($_POST[$i . "_country" . $id]);
|
| 1031 |
+
break;
|
| 1032 |
+
}
|
| 1033 |
+
break;
|
| 1034 |
+
}
|
| 1035 |
+
case "type_hidden": {
|
| 1036 |
+
$value = isset($_POST[$label_label[$key]]) ? $_POST[$label_label[$key]] : "";
|
| 1037 |
+
break;
|
| 1038 |
+
}
|
| 1039 |
+
case "type_radio": {
|
| 1040 |
+
$element = isset($_POST[$i . "_other_input" . $id]) ? $_POST[$i . "_other_input" . $id] : NULL;
|
| 1041 |
+
if (isset($element)) {
|
| 1042 |
+
$value = $element;
|
| 1043 |
+
break;
|
| 1044 |
+
}
|
| 1045 |
+
$value = isset($_POST[$i . "_element" . $id]) ? $_POST[$i . "_element" . $id] : "";
|
| 1046 |
+
break;
|
| 1047 |
+
}
|
| 1048 |
+
case "type_checkbox": {
|
| 1049 |
+
$start = -1;
|
| 1050 |
+
$value = '';
|
| 1051 |
+
for ($j = 0; $j < 100; $j++) {
|
| 1052 |
+
if (isset($_POST[$i . "_element" . $id . $j])) {
|
| 1053 |
+
$start = $j;
|
| 1054 |
+
break;
|
| 1055 |
+
}
|
| 1056 |
+
}
|
| 1057 |
+
$other_element_id = -1;
|
| 1058 |
+
$is_other = isset($_POST[$i . "_allow_other" . $id]) ? $_POST[$i . "_allow_other" . $id] : "";
|
| 1059 |
+
if ($is_other == "yes") {
|
| 1060 |
+
$other_element_id = isset($_POST[$i . "_allow_other_num" . $id]) ? $_POST[$i . "_allow_other_num" . $id] : "";
|
| 1061 |
+
}
|
| 1062 |
+
if ($start != -1) {
|
| 1063 |
+
for ($j = $start; $j < 100; $j++) {
|
| 1064 |
+
if (isset($_POST[$i . "_element" . $id . $j])) {
|
| 1065 |
+
if ($j == $other_element_id) {
|
| 1066 |
+
$value = $value . (isset($_POST[$i . "_other_input" . $id]) ? $_POST[$i . "_other_input" . $id] : "") . '***br***';
|
| 1067 |
+
}
|
| 1068 |
+
else {
|
| 1069 |
+
$value = $value . $_POST[$i . "_element" . $id . $j] . '***br***';
|
| 1070 |
+
}
|
| 1071 |
+
}
|
| 1072 |
+
}
|
| 1073 |
+
}
|
| 1074 |
+
break;
|
| 1075 |
+
}
|
| 1076 |
+
case "type_paypal_price": {
|
| 1077 |
+
$value = 0;
|
| 1078 |
+
if (isset($_POST[$i."_element_dollars".$id])) {
|
| 1079 |
+
$value = $_POST[$i . "_element_dollars" . $id];
|
| 1080 |
+
}
|
| 1081 |
+
$value = (int) preg_replace('/\D/', '', $value);
|
| 1082 |
+
if (isset($_POST[$i . "_element_cents" . $id])) {
|
| 1083 |
+
$value = $value . '.' . (preg_replace('/\D/', '', $_POST[$i . "_element_cents" . $id]));
|
| 1084 |
+
}
|
| 1085 |
+
$total += (float)($value);
|
| 1086 |
+
$paypal_option = array();
|
| 1087 |
+
if ($value != 0) {
|
| 1088 |
+
array_push($paypal['item_name'], $label_label[$key]);
|
| 1089 |
+
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1090 |
+
array_push($paypal['quantity'], $quantity);
|
| 1091 |
+
array_push($paypal['amount'], $value);
|
| 1092 |
+
$is_amount=true;
|
| 1093 |
+
array_push($paypal['on_os'], $paypal_option);
|
| 1094 |
+
}
|
| 1095 |
+
$value = $value . $form_currency;
|
| 1096 |
+
break;
|
| 1097 |
+
}
|
| 1098 |
+
case "type_paypal_select": {
|
| 1099 |
+
$value = '';
|
| 1100 |
+
$value = (isset($_POST[$i . "_element_label" . $id]) ? $_POST[$i . "_element_label" . $id] : "") . ' : ' . (isset($_POST[$i . "_element" . $id]) ? $_POST[$i . "_element" . $id] : "") . $form_currency;
|
| 1101 |
+
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1102 |
+
$total += (float)(isset($_POST[$i . "_element" . $id]) ? $_POST[$i . "_element" . $id] : 0) * (float)($quantity);
|
| 1103 |
+
array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST[$i."_element_label".$id]) ? $_POST[$i."_element_label".$id] : ""));
|
| 1104 |
+
array_push($paypal['quantity'], $quantity);
|
| 1105 |
+
array_push($paypal['amount'], isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "");
|
| 1106 |
+
if(isset($_POST[$i."_element".$id]) && $_POST[$i."_element".$id] != 0) {
|
| 1107 |
+
$is_amount=true;
|
| 1108 |
+
}
|
| 1109 |
+
$element_quantity_label = isset($_POST[$i."_element_quantity_label".$id]) ? $_POST[$i."_element_quantity_label".$id] : NULL;
|
| 1110 |
+
if (isset($element_quantity_label)) {
|
| 1111 |
+
$value .= '***br***' . $element_quantity_label . ': ' . $quantity;
|
| 1112 |
+
}
|
| 1113 |
+
$paypal_option=array();
|
| 1114 |
+
$paypal_option['on']=array();
|
| 1115 |
+
$paypal_option['os']=array();
|
| 1116 |
+
for($k=0; $k<50; $k++) {
|
| 1117 |
+
$temp_val = isset($_POST[$i."_element_property_value".$id.$k]) ? $_POST[$i."_element_property_value".$id.$k] : NULL;
|
| 1118 |
+
if(isset($temp_val)) {
|
| 1119 |
+
array_push($paypal_option['on'], isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "");
|
| 1120 |
+
array_push($paypal_option['os'], $temp_val);
|
| 1121 |
+
$value .= '***br***' . (isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 1122 |
+
}
|
| 1123 |
+
}
|
| 1124 |
+
array_push($paypal['on_os'], $paypal_option);
|
| 1125 |
+
break;
|
| 1126 |
+
}
|
| 1127 |
+
case "type_paypal_radio": {
|
| 1128 |
+
$value = '';
|
| 1129 |
+
if (isset($_POST[$i."_element_label".$id]) && ($_POST[$i."_element_label".$id] != '')) {
|
| 1130 |
+
$value = $_POST[$i."_element_label".$id] . ' - ' . (isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "") . $form_currency;
|
| 1131 |
+
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1132 |
+
$total+=(float)(isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : 0)*(float)($quantity);
|
| 1133 |
+
array_push($paypal['item_name'], $label_label[$key] . ' ' . $_POST[$i."_element_label".$id]);
|
| 1134 |
+
array_push($paypal['quantity'], $quantity);
|
| 1135 |
+
array_push($paypal['amount'], isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "");
|
| 1136 |
+
if(isset($_POST[$i."_element".$id]) && $_POST[$i."_element".$id] != 0) {
|
| 1137 |
+
$is_amount=true;
|
| 1138 |
+
}
|
| 1139 |
+
$element_quantity_label = isset($_POST[$i."_element_quantity_label".$id]) ? $_POST[$i."_element_quantity_label".$id] : NULL;
|
| 1140 |
+
if (isset($element_quantity_label)) {
|
| 1141 |
+
$value .= '***br***' . $element_quantity_label . ': ' . $quantity;
|
| 1142 |
+
}
|
| 1143 |
+
$paypal_option = array();
|
| 1144 |
+
$paypal_option['on'] = array();
|
| 1145 |
+
$paypal_option['os'] = array();
|
| 1146 |
+
for ($k = 0; $k < 50; $k++) {
|
| 1147 |
+
$temp_val = isset($_POST[$i."_element_property_value".$id.$k]) ? $_POST[$i."_element_property_value".$id.$k] : NULL;
|
| 1148 |
+
if(isset($temp_val)) {
|
| 1149 |
+
array_push ($paypal_option['on'], isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "");
|
| 1150 |
+
array_push ($paypal_option['os'], $temp_val);
|
| 1151 |
+
$value .= '***br***' . (isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 1152 |
+
}
|
| 1153 |
+
}
|
| 1154 |
+
array_push ($paypal['on_os'], $paypal_option);
|
| 1155 |
+
}
|
| 1156 |
+
break;
|
| 1157 |
+
}
|
| 1158 |
+
case "type_paypal_shipping": {
|
| 1159 |
+
$value = '';
|
| 1160 |
+
if (isset($_POST[$i."_element_label".$id]) && ($_POST[$i."_element_label".$id] != '')) {
|
| 1161 |
+
$value = $_POST[$i."_element_label".$id] . ' - ' . (isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "") . $form_currency;
|
| 1162 |
+
$paypal['shipping'] = isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : "";
|
| 1163 |
+
}
|
| 1164 |
+
break;
|
| 1165 |
+
}
|
| 1166 |
+
case "type_paypal_checkbox": {
|
| 1167 |
+
$start = -1;
|
| 1168 |
+
$value = '';
|
| 1169 |
+
for ($j = 0; $j < 100; $j++) {
|
| 1170 |
+
if (isset($_POST[$i."_element".$id.$j])) {
|
| 1171 |
+
$start = $j;
|
| 1172 |
+
break;
|
| 1173 |
+
}
|
| 1174 |
+
}
|
| 1175 |
+
$other_element_id = -1;
|
| 1176 |
+
$is_other = isset($_POST[$i."_allow_other".$id]) ? $_POST[$i."_allow_other".$id] : "";
|
| 1177 |
+
if ($is_other == "yes") {
|
| 1178 |
+
$other_element_id = isset($_POST[$i."_allow_other_num".$id]) ? $_POST[$i."_allow_other_num".$id] : "";
|
| 1179 |
+
}
|
| 1180 |
+
if ($start != -1) {
|
| 1181 |
+
for ($j = $start; $j < 100; $j++) {
|
| 1182 |
+
if (isset($_POST[$i."_element".$id.$j])) {
|
| 1183 |
+
if ($j == $other_element_id) {
|
| 1184 |
+
$value = $value . (isset($_POST[$i."_other_input".$id]) ? $_POST[$i."_other_input".$id] : "") . '***br***';
|
| 1185 |
+
}
|
| 1186 |
+
else {
|
| 1187 |
+
$value = $value . (isset($_POST[$i."_element".$id.$j."_label"]) ? $_POST[$i."_element".$id.$j."_label"] : "") . ' - ' . ($_POST[$i."_element".$id.$j] == '' ? '0' : $_POST[$i."_element".$id.$j]) . $form_currency . '***br***';
|
| 1188 |
+
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1189 |
+
$total += (float)(isset($_POST[$i."_element".$id.$j]) ? $_POST[$i."_element".$id.$j] : 0) * (float)($quantity);
|
| 1190 |
+
array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST[$i."_element".$id.$j."_label"]) ? $_POST[$i."_element".$id.$j."_label"] : ""));
|
| 1191 |
+
array_push($paypal['quantity'], $quantity);
|
| 1192 |
+
array_push($paypal['amount'], ($_POST[$i."_element".$id.$j] == '') ? '0' : $_POST[$i."_element".$id.$j]);
|
| 1193 |
+
if (isset($_POST[$i."_element".$id.$j]) && $_POST[$i."_element".$id.$j] != 0) {
|
| 1194 |
+
$is_amount = TRUE;
|
| 1195 |
+
}
|
| 1196 |
+
$paypal_option = array();
|
| 1197 |
+
$paypal_option['on'] = array();
|
| 1198 |
+
$paypal_option['os'] = array();
|
| 1199 |
+
for ($k = 0; $k < 50; $k++) {
|
| 1200 |
+
$temp_val = isset($_POST[$i."_element_property_value".$id.$k]) ? $_POST[$i."_element_property_value".$id.$k] : NULL;
|
| 1201 |
+
if (isset($temp_val)) {
|
| 1202 |
+
array_push ($paypal_option['on'], isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "");
|
| 1203 |
+
array_push ($paypal_option['os'], $temp_val);
|
| 1204 |
+
}
|
| 1205 |
+
}
|
| 1206 |
+
array_push ($paypal['on_os'], $paypal_option);
|
| 1207 |
+
}
|
| 1208 |
+
}
|
| 1209 |
+
}
|
| 1210 |
+
$element_quantity_label = isset($_POST[$i."_element_quantity_label".$id]) ? $_POST[$i."_element_quantity_label".$id] : NULL;
|
| 1211 |
+
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 1212 |
+
if (isset($element_quantity_label)) {
|
| 1213 |
+
$value .= $element_quantity_label . ': ' . $quantity . '***br***';
|
| 1214 |
+
}
|
| 1215 |
+
for ($k = 0; $k < 50; $k++) {
|
| 1216 |
+
$temp_val = isset($_POST[$i."_element_property_value".$id.$k]) ? $_POST[$i."_element_property_value".$id.$k] : NULL;
|
| 1217 |
+
if (isset($temp_val)) {
|
| 1218 |
+
$value .= (isset($_POST[$i."_element_property_label".$id.$k]) ? $_POST[$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val . '***br***';
|
| 1219 |
+
}
|
| 1220 |
+
}
|
| 1221 |
+
}
|
| 1222 |
+
break;
|
| 1223 |
+
}
|
| 1224 |
+
case "type_star_rating": {
|
| 1225 |
+
if (isset($_POST[$i."_selected_star_amount".$id]) && $_POST[$i."_selected_star_amount".$id] != "") {
|
| 1226 |
+
$selected_star_amount = $_POST[$i."_selected_star_amount".$id];
|
| 1227 |
+
}
|
| 1228 |
+
else {
|
| 1229 |
+
$selected_star_amount = 0;
|
| 1230 |
+
}
|
| 1231 |
+
$value = (isset($_POST[$i."_star_amount".$id]) ? $_POST[$i."_star_amount".$id] : '').'***'.$selected_star_amount.'***'.(isset($_POST[$i."_star_color".$id]) ? $_POST[$i."_star_color".$id] : '').'***star_rating***';
|
| 1232 |
+
break;
|
| 1233 |
+
}
|
| 1234 |
+
case "type_scale_rating": {
|
| 1235 |
+
$value = (isset($_POST[$i."_scale_radio".$id]) ? $_POST[$i."_scale_radio".$id] : 0).'/'.(isset($_POST[$i."_scale_amount".$id]) ? $_POST[$i."_scale_amount".$id] : '');
|
| 1236 |
+
break;
|
| 1237 |
+
}
|
| 1238 |
+
case "type_spinner": {
|
| 1239 |
+
$value = (isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : '');
|
| 1240 |
+
break;
|
| 1241 |
+
}
|
| 1242 |
+
case "type_slider": {
|
| 1243 |
+
$value = (isset($_POST[$i."_slider_value".$id]) ? $_POST[$i."_slider_value".$id] : '');
|
| 1244 |
+
break;
|
| 1245 |
+
}
|
| 1246 |
+
case "type_range": {
|
| 1247 |
+
$value = (isset($_POST[$i."_element".$id . '0']) ? $_POST[$i."_element".$id . '0'] : '') .'-'.(isset($_POST[$i."_element".$id.'1']) ? $_POST[$i."_element".$id.'1'] : '');
|
| 1248 |
+
break;
|
| 1249 |
+
}
|
| 1250 |
+
case "type_grading": {
|
| 1251 |
+
$value = "";
|
| 1252 |
+
if (isset($_POST[$i."_hidden_item".$id])) {
|
| 1253 |
+
$items = explode(":", $_POST[$i."_hidden_item".$id]);
|
| 1254 |
+
for ($k = 0; $k < sizeof($items) - 1; $k++) {
|
| 1255 |
+
if (isset($_POST[$i."_element".$id.$k])) {
|
| 1256 |
+
$value .= $_POST[$i."_element".$id.$k].':';
|
| 1257 |
+
}
|
| 1258 |
+
}
|
| 1259 |
+
$value .= $_POST[$i."_hidden_item".$id].'***grading***';
|
| 1260 |
+
}
|
| 1261 |
+
break;
|
| 1262 |
+
}
|
| 1263 |
+
case "type_matrix": {
|
| 1264 |
+
$rows_of_matrix = explode("***", isset($_POST[$i."_hidden_row".$id]) ? $_POST[$i."_hidden_row".$id] : "");
|
| 1265 |
+
$rows_count = sizeof($rows_of_matrix) - 1;
|
| 1266 |
+
$column_of_matrix = explode("***", isset($_POST[$i."_hidden_column".$id]) ? $_POST[$i."_hidden_column".$id] : "");
|
| 1267 |
+
$columns_count = sizeof($column_of_matrix) - 1;
|
| 1268 |
+
$row_ids = explode(",", substr(isset($_POST[$i."_row_ids".$id]) ? $_POST[$i."_row_ids".$id] : "", 0, -1));
|
| 1269 |
+
$column_ids = explode(",", substr(isset($_POST[$i."_column_ids".$id]) ? $_POST[$i."_column_ids".$id] : "", 0, -1));
|
| 1270 |
+
if (isset($_POST[$i."_input_type".$id]) && $_POST[$i."_input_type".$id] == "radio") {
|
| 1271 |
+
$input_value="";
|
| 1272 |
+
foreach($row_ids as $row_id) {
|
| 1273 |
+
$input_value.=(isset($_POST[$i."_input_element".$id.$row_id]) ? $_POST[$i."_input_element".$id.$row_id] : 0)."***";
|
| 1274 |
+
}
|
| 1275 |
+
}
|
| 1276 |
+
if (isset($_POST[$i."_input_type".$id]) && $_POST[$i."_input_type".$id] == "checkbox") {
|
| 1277 |
+
$input_value="";
|
| 1278 |
+
foreach($row_ids as $row_id)
|
| 1279 |
+
foreach($column_ids as $column_id)
|
| 1280 |
+
$input_value .= (isset($_POST[$i."_input_element".$id.$row_id.'_'.$column_id]) ? $_POST[$i."_input_element".$id.$row_id.'_'.$column_id] : 0)."***";
|
| 1281 |
+
}
|
| 1282 |
+
if (isset($_POST[$i."_input_type".$id]) && $_POST[$i."_input_type".$id] == "text") {
|
| 1283 |
+
$input_value="";
|
| 1284 |
+
foreach($row_ids as $row_id)
|
| 1285 |
+
foreach($column_ids as $column_id)
|
| 1286 |
+
$input_value .= (isset($_POST[$i."_input_element".$id.$row_id.'_'.$column_id]) ? esc_html($_POST[$i."_input_element".$id.$row_id.'_'.$column_id]) : "")."***";
|
| 1287 |
+
}
|
| 1288 |
+
if (isset($_POST[$i."_input_type".$id]) && $_POST[$i."_input_type".$id] == "select") {
|
| 1289 |
+
$input_value="";
|
| 1290 |
+
foreach($row_ids as $row_id)
|
| 1291 |
+
foreach($column_ids as $column_id)
|
| 1292 |
+
$input_value .= (isset($_POST[$i."_select_yes_no".$id.$row_id.'_'.$column_id]) ? $_POST[$i."_select_yes_no".$id.$row_id.'_'.$column_id] : "")."***";
|
| 1293 |
+
}
|
| 1294 |
+
$value = $rows_count . '***' . (isset($_POST[$i."_hidden_row".$id]) ? $_POST[$i."_hidden_row".$id] : "") . $columns_count . '***' . (isset($_POST[$i."_hidden_column".$id]) ? $_POST[$i."_hidden_column".$id] : "") . (isset($_POST[$i."_input_type".$id]) ? $_POST[$i."_input_type".$id] : "") . '***' .$input_value . '***matrix***';
|
| 1295 |
+
break;
|
| 1296 |
+
}
|
| 1297 |
+
}
|
| 1298 |
+
if ($type == "type_address") {
|
| 1299 |
+
if ($value == '*#*#*#') {
|
| 1300 |
+
// break; ?????????????????????????????????????????????????????
|
| 1301 |
+
continue;
|
| 1302 |
+
}
|
| 1303 |
+
}
|
| 1304 |
+
$unique_element = isset($_POST[$i . "_unique" . $id]) ? $_POST[$i . "_unique" . $id] : "";
|
| 1305 |
+
if ($unique_element == 'yes') {
|
| 1306 |
+
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id_old, $i, addslashes($value)));
|
| 1307 |
+
if ($unique) {
|
| 1308 |
+
echo "<script> alert('" . addslashes(__('This field %s requires a unique entry and this value was already submitted.', 'form_maker')) . "'.replace('%s','" . $label_label[$key] . "'));</script>";
|
| 1309 |
+
return array($max + 1);
|
| 1310 |
+
}
|
| 1311 |
+
}
|
| 1312 |
+
|
| 1313 |
+
$r = $wpdb->prefix . "formmaker_submits";
|
| 1314 |
+
|
| 1315 |
+
$save_or_no = $wpdb->insert($r, array(
|
| 1316 |
+
'form_id' => $id_old,
|
| 1317 |
+
'element_label' => $i,
|
| 1318 |
+
'element_value' => stripslashes($value),
|
| 1319 |
+
'group_id' => ($max + 1),
|
| 1320 |
+
'date' => date('Y-m-d H:i:s'),
|
| 1321 |
+
'ip' => $ip,
|
| 1322 |
+
'user_id_wd' => $current_user->ID,
|
| 1323 |
+
), array(
|
| 1324 |
+
'%d',
|
| 1325 |
+
'%s',
|
| 1326 |
+
'%s',
|
| 1327 |
+
'%d',
|
| 1328 |
+
'%s',
|
| 1329 |
+
'%s',
|
| 1330 |
+
'%d'
|
| 1331 |
+
));
|
| 1332 |
+
if (!$save_or_no) {
|
| 1333 |
+
return FALSE;
|
| 1334 |
+
}
|
| 1335 |
+
$chgnac = FALSE;
|
| 1336 |
+
}
|
| 1337 |
+
}
|
| 1338 |
+
|
| 1339 |
+
|
| 1340 |
+
$subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix ."formmaker_submits" );
|
| 1341 |
+
$user_fields = array("subid"=>$subid, "ip"=>$ip, "userid"=>$wp_userid, "username"=>$wp_username, "useremail"=>$wp_useremail);
|
| 1342 |
+
|
| 1343 |
+
$queries = $wpdb->get_results( $wpdb->prepare("SELECT * FROM " .$wpdb->prefix. "formmaker_query WHERE form_id=%d",(int)$id ));
|
| 1344 |
+
if($queries)
|
| 1345 |
+
{
|
| 1346 |
+
foreach($queries as $query)
|
| 1347 |
+
{
|
| 1348 |
+
$temp = explode('***wdfcon_typewdf***',$query->details);
|
| 1349 |
+
$con_type = $temp[0];
|
| 1350 |
+
$temp = explode('***wdfcon_methodwdf***',$temp[1]);
|
| 1351 |
+
$con_method = $temp[0];
|
| 1352 |
+
$temp = explode('***wdftablewdf***',$temp[1]);
|
| 1353 |
+
$table_cur = $temp[0];
|
| 1354 |
+
$temp = explode('***wdfhostwdf***',$temp[1]);
|
| 1355 |
+
$host = $temp[0];
|
| 1356 |
+
$temp = explode('***wdfportwdf***',$temp[1]);
|
| 1357 |
+
$port = $temp[0];
|
| 1358 |
+
$temp = explode('***wdfusernamewdf***',$temp[1]);
|
| 1359 |
+
$username = $temp[0];
|
| 1360 |
+
$temp = explode('***wdfpasswordwdf***',$temp[1]);
|
| 1361 |
+
$password = $temp[0];
|
| 1362 |
+
$temp = explode('***wdfdatabasewdf***',$temp[1]);
|
| 1363 |
+
$database = $temp[0];
|
| 1364 |
+
|
| 1365 |
+
$query=str_replace(array_keys($fvals), $fvals ,$query->query);
|
| 1366 |
+
foreach($user_fields as $user_key=>$user_field)
|
| 1367 |
+
$query=str_replace('{'.$user_key.'}', $user_field , $query);
|
| 1368 |
+
|
| 1369 |
+
if($con_type == 'remote')
|
| 1370 |
+
{
|
| 1371 |
+
$wpdb_temp = new wpdb($username, $password, $database, $host);
|
| 1372 |
+
$wpdb_temp->query($query);
|
| 1373 |
+
}
|
| 1374 |
+
else {
|
| 1375 |
+
$wpdb->query($query);
|
| 1376 |
+
}
|
| 1377 |
+
}
|
| 1378 |
+
// $wpdb= new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
|
| 1379 |
+
}
|
| 1380 |
+
|
| 1381 |
+
$addons = array('WD_FM_MAILCHIMP' => 'MailChimp', 'WD_FM_REG' => 'Registration');
|
| 1382 |
+
foreach($addons as $addon => $addon_name)
|
| 1383 |
+
{
|
| 1384 |
+
if (defined($addon) && is_plugin_active(constant($addon))) {
|
| 1385 |
+
$_GET['addon_task']='frontend';
|
| 1386 |
+
$_GET['form_id']=$id;
|
| 1387 |
+
$GLOBALS['fvals']=$fvals;
|
| 1388 |
+
do_action($addon.'_init');
|
| 1389 |
+
}
|
| 1390 |
+
}
|
| 1391 |
+
|
| 1392 |
+
$str = '';
|
| 1393 |
+
|
| 1394 |
+
if ($form->paypal_mode) {
|
| 1395 |
+
if ($paypal['item_name']) {
|
| 1396 |
+
if ($is_amount) {
|
| 1397 |
+
$tax = $form->tax;
|
| 1398 |
+
$currency = $form->payment_currency;
|
| 1399 |
+
$business = $form->paypal_email;
|
| 1400 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
| 1401 |
+
$total2 = round($total, 2);
|
| 1402 |
+
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 1403 |
+
'form_id' => $id,
|
| 1404 |
+
'element_label' => 'item_total',
|
| 1405 |
+
'element_value' => $total2 . $form_currency,
|
| 1406 |
+
'group_id' => ($max + 1),
|
| 1407 |
+
'date' => date('Y-m-d H:i:s'),
|
| 1408 |
+
'ip' => $ip,
|
| 1409 |
+
'user_id_wd' => $current_user->ID,
|
| 1410 |
+
), array(
|
| 1411 |
+
'%d',
|
| 1412 |
+
'%s',
|
| 1413 |
+
'%s',
|
| 1414 |
+
'%d',
|
| 1415 |
+
'%s',
|
| 1416 |
+
'%s',
|
| 1417 |
+
'%d'
|
| 1418 |
+
));
|
| 1419 |
+
if (!$save_or_no) {
|
| 1420 |
+
return false;
|
| 1421 |
+
}
|
| 1422 |
+
$total = $total + ($total * $tax) / 100;
|
| 1423 |
+
if (isset($paypal['shipping'])) {
|
| 1424 |
+
$total = $total + $paypal['shipping'];
|
| 1425 |
+
}
|
| 1426 |
+
$total = round($total, 2);
|
| 1427 |
+
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 1428 |
+
'form_id' => $id,
|
| 1429 |
+
'element_label' => 'total',
|
| 1430 |
+
'element_value' => $total . $form_currency,
|
| 1431 |
+
'group_id' => ($max + 1),
|
| 1432 |
+
'date' => date('Y-m-d H:i:s'),
|
| 1433 |
+
'ip' => $ip,
|
| 1434 |
+
'user_id_wd' => $current_user->ID,
|
| 1435 |
+
), array(
|
| 1436 |
+
'%d',
|
| 1437 |
+
'%s',
|
| 1438 |
+
'%s',
|
| 1439 |
+
'%d',
|
| 1440 |
+
'%s',
|
| 1441 |
+
'%s',
|
| 1442 |
+
'%d'
|
| 1443 |
+
));
|
| 1444 |
+
if (!$save_or_no) {
|
| 1445 |
+
return false;
|
| 1446 |
+
}
|
| 1447 |
+
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 1448 |
+
'form_id' => $id,
|
| 1449 |
+
'element_label' => '0',
|
| 1450 |
+
'element_value' => 'In progress',
|
| 1451 |
+
'group_id' => ($max + 1),
|
| 1452 |
+
'date' => date('Y-m-d H:i:s'),
|
| 1453 |
+
'ip' => $ip,
|
| 1454 |
+
'user_id_wd' => $current_user->ID,
|
| 1455 |
+
), array(
|
| 1456 |
+
'%d',
|
| 1457 |
+
'%s',
|
| 1458 |
+
'%s',
|
| 1459 |
+
'%d',
|
| 1460 |
+
'%s',
|
| 1461 |
+
'%s',
|
| 1462 |
+
'%d'
|
| 1463 |
+
));
|
| 1464 |
+
if (!$save_or_no) {
|
| 1465 |
+
return false;
|
| 1466 |
+
}
|
| 1467 |
+
$str = '';
|
| 1468 |
+
if ($form->checkout_mode==1 || $form->checkout_mode == "production") {
|
| 1469 |
+
$str .= "https://www.paypal.com/cgi-bin/webscr?";
|
| 1470 |
+
}
|
| 1471 |
+
else {
|
| 1472 |
+
$str .= "https://www.sandbox.paypal.com/cgi-bin/webscr?";
|
| 1473 |
+
}
|
| 1474 |
+
$str .= "currency_code=" . $currency;
|
| 1475 |
+
$str .= "&business=" . urlencode($business);
|
| 1476 |
+
$str .= "&cmd=" . "_cart";
|
| 1477 |
+
$str .= "¬ify_url=" . admin_url('admin-ajax.php?action=checkpaypal%26form_id=' . $id . '%26group_id=' . ($max + 1));
|
| 1478 |
+
$str .= "&upload=" . "1";
|
| 1479 |
+
$str .= "&charset=UTF-8";
|
| 1480 |
+
if (isset($paypal['shipping'])) {
|
| 1481 |
+
$str = $str . "&shipping_1=" . $paypal['shipping'];
|
| 1482 |
+
// $str=$str."&weight_cart=".$paypal['shipping'];
|
| 1483 |
+
// $str=$str."&shipping2=3".$paypal['shipping'];
|
| 1484 |
+
$str = $str."&no_shipping=2";
|
| 1485 |
+
}
|
| 1486 |
+
$i=0;
|
| 1487 |
+
foreach ($paypal['item_name'] as $pkey => $pitem_name) {
|
| 1488 |
+
if($paypal['amount'][$pkey]) {
|
| 1489 |
+
$i++;
|
| 1490 |
+
$str = $str."&item_name_".$i."=".urlencode($pitem_name);
|
| 1491 |
+
$str = $str."&amount_".$i."=".$paypal['amount'][$pkey];
|
| 1492 |
+
$str = $str."&quantity_".$i."=".$paypal['quantity'][$pkey];
|
| 1493 |
+
if ($tax) {
|
| 1494 |
+
$str = $str . "&tax_rate_" . $i . "=" . $tax;
|
| 1495 |
+
}
|
| 1496 |
+
if ($paypal['on_os'][$pkey]) {
|
| 1497 |
+
foreach ($paypal['on_os'][$pkey]['on'] as $on_os_key => $on_item_name) {
|
| 1498 |
+
$str = $str."&on".$on_os_key."_".$i."=".$on_item_name;
|
| 1499 |
+
$str = $str."&os".$on_os_key."_".$i."=".$paypal['on_os'][$pkey]['os'][$on_os_key];
|
| 1500 |
+
}
|
| 1501 |
+
}
|
| 1502 |
+
}
|
| 1503 |
+
}
|
| 1504 |
+
}
|
| 1505 |
+
}
|
| 1506 |
+
}
|
| 1507 |
+
|
| 1508 |
+
if($form->mail_verify){
|
| 1509 |
+
unset($_SESSION['hash']);
|
| 1510 |
+
unset($_SESSION['gid']);
|
| 1511 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
| 1512 |
+
$_SESSION['gid'] = $max+1;
|
| 1513 |
+
$send_tos = explode('**',$form->send_to);
|
| 1514 |
+
if($send_tos){
|
| 1515 |
+
foreach($send_tos as $send_index => $send_to)
|
| 1516 |
+
{
|
| 1517 |
+
$_SESSION['hash'][] = md5($ip.time().rand());
|
| 1518 |
+
$send_to = str_replace('*', '',$send_to);
|
| 1519 |
+
$save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
| 1520 |
+
'form_id' => $id,
|
| 1521 |
+
'element_label' => 'verifyInfo@'.$send_to,
|
| 1522 |
+
'element_value' => $_SESSION['hash'][$send_index]."**".$form->mail_verify_expiretime."**".$send_to,
|
| 1523 |
+
'group_id' => ($max + 1),
|
| 1524 |
+
'date' => date('Y-m-d H:i:s'),
|
| 1525 |
+
'ip' => $ip,
|
| 1526 |
+
'user_id_wd' => $current_user->ID,
|
| 1527 |
+
), array(
|
| 1528 |
+
'%d',
|
| 1529 |
+
'%s',
|
| 1530 |
+
'%s',
|
| 1531 |
+
'%d',
|
| 1532 |
+
'%s',
|
| 1533 |
+
'%s',
|
| 1534 |
+
'%d'
|
| 1535 |
+
));
|
| 1536 |
+
if (!$save_or_no) {
|
| 1537 |
+
return false;
|
| 1538 |
+
}
|
| 1539 |
+
}
|
| 1540 |
+
}
|
| 1541 |
+
}
|
| 1542 |
+
|
| 1543 |
+
|
| 1544 |
+
if ($chgnac) {
|
| 1545 |
+
global $wpdb;
|
| 1546 |
+
if ($form->submit_text_type != 4) {
|
| 1547 |
+
$_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Nothing was submitted.', 'form_maker')));
|
| 1548 |
+
}
|
| 1549 |
+
$_SESSION['error_or_no' . $id] = 1;
|
| 1550 |
+
$_SESSION['form_submit_type' . $id] = $form->submit_text_type . "," . $form->id;
|
| 1551 |
+
wp_redirect($_SERVER["REQUEST_URI"]);
|
| 1552 |
+
exit;
|
| 1553 |
+
}
|
| 1554 |
+
|
| 1555 |
+
$addons = array('WD_FM_GDRIVE_INT' => 'GDriveInt', 'WD_FM_DBOX_INT' => 'DboxInt', 'WD_FM_POST_GEN' => 'PostGen', 'WD_FM_PUSHOVER' => 'Pushover'); // the sequence is important for google drive and drop box addons !!!!!!!!!!
|
| 1556 |
+
foreach($addons as $addon => $addon_name) {
|
| 1557 |
+
if (defined($addon) && is_plugin_active(constant($addon))) {
|
| 1558 |
+
$_GET['addon_task'] = 'frontend';
|
| 1559 |
+
$_GET['form_id'] = $id;
|
| 1560 |
+
$GLOBALS['all_files'] = json_encode($all_files);
|
| 1561 |
+
$GLOBALS['form_currency'] = $form_currency;
|
| 1562 |
+
do_action($addon.'_init');
|
| 1563 |
+
}
|
| 1564 |
+
}
|
| 1565 |
+
return array($all_files, $str);
|
| 1566 |
+
}
|
| 1567 |
+
|
| 1568 |
+
public function remove($group_id) {
|
| 1569 |
+
global $wpdb;
|
| 1570 |
+
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id));
|
| 1571 |
+
}
|
| 1572 |
+
|
| 1573 |
+
public function get_after_submission_text($form_id) {
|
| 1574 |
+
global $wpdb;
|
| 1575 |
+
$submit_text = $wpdb->get_var("SELECT submit_text FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
|
| 1576 |
+
$current_user = wp_get_current_user();
|
| 1577 |
+
if ($current_user->ID != 0){
|
| 1578 |
+
$userid = $current_user->ID;
|
| 1579 |
+
$username = $current_user->display_name;
|
| 1580 |
+
$useremail = $current_user->user_email;
|
| 1581 |
+
} else{
|
| 1582 |
+
$userid = '';
|
| 1583 |
+
$username = '';
|
| 1584 |
+
$useremail = '';
|
| 1585 |
+
}
|
| 1586 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
| 1587 |
+
$subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix ."formmaker_submits" );
|
| 1588 |
+
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $form_id));
|
| 1589 |
+
|
| 1590 |
+
$old = false;
|
| 1591 |
+
if(isset($row->form)) {
|
| 1592 |
+
$old = true;
|
| 1593 |
+
}
|
| 1594 |
+
$label_order_original = array();
|
| 1595 |
+
$label_order_ids = array();
|
| 1596 |
+
$submission_array = array();
|
| 1597 |
+
if($old == false || ($old == true && $row->form == '')) {
|
| 1598 |
+
$label_all = explode('#****#',$row->label_order_current);
|
| 1599 |
+
} else {
|
| 1600 |
+
$label_all = explode('#****#',$row->label_order);
|
| 1601 |
+
}
|
| 1602 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 1603 |
+
foreach ($label_all as $key => $label_each) {
|
| 1604 |
+
$label_id_each = explode('#**id**#', $label_each);
|
| 1605 |
+
$label_id = $label_id_each[0];
|
| 1606 |
+
array_push($label_order_ids, $label_id);
|
| 1607 |
+
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
| 1608 |
+
$label_order_original[$label_id] = $label_order_each[0];
|
| 1609 |
+
}
|
| 1610 |
+
|
| 1611 |
+
$submissions_row = $wpdb->get_results($wpdb->prepare("SELECT `element_label`, `element_value` FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=%d AND group_id=%d", $form_id, $subid));
|
| 1612 |
+
foreach ($submissions_row as $sub_row){
|
| 1613 |
+
$submission_array[$sub_row->element_label] = $sub_row->element_value;
|
| 1614 |
+
}
|
| 1615 |
+
|
| 1616 |
+
foreach($label_order_original as $key => $label_each) {
|
| 1617 |
+
if(strpos($submit_text, "%".$label_each."%")>-1) {
|
| 1618 |
+
$submit_text = str_replace("%".$label_each."%", $submission_array[$key], $submit_text);
|
| 1619 |
+
}
|
| 1620 |
+
}
|
| 1621 |
+
|
| 1622 |
+
$custom_fields = array( "subid"=>$subid, "ip"=>$ip, "userid"=>$userid, "username"=>$username, "useremail"=>$useremail);
|
| 1623 |
+
foreach($custom_fields as $key=>$custom_field)
|
| 1624 |
+
{
|
| 1625 |
+
if(strpos($submit_text, "%".$key."%")>-1)
|
| 1626 |
+
$submit_text = str_replace("%".$key."%", $custom_field, $submit_text);
|
| 1627 |
+
}
|
| 1628 |
+
$submit_text = str_replace(array("***map***", "*@@url@@*", "@@@@@@@@@", "@@@", "***grading***", "***br***", "***star_rating***"), array(" ", "", " ", " ", " ", ", ", " "), $submit_text);
|
| 1629 |
+
|
| 1630 |
+
return $submit_text;
|
| 1631 |
+
}
|
| 1632 |
+
|
| 1633 |
+
public function increment_views_count($id) {
|
| 1634 |
+
global $wpdb;
|
| 1635 |
+
$vives_form = $wpdb->get_var($wpdb->prepare("SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id));
|
| 1636 |
+
if (isset($vives_form)) {
|
| 1637 |
+
$vives_form = $vives_form + 1;
|
| 1638 |
+
$wpdb->update($wpdb->prefix . "formmaker_views", array(
|
| 1639 |
+
'views' => $vives_form,
|
| 1640 |
+
), array('form_id' => $id), array(
|
| 1641 |
+
'%d',
|
| 1642 |
+
), array('%d'));
|
| 1643 |
+
}
|
| 1644 |
+
else {
|
| 1645 |
+
$wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
| 1646 |
+
'form_id' => $id,
|
| 1647 |
+
'views' => 1
|
| 1648 |
+
), array(
|
| 1649 |
+
'%d',
|
| 1650 |
+
'%d'
|
| 1651 |
+
));
|
| 1652 |
+
}
|
| 1653 |
+
}
|
| 1654 |
+
|
| 1655 |
+
public function gen_mail($counter, $all_files, $id, $str) {
|
| 1656 |
+
// checking save uploads option
|
| 1657 |
+
global $wpdb;
|
| 1658 |
+
$save_uploads = $wpdb->get_var("SELECT save_uploads FROM " . $wpdb->prefix ."formmaker WHERE id=" . $id);
|
| 1659 |
+
if($save_uploads == 0){
|
| 1660 |
+
$destination = 'wp-content/uploads/tmpAddon';
|
| 1661 |
+
if(!file_exists($destination))
|
| 1662 |
+
mkdir($destination , 0777);
|
| 1663 |
+
|
| 1664 |
+
foreach($all_files as &$all_file){
|
| 1665 |
+
$fileTemp = $all_file['tmp_name'];
|
| 1666 |
+
$fileName = $all_file['name'];
|
| 1667 |
+
if(!move_uploaded_file($fileTemp, ABSPATH . $destination . '/' . $fileName)) {
|
| 1668 |
+
echo "<script> alert('" . addslashes(__('Error, file cannot be moved.', 'form_maker')) . "');</script>";
|
| 1669 |
+
return array($max+1);
|
| 1670 |
+
}
|
| 1671 |
+
|
| 1672 |
+
$all_file['tmp_name'] = $destination . "/" . $fileName;
|
| 1673 |
+
}
|
| 1674 |
+
}
|
| 1675 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
| 1676 |
+
$replyto = '';
|
| 1677 |
+
global $wpdb;
|
| 1678 |
+
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id));
|
| 1679 |
+
if (!$row->form_front) {
|
| 1680 |
+
$id = '';
|
| 1681 |
+
}
|
| 1682 |
+
|
| 1683 |
+
$custom_fields = array('ip', 'useremail', 'username', 'subid', 'all' );
|
| 1684 |
+
$subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix ."formmaker_submits" );
|
| 1685 |
+
|
| 1686 |
+
$current_user = wp_get_current_user();
|
| 1687 |
+
if ($current_user->ID != 0)
|
| 1688 |
+
{
|
| 1689 |
+
$username = $current_user->display_name;
|
| 1690 |
+
$useremail = $current_user->user_email;
|
| 1691 |
+
}
|
| 1692 |
+
else
|
| 1693 |
+
{
|
| 1694 |
+
$username = '';
|
| 1695 |
+
$useremail = '';
|
| 1696 |
+
}
|
| 1697 |
+
|
| 1698 |
+
$label_order_original = array();
|
| 1699 |
+
$label_order_ids = array();
|
| 1700 |
+
$label_label = array();
|
| 1701 |
+
$label_type = array();
|
| 1702 |
+
$total = 0;
|
| 1703 |
+
$form_currency = '$';
|
| 1704 |
+
$currency_code = array('USD', 'EUR', 'GBP', 'JPY', 'CAD', 'MXN', 'HKD', 'HUF', 'NOK', 'NZD', 'SGD', 'SEK', 'PLN', 'AUD', 'DKK', 'CHF', 'CZK', 'ILS', 'BRL', 'TWD', 'MYR', 'PHP', 'THB');
|
| 1705 |
+
$currency_sign = array('$', '€', '£', '¥', 'C$', 'Mex$', 'HK$', 'Ft', 'kr', 'NZ$', 'S$', 'kr', 'zl', 'A$', 'kr', 'CHF', 'Kc', '₪', 'R$', 'NT$', 'RM', '₱', '฿');
|
| 1706 |
+
if ($row->payment_currency) {
|
| 1707 |
+
$form_currency = $currency_sign[array_search($row->payment_currency, $currency_code)];
|
| 1708 |
+
}
|
| 1709 |
+
|
| 1710 |
+
$old = false;
|
| 1711 |
+
if(isset($row->form)) {
|
| 1712 |
+
$old = true;
|
| 1713 |
+
}
|
| 1714 |
+
|
| 1715 |
+
$cc = array();
|
| 1716 |
+
$row_mail_one_time = 1;
|
| 1717 |
+
$label_type = array();
|
| 1718 |
+
|
| 1719 |
+
if($old == false || ($old == true && $row->form == '')) {
|
| 1720 |
+
$label_all = explode('#****#',$row->label_order_current);
|
| 1721 |
+
}
|
| 1722 |
+
else {
|
| 1723 |
+
$label_all = explode('#****#',$row->label_order);
|
| 1724 |
+
}
|
| 1725 |
+
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
| 1726 |
+
foreach ($label_all as $key => $label_each) {
|
| 1727 |
+
$label_id_each = explode('#**id**#', $label_each);
|
| 1728 |
+
$label_id = $label_id_each[0];
|
| 1729 |
+
array_push($label_order_ids, $label_id);
|
| 1730 |
+
$label_order_each = explode('#**label**#', $label_id_each[1]);
|
| 1731 |
+
$label_order_original[$label_id] = $label_order_each[0];
|
| 1732 |
+
$label_type[$label_id] = $label_order_each[1];
|
| 1733 |
+
array_push($label_label, $label_order_each[0]);
|
| 1734 |
+
array_push($label_type, $label_order_each[1]);
|
| 1735 |
+
}
|
| 1736 |
+
|
| 1737 |
+
$disabled_fields = explode(',', isset($_REQUEST["disabled_fields".$id]) ? $_REQUEST["disabled_fields".$id] : "");
|
| 1738 |
+
$disabled_fields = array_slice($disabled_fields,0, count($disabled_fields)-1);
|
| 1739 |
+
|
| 1740 |
+
$list='<table border="1" cellpadding="3" cellspacing="0" style="width:600px;">';
|
| 1741 |
+
$list_text_mode = '';
|
| 1742 |
+
if($old == false || ($old == true && $row->form == '')) {
|
| 1743 |
+
foreach($label_order_ids as $key => $label_order_id) {
|
| 1744 |
+
$i = $label_order_id;
|
| 1745 |
+
$type = $label_type[$i];
|
| 1746 |
+
|
| 1747 |
+
if($type != "type_map" and $type != "type_submit_reset" and $type != "type_editor" and $type != "type_captcha" and $type != "type_arithmetic_captcha" and $type != "type_recaptcha" and $type != "type_button") {
|
| 1748 |
+
$element_label=$label_order_original[$i];
|
| 1749 |
+
if(!in_array($i,$disabled_fields)) {
|
| 1750 |
+
switch ($type) {
|
| 1751 |
+
case 'type_text':
|
| 1752 |
+
case 'type_password':
|
| 1753 |
+
case 'type_textarea':
|
| 1754 |
+
case "type_date":
|
| 1755 |
+
case "type_own_select":
|
| 1756 |
+
case "type_country":
|
| 1757 |
+
case "type_number": {
|
| 1758 |
+
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
| 1759 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1760 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
|
| 1761 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1762 |
+
}
|
| 1763 |
+
|
| 1764 |
+
break;
|
| 1765 |
+
}
|
| 1766 |
+
case "type_hidden": {
|
| 1767 |
+
$element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
|
| 1768 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1769 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
|
| 1770 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1771 |
+
}
|
| 1772 |
+
break;
|
| 1773 |
+
}
|
| 1774 |
+
case "type_mark_map": {
|
| 1775 |
+
$element = isset($_POST['wdform_'.$i."_long".$id]) ? $_POST['wdform_'.$i."_long".$id] : NULL;
|
| 1776 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1777 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "") . '</td></tr>';
|
| 1778 |
+
$list_text_mode=$list_text_mode.$element_label.' - Longitude:'.$element.' Latitude:'.(isset($_POST['wdform_'.$i."_lat".$id]) ? $_POST['wdform_'.$i."_lat".$id] : "")."\r\n";
|
| 1779 |
+
}
|
| 1780 |
+
break;
|
| 1781 |
+
}
|
| 1782 |
+
case "type_submitter_mail": {
|
| 1783 |
+
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
| 1784 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1785 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 1786 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1787 |
+
}
|
| 1788 |
+
break;
|
| 1789 |
+
}
|
| 1790 |
+
|
| 1791 |
+
case "type_time": {
|
| 1792 |
+
$hh = isset($_POST['wdform_'.$i."_hh".$id]) ? $_POST['wdform_'.$i."_hh".$id] : NULL;
|
| 1793 |
+
if(isset($hh) && ($this->empty_field($hh, $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_mm".$id], $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_ss".$id], $row->mail_emptyfields))) {
|
| 1794 |
+
$ss = isset($_POST['wdform_'.$i."_ss".$id]) ? $_POST['wdform_'.$i."_ss".$id] : NULL;
|
| 1795 |
+
if(isset($ss)) {
|
| 1796 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "") . ':' . $ss;
|
| 1797 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$hh.':'.(isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "").':'.$ss;
|
| 1798 |
+
}
|
| 1799 |
+
else {
|
| 1800 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
| 1801 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$hh.':'.(isset($_POST['wdform_'.$i."_mm".$id]) ? $_POST['wdform_'.$i."_mm".$id] : "");
|
| 1802 |
+
}
|
| 1803 |
+
$am_pm = isset($_POST['wdform_'.$i."_am_pm".$id]) ? $_POST['wdform_'.$i."_am_pm".$id] : NULL;
|
| 1804 |
+
if(isset($am_pm)) {
|
| 1805 |
+
$list = $list . ' ' . $am_pm . '</td></tr>';
|
| 1806 |
+
$list_text_mode=$list_text_mode.$am_pm."\r\n";
|
| 1807 |
+
}
|
| 1808 |
+
else {
|
| 1809 |
+
$list = $list.'</td></tr>';
|
| 1810 |
+
$list_text_mode=$list_text_mode."\r\n";
|
| 1811 |
+
}
|
| 1812 |
+
}
|
| 1813 |
+
break;
|
| 1814 |
+
}
|
| 1815 |
+
|
| 1816 |
+
case "type_phone": {
|
| 1817 |
+
$element_first = isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : NULL;
|
| 1818 |
+
if(isset($element_first) && $this->empty_field($element_first, $row->mail_emptyfields)) {
|
| 1819 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . '</td></tr>';
|
| 1820 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element_first.' '.(isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "")."\r\n";
|
| 1821 |
+
}
|
| 1822 |
+
break;
|
| 1823 |
+
}
|
| 1824 |
+
|
| 1825 |
+
case "type_name": {
|
| 1826 |
+
$element_first = isset($_POST['wdform_'.$i."_element_first".$id]) ? $_POST['wdform_'.$i."_element_first".$id] : NULL;
|
| 1827 |
+
if(isset($element_first)) {
|
| 1828 |
+
$element_title = isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : NULL;
|
| 1829 |
+
$element_middle = isset($_POST['wdform_'.$i."_element_middle".$id]) ? esc_html($_POST['wdform_'.$i."_element_middle".$id]) : NULL;
|
| 1830 |
+
if((isset($element_title) || isset($element_middle)) && ($this->empty_field($element_title, $row->mail_emptyfields) || $this->empty_field($element_first, $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_element_last".$id], $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_element_middle".$id], $row->mail_emptyfields))) {
|
| 1831 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . (isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : '') . ' ' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . ' ' . (isset($_POST['wdform_'.$i."_element_middle".$id]) ? $_POST['wdform_'.$i."_element_middle".$id] : "") . '</td></tr>';
|
| 1832 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.(isset($_POST['wdform_'.$i."_element_title".$id]) ? $_POST['wdform_'.$i."_element_title".$id] : '').' '.$element_first.' '.(isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "").' '.(isset($_POST['wdform_'.$i."_element_middle".$id]) ? $_POST['wdform_'.$i."_element_middle".$id] : "")."\r\n";
|
| 1833 |
+
}
|
| 1834 |
+
else {
|
| 1835 |
+
if($this->empty_field($element_first, $row->mail_emptyfields) || $this->empty_field($_POST['wdform_'.$i."_element_last".$id], $row->mail_emptyfields)) {
|
| 1836 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "") . '</td></tr>';
|
| 1837 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element_first.' '.(isset($_POST['wdform_'.$i."_element_last".$id]) ? $_POST['wdform_'.$i."_element_last".$id] : "")."\r\n";
|
| 1838 |
+
}
|
| 1839 |
+
}
|
| 1840 |
+
}
|
| 1841 |
+
break;
|
| 1842 |
+
}
|
| 1843 |
+
|
| 1844 |
+
case "type_address": {
|
| 1845 |
+
$element = isset($_POST['wdform_'.$i."_street1".$id]) ? $_POST['wdform_'.$i."_street1".$id] : NULL;
|
| 1846 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1847 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1848 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1849 |
+
break;
|
| 1850 |
+
}
|
| 1851 |
+
$element = isset($_POST['wdform_'.$i."_street2".$id]) ? $_POST['wdform_'.$i."_street2".$id] : NULL;
|
| 1852 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1853 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1854 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1855 |
+
break;
|
| 1856 |
+
}
|
| 1857 |
+
$element = isset($_POST['wdform_'.$i."_city".$id]) ? $_POST['wdform_'.$i."_city".$id] : NULL;
|
| 1858 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1859 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1860 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1861 |
+
break;
|
| 1862 |
+
}
|
| 1863 |
+
$element = isset($_POST['wdform_'.$i."_state".$id]) ? $_POST['wdform_'.$i."_state".$id] : NULL;
|
| 1864 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1865 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1866 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1867 |
+
break;
|
| 1868 |
+
}
|
| 1869 |
+
$element = isset($_POST['wdform_'.$i."_postal".$id]) ? $_POST['wdform_'.$i."_postal".$id] : NULL;
|
| 1870 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1871 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1872 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1873 |
+
break;
|
| 1874 |
+
}
|
| 1875 |
+
$element = isset($_POST['wdform_'.$i."_country".$id]) ? $_POST['wdform_'.$i."_country".$id] : NULL;
|
| 1876 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1877 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
|
| 1878 |
+
$list_text_mode=$list_text_mode.$label_order_original[$i].' - '.$element."\r\n";
|
| 1879 |
+
break;
|
| 1880 |
+
}
|
| 1881 |
+
break;
|
| 1882 |
+
}
|
| 1883 |
+
|
| 1884 |
+
case "type_date_fields": {
|
| 1885 |
+
$day = isset($_POST['wdform_'.$i."_day".$id]) ? $_POST['wdform_'.$i."_day".$id] : NULL;
|
| 1886 |
+
$month = isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : "";
|
| 1887 |
+
$year = isset($_POST['wdform_'.$i."_year".$id]) ? $_POST['wdform_'.$i."_year".$id] : "";
|
| 1888 |
+
if(isset($day) && $this->empty_field($day, $row->mail_emptyfields)) {
|
| 1889 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' .(($day || $month || $year) ? $day . '-' . $month . '-' . $year : '' ). '</td></tr>';
|
| 1890 |
+
$list_text_mode=$list_text_mode.$element_label.(($day || $month || $year) ? $day.'-'.$month.'-'.$year : '')."\r\n";
|
| 1891 |
+
}
|
| 1892 |
+
break;
|
| 1893 |
+
}
|
| 1894 |
+
|
| 1895 |
+
case "type_radio": {
|
| 1896 |
+
$element = isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : NULL;
|
| 1897 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1898 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 1899 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1900 |
+
break;
|
| 1901 |
+
}
|
| 1902 |
+
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
| 1903 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 1904 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 1905 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 1906 |
+
}
|
| 1907 |
+
break;
|
| 1908 |
+
}
|
| 1909 |
+
|
| 1910 |
+
case "type_checkbox": {
|
| 1911 |
+
$start = -1;
|
| 1912 |
+
for($j = 0; $j < 100; $j++) {
|
| 1913 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 1914 |
+
if(isset($element)) {
|
| 1915 |
+
$start = $j;
|
| 1916 |
+
break;
|
| 1917 |
+
}
|
| 1918 |
+
}
|
| 1919 |
+
$other_element_id = -1;
|
| 1920 |
+
$is_other = isset($_POST['wdform_'.$i."_allow_other".$id]) ? $_POST['wdform_'.$i."_allow_other".$id] : "";
|
| 1921 |
+
if($is_other == "yes") {
|
| 1922 |
+
$other_element_id = isset($_POST['wdform_'.$i."_allow_other_num".$id]) ? $_POST['wdform_'.$i."_allow_other_num".$id] : "";
|
| 1923 |
+
}
|
| 1924 |
+
|
| 1925 |
+
if($start != -1 || ($start == -1 && $row->mail_emptyfields))
|
| 1926 |
+
{
|
| 1927 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
|
| 1928 |
+
$list_text_mode=$list_text_mode.$element_label.' - ';
|
| 1929 |
+
}
|
| 1930 |
+
|
| 1931 |
+
if($start != -1) {
|
| 1932 |
+
for($j = $start; $j < 100; $j++) {
|
| 1933 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 1934 |
+
if(isset($element)) {
|
| 1935 |
+
if($j == $other_element_id) {
|
| 1936 |
+
$list = $list . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "") . '<br>';
|
| 1937 |
+
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : "").', ';
|
| 1938 |
+
}
|
| 1939 |
+
else {
|
| 1940 |
+
$list = $list . (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "") . '<br>';
|
| 1941 |
+
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : "").', ';
|
| 1942 |
+
}
|
| 1943 |
+
}
|
| 1944 |
+
}
|
| 1945 |
+
}
|
| 1946 |
+
|
| 1947 |
+
if($start != -1 || ($start == -1 && $row->mail_emptyfields))
|
| 1948 |
+
{
|
| 1949 |
+
$list = $list . '</td></tr>';
|
| 1950 |
+
$list_text_mode=$list_text_mode."\r\n";
|
| 1951 |
+
}
|
| 1952 |
+
break;
|
| 1953 |
+
}
|
| 1954 |
+
|
| 1955 |
+
case "type_paypal_price": {
|
| 1956 |
+
$value = 0;
|
| 1957 |
+
if(isset($_POST['wdform_'.$i."_element_dollars".$id])) {
|
| 1958 |
+
$value = $_POST['wdform_'.$i."_element_dollars".$id];
|
| 1959 |
+
}
|
| 1960 |
+
if(isset($_POST['wdform_'.$i."_element_cents".$id]) && $_POST['wdform_'.$i."_element_cents".$id]) {
|
| 1961 |
+
$value = $value . '.' . $_POST['wdform_'.$i."_element_cents".$id];
|
| 1962 |
+
}
|
| 1963 |
+
|
| 1964 |
+
if($this->empty_field($value, $row->mail_emptyfields) && $value!='.')
|
| 1965 |
+
{
|
| 1966 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . $form_currency . '</td></tr>';
|
| 1967 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$value.$form_currency."\r\n";
|
| 1968 |
+
}
|
| 1969 |
+
break;
|
| 1970 |
+
}
|
| 1971 |
+
|
| 1972 |
+
case "type_paypal_select": {
|
| 1973 |
+
if(isset($_POST['wdform_'.$i."_element_label".$id]) && $_POST['wdform_'.$i."_element".$id] != '') {
|
| 1974 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 1975 |
+
}
|
| 1976 |
+
else {
|
| 1977 |
+
$value='';
|
| 1978 |
+
}
|
| 1979 |
+
$element_quantity_label = (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) && $_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
| 1980 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 1981 |
+
if($value != '' && isset($element_quantity)) {
|
| 1982 |
+
$value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
| 1983 |
+
}
|
| 1984 |
+
for($k = 0; $k < 50; $k++) {
|
| 1985 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 1986 |
+
if(isset($temp_val)) {
|
| 1987 |
+
$value .= '<br/>' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 1988 |
+
}
|
| 1989 |
+
}
|
| 1990 |
+
|
| 1991 |
+
if($this->empty_field($value, $row->mail_emptyfields))
|
| 1992 |
+
{
|
| 1993 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
|
| 1994 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.str_replace('<br/>',', ',$value)."\r\n";
|
| 1995 |
+
}
|
| 1996 |
+
break;
|
| 1997 |
+
}
|
| 1998 |
+
|
| 1999 |
+
case "type_paypal_radio": {
|
| 2000 |
+
if(isset($_POST['wdform_'.$i."_element".$id])) {
|
| 2001 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 2002 |
+
|
| 2003 |
+
$element_quantity_label = isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
| 2004 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 2005 |
+
if (isset($element_quantity)) {
|
| 2006 |
+
$value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
| 2007 |
+
}
|
| 2008 |
+
for($k = 0; $k < 50; $k++) {
|
| 2009 |
+
$temp_val = isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL;
|
| 2010 |
+
if(isset($temp_val)) {
|
| 2011 |
+
$value .= '<br/>' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 2012 |
+
}
|
| 2013 |
+
}
|
| 2014 |
+
}
|
| 2015 |
+
else {
|
| 2016 |
+
$value='';
|
| 2017 |
+
}
|
| 2018 |
+
|
| 2019 |
+
if($this->empty_field($value, $row->mail_emptyfields))
|
| 2020 |
+
{
|
| 2021 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
|
| 2022 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.str_replace('<br/>',', ',$value)."\r\n";
|
| 2023 |
+
}
|
| 2024 |
+
break;
|
| 2025 |
+
}
|
| 2026 |
+
|
| 2027 |
+
case "type_paypal_shipping": {
|
| 2028 |
+
if(isset($_POST['wdform_'.$i."_element".$id])) {
|
| 2029 |
+
$value = $_POST['wdform_'.$i."_element_label".$id] . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : "") . $form_currency;
|
| 2030 |
+
|
| 2031 |
+
if($this->empty_field($value, $row->mail_emptyfields))
|
| 2032 |
+
{
|
| 2033 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
|
| 2034 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$value."\r\n";
|
| 2035 |
+
}
|
| 2036 |
+
}
|
| 2037 |
+
else {
|
| 2038 |
+
$value='';
|
| 2039 |
+
}
|
| 2040 |
+
|
| 2041 |
+
break;
|
| 2042 |
+
}
|
| 2043 |
+
|
| 2044 |
+
case "type_paypal_checkbox": {
|
| 2045 |
+
|
| 2046 |
+
$start = -1;
|
| 2047 |
+
for($j = 0; $j < 100; $j++) {
|
| 2048 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 2049 |
+
if(isset($element)) {
|
| 2050 |
+
$start=$j;
|
| 2051 |
+
break;
|
| 2052 |
+
}
|
| 2053 |
+
}
|
| 2054 |
+
|
| 2055 |
+
if($start != -1 || ($start == -1 && $row->mail_emptyfields))
|
| 2056 |
+
{
|
| 2057 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
|
| 2058 |
+
$list_text_mode=$list_text_mode.$element_label.' - ';
|
| 2059 |
+
}
|
| 2060 |
+
if($start!=-1) {
|
| 2061 |
+
for($j = $start; $j < 100; $j++) {
|
| 2062 |
+
$element = isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL;
|
| 2063 |
+
if(isset($element)) {
|
| 2064 |
+
$list = $list . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . '<br>';
|
| 2065 |
+
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : "").' - '.($element == '' ? '0' . $form_currency : $element).$form_currency.', ';
|
| 2066 |
+
}
|
| 2067 |
+
}
|
| 2068 |
+
}
|
| 2069 |
+
$element_quantity_label = isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL;
|
| 2070 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 2071 |
+
if (isset($element_quantity)) {
|
| 2072 |
+
$list = $list . '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
| 2073 |
+
$list_text_mode=$list_text_mode.$element_quantity_label . ': ' . $element_quantity.', ';
|
| 2074 |
+
}
|
| 2075 |
+
for($k = 0; $k < 50; $k++) {
|
| 2076 |
+
$temp_val = isset($_POST['wdform_'.$i."_element_property_value".$id.$k]) ? $_POST['wdform_'.$i."_element_property_value".$id.$k] : NULL;
|
| 2077 |
+
if(isset($temp_val)) {
|
| 2078 |
+
$list = $list . '<br/>' . (isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 2079 |
+
$list_text_mode=$list_text_mode.(isset($_POST['wdform_'.$i."_element_property_label".$id.$k]) ? $_POST['wdform_'.$i."_element_property_label".$id.$k] : "") . ': ' . $temp_val.', ';
|
| 2080 |
+
}
|
| 2081 |
+
}
|
| 2082 |
+
if($start != -1 || ($start == -1 && $row->mail_emptyfields))
|
| 2083 |
+
{
|
| 2084 |
+
$list = $list . '</td></tr>';
|
| 2085 |
+
$list_text_mode=$list_text_mode."\r\n";
|
| 2086 |
+
}
|
| 2087 |
+
break;
|
| 2088 |
+
}
|
| 2089 |
+
|
| 2090 |
+
case "type_paypal_total": {
|
| 2091 |
+
$element = isset($_POST['wdform_'.$i."_paypal_total".$id]) ? $_POST['wdform_'.$i."_paypal_total".$id] : "";
|
| 2092 |
+
if($this->empty_field($element, $row->mail_emptyfields))
|
| 2093 |
+
{
|
| 2094 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 2095 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 2096 |
+
}
|
| 2097 |
+
break;
|
| 2098 |
+
}
|
| 2099 |
+
|
| 2100 |
+
case "type_star_rating": {
|
| 2101 |
+
$element = isset($_POST['wdform_'.$i."_star_amount".$id]) ? $_POST['wdform_'.$i."_star_amount".$id] : NULL;
|
| 2102 |
+
$selected = isset($_POST['wdform_'.$i."_selected_star_amount".$id]) ? $_POST['wdform_'.$i."_selected_star_amount".$id] : 0;
|
| 2103 |
+
if(isset($element) && $this->empty_field($selected, $row->mail_emptyfields)) {
|
| 2104 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
|
| 2105 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$selected.'/'.$element."\r\n";
|
| 2106 |
+
}
|
| 2107 |
+
break;
|
| 2108 |
+
}
|
| 2109 |
+
|
| 2110 |
+
case "type_scale_rating": {
|
| 2111 |
+
$element = isset($_POST['wdform_'.$i."_scale_amount".$id]) ? $_POST['wdform_'.$i."_scale_amount".$id] : NULL;
|
| 2112 |
+
$selected = isset($_POST['wdform_'.$i."_scale_radio".$id]) ? $_POST['wdform_'.$i."_scale_radio".$id] : 0;
|
| 2113 |
+
if(isset($element) && $this->empty_field($selected, $row->mail_emptyfields)) {
|
| 2114 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
|
| 2115 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$selected.'/'.$element."\r\n";
|
| 2116 |
+
}
|
| 2117 |
+
break;
|
| 2118 |
+
}
|
| 2119 |
+
|
| 2120 |
+
case "type_spinner": {
|
| 2121 |
+
$element = isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL;
|
| 2122 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 2123 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 2124 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 2125 |
+
}
|
| 2126 |
+
break;
|
| 2127 |
+
}
|
| 2128 |
+
|
| 2129 |
+
case "type_slider": {
|
| 2130 |
+
$element = isset($_POST['wdform_'.$i."_slider_value".$id]) ? $_POST['wdform_'.$i."_slider_value".$id] : NULL;
|
| 2131 |
+
if(isset($element) && $this->empty_field($element, $row->mail_emptyfields)) {
|
| 2132 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 2133 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 2134 |
+
}
|
| 2135 |
+
break;
|
| 2136 |
+
}
|
| 2137 |
+
|
| 2138 |
+
case "type_range": {
|
| 2139 |
+
$element0 = isset($_POST['wdform_'.$i."_element".$id.'0']) ? $_POST['wdform_'.$i."_element".$id.'0'] : NULL;
|
| 2140 |
+
$element1 = isset($_POST['wdform_'.$i."_element".$id.'1']) ? $_POST['wdform_'.$i."_element".$id.'1'] : NULL;
|
| 2141 |
+
if((isset($element0) && $this->empty_field($element0, $row->mail_emptyfields)) || (isset($element1) && $this->empty_field($element1, $row->mail_emptyfields))) {
|
| 2142 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >From:' . $element0 . '<span style="margin-left:6px">To</span>:' . $element1 . '</td></tr>';
|
| 2143 |
+
$list_text_mode=$list_text_mode.$element_label.' - From:'.$element0.' To:'.$element1."\r\n";
|
| 2144 |
+
}
|
| 2145 |
+
break;
|
| 2146 |
+
}
|
| 2147 |
+
|
| 2148 |
+
case "type_grading": {
|
| 2149 |
+
$element = isset($_POST['wdform_'.$i."_hidden_item".$id]) ? $_POST['wdform_'.$i."_hidden_item".$id] : "";
|
| 2150 |
+
$grading = explode(":", $element);
|
| 2151 |
+
$items_count = sizeof($grading) - 1;
|
| 2152 |
+
$element = "";
|
| 2153 |
+
$total = "";
|
| 2154 |
+
$form_empty_field = 1;
|
| 2155 |
+
for($k = 0;$k < $items_count; $k++) {
|
| 2156 |
+
$element .= $grading[$k] . ":" . (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : "") . " ";
|
| 2157 |
+
$total += (isset($_POST['wdform_'.$i."_element".$id.'_'.$k]) ? $_POST['wdform_'.$i."_element".$id.'_'.$k] : 0);
|
| 2158 |
+
if(isset($_POST['wdform_'.$i."_element".$id.'_'.$k]))
|
| 2159 |
+
$form_empty_field = 0;
|
| 2160 |
+
}
|
| 2161 |
+
$element .= "Total:" . $total;
|
| 2162 |
+
if(isset($element) && $this->empty_field($form_empty_field, $row->mail_emptyfields)) {
|
| 2163 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
| 2164 |
+
$list_text_mode=$list_text_mode.$element_label.' - '.$element."\r\n";
|
| 2165 |
+
}
|
| 2166 |
+
break;
|
| 2167 |
+
}
|
| 2168 |
+
|
| 2169 |
+
case "type_matrix": {
|
| 2170 |
+
$input_type = isset($_POST['wdform_'.$i."_input_type".$id]) ? $_POST['wdform_'.$i."_input_type".$id] : "";
|
| 2171 |
+
$mat_rows = explode("***", isset($_POST['wdform_'.$i."_hidden_row".$id]) ? $_POST['wdform_'.$i."_hidden_row".$id] : "");
|
| 2172 |
+
$rows_count = sizeof($mat_rows) - 1;
|
| 2173 |
+
$mat_columns = explode("***", isset($_POST['wdform_'.$i."_hidden_column".$id]) ? $_POST['wdform_'.$i."_hidden_column".$id] : "");
|
| 2174 |
+
$columns_count = sizeof($mat_columns) - 1;
|
| 2175 |
+
$matrix = "<table>";
|
| 2176 |
+
$matrix .= '<tr><td></td>';
|
| 2177 |
+
for($k = 1; $k < count($mat_columns); $k++) {
|
| 2178 |
+
$matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[$k] . '</td>';
|
| 2179 |
+
}
|
| 2180 |
+
$matrix .= '</tr>';
|
| 2181 |
+
$aaa = Array();
|
| 2182 |
+
for($k = 1; $k <= $rows_count; $k++) {
|
| 2183 |
+
$matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[$k] . '</td>';
|
| 2184 |
+
if($input_type == "radio") {
|
| 2185 |
+
$mat_radio = isset($_POST['wdform_'.$i."_input_element".$id.$k]) ? $_POST['wdform_'.$i."_input_element".$id.$k] : 0;
|
| 2186 |
+
if($mat_radio == 0) {
|
| 2187 |
+
$checked = "";
|
| 2188 |
+
$aaa[1] = "";
|
| 2189 |
+
}
|
| 2190 |
+
else {
|
| 2191 |
+
$aaa = explode("_", $mat_radio);
|
| 2192 |
+
}
|
| 2193 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 2194 |
+
if($aaa[1] == $j) {
|
| 2195 |
+
$checked = "checked";
|
| 2196 |
+
}
|
| 2197 |
+
else {
|
| 2198 |
+
$checked = "";
|
| 2199 |
+
}
|
| 2200 |
+
$matrix .= '<td style="text-align:center"><input type="radio" ' . $checked . ' disabled /></td>';
|
| 2201 |
+
}
|
| 2202 |
+
}
|
| 2203 |
+
else {
|
| 2204 |
+
if($input_type == "checkbox") {
|
| 2205 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 2206 |
+
$checked = isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "";
|
| 2207 |
+
if($checked == 1) {
|
| 2208 |
+
$checked = "checked";
|
| 2209 |
+
}
|
| 2210 |
+
else {
|
| 2211 |
+
$checked = "";
|
| 2212 |
+
}
|
| 2213 |
+
$matrix .= '<td style="text-align:center"><input type="checkbox" ' . $checked . ' disabled /></td>';
|
| 2214 |
+
}
|
| 2215 |
+
}
|
| 2216 |
+
else {
|
| 2217 |
+
if($input_type == "text") {
|
| 2218 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 2219 |
+
$checked = isset($_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_input_element".$id.$k.'_'.$j] : "";
|
| 2220 |
+
$matrix .= '<td style="text-align:center"><input type="text" value="' . $checked . '" disabled /></td>';
|
| 2221 |
+
}
|
| 2222 |
+
}
|
| 2223 |
+
else {
|
| 2224 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 2225 |
+
$checked = isset($_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$i."_select_yes_no".$id.$k.'_'.$j] : "";
|
| 2226 |
+
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
| 2227 |
+
}
|
| 2228 |
+
}
|
| 2229 |
+
}
|
| 2230 |
+
}
|
| 2231 |
+
$matrix .= '</tr>';
|
| 2232 |
+
}
|
| 2233 |
+
$matrix .= '</table>';
|
| 2234 |
+
if(isset($matrix)) {
|
| 2235 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $matrix . '</td></tr>';
|
| 2236 |
+
}
|
| 2237 |
+
break;
|
| 2238 |
+
}
|
| 2239 |
+
default: break;
|
| 2240 |
+
}
|
| 2241 |
+
}
|
| 2242 |
+
}
|
| 2243 |
+
}
|
| 2244 |
+
|
| 2245 |
+
$list = $list . '</table>';
|
| 2246 |
+
if($row->sendemail) {
|
| 2247 |
+
$fromname = $row->mail_from_name_user;
|
| 2248 |
+
if($row->mail_subject_user)
|
| 2249 |
+
$subject = $row->mail_subject_user;
|
| 2250 |
+
else
|
| 2251 |
+
$subject = $row->title;
|
| 2252 |
+
if($row->reply_to_user) {
|
| 2253 |
+
$replyto = $row->reply_to_user;
|
| 2254 |
+
}
|
| 2255 |
+
$attachment_user = array();
|
| 2256 |
+
if ($row->mail_attachment_user) {
|
| 2257 |
+
for ($k = 0; $k < count($all_files); $k++) {
|
| 2258 |
+
if (isset($all_files[$k]['tmp_name'])) {
|
| 2259 |
+
$attachment_user[$k] = $all_files[$k]['tmp_name'];
|
| 2260 |
+
}
|
| 2261 |
+
}
|
| 2262 |
+
}
|
| 2263 |
+
|
| 2264 |
+
if ($row->mail_mode_user) {
|
| 2265 |
+
$content_type = "text/html";
|
| 2266 |
+
$mode = 1;
|
| 2267 |
+
$list_user = wordwrap($list, 70, "\n", true);
|
| 2268 |
+
$new_script = wpautop($row->script_mail_user);
|
| 2269 |
+
}
|
| 2270 |
+
else {
|
| 2271 |
+
$content_type = "text/plain";
|
| 2272 |
+
$mode = 0;
|
| 2273 |
+
$list_user = wordwrap($list_text_mode, 1000, "\n", true);
|
| 2274 |
+
$new_script = str_replace(array('<p>','</p>'),'',$row->script_mail_user);
|
| 2275 |
+
}
|
| 2276 |
+
|
| 2277 |
+
foreach($label_order_original as $key => $label_each) {
|
| 2278 |
+
$type=$label_type[$key];
|
| 2279 |
+
$key1 = $type == 'type_hidden' ? $label_each : $key;
|
| 2280 |
+
if(strpos($row->script_mail_user, "%".$label_each."%")>-1) {
|
| 2281 |
+
$new_value = $this->custom_fields_mail($type, $key1, $id, $attachment_user, '');
|
| 2282 |
+
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
| 2283 |
+
}
|
| 2284 |
+
|
| 2285 |
+
if(strpos($fromname, "%".$label_each."%")>-1) {
|
| 2286 |
+
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id, '', ''));
|
| 2287 |
+
if(substr($new_value, -2)==', ') {
|
| 2288 |
+
$new_value = substr($new_value, 0, -2);
|
| 2289 |
+
}
|
| 2290 |
+
$fromname = str_replace("%".$label_each."%", $new_value, $fromname);
|
| 2291 |
+
}
|
| 2292 |
+
|
| 2293 |
+
if(strpos($subject, "%".$label_each."%")>-1) {
|
| 2294 |
+
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id, '', ''));
|
| 2295 |
+
if(substr($new_value, -2)==', ') {
|
| 2296 |
+
$new_value = substr($new_value, 0, -2);
|
| 2297 |
+
}
|
| 2298 |
+
$subject = str_replace("%".$label_each."%", $new_value, $subject);
|
| 2299 |
+
}
|
| 2300 |
+
}
|
| 2301 |
+
|
| 2302 |
+
$recipient = '';
|
| 2303 |
+
$cca = $row->mail_cc_user;
|
| 2304 |
+
$bcc = $row->mail_bcc_user;
|
| 2305 |
+
if ($row->mail_from_user != '') {
|
| 2306 |
+
if ($fromname != '') {
|
| 2307 |
+
$from = "From: '" . $fromname . "' <" . $row->mail_from_user . ">" . "\r\n";
|
| 2308 |
+
}
|
| 2309 |
+
else {
|
| 2310 |
+
$from = "From: '' <" . $row->mail_from_user . ">" . "\r\n";
|
| 2311 |
+
}
|
| 2312 |
+
}
|
| 2313 |
+
else {
|
| 2314 |
+
$from = '';
|
| 2315 |
+
}
|
| 2316 |
+
|
| 2317 |
+
$headers = $from . " Content-Type: " . $content_type . "; charset=\"" . get_option('blog_charset') . "\"\n";
|
| 2318 |
+
if ($replyto) {
|
| 2319 |
+
$headers .= "Reply-To: <" . $replyto . ">\r\n";
|
| 2320 |
+
}
|
| 2321 |
+
if ($cca) {
|
| 2322 |
+
$headers .= "Cc: <" . $cca . ">\r\n";
|
| 2323 |
+
}
|
| 2324 |
+
if ($bcc) {
|
| 2325 |
+
$headers .= "Bcc: <" . $bcc . ">\r\n";
|
| 2326 |
+
}
|
| 2327 |
+
|
| 2328 |
+
$custom_fields_value = array( $ip, $useremail, $username, $subid, $list_user );
|
| 2329 |
+
foreach($custom_fields as $key=>$custom_field)
|
| 2330 |
+
{
|
| 2331 |
+
if(strpos($new_script, "%".$custom_field."%")>-1)
|
| 2332 |
+
$new_script = str_replace("%".$custom_field."%", $custom_fields_value[$key], $new_script);
|
| 2333 |
+
|
| 2334 |
+
if($key==2 || $key==3)
|
| 2335 |
+
{
|
| 2336 |
+
if(strpos($fromname, "%".$custom_field."%")>-1)
|
| 2337 |
+
$fromname = str_replace("%".$custom_field."%", $custom_fields_value[$key], $fromname);
|
| 2338 |
+
|
| 2339 |
+
if(strpos($subject, "%".$custom_field."%")>-1)
|
| 2340 |
+
$subject = str_replace("%".$custom_field."%", $custom_fields_value[$key], $subject);
|
| 2341 |
+
}
|
| 2342 |
+
}
|
| 2343 |
+
$body = $new_script;
|
| 2344 |
+
$GLOBALS['attachment_user'] = array();
|
| 2345 |
+
$GLOBALS['attachment'] = array();
|
| 2346 |
+
if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))) {
|
| 2347 |
+
$_GET['addon_task'] = 'frontend';
|
| 2348 |
+
$_GET['form_id'] = $id;
|
| 2349 |
+
$_GET['form_currency'] = $form_currency;
|
| 2350 |
+
$GLOBALS['custom_fields_value'] = $custom_fields_value;
|
| 2351 |
+
do_action('WD_FM_PDF_init');
|
| 2352 |
+
}
|
| 2353 |
+
if(!empty($GLOBALS['attachment_user']))
|
| 2354 |
+
array_push($attachment_user, $GLOBALS['attachment_user']);
|
| 2355 |
+
|
| 2356 |
+
if($row->send_to) {
|
| 2357 |
+
$send_tos = explode('**',$row->send_to);
|
| 2358 |
+
$send_copy = isset($_POST["wdform_send_copy_".$id]) ? $_POST["wdform_send_copy_".$id] : NULL;
|
| 2359 |
+
if(isset($send_copy)) {
|
| 2360 |
+
$send=true;
|
| 2361 |
+
}
|
| 2362 |
+
else {
|
| 2363 |
+
$mail_verification_post_id = (int)$wpdb->get_var($wpdb->prepare('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
| 2364 |
+
$verification_link = get_post( $mail_verification_post_id );
|
| 2365 |
+
foreach($send_tos as $index => $send_to) {
|
| 2366 |
+
$recipient = isset($_POST['wdform_'.str_replace('*', '', $send_to)."_element".$id]) ? $_POST['wdform_'.str_replace('*', '', $send_to)."_element".$id] : NULL;
|
| 2367 |
+
if(strpos($new_script, "%Verification link%")>-1 && $verification_link !== NULL) {
|
| 2368 |
+
$ver_link = $row->mail_mode_user ? "<a href =".add_query_arg(array('gid' => $_SESSION['gid'], 'h' => $_SESSION['hash'][$index].'@'.str_replace("*", "", $send_to)), get_post_permalink($mail_verification_post_id)).">".add_query_arg(array('gid' => $_SESSION['gid'], 'h' => $_SESSION['hash'][$index].'@'.str_replace("*", "", $send_to)), get_post_permalink($mail_verification_post_id))."</a><br/>" : add_query_arg(array('gid' => $_SESSION['gid'], 'h' => $_SESSION['hash'][$index].'@'.str_replace("*", "", $send_to)), get_post_permalink($mail_verification_post_id));
|
| 2369 |
+
|
| 2370 |
+
$body = $row->mail_verify ? str_replace("%Verification link%", $ver_link, $new_script) : str_replace("%Verification link%", '', $new_script);
|
| 2371 |
+
}
|
| 2372 |
+
|
| 2373 |
+
if($recipient) {
|
| 2374 |
+
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment_user);
|
| 2375 |
+
}
|
| 2376 |
+
}
|
| 2377 |
+
}
|
| 2378 |
+
}
|
| 2379 |
+
}
|
| 2380 |
+
|
| 2381 |
+
if($row->sendemail) {
|
| 2382 |
+
if($row->reply_to) {
|
| 2383 |
+
$replyto = isset($_POST['wdform_'.$row->reply_to."_element".$id]) ? $_POST['wdform_'.$row->reply_to."_element".$id] : NULL;
|
| 2384 |
+
if(!isset($replyto)) {
|
| 2385 |
+
$replyto = $row->reply_to;
|
| 2386 |
+
}
|
| 2387 |
+
}
|
| 2388 |
+
$recipient = $row->mail;
|
| 2389 |
+
if($row->mail_subject) {
|
| 2390 |
+
$subject = $row->mail_subject;
|
| 2391 |
+
}
|
| 2392 |
+
else {
|
| 2393 |
+
$subject = $row->title;
|
| 2394 |
+
}
|
| 2395 |
+
|
| 2396 |
+
if ($row->from_name) {
|
| 2397 |
+
$fromname = $row->from_name;
|
| 2398 |
+
}
|
| 2399 |
+
else {
|
| 2400 |
+
$fromname = '';
|
| 2401 |
+
}
|
| 2402 |
+
$attachment = array();
|
| 2403 |
+
if ($row->mail_attachment) {
|
| 2404 |
+
for ($k = 0; $k < count($all_files); $k++) {
|
| 2405 |
+
if (isset($all_files[$k]['tmp_name'])) {
|
| 2406 |
+
$attachment[$k] = $all_files[$k]['tmp_name'];
|
| 2407 |
+
}
|
| 2408 |
+
}
|
| 2409 |
+
}
|
| 2410 |
+
if(!empty($GLOBALS['attachment']))
|
| 2411 |
+
array_push($attachment, $GLOBALS['attachment']);
|
| 2412 |
+
|
| 2413 |
+
|
| 2414 |
+
if ($row->mail_mode) {
|
| 2415 |
+
$content_type = "text/html";
|
| 2416 |
+
$mode = 1;
|
| 2417 |
+
$list = wordwrap($list, 70, "\n", true);
|
| 2418 |
+
$new_script = wpautop($row->script_mail);
|
| 2419 |
+
}
|
| 2420 |
+
else {
|
| 2421 |
+
$content_type = "text/plain";
|
| 2422 |
+
$mode = 0;
|
| 2423 |
+
$list = $list_text_mode;
|
| 2424 |
+
$list = wordwrap($list, 1000, "\n", true);
|
| 2425 |
+
$new_script = str_replace(array('<p>','</p>'),'',$row->script_mail);
|
| 2426 |
+
}
|
| 2427 |
+
|
| 2428 |
+
foreach($label_order_original as $key => $label_each) {
|
| 2429 |
+
$type=$label_type[$key];
|
| 2430 |
+
$key1 = $type == 'type_hidden' ? $label_each : $key;
|
| 2431 |
+
if(strpos($row->script_mail, "%".$label_each."%")>-1) {
|
| 2432 |
+
$new_value = $this->custom_fields_mail($type, $key1, $id, $attachment, '');
|
| 2433 |
+
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
| 2434 |
+
}
|
| 2435 |
+
|
| 2436 |
+
if(strpos($fromname, "%".$label_each."%")>-1) {
|
| 2437 |
+
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id, '', ''));
|
| 2438 |
+
if(substr($new_value, -2)==', ') {
|
| 2439 |
+
$new_value = substr($new_value, 0, -2);
|
| 2440 |
+
}
|
| 2441 |
+
$fromname = str_replace("%".$label_each."%", $new_value, $fromname);
|
| 2442 |
+
}
|
| 2443 |
+
|
| 2444 |
+
if(strpos($fromname, "%username%")>-1){
|
| 2445 |
+
$fromname = str_replace("%username%", $username, $fromname);
|
| 2446 |
+
}
|
| 2447 |
+
|
| 2448 |
+
if(strpos($subject, "%".$label_each."%")>-1) {
|
| 2449 |
+
$new_value = str_replace('<br>',', ',$this->custom_fields_mail($type, $key, $id, '', ''));
|
| 2450 |
+
if(substr($new_value, -2)==', ') {
|
| 2451 |
+
$new_value = substr($new_value, 0, -2);
|
| 2452 |
+
}
|
| 2453 |
+
$subject = str_replace("%".$label_each."%", $new_value, $subject);
|
| 2454 |
+
}
|
| 2455 |
+
}
|
| 2456 |
+
|
| 2457 |
+
if ($row->from_mail) {
|
| 2458 |
+
$from = isset($_POST['wdform_'.$row->from_mail."_element".$id]) ? $_POST['wdform_'.$row->from_mail."_element".$id] : NULL;
|
| 2459 |
+
if (!isset($from)) {
|
| 2460 |
+
$from = $row->from_mail;
|
| 2461 |
+
}
|
| 2462 |
+
$from = "From: '" . $fromname . "' <" . $from . ">" . "\r\n";
|
| 2463 |
+
}
|
| 2464 |
+
else {
|
| 2465 |
+
$from = "";
|
| 2466 |
+
}
|
| 2467 |
+
|
| 2468 |
+
$headers = $from . " Content-Type: " . $content_type . "; charset=\"" . get_option('blog_charset') . "\"\n";
|
| 2469 |
+
if ($replyto) {
|
| 2470 |
+
$headers .= "Reply-To: <" . $replyto . ">\r\n";
|
| 2471 |
+
}
|
| 2472 |
+
$cca = $row->mail_cc;
|
| 2473 |
+
$bcc = $row->mail_bcc;
|
| 2474 |
+
if ($cca) {
|
| 2475 |
+
$headers .= "Cc: <" . $cca . ">\r\n";
|
| 2476 |
+
}
|
| 2477 |
+
if ($bcc) {
|
| 2478 |
+
$headers .= "Bcc: <" . $bcc . ">\r\n";
|
| 2479 |
+
}
|
| 2480 |
+
|
| 2481 |
+
$custom_fields_value = array( $ip, $useremail, $username, $subid, $list );
|
| 2482 |
+
foreach($custom_fields as $key=>$custom_field)
|
| 2483 |
+
{
|
| 2484 |
+
if(strpos($new_script, "%".$custom_field."%")>-1)
|
| 2485 |
+
$new_script = str_replace("%".$custom_field."%", $custom_fields_value[$key], $new_script);
|
| 2486 |
+
|
| 2487 |
+
if($key==2 || $key==3)
|
| 2488 |
+
{
|
| 2489 |
+
if(strpos($fromname, "%".$custom_field."%")>-1)
|
| 2490 |
+
$fromname = str_replace("%".$custom_field."%", $custom_fields_value[$key], $fromname);
|
| 2491 |
+
|
| 2492 |
+
if(strpos($subject, "%".$custom_field."%")>-1)
|
| 2493 |
+
$subject = str_replace("%".$custom_field."%", $custom_fields_value[$key], $subject);
|
| 2494 |
+
}
|
| 2495 |
+
}
|
| 2496 |
+
$admin_body = $new_script;
|
| 2497 |
+
if($recipient) {
|
| 2498 |
+
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($admin_body), $headers, $attachment);
|
| 2499 |
+
}
|
| 2500 |
+
}
|
| 2501 |
+
|
| 2502 |
+
$_SESSION['error_or_no' . $id] = 0;
|
| 2503 |
+
$msg = addslashes(__('Your form was successfully submitted.', 'form_maker'));
|
| 2504 |
+
$succes = 1;
|
| 2505 |
+
|
| 2506 |
+
if($row->sendemail)
|
| 2507 |
+
if($row->mail || $row->send_to) {
|
| 2508 |
+
if ($send) {
|
| 2509 |
+
if ($send !== true ) {
|
| 2510 |
+
$_SESSION['error_or_no' . $id] = 1;
|
| 2511 |
+
$msg = addslashes(__('Error, email was not sent.', 'form_maker'));
|
| 2512 |
+
$succes = 0;
|
| 2513 |
+
}
|
| 2514 |
+
else {
|
| 2515 |
+
$_SESSION['error_or_no' . $id] = 0;
|
| 2516 |
+
$msg = addslashes(__('Your form was successfully submitted.', 'form_maker'));
|
| 2517 |
+
}
|
| 2518 |
+
}
|
| 2519 |
+
}
|
| 2520 |
+
|
| 2521 |
+
$fm_email_params = $row->sendemail ? array('admin_body' => $admin_body, 'body' => $body, 'subject' => $subject, 'headers' => $headers, 'attachment' => $attachment, 'attachment_user' => $attachment_user) : array();
|
| 2522 |
+
|
| 2523 |
+
$addons = array('WD_FM_EMAIL_COND' => 'Email Conditions');
|
| 2524 |
+
$addons_array = array();
|
| 2525 |
+
foreach($addons as $addon => $addon_name) {
|
| 2526 |
+
if (defined($addon) && is_plugin_active(constant($addon))) {
|
| 2527 |
+
$_GET['addon_task'] = 'frontend';
|
| 2528 |
+
$_GET['form_id'] = $id;
|
| 2529 |
+
$GLOBALS['fm_email_params'] = $fm_email_params;
|
| 2530 |
+
$GLOBALS['form_currency'] = $form_currency;
|
| 2531 |
+
$GLOBALS['custom_fields_value'] = isset($custom_fields_value) ? $custom_fields_value : array();
|
| 2532 |
+
do_action($addon.'_init');
|
| 2533 |
+
}
|
| 2534 |
+
}
|
| 2535 |
+
}
|
| 2536 |
+
else { /* Old form.*/
|
| 2537 |
+
foreach ($label_order_ids as $key => $label_order_id) {
|
| 2538 |
+
$i = $label_order_id;
|
| 2539 |
+
$type = $_POST[$i . "_type" . $id];
|
| 2540 |
+
if (isset($_POST[$i . "_type" . $id]))
|
| 2541 |
+
if ($type != "type_map" and $type != "type_submit_reset" and $type != "type_editor" and $type != "type_captcha" and $type != "type_arithmetic_captcha" and $type != "type_recaptcha" and $type != "type_button") {
|
| 2542 |
+
$element_label = $label_order_original[$i];
|
| 2543 |
+
switch ($type) {
|
| 2544 |
+
case 'type_text':
|
| 2545 |
+
case 'type_password':
|
| 2546 |
+
case 'type_textarea':
|
| 2547 |
+
case "type_date":
|
| 2548 |
+
case "type_own_select":
|
| 2549 |
+
case "type_country":
|
| 2550 |
+
case "type_number":
|
| 2551 |
+
{
|
| 2552 |
+
$element = $_POST[$i . "_element" . $id];
|
| 2553 |
+
if (isset($_POST[$i . "_element" . $id])) {
|
| 2554 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
| 2555 |
+
}
|
| 2556 |
+
break;
|
| 2557 |
+
}
|
| 2558 |
+
case "type_hidden": {
|
| 2559 |
+
$element = $_POST[$element_label];
|
| 2560 |
+
if (isset($element)) {
|
| 2561 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
| 2562 |
+
}
|
| 2563 |
+
break;
|
| 2564 |
+
}
|
| 2565 |
+
case "type_submitter_mail":
|
| 2566 |
+
{
|
| 2567 |
+
$element = $_POST[$i . "_element" . $id];
|
| 2568 |
+
if (isset($_POST[$i . "_element" . $id])) {
|
| 2569 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
| 2570 |
+
if ($_POST[$i . "_send" . $id] == "yes")
|
| 2571 |
+
array_push($cc, $element);
|
| 2572 |
+
}
|
| 2573 |
+
break;
|
| 2574 |
+
}
|
| 2575 |
+
case "type_time":
|
| 2576 |
+
{
|
| 2577 |
+
$hh = $_POST[$i . "_hh" . $id];
|
| 2578 |
+
if (isset($_POST[$i . "_hh" . $id])) {
|
| 2579 |
+
$ss = $_POST[$i . "_ss" . $id];
|
| 2580 |
+
if (isset($_POST[$i . "_ss" . $id]))
|
| 2581 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $_POST[$i . "_hh" . $id] . ':' . $_POST[$i . "_mm" . $id] . ':' . $_POST[$i . "_ss" . $id];
|
| 2582 |
+
else
|
| 2583 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $_POST[$i . "_hh" . $id] . ':' . $_POST[$i . "_mm" . $id];
|
| 2584 |
+
$am_pm = $_POST[$i . "_am_pm" . $id];
|
| 2585 |
+
if (isset($_POST[$i . "_am_pm" . $id]))
|
| 2586 |
+
$list = $list . ' ' . $_POST[$i . "_am_pm" . $id] . '</td></tr>';
|
| 2587 |
+
else
|
| 2588 |
+
$list = $list . '</td></tr>';
|
| 2589 |
+
}
|
| 2590 |
+
break;
|
| 2591 |
+
}
|
| 2592 |
+
case "type_phone":
|
| 2593 |
+
{
|
| 2594 |
+
$element_first = $_POST[$i . "_element_first" . $id];
|
| 2595 |
+
if (isset($_POST[$i . "_element_first" . $id])) {
|
| 2596 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $_POST[$i . "_element_first" . $id] . ' ' . $_POST[$i . "_element_last" . $id] . '</td></tr>';
|
| 2597 |
+
}
|
| 2598 |
+
break;
|
| 2599 |
+
}
|
| 2600 |
+
case "type_name":
|
| 2601 |
+
{
|
| 2602 |
+
$element_first = $_POST[$i . "_element_first" . $id];
|
| 2603 |
+
if (isset($_POST[$i . "_element_first" . $id])) {
|
| 2604 |
+
$element_title = $_POST[$i . "_element_title" . $id];
|
| 2605 |
+
if (isset($_POST[$i . "_element_title" . $id]))
|
| 2606 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $_POST[$i . "_element_title" . $id] . ' ' . $_POST[$i . "_element_first" . $id] . ' ' . $_POST[$i . "_element_last" . $id] . ' ' . $_POST[$i . "_element_middle" . $id] . '</td></tr>';
|
| 2607 |
+
else
|
| 2608 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $_POST[$i . "_element_first" . $id] . ' ' . $_POST[$i . "_element_last" . $id] . '</td></tr>';
|
| 2609 |
+
}
|
| 2610 |
+
break;
|
| 2611 |
+
}
|
| 2612 |
+
case "type_mark_map":
|
| 2613 |
+
{
|
| 2614 |
+
if (isset($_POST[$i . "_long" . $id])) {
|
| 2615 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >Longitude:' . $_POST[$i . "_long" . $id] . '<br/>Latitude:' . $_POST[$i . "_lat" . $id] . '</td></tr>';
|
| 2616 |
+
}
|
| 2617 |
+
break;
|
| 2618 |
+
}
|
| 2619 |
+
case "type_address":
|
| 2620 |
+
{
|
| 2621 |
+
if (isset($_POST[$i . "_street1" . $id]))
|
| 2622 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_street1" . $id] . '</td></tr>';
|
| 2623 |
+
$i++;
|
| 2624 |
+
if (isset($_POST[$i."_street2".$id]))
|
| 2625 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_street2" . $id] . '</td></tr>';
|
| 2626 |
+
$i++;
|
| 2627 |
+
if (isset($_POST[$i."_city".$id]))
|
| 2628 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_city" . $id] . '</td></tr>';
|
| 2629 |
+
$i++;
|
| 2630 |
+
if (isset($_POST[$i."_state".$id]))
|
| 2631 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_state" . $id] . '</td></tr>';
|
| 2632 |
+
$i++;
|
| 2633 |
+
if (isset($_POST[$i."_postal".$id]))
|
| 2634 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_postal" . $id] . '</td></tr>';
|
| 2635 |
+
$i++;
|
| 2636 |
+
if (isset($_POST[$i."_country".$id]))
|
| 2637 |
+
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_country" . $id] . '</td></tr>';
|
| 2638 |
+
$i++;
|
| 2639 |
+
break;
|
| 2640 |
+
}
|
| 2641 |
+
case "type_date_fields":
|
| 2642 |
+
{
|
| 2643 |
+
$day = $_POST[$i . "_day" . $id];
|
| 2644 |
+
if (isset($_POST[$i . "_day" . $id])) {
|
| 2645 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $_POST[$i . "_day" . $id] . '-' . $_POST[$i . "_month" . $id] . '-' . $_POST[$i . "_year" . $id] . '</td></tr>';
|
| 2646 |
+
}
|
| 2647 |
+
break;
|
| 2648 |
+
}
|
| 2649 |
+
case "type_radio":
|
| 2650 |
+
{
|
| 2651 |
+
$element = $_POST[$i . "_other_input" . $id];
|
| 2652 |
+
if (isset($_POST[$i . "_other_input" . $id])) {
|
| 2653 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $_POST[$i . "_other_input" . $id] . '</td></tr>';
|
| 2654 |
+
break;
|
| 2655 |
+
}
|
| 2656 |
+
$element = $_POST[$i . "_element" . $id];
|
| 2657 |
+
if (isset($_POST[$i . "_element" . $id])) {
|
| 2658 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td ><pre style="margin:0px; padding:0px">' . $element . '</pre></td></tr>';
|
| 2659 |
+
}
|
| 2660 |
+
break;
|
| 2661 |
+
}
|
| 2662 |
+
case "type_checkbox":
|
| 2663 |
+
{
|
| 2664 |
+
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
|
| 2665 |
+
$start = -1;
|
| 2666 |
+
for ($j = 0; $j < 100; $j++) {
|
| 2667 |
+
if (isset($_POST[$i . "_element" . $id . $j])) {
|
| 2668 |
+
$start = $j;
|
| 2669 |
+
break;
|
| 2670 |
+
}
|
| 2671 |
+
}
|
| 2672 |
+
$other_element_id = -1;
|
| 2673 |
+
$is_other = $_POST[$i . "_allow_other" . $id];
|
| 2674 |
+
if ($is_other == "yes") {
|
| 2675 |
+
$other_element_id = $_POST[$i . "_allow_other_num" . $id];
|
| 2676 |
+
}
|
| 2677 |
+
if ($start != -1) {
|
| 2678 |
+
for ($j = $start; $j < 100; $j++) {
|
| 2679 |
+
$element = $_POST[$i . "_element" . $id . $j];
|
| 2680 |
+
if (isset($_POST[$i . "_element" . $id . $j]))
|
| 2681 |
+
if ($j == $other_element_id) {
|
| 2682 |
+
$list = $list . $_POST[$i . "_other_input" . $id] . '<br>';
|
| 2683 |
+
}
|
| 2684 |
+
else
|
| 2685 |
+
$list = $list . $_POST[$i . "_element" . $id . $j] . '<br>';
|
| 2686 |
+
}
|
| 2687 |
+
$list = $list . '</td></tr>';
|
| 2688 |
+
}
|
| 2689 |
+
break;
|
| 2690 |
+
}
|
| 2691 |
+
case "type_paypal_price": {
|
| 2692 |
+
$value = 0;
|
| 2693 |
+
if ($_POST[$i."_element_dollars".$id]) {
|
| 2694 |
+
$value = $_POST[$i."_element_dollars".$id];
|
| 2695 |
+
}
|
| 2696 |
+
if ($_POST[$i."_element_cents".$id]) {
|
| 2697 |
+
$value = $value.'.'.$_POST[$i."_element_cents".$id];
|
| 2698 |
+
}
|
| 2699 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td >'.$value.$form_currency.'</td></tr>';
|
| 2700 |
+
break;
|
| 2701 |
+
}
|
| 2702 |
+
case "type_paypal_select": {
|
| 2703 |
+
$value = $_POST[$i."_element_label".$id].':'.$_POST[$i."_element".$id].$form_currency;
|
| 2704 |
+
$element_quantity_label = $_POST[$i."_element_quantity_label".$id];
|
| 2705 |
+
if (isset($element_quantity_label)) {
|
| 2706 |
+
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 2707 |
+
$value .= '<br/>'.$_POST[$i."_element_quantity_label".$id].': '.$quantity;
|
| 2708 |
+
}
|
| 2709 |
+
for ($k = 0; $k < 50; $k++) {
|
| 2710 |
+
$temp_val = $_POST[$i."_element_property_value".$id.$k];
|
| 2711 |
+
if (isset($temp_val)) {
|
| 2712 |
+
$value .= '<br/>'.$_POST[$i."_element_property_label".$id.$k].': '.$_POST[$i."_element_property_value".$id.$k];
|
| 2713 |
+
}
|
| 2714 |
+
}
|
| 2715 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">'.$value.'</pre></td></tr>';
|
| 2716 |
+
break;
|
| 2717 |
+
}
|
| 2718 |
+
case "type_paypal_radio": {
|
| 2719 |
+
$value = $_POST[$i."_element_label".$id].' - '.$_POST[$i."_element".$id].$form_currency;
|
| 2720 |
+
$element_quantity_label = $_POST[$i."_element_quantity_label".$id];
|
| 2721 |
+
if (isset($element_quantity_label)) {
|
| 2722 |
+
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 2723 |
+
$value .= '<br/>' . $_POST[$i."_element_quantity_label".$id] . ': ' . $quantity;
|
| 2724 |
+
}
|
| 2725 |
+
for ($k = 0; $k < 50; $k++) {
|
| 2726 |
+
$temp_val = $_POST[$i."_element_property_value".$id.$k];
|
| 2727 |
+
if (isset($temp_val)) {
|
| 2728 |
+
$value .= '<br/>'.$_POST[$i."_element_property_label".$id.$k].': '.$_POST[$i."_element_property_value".$id.$k];
|
| 2729 |
+
}
|
| 2730 |
+
}
|
| 2731 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">'.$value.'</pre></td></tr>';
|
| 2732 |
+
break;
|
| 2733 |
+
}
|
| 2734 |
+
case "type_paypal_shipping": {
|
| 2735 |
+
$value = $_POST[$i."_element_label".$id].' - '.$_POST[$i."_element".$id].$form_currency;
|
| 2736 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">'.$value.'</pre></td></tr>';
|
| 2737 |
+
break;
|
| 2738 |
+
}
|
| 2739 |
+
case "type_paypal_checkbox": {
|
| 2740 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td >';
|
| 2741 |
+
$start = -1;
|
| 2742 |
+
for ($j = 0; $j < 100; $j++) {
|
| 2743 |
+
$element = $_POST[$i."_element".$id.$j];
|
| 2744 |
+
if (isset($element)) {
|
| 2745 |
+
$start = $j;
|
| 2746 |
+
break;
|
| 2747 |
+
}
|
| 2748 |
+
}
|
| 2749 |
+
if ($start != -1) {
|
| 2750 |
+
for ($j = $start; $j < 100; $j++) {
|
| 2751 |
+
$element = $_POST[$i."_element".$id.$j];
|
| 2752 |
+
if (isset($element)) {
|
| 2753 |
+
$list = $list.$_POST[$i."_element".$id.$j."_label"].' - '.($_POST[$i."_element".$id.$j]=='' ? '0'.$form_currency : $_POST[$i."_element".$id.$j]).$form_currency.'<br>';
|
| 2754 |
+
}
|
| 2755 |
+
}
|
| 2756 |
+
}
|
| 2757 |
+
$element_quantity_label = $_POST[$i."_element_quantity_label".$id];
|
| 2758 |
+
if (isset($element_quantity_label)) {
|
| 2759 |
+
$quantity = ((isset($_POST[$i . "_element_quantity" . $id]) && ($_POST[$i . "_element_quantity" . $id] >= 1)) ? $_POST[$i . "_element_quantity" . $id] : 1);
|
| 2760 |
+
$list = $list.'<br/>'.$_POST[$i."_element_quantity_label".$id].': '.$quantity;
|
| 2761 |
+
}
|
| 2762 |
+
for ($k = 0; $k < 50; $k++) {
|
| 2763 |
+
$temp_val = $_POST[$i."_element_property_value".$id.$k];
|
| 2764 |
+
if (isset($temp_val)) {
|
| 2765 |
+
$list = $list.'<br/>'.$_POST[$i."_element_property_label".$id.$k].': '.$_POST[$i."_element_property_value".$id.$k];
|
| 2766 |
+
}
|
| 2767 |
+
}
|
| 2768 |
+
$list = $list.'</td></tr>';
|
| 2769 |
+
break;
|
| 2770 |
+
}
|
| 2771 |
+
case "type_star_rating": {
|
| 2772 |
+
$selected = (isset($_POST[$i."_selected_star_amount".$id]) ? $_POST[$i."_selected_star_amount".$id] : 0);
|
| 2773 |
+
if (isset($_POST[$i."_star_amount".$id])) {
|
| 2774 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">'.$selected.'/'.$_POST[$i."_star_amount".$id].'</pre></td></tr>';
|
| 2775 |
+
}
|
| 2776 |
+
break;
|
| 2777 |
+
}
|
| 2778 |
+
case "type_scale_rating": {
|
| 2779 |
+
$selected = (isset($_POST[$i."_scale_radio".$id]) ? $_POST[$i."_scale_radio".$id] : 0);
|
| 2780 |
+
if (isset($_POST[$i."_scale_amount".$id])) {
|
| 2781 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">'.$selected.'/'.$_POST[$i."_scale_radio".$id].'</pre></td></tr>';
|
| 2782 |
+
}
|
| 2783 |
+
break;
|
| 2784 |
+
}
|
| 2785 |
+
case "type_spinner": {
|
| 2786 |
+
if (isset($_POST[$i."_element".$id])) {
|
| 2787 |
+
$list=$list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">'.$_POST[$i."_element".$id].'</pre></td></tr>';
|
| 2788 |
+
}
|
| 2789 |
+
break;
|
| 2790 |
+
}
|
| 2791 |
+
case "type_slider": {
|
| 2792 |
+
if (isset($_POST[$i."_slider_value".$id])) {
|
| 2793 |
+
$list=$list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">'.$_POST[$i."_slider_value".$id].'</pre></td></tr>';
|
| 2794 |
+
}
|
| 2795 |
+
break;
|
| 2796 |
+
}
|
| 2797 |
+
case "type_range": {
|
| 2798 |
+
if(isset($_POST[$i."_element".$id.'0']) || isset($_POST[$i."_element".$id.'1'])) {
|
| 2799 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">From:'.$_POST[$i."_element".$id.'0'].'<span style="margin-left:6px">To</span>:'.$_POST[$i."_element".$id.'1'].'</pre></td></tr>';
|
| 2800 |
+
}
|
| 2801 |
+
break;
|
| 2802 |
+
}
|
| 2803 |
+
case "type_grading": {
|
| 2804 |
+
if (isset($_POST[$i."_hidden_item".$id])) {
|
| 2805 |
+
$element = $_POST[$i."_hidden_item".$id];
|
| 2806 |
+
$grading = explode(":", $element);
|
| 2807 |
+
$items_count = sizeof($grading) - 1;
|
| 2808 |
+
$total = "";
|
| 2809 |
+
for ($k = 0; $k < $items_count; $k++) {
|
| 2810 |
+
if (isset($_POST[$i."_element".$id.$k])) {
|
| 2811 |
+
$element .= $grading[$k].":".$_POST[$i."_element".$id.$k]." ";
|
| 2812 |
+
$total += $_POST[$i."_element".$id.$k];
|
| 2813 |
+
}
|
| 2814 |
+
}
|
| 2815 |
+
$element .= "Total:".$total;
|
| 2816 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">'.$element.'</pre></td></tr>';
|
| 2817 |
+
}
|
| 2818 |
+
break;
|
| 2819 |
+
}
|
| 2820 |
+
case "type_matrix": {
|
| 2821 |
+
$input_type=$_POST[$i."_input_type".$id];
|
| 2822 |
+
$mat_rows = $_POST[$i."_hidden_row".$id];
|
| 2823 |
+
$mat_rows = explode('***', $mat_rows);
|
| 2824 |
+
$mat_rows = array_slice($mat_rows,0, count($mat_rows)-1);
|
| 2825 |
+
$mat_columns = $_POST[$i."_hidden_column".$id];
|
| 2826 |
+
$mat_columns = explode('***', $mat_columns);
|
| 2827 |
+
$mat_columns = array_slice($mat_columns,0, count($mat_columns)-1);
|
| 2828 |
+
$row_ids=explode(",",substr($_POST[$i."_row_ids".$id], 0, -1));
|
| 2829 |
+
$column_ids=explode(",",substr($_POST[$i."_column_ids".$id], 0, -1));
|
| 2830 |
+
$matrix = "<table>";
|
| 2831 |
+
$matrix .= '<tr><td></td>';
|
| 2832 |
+
for ($k = 0; $k < count($mat_columns); $k++) {
|
| 2833 |
+
$matrix .='<td style="background-color:#BBBBBB; padding:5px; ">'.$mat_columns[$k].'</td>';
|
| 2834 |
+
}
|
| 2835 |
+
$matrix .= '</tr>';
|
| 2836 |
+
$aaa = Array();
|
| 2837 |
+
$k = 0;
|
| 2838 |
+
foreach ($row_ids as $row_id) {
|
| 2839 |
+
$matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">'.$mat_rows[$k].'</td>';
|
| 2840 |
+
if ($input_type=="radio") {
|
| 2841 |
+
$mat_radio = (isset($_POST[$i."_input_element".$id.$row_id]) ? $_POST[$i."_input_element".$id.$row_id] : 0);
|
| 2842 |
+
if ($mat_radio == 0) {
|
| 2843 |
+
$checked = "";
|
| 2844 |
+
$aaa[1] = "";
|
| 2845 |
+
}
|
| 2846 |
+
else {
|
| 2847 |
+
$aaa = explode("_", $mat_radio);
|
| 2848 |
+
}
|
| 2849 |
+
foreach ($column_ids as $column_id) {
|
| 2850 |
+
if ($aaa[1] == $column_id) {
|
| 2851 |
+
$checked = "checked";
|
| 2852 |
+
}
|
| 2853 |
+
else {
|
| 2854 |
+
$checked = "";
|
| 2855 |
+
}
|
| 2856 |
+
$matrix .= '<td style="text-align:center"><input type="radio" '.$checked.' disabled /></td>';
|
| 2857 |
+
}
|
| 2858 |
+
}
|
| 2859 |
+
else {
|
| 2860 |
+
if ($input_type=="checkbox") {
|
| 2861 |
+
foreach($column_ids as $column_id) {
|
| 2862 |
+
$checked = $_POST[$i."_input_element".$id.$row_id.'_'.$column_id];
|
| 2863 |
+
if ($checked == 1) {
|
| 2864 |
+
$checked = "checked";
|
| 2865 |
+
}
|
| 2866 |
+
else {
|
| 2867 |
+
$checked = "";
|
| 2868 |
+
}
|
| 2869 |
+
$matrix .= '<td style="text-align:center"><input type="checkbox" '.$checked.' disabled /></td>';
|
| 2870 |
+
}
|
| 2871 |
+
}
|
| 2872 |
+
else {
|
| 2873 |
+
if ($input_type=="text") {
|
| 2874 |
+
foreach ($column_ids as $column_id) {
|
| 2875 |
+
$checked = $_POST[$i."_input_element".$id.$row_id.'_'.$column_id];
|
| 2876 |
+
$matrix .='<td style="text-align:center"><input type="text" value="'.$checked.'" disabled /></td>';
|
| 2877 |
+
}
|
| 2878 |
+
}
|
| 2879 |
+
else {
|
| 2880 |
+
foreach ($column_ids as $column_id) {
|
| 2881 |
+
$checked = $_POST[$i."_select_yes_no".$id.$row_id.'_'.$column_id];
|
| 2882 |
+
$matrix .='<td style="text-align:center">'.$checked.'</td>';
|
| 2883 |
+
}
|
| 2884 |
+
}
|
| 2885 |
+
}
|
| 2886 |
+
}
|
| 2887 |
+
$matrix .= '</tr>';
|
| 2888 |
+
$k++;
|
| 2889 |
+
}
|
| 2890 |
+
$matrix .= '</table>';
|
| 2891 |
+
if (isset($matrix)) {
|
| 2892 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="margin:0px; padding:0px">'.$matrix.'</pre></td></tr>';
|
| 2893 |
+
}
|
| 2894 |
+
break;
|
| 2895 |
+
}
|
| 2896 |
+
default:
|
| 2897 |
+
break;
|
| 2898 |
+
}
|
| 2899 |
+
}
|
| 2900 |
+
}
|
| 2901 |
+
$list = $list . '</table>';
|
| 2902 |
+
$list = wordwrap($list, 70, "\n", TRUE);
|
| 2903 |
+
// add_filter('wp_mail_content_type', create_function('', 'return "text/html";'));
|
| 2904 |
+
if ($row->from_mail != '') {
|
| 2905 |
+
if ($row->from_name != '') {
|
| 2906 |
+
$from_mail = "From: '" . $row->from_name . "' <" . $row->from_mail . ">" . "\r\n";
|
| 2907 |
+
}
|
| 2908 |
+
else {
|
| 2909 |
+
$from_mail = "From: '' <" . $row->from_mail . ">" . "\r\n";
|
| 2910 |
+
}
|
| 2911 |
+
}
|
| 2912 |
+
else {
|
| 2913 |
+
$from_mail = '';
|
| 2914 |
+
}
|
| 2915 |
+
$headers = $from_mail . " Content-Type: text/html; charset=\"" . get_option('blog_charset') . "\"\n";
|
| 2916 |
+
for ($k = 0; $k < count($all_files); $k++) {
|
| 2917 |
+
// $attachment[$k] = dirname(__FILE__) . '/uploads/' . $all_files[$k]['name'];
|
| 2918 |
+
$attachment[$k]= $all_files[$k]['name'];
|
| 2919 |
+
}
|
| 2920 |
+
if (isset($cc[0])) {
|
| 2921 |
+
foreach ($cc as $c) {
|
| 2922 |
+
if ($c) {
|
| 2923 |
+
$recipient = $c;
|
| 2924 |
+
$subject = $row->title;
|
| 2925 |
+
$new_script = wpautop($row->script_mail_user);
|
| 2926 |
+
foreach ($label_order_original as $key => $label_each) {
|
| 2927 |
+
if (strpos($row->script_mail_user, "%" . $label_each . "%") !== FALSE) {
|
| 2928 |
+
$type = $label_type[$key];
|
| 2929 |
+
if ($type != "type_submit_reset" or $type != "type_map" or $type != "type_editor" or $type != "type_captcha" or $type != "type_arithmetic_captcha" or $type != "type_recaptcha" or $type != "type_button") {
|
| 2930 |
+
$new_value = "";
|
| 2931 |
+
switch ($type) {
|
| 2932 |
+
case 'type_text':
|
| 2933 |
+
case 'type_password':
|
| 2934 |
+
case 'type_textarea':
|
| 2935 |
+
case "type_date":
|
| 2936 |
+
case "type_own_select":
|
| 2937 |
+
case "type_country":
|
| 2938 |
+
case "type_number": {
|
| 2939 |
+
$element = $_POST[$key."_element".$id];
|
| 2940 |
+
if (isset($element)) {
|
| 2941 |
+
$new_value = $element;
|
| 2942 |
+
}
|
| 2943 |
+
break;
|
| 2944 |
+
}
|
| 2945 |
+
case "type_hidden": {
|
| 2946 |
+
$element = $_POST[$element_label];
|
| 2947 |
+
if (isset($element)) {
|
| 2948 |
+
$new_value = $element;
|
| 2949 |
+
}
|
| 2950 |
+
break;
|
| 2951 |
+
}
|
| 2952 |
+
case "type_mark_map": {
|
| 2953 |
+
$element = $_POST[$key."_long".$id];
|
| 2954 |
+
if (isset($element)) {
|
| 2955 |
+
$new_value = 'Longitude:'.$_POST[$key."_long".$id].'<br/>Latitude:' . $_POST[$key."_lat".$id];
|
| 2956 |
+
}
|
| 2957 |
+
break;
|
| 2958 |
+
}
|
| 2959 |
+
case "type_submitter_mail": {
|
| 2960 |
+
$element = $_POST[$key."_element".$id];
|
| 2961 |
+
if (isset($element)) {
|
| 2962 |
+
$new_value = $element;
|
| 2963 |
+
}
|
| 2964 |
+
break;
|
| 2965 |
+
}
|
| 2966 |
+
case "type_time": {
|
| 2967 |
+
$hh = $_POST[$key."_hh".$id];
|
| 2968 |
+
if (isset($hh)) {
|
| 2969 |
+
$ss = $_POST[$key."_ss".$id];
|
| 2970 |
+
if (isset($ss)) {
|
| 2971 |
+
$new_value = $_POST[$key."_hh".$id].':'.$_POST[$key."_mm".$id].':'.$_POST[$key."_ss".$id];
|
| 2972 |
+
}
|
| 2973 |
+
else {
|
| 2974 |
+
$new_value = $_POST[$key."_hh".$id].':'.$_POST[$key."_mm".$id];
|
| 2975 |
+
}
|
| 2976 |
+
$am_pm = $_POST[$key."_am_pm".$id];
|
| 2977 |
+
if (isset($am_pm)) {
|
| 2978 |
+
$new_value = $new_value.' '.$_POST[$key."_am_pm".$id];
|
| 2979 |
+
}
|
| 2980 |
+
}
|
| 2981 |
+
break;
|
| 2982 |
+
}
|
| 2983 |
+
case "type_phone": {
|
| 2984 |
+
$element_first = $_POST[$key."_element_first".$id];
|
| 2985 |
+
if (isset($element_first)) {
|
| 2986 |
+
$new_value = $_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id];
|
| 2987 |
+
}
|
| 2988 |
+
break;
|
| 2989 |
+
}
|
| 2990 |
+
case "type_name": {
|
| 2991 |
+
$element_first = $_POST[$key."_element_first".$id];
|
| 2992 |
+
if (isset($element_first)) {
|
| 2993 |
+
$element_title = $_POST[$key."_element_title".$id];
|
| 2994 |
+
if (isset($element_title)) {
|
| 2995 |
+
$new_value = $_POST[$key."_element_title".$id].' '.$_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id].' '.$_POST[$key."_element_middle".$id];
|
| 2996 |
+
}
|
| 2997 |
+
else {
|
| 2998 |
+
$new_value = $_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id];
|
| 2999 |
+
}
|
| 3000 |
+
}
|
| 3001 |
+
break;
|
| 3002 |
+
}
|
| 3003 |
+
case "type_address": {
|
| 3004 |
+
if (isset($_POST[$key."_street1".$id])) {
|
| 3005 |
+
$new_value = $new_value.$_POST[$key."_street1".$id];
|
| 3006 |
+
break;
|
| 3007 |
+
}
|
| 3008 |
+
if (isset($_POST[$key."_street2".$id])) {
|
| 3009 |
+
$new_value = $new_value.$_POST[$key."_street2".$id];
|
| 3010 |
+
break;
|
| 3011 |
+
}
|
| 3012 |
+
if (isset($_POST[$key."_city".$id])) {
|
| 3013 |
+
$new_value = $new_value.$_POST[$key."_city".$id];
|
| 3014 |
+
break;
|
| 3015 |
+
}
|
| 3016 |
+
if (isset($_POST[$key."_state".$id])) {
|
| 3017 |
+
$new_value = $new_value.$_POST[$key."_state".$id];
|
| 3018 |
+
break;
|
| 3019 |
+
}
|
| 3020 |
+
if (isset($_POST[$key."_postal".$id])) {
|
| 3021 |
+
$new_value = $new_value.$_POST[$key."_postal".$id];
|
| 3022 |
+
break;
|
| 3023 |
+
}
|
| 3024 |
+
if (isset($_POST[$key."_country".$id])) {
|
| 3025 |
+
$new_value = $new_value.$_POST[$key."_country".$id];
|
| 3026 |
+
break;
|
| 3027 |
+
}
|
| 3028 |
+
}
|
| 3029 |
+
case "type_date_fields": {
|
| 3030 |
+
$day = $_POST[$key."_day".$id];
|
| 3031 |
+
if (isset($day)) {
|
| 3032 |
+
$new_value = $_POST[$key."_day".$id].'-'.$_POST[$key."_month".$id].'-'.$_POST[$key."_year".$id];
|
| 3033 |
+
}
|
| 3034 |
+
break;
|
| 3035 |
+
}
|
| 3036 |
+
case "type_radio": {
|
| 3037 |
+
$element = $_POST[$key."_other_input".$id];
|
| 3038 |
+
if (isset($element)) {
|
| 3039 |
+
$new_value = $_POST[$key."_other_input".$id];
|
| 3040 |
+
break;
|
| 3041 |
+
}
|
| 3042 |
+
$element = $_POST[$key."_element".$id];
|
| 3043 |
+
if (isset($element)) {
|
| 3044 |
+
$new_value = $element;
|
| 3045 |
+
}
|
| 3046 |
+
break;
|
| 3047 |
+
}
|
| 3048 |
+
case "type_checkbox": {
|
| 3049 |
+
$start = -1;
|
| 3050 |
+
for ($j = 0; $j < 100; $j++) {
|
| 3051 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3052 |
+
if (isset($element)) {
|
| 3053 |
+
$start = $j;
|
| 3054 |
+
break;
|
| 3055 |
+
}
|
| 3056 |
+
}
|
| 3057 |
+
$other_element_id = -1;
|
| 3058 |
+
$is_other = $_POST[$key."_allow_other".$id];
|
| 3059 |
+
if ($is_other == "yes") {
|
| 3060 |
+
$other_element_id = $_POST[$key."_allow_other_num".$id];
|
| 3061 |
+
}
|
| 3062 |
+
if ($start != -1) {
|
| 3063 |
+
for ($j = $start; $j < 100; $j++) {
|
| 3064 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3065 |
+
if (isset($element)) {
|
| 3066 |
+
if ($j == $other_element_id) {
|
| 3067 |
+
$new_value = $new_value.$_POST[$key."_other_input".$id].'<br>';
|
| 3068 |
+
}
|
| 3069 |
+
else {
|
| 3070 |
+
$new_value = $new_value.$_POST[$key."_element".$id.$j].'<br>';
|
| 3071 |
+
}
|
| 3072 |
+
}
|
| 3073 |
+
}
|
| 3074 |
+
}
|
| 3075 |
+
break;
|
| 3076 |
+
}
|
| 3077 |
+
case "type_paypal_price": {
|
| 3078 |
+
$new_value = 0;
|
| 3079 |
+
if ($_POST[$key."_element_dollars".$id]) {
|
| 3080 |
+
$new_value = $_POST[$key."_element_dollars".$id];
|
| 3081 |
+
}
|
| 3082 |
+
if ($_POST[$key."_element_cents".$id]) {
|
| 3083 |
+
$new_value = $new_value.'.'.$_POST[$key."_element_cents".$id];
|
| 3084 |
+
}
|
| 3085 |
+
$new_value = $new_value.$form_currency;
|
| 3086 |
+
break;
|
| 3087 |
+
}
|
| 3088 |
+
case "type_paypal_select": {
|
| 3089 |
+
$new_value = $_POST[$key."_element_label".$id].':'.$_POST[$key."_element".$id].$form_currency;
|
| 3090 |
+
$element_quantity_label = $_POST[$key."_element_quantity_label".$id];
|
| 3091 |
+
if (isset($element_quantity_label)) {
|
| 3092 |
+
$quantity = ((isset($_POST[$key . "_element_quantity" . $id]) && ($_POST[$key . "_element_quantity" . $id] >= 1)) ? $_POST[$key . "_element_quantity" . $id] : 1);
|
| 3093 |
+
$new_value.='<br/>'.$_POST[$key."_element_quantity_label".$id].': '.$quantity;
|
| 3094 |
+
}
|
| 3095 |
+
for ($k = 0; $k < 50; $k++) {
|
| 3096 |
+
$temp_val = $_POST[$key."_element_property_value".$id.$k];
|
| 3097 |
+
if (isset($temp_val)) {
|
| 3098 |
+
$new_value .= '<br/>'.$_POST[$key."_element_property_label".$id.$k].': '.$_POST[$i."_element_property_value".$id.$k];
|
| 3099 |
+
}
|
| 3100 |
+
}
|
| 3101 |
+
break;
|
| 3102 |
+
}
|
| 3103 |
+
case "type_paypal_radio": {
|
| 3104 |
+
$new_value = $_POST[$key."_element_label".$id].' - '.$_POST[$key."_element".$id].$form_currency;
|
| 3105 |
+
$element_quantity_label = $_POST[$key."_element_quantity_label".$id];
|
| 3106 |
+
if (isset($element_quantity_label)) {
|
| 3107 |
+
$quantity = ((isset($_POST[$key . "_element_quantity" . $id]) && ($_POST[$key . "_element_quantity" . $id] >= 1)) ? $_POST[$key . "_element_quantity" . $id] : 1);
|
| 3108 |
+
$new_value .= '<br/>'.$_POST[$key."_element_quantity_label".$id].': '.$quantity;
|
| 3109 |
+
}
|
| 3110 |
+
for ($k = 0; $k < 50; $k++) {
|
| 3111 |
+
$temp_val = $_POST[$key."_element_property_value".$id.$k];
|
| 3112 |
+
if (isset($temp_val)) {
|
| 3113 |
+
$new_value .= '<br/>' . $_POST[$key."_element_property_label".$id.$k].': '.$_POST[$key."_element_property_value".$id.$k];
|
| 3114 |
+
}
|
| 3115 |
+
}
|
| 3116 |
+
break;
|
| 3117 |
+
}
|
| 3118 |
+
case "type_paypal_shipping": {
|
| 3119 |
+
$new_value = $_POST[$key."_element_label".$id].' : '.$_POST[$key."_element".$id].$form_currency;
|
| 3120 |
+
break;
|
| 3121 |
+
}
|
| 3122 |
+
case "type_paypal_checkbox": {
|
| 3123 |
+
$start = -1;
|
| 3124 |
+
for($j = 0; $j < 100; $j++) {
|
| 3125 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3126 |
+
if (isset($element)) {
|
| 3127 |
+
$start = $j;
|
| 3128 |
+
break;
|
| 3129 |
+
}
|
| 3130 |
+
}
|
| 3131 |
+
if ($start != -1) {
|
| 3132 |
+
for ($j = $start; $j<100; $j++) {
|
| 3133 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3134 |
+
if (isset($element)) {
|
| 3135 |
+
$new_value = $new_value.$_POST[$key."_element".$id.$j."_label"].' - '.(($_POST[$key."_element".$id.$j] == '') ? '0'.$form_currency : $_POST[$key."_element".$id.$j]).$form_currency.'<br>';
|
| 3136 |
+
}
|
| 3137 |
+
}
|
| 3138 |
+
}
|
| 3139 |
+
$element_quantity_label = $_POST[$key."_element_quantity_label".$id];
|
| 3140 |
+
if (isset($element_quantity_label)) {
|
| 3141 |
+
$quantity = ((isset($_POST[$key . "_element_quantity" . $id]) && ($_POST[$key . "_element_quantity" . $id] >= 1)) ? $_POST[$key . "_element_quantity" . $id] : 1);
|
| 3142 |
+
$new_value .= '<br/>'.$_POST[$key."_element_quantity_label".$id].': '.$quantity;
|
| 3143 |
+
}
|
| 3144 |
+
for ($k = 0; $k < 50; $k++) {
|
| 3145 |
+
$temp_val = $_POST[$key."_element_property_value".$id.$k];
|
| 3146 |
+
if (isset($temp_val)) {
|
| 3147 |
+
$new_value .= '<br/>'.$_POST[$key."_element_property_label".$id.$k].': '.$_POST[$key."_element_property_value".$id.$k];
|
| 3148 |
+
}
|
| 3149 |
+
}
|
| 3150 |
+
break;
|
| 3151 |
+
}
|
| 3152 |
+
case "type_star_rating":
|
| 3153 |
+
{
|
| 3154 |
+
$element=$_POST[$key."_star_amount".$id];
|
| 3155 |
+
$selected=(isset($_POST[$key."_selected_star_amount".$id]) ? $_POST[$key."_selected_star_amount".$id] : 0);
|
| 3156 |
+
|
| 3157 |
+
|
| 3158 |
+
if(isset($element))
|
| 3159 |
+
{
|
| 3160 |
+
$new_value=$new_value.$selected.'/'.$element;
|
| 3161 |
+
}
|
| 3162 |
+
break;
|
| 3163 |
+
}
|
| 3164 |
+
|
| 3165 |
+
|
| 3166 |
+
case "type_scale_rating":
|
| 3167 |
+
{
|
| 3168 |
+
$element=$_POST[$key."_scale_amount".$id];
|
| 3169 |
+
$selected=(isset($_POST[$key."_scale_radio".$id]) ? $_POST[$key."_scale_radio".$id] : 0);
|
| 3170 |
+
|
| 3171 |
+
|
| 3172 |
+
if(isset($element))
|
| 3173 |
+
{
|
| 3174 |
+
$new_value=$new_value.$selected.'/'.$element;
|
| 3175 |
+
}
|
| 3176 |
+
break;
|
| 3177 |
+
}
|
| 3178 |
+
|
| 3179 |
+
case "type_spinner":
|
| 3180 |
+
{
|
| 3181 |
+
|
| 3182 |
+
if (isset($_POST[$key."_element".$id])) {
|
| 3183 |
+
$new_value = $new_value . $_POST[$key."_element".$id];
|
| 3184 |
+
}
|
| 3185 |
+
break;
|
| 3186 |
+
}
|
| 3187 |
+
|
| 3188 |
+
case "type_slider":
|
| 3189 |
+
{
|
| 3190 |
+
|
| 3191 |
+
$element=$_POST[$key."_slider_value".$id];
|
| 3192 |
+
if(isset($element))
|
| 3193 |
+
{
|
| 3194 |
+
$new_value=$new_value.$element;
|
| 3195 |
+
}
|
| 3196 |
+
break;
|
| 3197 |
+
}
|
| 3198 |
+
case "type_range":
|
| 3199 |
+
{
|
| 3200 |
+
|
| 3201 |
+
$element0=$_POST[$key."_element".$id.'0'];
|
| 3202 |
+
$element1=$_POST[$key."_element".$id.'1'];
|
| 3203 |
+
if(isset($element0) || isset($element1))
|
| 3204 |
+
{
|
| 3205 |
+
$new_value=$new_value.$element0.'-'.$element1;
|
| 3206 |
+
}
|
| 3207 |
+
break;
|
| 3208 |
+
}
|
| 3209 |
+
|
| 3210 |
+
case "type_grading":
|
| 3211 |
+
{
|
| 3212 |
+
$element=$_POST[$key."_hidden_item".$id];
|
| 3213 |
+
$grading = explode(":",$element);
|
| 3214 |
+
$items_count = sizeof($grading)-1;
|
| 3215 |
+
|
| 3216 |
+
$element = "";
|
| 3217 |
+
$total = "";
|
| 3218 |
+
|
| 3219 |
+
for($k=0;$k<$items_count;$k++)
|
| 3220 |
+
|
| 3221 |
+
{
|
| 3222 |
+
$element .= $grading[$k].":".$_POST[$key."_element".$id.$k]." ";
|
| 3223 |
+
$total += $_POST[$key."_element".$id.$k];
|
| 3224 |
+
}
|
| 3225 |
+
|
| 3226 |
+
$element .="Total:".$total;
|
| 3227 |
+
|
| 3228 |
+
|
| 3229 |
+
if(isset($element))
|
| 3230 |
+
{
|
| 3231 |
+
$new_value=$new_value.$element;
|
| 3232 |
+
}
|
| 3233 |
+
break;
|
| 3234 |
+
}
|
| 3235 |
+
|
| 3236 |
+
case "type_matrix":
|
| 3237 |
+
{
|
| 3238 |
+
|
| 3239 |
+
|
| 3240 |
+
$input_type=$_POST[$key."_input_type".$id];
|
| 3241 |
+
|
| 3242 |
+
$mat_rows = $_POST[$key."_hidden_row".$id];
|
| 3243 |
+
$mat_rows = explode('***', $mat_rows);
|
| 3244 |
+
$mat_rows = array_slice($mat_rows,0, count($mat_rows)-1);
|
| 3245 |
+
|
| 3246 |
+
$mat_columns = $_POST[$key."_hidden_column".$id];
|
| 3247 |
+
$mat_columns = explode('***', $mat_columns);
|
| 3248 |
+
$mat_columns = array_slice($mat_columns,0, count($mat_columns)-1);
|
| 3249 |
+
|
| 3250 |
+
$row_ids=explode(",",substr($_POST[$key."_row_ids".$id], 0, -1));
|
| 3251 |
+
$column_ids=explode(",",substr($_POST[$key."_column_ids".$id], 0, -1));
|
| 3252 |
+
|
| 3253 |
+
|
| 3254 |
+
$matrix="<table>";
|
| 3255 |
+
|
| 3256 |
+
$matrix .='<tr><td></td>';
|
| 3257 |
+
|
| 3258 |
+
for( $k=0;$k< count($mat_columns) ;$k++)
|
| 3259 |
+
$matrix .='<td style="background-color:#BBBBBB; padding:5px; ">'.$mat_columns[$k].'</td>';
|
| 3260 |
+
$matrix .='</tr>';
|
| 3261 |
+
|
| 3262 |
+
$aaa=Array();
|
| 3263 |
+
$k=0;
|
| 3264 |
+
foreach( $row_ids as $row_id){
|
| 3265 |
+
$matrix .='<tr><td style="background-color:#BBBBBB; padding:5px;">'.$mat_rows[$k].'</td>';
|
| 3266 |
+
|
| 3267 |
+
if($input_type=="radio"){
|
| 3268 |
+
|
| 3269 |
+
$mat_radio = (isset($_POST[$key."_input_element".$id.$row_id]) ? $_POST[$key."_input_element".$id.$row_id] : 0);
|
| 3270 |
+
if($mat_radio==0){
|
| 3271 |
+
$checked="";
|
| 3272 |
+
$aaa[1]="";
|
| 3273 |
+
}
|
| 3274 |
+
else{
|
| 3275 |
+
$aaa=explode("_",$mat_radio);
|
| 3276 |
+
}
|
| 3277 |
+
|
| 3278 |
+
foreach( $column_ids as $column_id){
|
| 3279 |
+
if($aaa[1]==$column_id)
|
| 3280 |
+
$checked="checked";
|
| 3281 |
+
else
|
| 3282 |
+
$checked="";
|
| 3283 |
+
$matrix .='<td style="text-align:center"><input type="radio" '.$checked.' disabled /></td>';
|
| 3284 |
+
|
| 3285 |
+
}
|
| 3286 |
+
|
| 3287 |
+
}
|
| 3288 |
+
else{
|
| 3289 |
+
if($input_type=="checkbox")
|
| 3290 |
+
{
|
| 3291 |
+
foreach( $column_ids as $column_id){
|
| 3292 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
| 3293 |
+
if($checked==1)
|
| 3294 |
+
$checked = "checked";
|
| 3295 |
+
else
|
| 3296 |
+
$checked = "";
|
| 3297 |
+
|
| 3298 |
+
$matrix .='<td style="text-align:center"><input type="checkbox" '.$checked.' disabled /></td>';
|
| 3299 |
+
|
| 3300 |
+
}
|
| 3301 |
+
|
| 3302 |
+
}
|
| 3303 |
+
else
|
| 3304 |
+
{
|
| 3305 |
+
if($input_type=="text")
|
| 3306 |
+
{
|
| 3307 |
+
|
| 3308 |
+
foreach( $column_ids as $column_id){
|
| 3309 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
| 3310 |
+
|
| 3311 |
+
$matrix .='<td style="text-align:center"><input type="text" value="'.$checked.'" disabled /></td>';
|
| 3312 |
+
|
| 3313 |
+
}
|
| 3314 |
+
|
| 3315 |
+
}
|
| 3316 |
+
else{
|
| 3317 |
+
foreach( $column_ids as $column_id){
|
| 3318 |
+
$checked = $_POST[$key."_select_yes_no".$id.$row_id.'_'.$column_id];
|
| 3319 |
+
$matrix .='<td style="text-align:center">'.$checked.'</td>';
|
| 3320 |
+
|
| 3321 |
+
|
| 3322 |
+
|
| 3323 |
+
}
|
| 3324 |
+
}
|
| 3325 |
+
|
| 3326 |
+
}
|
| 3327 |
+
|
| 3328 |
+
}
|
| 3329 |
+
$matrix .='</tr>';
|
| 3330 |
+
$k++;
|
| 3331 |
+
}
|
| 3332 |
+
$matrix .='</table>';
|
| 3333 |
+
|
| 3334 |
+
|
| 3335 |
+
|
| 3336 |
+
|
| 3337 |
+
|
| 3338 |
+
if(isset($matrix))
|
| 3339 |
+
{
|
| 3340 |
+
$new_value=$new_value.$matrix;
|
| 3341 |
+
}
|
| 3342 |
+
|
| 3343 |
+
break;
|
| 3344 |
+
}
|
| 3345 |
+
default: break;
|
| 3346 |
+
}
|
| 3347 |
+
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
| 3348 |
+
}
|
| 3349 |
+
}
|
| 3350 |
+
}
|
| 3351 |
+
if (strpos($new_script, "%all%") !== FALSE) {
|
| 3352 |
+
$new_script = str_replace("%all%", $list, $new_script);
|
| 3353 |
+
}
|
| 3354 |
+
$body = $new_script;
|
| 3355 |
+
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment);
|
| 3356 |
+
}
|
| 3357 |
+
if ($row->mail) {
|
| 3358 |
+
if ($c) {
|
| 3359 |
+
// $headers_form_mail = "From: " . $c . " <" . $c . ">" . "\r\n";
|
| 3360 |
+
$headers = "From: '" . $c . "' <" . $c . ">" . "\r\n" . "Content-Type: text/html; charset=\"" . get_option('blog_charset') . "\"\n";
|
| 3361 |
+
}
|
| 3362 |
+
// else {
|
| 3363 |
+
// $headers_form_mail = "";
|
| 3364 |
+
// }
|
| 3365 |
+
if ($row_mail_one_time) {
|
| 3366 |
+
$recipient = $row->mail;
|
| 3367 |
+
$subject = $row->title;
|
| 3368 |
+
$new_script = wpautop($row->script_mail);
|
| 3369 |
+
foreach($label_order_original as $key => $label_each) {
|
| 3370 |
+
if (strpos($row->script_mail, "%" . $label_each . "%") !== FALSE) {
|
| 3371 |
+
$type = $label_type[$key];
|
| 3372 |
+
if ($type != "type_submit_reset" or $type!="type_map" or $type!="type_editor" or $type!="type_captcha" or $type != "type_arithmetic_captcha" or $type!="type_recaptcha" or $type!="type_button") {
|
| 3373 |
+
$new_value ="";
|
| 3374 |
+
switch ($type) {
|
| 3375 |
+
case 'type_text':
|
| 3376 |
+
case 'type_password':
|
| 3377 |
+
case 'type_textarea':
|
| 3378 |
+
case "type_date":
|
| 3379 |
+
case "type_own_select":
|
| 3380 |
+
case "type_country":
|
| 3381 |
+
case "type_number": {
|
| 3382 |
+
$element = $_POST[$key."_element".$id];
|
| 3383 |
+
if (isset($element)) {
|
| 3384 |
+
$new_value = $element;
|
| 3385 |
+
}
|
| 3386 |
+
break;
|
| 3387 |
+
}
|
| 3388 |
+
case "type_hidden": {
|
| 3389 |
+
$element = $_POST[$element_label];
|
| 3390 |
+
if(isset($element))
|
| 3391 |
+
{
|
| 3392 |
+
$new_value = $element;
|
| 3393 |
+
}
|
| 3394 |
+
break;
|
| 3395 |
+
}
|
| 3396 |
+
case "type_mark_map": {
|
| 3397 |
+
$element = $_POST[$key."_long".$id];
|
| 3398 |
+
if (isset($element)) {
|
| 3399 |
+
$new_value = 'Longitude:'.$_POST[$key."_long".$id].'<br/>Latitude:'.$_POST[$key."_lat".$id];
|
| 3400 |
+
}
|
| 3401 |
+
break;
|
| 3402 |
+
}
|
| 3403 |
+
case "type_submitter_mail": {
|
| 3404 |
+
$element = $_POST[$key."_element".$id];
|
| 3405 |
+
if (isset($element)) {
|
| 3406 |
+
$new_value = $element;
|
| 3407 |
+
}
|
| 3408 |
+
break;
|
| 3409 |
+
}
|
| 3410 |
+
case "type_time": {
|
| 3411 |
+
$hh = $_POST[$key."_hh".$id];
|
| 3412 |
+
if (isset($hh)) {
|
| 3413 |
+
$ss = $_POST[$key."_ss".$id];
|
| 3414 |
+
if (isset($ss)) {
|
| 3415 |
+
$new_value = $_POST[$key."_hh".$id].':'.$_POST[$key."_mm".$id].':'.$_POST[$key."_ss".$id];
|
| 3416 |
+
}
|
| 3417 |
+
else {
|
| 3418 |
+
$new_value = $_POST[$key."_hh".$id].':'.$_POST[$key."_mm".$id];
|
| 3419 |
+
}
|
| 3420 |
+
$am_pm = $_POST[$key."_am_pm".$id];
|
| 3421 |
+
if (isset($am_pm)) {
|
| 3422 |
+
$new_value = $new_value.' '.$_POST[$key."_am_pm".$id];
|
| 3423 |
+
}
|
| 3424 |
+
}
|
| 3425 |
+
break;
|
| 3426 |
+
}
|
| 3427 |
+
case "type_phone": {
|
| 3428 |
+
$element_first = $_POST[$key."_element_first".$id];
|
| 3429 |
+
if (isset($element_first)) {
|
| 3430 |
+
$new_value = $_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id];
|
| 3431 |
+
}
|
| 3432 |
+
break;
|
| 3433 |
+
}
|
| 3434 |
+
case "type_name": {
|
| 3435 |
+
$element_first = $_POST[$key."_element_first".$id];
|
| 3436 |
+
if (isset($element_first)) {
|
| 3437 |
+
$element_title = $_POST[$key."_element_title".$id];
|
| 3438 |
+
if (isset($element_title)) {
|
| 3439 |
+
$new_value = $_POST[$key."_element_title".$id].' '.$_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id].' '.$_POST[$key."_element_middle".$id];
|
| 3440 |
+
}
|
| 3441 |
+
else {
|
| 3442 |
+
$new_value = $_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id];
|
| 3443 |
+
}
|
| 3444 |
+
}
|
| 3445 |
+
break;
|
| 3446 |
+
}
|
| 3447 |
+
case "type_address": {
|
| 3448 |
+
$street1 = $_POST[$key."_street1".$id];
|
| 3449 |
+
if (isset($_POST[$key."_street1".$id])) {
|
| 3450 |
+
$new_value = $new_value.$_POST[$key."_street1".$id];
|
| 3451 |
+
break;
|
| 3452 |
+
}
|
| 3453 |
+
if (isset($_POST[$key."_street2".$id])) {
|
| 3454 |
+
$new_value=$new_value.$_POST[$key."_street2".$id];
|
| 3455 |
+
break;
|
| 3456 |
+
}
|
| 3457 |
+
if (isset($_POST[$key."_city".$id])) {
|
| 3458 |
+
$new_value=$new_value.$_POST[$key."_city".$id];
|
| 3459 |
+
break;
|
| 3460 |
+
}
|
| 3461 |
+
if (isset($_POST[$key."_state".$id])) {
|
| 3462 |
+
$new_value=$new_value.$_POST[$key."_state".$id];
|
| 3463 |
+
break;
|
| 3464 |
+
}
|
| 3465 |
+
if (isset($_POST[$key."_postal".$id])) {
|
| 3466 |
+
$new_value=$new_value.$_POST[$key."_postal".$id];
|
| 3467 |
+
break;
|
| 3468 |
+
}
|
| 3469 |
+
if (isset($_POST[$key."_country".$id])) {
|
| 3470 |
+
$new_value=$new_value.$_POST[$key."_country".$id];
|
| 3471 |
+
break;
|
| 3472 |
+
}
|
| 3473 |
+
}
|
| 3474 |
+
case "type_date_fields": {
|
| 3475 |
+
$day = $_POST[$key."_day".$id];
|
| 3476 |
+
if (isset($day)) {
|
| 3477 |
+
$new_value = $_POST[$key."_day".$id].'-'.$_POST[$key."_month".$id].'-'.$_POST[$key."_year".$id];
|
| 3478 |
+
}
|
| 3479 |
+
break;
|
| 3480 |
+
}
|
| 3481 |
+
case "type_radio": {
|
| 3482 |
+
$element = $_POST[$key."_other_input".$id];
|
| 3483 |
+
if (isset($element)) {
|
| 3484 |
+
$new_value = $_POST[$key."_other_input".$id];
|
| 3485 |
+
break;
|
| 3486 |
+
}
|
| 3487 |
+
$element = $_POST[$key."_element".$id];
|
| 3488 |
+
if (isset($element)) {
|
| 3489 |
+
$new_value = $element;
|
| 3490 |
+
}
|
| 3491 |
+
break;
|
| 3492 |
+
}
|
| 3493 |
+
case "type_checkbox": {
|
| 3494 |
+
$start = -1;
|
| 3495 |
+
for ($j=0; $j<100; $j++) {
|
| 3496 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3497 |
+
if (isset($element)) {
|
| 3498 |
+
$start = $j;
|
| 3499 |
+
break;
|
| 3500 |
+
}
|
| 3501 |
+
}
|
| 3502 |
+
$other_element_id=-1;
|
| 3503 |
+
$is_other = $_POST[$key."_allow_other".$id];
|
| 3504 |
+
if ($is_other == "yes") {
|
| 3505 |
+
$other_element_id = $_POST[$key."_allow_other_num".$id];
|
| 3506 |
+
}
|
| 3507 |
+
if ($start != -1) {
|
| 3508 |
+
for ($j = $start; $j < 100; $j++) {
|
| 3509 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3510 |
+
if (isset($element)) {
|
| 3511 |
+
if ($j == $other_element_id) {
|
| 3512 |
+
$new_value = $new_value.$_POST[$key."_other_input".$id].'<br>';
|
| 3513 |
+
}
|
| 3514 |
+
else {
|
| 3515 |
+
$new_value = $new_value.$_POST[$key."_element".$id.$j].'<br>';
|
| 3516 |
+
}
|
| 3517 |
+
}
|
| 3518 |
+
}
|
| 3519 |
+
}
|
| 3520 |
+
break;
|
| 3521 |
+
}
|
| 3522 |
+
case "type_paypal_price": {
|
| 3523 |
+
$new_value = 0;
|
| 3524 |
+
if ($_POST[$key."_element_dollars".$id]) {
|
| 3525 |
+
$new_value = $_POST[$key."_element_dollars".$id];
|
| 3526 |
+
}
|
| 3527 |
+
if ($_POST[$key."_element_cents".$id]) {
|
| 3528 |
+
$new_value = $new_value.'.'.$_POST[$key."_element_cents".$id];
|
| 3529 |
+
}
|
| 3530 |
+
$new_value = $new_value.$form_currency;
|
| 3531 |
+
break;
|
| 3532 |
+
}
|
| 3533 |
+
case "type_paypal_select": {
|
| 3534 |
+
$new_value = $_POST[$key."_element_label".$id].':'.$_POST[$key."_element".$id].$form_currency;
|
| 3535 |
+
$element_quantity_label = $_POST[$key."_element_quantity_label".$id];
|
| 3536 |
+
if (isset($element_quantity_label)) {
|
| 3537 |
+
$quantity = ((isset($_POST[$key . "_element_quantity" . $id]) && ($_POST[$key . "_element_quantity" . $id] >= 1)) ? $_POST[$key . "_element_quantity" . $id] : 1);
|
| 3538 |
+
$new_value .= '<br/>'.$_POST[$key."_element_quantity_label".$id].': '.$quantity;
|
| 3539 |
+
}
|
| 3540 |
+
for($k = 0; $k < 50; $k++) {
|
| 3541 |
+
$temp_val = $_POST[$key."_element_property_value".$id.$k];
|
| 3542 |
+
if (isset($temp_val)) {
|
| 3543 |
+
$new_value .= '<br/>'.$_POST[$key."_element_property_label".$id.$k].': '.$_POST[$key."_element_property_value".$id.$k];
|
| 3544 |
+
}
|
| 3545 |
+
}
|
| 3546 |
+
break;
|
| 3547 |
+
}
|
| 3548 |
+
case "type_paypal_radio": {
|
| 3549 |
+
$new_value = $_POST[$key."_element_label".$id].' - '.$_POST[$key."_element".$id].$form_currency;
|
| 3550 |
+
$element_quantity_label = $_POST[$key."_element_quantity_label".$id];
|
| 3551 |
+
if (isset($element_quantity_label)) {
|
| 3552 |
+
$quantity = ((isset($_POST[$key . "_element_quantity" . $id]) && ($_POST[$key . "_element_quantity" . $id] >= 1)) ? $_POST[$key . "_element_quantity" . $id] : 1);
|
| 3553 |
+
$new_value .= '<br/>'.$_POST[$key."_element_quantity_label".$id].': '.$quantity;
|
| 3554 |
+
}
|
| 3555 |
+
for ($k = 0; $k < 50; $k++) {
|
| 3556 |
+
$temp_val = $_POST[$key."_element_property_value".$id.$k];
|
| 3557 |
+
if (isset($temp_val)) {
|
| 3558 |
+
$new_value .= '<br/>'.$_POST[$key."_element_property_label".$id.$k].': '.$_POST[$key."_element_property_value".$id.$k];
|
| 3559 |
+
}
|
| 3560 |
+
}
|
| 3561 |
+
break;
|
| 3562 |
+
}
|
| 3563 |
+
case "type_paypal_shipping": {
|
| 3564 |
+
$new_value = $_POST[$key."_element_label".$id].' : '.$_POST[$key."_element".$id].$form_currency;
|
| 3565 |
+
break;
|
| 3566 |
+
}
|
| 3567 |
+
case "type_paypal_checkbox": {
|
| 3568 |
+
$start = -1;
|
| 3569 |
+
for ($j = 0; $j < 100; $j++) {
|
| 3570 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3571 |
+
if (isset($element)) {
|
| 3572 |
+
$start = $j;
|
| 3573 |
+
break;
|
| 3574 |
+
}
|
| 3575 |
+
}
|
| 3576 |
+
if ($start != -1) {
|
| 3577 |
+
for ($j = $start; $j < 100; $j++) {
|
| 3578 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3579 |
+
if (isset($element)) {
|
| 3580 |
+
$new_value = $new_value.$_POST[$key."_element".$id.$j."_label"].' - '.(($_POST[$key."_element".$id.$j] == '') ? '0'.$form_currency : $_POST[$key."_element".$id.$j]).$form_currency.'<br>';
|
| 3581 |
+
}
|
| 3582 |
+
}
|
| 3583 |
+
}
|
| 3584 |
+
$element_quantity_label = $_POST[$key."_element_quantity_label".$id];
|
| 3585 |
+
if (isset($element_quantity_label)) {
|
| 3586 |
+
$quantity = ((isset($_POST[$key . "_element_quantity" . $id]) && ($_POST[$key . "_element_quantity" . $id] >= 1)) ? $_POST[$key . "_element_quantity" . $id] : 1);
|
| 3587 |
+
$new_value .= '<br/>'.$_POST[$key."_element_quantity_label".$id].': '.$quantity;
|
| 3588 |
+
}
|
| 3589 |
+
for ($k = 0; $k < 50; $k++) {
|
| 3590 |
+
$temp_val = $_POST[$key."_element_property_value".$id.$k];
|
| 3591 |
+
if (isset($temp_val)) {
|
| 3592 |
+
$new_value .= '<br/>'.$_POST[$key."_element_property_label".$id.$k].': '.$_POST[$key."_element_property_value".$id.$k];
|
| 3593 |
+
}
|
| 3594 |
+
}
|
| 3595 |
+
break;
|
| 3596 |
+
}
|
| 3597 |
+
case "type_star_rating": {
|
| 3598 |
+
if (isset($_POST[$key."_star_amount".$id])) {
|
| 3599 |
+
$selected = (isset($_POST[$key."_selected_star_amount".$id]) ? $_POST[$key."_selected_star_amount".$id] : 0);
|
| 3600 |
+
$new_value = $new_value.$selected.'/'.$_POST[$key."_star_amount".$id];
|
| 3601 |
+
}
|
| 3602 |
+
break;
|
| 3603 |
+
}
|
| 3604 |
+
case "type_scale_rating": {
|
| 3605 |
+
if (isset($_POST[$key."_scale_amount".$id])) {
|
| 3606 |
+
$selected = (isset($_POST[$key."_scale_radio".$id]) ? $_POST[$key."_scale_radio".$id] : 0);
|
| 3607 |
+
$new_value=$new_value.$selected.'/'.$_POST[$key."_scale_amount".$id];
|
| 3608 |
+
}
|
| 3609 |
+
break;
|
| 3610 |
+
}
|
| 3611 |
+
case "type_spinner": {
|
| 3612 |
+
if(isset($_POST[$key."_element".$id])) {
|
| 3613 |
+
$new_value = $new_value.$_POST[$key."_element".$id];
|
| 3614 |
+
}
|
| 3615 |
+
break;
|
| 3616 |
+
}
|
| 3617 |
+
case "type_slider": {
|
| 3618 |
+
if (isset($_POST[$key."_slider_value".$id])) {
|
| 3619 |
+
$new_value = $new_value.$_POST[$key."_slider_value".$id];
|
| 3620 |
+
}
|
| 3621 |
+
break;
|
| 3622 |
+
}
|
| 3623 |
+
case "type_range": {
|
| 3624 |
+
if (isset($_POST[$key."_element".$id.'0']) || isset($_POST[$key."_element".$id.'1'])) {
|
| 3625 |
+
$new_value=$new_value.$_POST[$key."_element".$id.'0'].'-'.$_POST[$key."_element".$id.'1'];
|
| 3626 |
+
}
|
| 3627 |
+
break;
|
| 3628 |
+
}
|
| 3629 |
+
|
| 3630 |
+
case "type_grading":
|
| 3631 |
+
{
|
| 3632 |
+
$element=$_POST[$key."_hidden_item".$id];
|
| 3633 |
+
$grading = explode(":",$element);
|
| 3634 |
+
$items_count = sizeof($grading)-1;
|
| 3635 |
+
|
| 3636 |
+
$element = "";
|
| 3637 |
+
$total = "";
|
| 3638 |
+
|
| 3639 |
+
for($k=0;$k<$items_count;$k++) {
|
| 3640 |
+
$element .= $grading[$k].":".$_POST[$key."_element".$id.$k]." ";
|
| 3641 |
+
$total += $_POST[$key."_element".$id.$k];
|
| 3642 |
+
}
|
| 3643 |
+
|
| 3644 |
+
$element .="Total:".$total;
|
| 3645 |
+
|
| 3646 |
+
|
| 3647 |
+
if(isset($element))
|
| 3648 |
+
{
|
| 3649 |
+
$new_value=$new_value.$element;
|
| 3650 |
+
}
|
| 3651 |
+
break;
|
| 3652 |
+
}
|
| 3653 |
+
|
| 3654 |
+
case "type_matrix":
|
| 3655 |
+
{
|
| 3656 |
+
|
| 3657 |
+
|
| 3658 |
+
$input_type=$_POST[$key."_input_type".$id];
|
| 3659 |
+
|
| 3660 |
+
$mat_rows = $_POST[$key."_hidden_row".$id];
|
| 3661 |
+
$mat_rows = explode('***', $mat_rows);
|
| 3662 |
+
$mat_rows = array_slice($mat_rows,0, count($mat_rows)-1);
|
| 3663 |
+
|
| 3664 |
+
$mat_columns = $_POST[$key."_hidden_column".$id];
|
| 3665 |
+
$mat_columns = explode('***', $mat_columns);
|
| 3666 |
+
$mat_columns = array_slice($mat_columns,0, count($mat_columns)-1);
|
| 3667 |
+
|
| 3668 |
+
$row_ids=explode(",",substr($_POST[$key."_row_ids".$id], 0, -1));
|
| 3669 |
+
$column_ids=explode(",",substr($_POST[$key."_column_ids".$id], 0, -1));
|
| 3670 |
+
$matrix="<table>";
|
| 3671 |
+
|
| 3672 |
+
$matrix .='<tr><td></td>';
|
| 3673 |
+
|
| 3674 |
+
for( $k=0;$k< count($mat_columns) ;$k++)
|
| 3675 |
+
$matrix .='<td style="background-color:#BBBBBB; padding:5px; ">'.$mat_columns[$k].'</td>';
|
| 3676 |
+
$matrix .='</tr>';
|
| 3677 |
+
|
| 3678 |
+
$aaa=Array();
|
| 3679 |
+
$k=0;
|
| 3680 |
+
foreach( $row_ids as $row_id){
|
| 3681 |
+
$matrix .='<tr><td style="background-color:#BBBBBB; padding:5px;">'.$mat_rows[$k].'</td>';
|
| 3682 |
+
|
| 3683 |
+
if($input_type=="radio"){
|
| 3684 |
+
|
| 3685 |
+
$mat_radio = (isset($_POST[$key."_input_element".$id.$row_id]) ? $_POST[$key."_input_element".$id.$row_id] : 0);
|
| 3686 |
+
if($mat_radio==0){
|
| 3687 |
+
$checked="";
|
| 3688 |
+
$aaa[1]="";
|
| 3689 |
+
}
|
| 3690 |
+
else{
|
| 3691 |
+
$aaa=explode("_",$mat_radio);
|
| 3692 |
+
}
|
| 3693 |
+
|
| 3694 |
+
foreach( $column_ids as $column_id){
|
| 3695 |
+
if($aaa[1]==$column_id)
|
| 3696 |
+
$checked="checked";
|
| 3697 |
+
else
|
| 3698 |
+
$checked="";
|
| 3699 |
+
$matrix .='<td style="text-align:center"><input type="radio" '.$checked.' disabled /></td>';
|
| 3700 |
+
|
| 3701 |
+
}
|
| 3702 |
+
|
| 3703 |
+
}
|
| 3704 |
+
else{
|
| 3705 |
+
if($input_type=="checkbox")
|
| 3706 |
+
{
|
| 3707 |
+
foreach( $column_ids as $column_id){
|
| 3708 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
| 3709 |
+
if($checked==1)
|
| 3710 |
+
$checked = "checked";
|
| 3711 |
+
else
|
| 3712 |
+
$checked = "";
|
| 3713 |
+
|
| 3714 |
+
$matrix .='<td style="text-align:center"><input type="checkbox" '.$checked.' disabled /></td>';
|
| 3715 |
+
|
| 3716 |
+
}
|
| 3717 |
+
|
| 3718 |
+
}
|
| 3719 |
+
else
|
| 3720 |
+
{
|
| 3721 |
+
if($input_type=="text")
|
| 3722 |
+
{
|
| 3723 |
+
|
| 3724 |
+
foreach( $column_ids as $column_id){
|
| 3725 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
| 3726 |
+
|
| 3727 |
+
$matrix .='<td style="text-align:center"><input type="text" value="'.$checked.'" disabled /></td>';
|
| 3728 |
+
|
| 3729 |
+
}
|
| 3730 |
+
|
| 3731 |
+
}
|
| 3732 |
+
else{
|
| 3733 |
+
foreach( $column_ids as $column_id){
|
| 3734 |
+
$checked = $_POST[$key."_select_yes_no".$id.$row_id.'_'.$column_id];
|
| 3735 |
+
$matrix .='<td style="text-align:center">'.$checked.'</td>';
|
| 3736 |
+
|
| 3737 |
+
|
| 3738 |
+
|
| 3739 |
+
}
|
| 3740 |
+
}
|
| 3741 |
+
|
| 3742 |
+
}
|
| 3743 |
+
|
| 3744 |
+
}
|
| 3745 |
+
$matrix .='</tr>';
|
| 3746 |
+
$k++;
|
| 3747 |
+
}
|
| 3748 |
+
$matrix .='</table>';
|
| 3749 |
+
|
| 3750 |
+
|
| 3751 |
+
|
| 3752 |
+
|
| 3753 |
+
|
| 3754 |
+
if(isset($matrix))
|
| 3755 |
+
{
|
| 3756 |
+
$new_value=$new_value.$matrix;
|
| 3757 |
+
}
|
| 3758 |
+
|
| 3759 |
+
break;
|
| 3760 |
+
}
|
| 3761 |
+
default: break;
|
| 3762 |
+
}
|
| 3763 |
+
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
| 3764 |
+
}
|
| 3765 |
+
}
|
| 3766 |
+
}
|
| 3767 |
+
if (strpos($new_script, "%all%") !== FALSE) {
|
| 3768 |
+
$new_script = str_replace("%all%", $list, $new_script);
|
| 3769 |
+
}
|
| 3770 |
+
$body = $new_script;
|
| 3771 |
+
$mode = 1;
|
| 3772 |
+
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment);
|
| 3773 |
+
$row_mail_one_time = 0;
|
| 3774 |
+
}
|
| 3775 |
+
}
|
| 3776 |
+
}
|
| 3777 |
+
}
|
| 3778 |
+
else {
|
| 3779 |
+
if ($row->mail) {
|
| 3780 |
+
$recipient = $row->mail;
|
| 3781 |
+
$subject = $row->title;
|
| 3782 |
+
$new_script = wpautop($row->script_mail);
|
| 3783 |
+
foreach($label_order_original as $key => $label_each) {
|
| 3784 |
+
if (strpos($row->script_mail, "%" . $label_each . "%") !== FALSE) {
|
| 3785 |
+
$type = $label_type[$key];
|
| 3786 |
+
if ($type != "type_submit_reset" or $type != "type_map" or $type != "type_editor" or $type!="type_captcha" or $type != "type_arithmetic_captcha" or $type!="type_recaptcha" or $type!="type_button") {
|
| 3787 |
+
$new_value = "";
|
| 3788 |
+
switch ($type) {
|
| 3789 |
+
case 'type_text':
|
| 3790 |
+
case 'type_password':
|
| 3791 |
+
case 'type_textarea':
|
| 3792 |
+
case "type_date":
|
| 3793 |
+
case "type_own_select":
|
| 3794 |
+
case "type_country":
|
| 3795 |
+
case "type_number": {
|
| 3796 |
+
$element = $_POST[$key."_element".$id];
|
| 3797 |
+
if (isset($element)) {
|
| 3798 |
+
$new_value = $element;
|
| 3799 |
+
}
|
| 3800 |
+
break;
|
| 3801 |
+
}
|
| 3802 |
+
case "type_hidden": {
|
| 3803 |
+
$element = $_POST[$element_label];
|
| 3804 |
+
if (isset($element)) {
|
| 3805 |
+
$new_value = $element;
|
| 3806 |
+
}
|
| 3807 |
+
break;
|
| 3808 |
+
}
|
| 3809 |
+
case "type_mark_map": {
|
| 3810 |
+
$element = $_POST[$key."_long".$id];
|
| 3811 |
+
if (isset($element)) {
|
| 3812 |
+
$new_value = 'Longitude:'.$_POST[$key."_long".$id].'<br/>Latitude:'.$_POST[$key."_lat".$id];
|
| 3813 |
+
}
|
| 3814 |
+
break;
|
| 3815 |
+
}
|
| 3816 |
+
case "type_submitter_mail": {
|
| 3817 |
+
$element = $_POST[$key."_element".$id];
|
| 3818 |
+
if (isset($element)) {
|
| 3819 |
+
$new_value = $element;
|
| 3820 |
+
}
|
| 3821 |
+
break;
|
| 3822 |
+
}
|
| 3823 |
+
case "type_time": {
|
| 3824 |
+
$hh = $_POST[$key."_hh".$id];
|
| 3825 |
+
if (isset($hh)) {
|
| 3826 |
+
$ss = $_POST[$key."_ss".$id];
|
| 3827 |
+
if (isset($ss)) {
|
| 3828 |
+
$new_value = $_POST[$key."_hh".$id].':'.$_POST[$key."_mm".$id].':'.$_POST[$key."_ss".$id];
|
| 3829 |
+
}
|
| 3830 |
+
else {
|
| 3831 |
+
$new_value = $_POST[$key."_hh".$id].':'.$_POST[$key."_mm".$id];
|
| 3832 |
+
}
|
| 3833 |
+
$am_pm = $_POST[$key."_am_pm".$id];
|
| 3834 |
+
if (isset($am_pm)) {
|
| 3835 |
+
$new_value = $new_value.' '.$_POST[$key."_am_pm".$id];
|
| 3836 |
+
}
|
| 3837 |
+
}
|
| 3838 |
+
break;
|
| 3839 |
+
}
|
| 3840 |
+
case "type_phone": {
|
| 3841 |
+
$element_first = $_POST[$key."_element_first".$id];
|
| 3842 |
+
if (isset($element_first)) {
|
| 3843 |
+
$new_value = $_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id];
|
| 3844 |
+
}
|
| 3845 |
+
break;
|
| 3846 |
+
}
|
| 3847 |
+
case "type_name": {
|
| 3848 |
+
$element_first = $_POST[$key."_element_first".$id];
|
| 3849 |
+
if (isset($element_first)) {
|
| 3850 |
+
$element_title = $_POST[$key."_element_title".$id];
|
| 3851 |
+
if (isset($element_title)) {
|
| 3852 |
+
$new_value = $_POST[$key."_element_title".$id].' '.$_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id].' '.$_POST[$key."_element_middle".$id];
|
| 3853 |
+
}
|
| 3854 |
+
else {
|
| 3855 |
+
$new_value = $_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id];
|
| 3856 |
+
}
|
| 3857 |
+
}
|
| 3858 |
+
break;
|
| 3859 |
+
}
|
| 3860 |
+
case "type_address": {
|
| 3861 |
+
if (isset($_POST[$key."_street1".$id])) {
|
| 3862 |
+
$new_value = $new_value.$_POST[$key."_street1".$id];
|
| 3863 |
+
break;
|
| 3864 |
+
}
|
| 3865 |
+
if (isset($_POST[$key."_street2".$id])) {
|
| 3866 |
+
$new_value = $new_value.$_POST[$key."_street2".$id];
|
| 3867 |
+
break;
|
| 3868 |
+
}
|
| 3869 |
+
if (isset($_POST[$key."_city".$id])) {
|
| 3870 |
+
$new_value = $new_value.$_POST[$key."_city".$id];
|
| 3871 |
+
break;
|
| 3872 |
+
}
|
| 3873 |
+
if (isset($_POST[$key."_state".$id])) {
|
| 3874 |
+
$new_value = $new_value.$_POST[$key."_state".$id];
|
| 3875 |
+
break;
|
| 3876 |
+
}
|
| 3877 |
+
if (isset($_POST[$key."_postal".$id])) {
|
| 3878 |
+
$new_value = $new_value.$_POST[$key."_postal".$id];
|
| 3879 |
+
break;
|
| 3880 |
+
}
|
| 3881 |
+
if (isset($_POST[$key."_country".$id])) {
|
| 3882 |
+
$new_value = $new_value.$_POST[$key."_country".$id];
|
| 3883 |
+
break;
|
| 3884 |
+
}
|
| 3885 |
+
}
|
| 3886 |
+
case "type_date_fields": {
|
| 3887 |
+
$day = $_POST[$key."_day".$id];
|
| 3888 |
+
if (isset($day)) {
|
| 3889 |
+
$new_value = $_POST[$key."_day".$id].'-'.$_POST[$key."_month".$id].'-'.$_POST[$key."_year".$id];
|
| 3890 |
+
}
|
| 3891 |
+
break;
|
| 3892 |
+
}
|
| 3893 |
+
case "type_radio": {
|
| 3894 |
+
$element = $_POST[$key."_other_input".$id];
|
| 3895 |
+
if (isset($element)) {
|
| 3896 |
+
$new_value = $_POST[$key."_other_input".$id];
|
| 3897 |
+
break;
|
| 3898 |
+
}
|
| 3899 |
+
$element = $_POST[$key."_element".$id];
|
| 3900 |
+
if (isset($element)) {
|
| 3901 |
+
$new_value = $element;
|
| 3902 |
+
}
|
| 3903 |
+
break;
|
| 3904 |
+
}
|
| 3905 |
+
case "type_checkbox": {
|
| 3906 |
+
$start = -1;
|
| 3907 |
+
for ($j = 0; $j < 100; $j++) {
|
| 3908 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3909 |
+
if (isset($element)) {
|
| 3910 |
+
$start = $j;
|
| 3911 |
+
break;
|
| 3912 |
+
}
|
| 3913 |
+
}
|
| 3914 |
+
$other_element_id = -1;
|
| 3915 |
+
$is_other = $_POST[$key."_allow_other".$id];
|
| 3916 |
+
if ($is_other == "yes") {
|
| 3917 |
+
$other_element_id = $_POST[$key."_allow_other_num".$id];
|
| 3918 |
+
}
|
| 3919 |
+
if ($start != -1) {
|
| 3920 |
+
for ($j = $start; $j < 100; $j++) {
|
| 3921 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3922 |
+
if (isset($element)) {
|
| 3923 |
+
if ($j == $other_element_id) {
|
| 3924 |
+
$new_value = $new_value.$_POST[$key."_other_input".$id].'<br>';
|
| 3925 |
+
}
|
| 3926 |
+
else {
|
| 3927 |
+
$new_value = $new_value.$_POST[$key."_element".$id.$j].'<br>';
|
| 3928 |
+
}
|
| 3929 |
+
}
|
| 3930 |
+
}
|
| 3931 |
+
}
|
| 3932 |
+
break;
|
| 3933 |
+
}
|
| 3934 |
+
case "type_paypal_price": {
|
| 3935 |
+
$new_value = 0;
|
| 3936 |
+
if ($_POST[$key."_element_dollars".$id]) {
|
| 3937 |
+
$new_value = $_POST[$key."_element_dollars".$id];
|
| 3938 |
+
}
|
| 3939 |
+
if ($_POST[$key."_element_cents".$id]) {
|
| 3940 |
+
$new_value = $new_value.'.'.$_POST[$key."_element_cents".$id];
|
| 3941 |
+
}
|
| 3942 |
+
$new_value = $new_value.$form_currency;
|
| 3943 |
+
break;
|
| 3944 |
+
}
|
| 3945 |
+
case "type_paypal_select": {
|
| 3946 |
+
$new_value = $_POST[$key."_element_label".$id].':'.$_POST[$key."_element".$id].$form_currency;
|
| 3947 |
+
$element_quantity_label = $_POST[$key."_element_quantity_label".$id];
|
| 3948 |
+
if (isset($element_quantity_label)) {
|
| 3949 |
+
$quantity = ((isset($_POST[$key . "_element_quantity" . $id]) && ($_POST[$key . "_element_quantity" . $id] >= 1)) ? $_POST[$key . "_element_quantity" . $id] : 1);
|
| 3950 |
+
$new_value .= '<br/>'.$_POST[$key."_element_quantity_label".$id].': '.$quantity;
|
| 3951 |
+
}
|
| 3952 |
+
for ($k = 0; $k < 50; $k++) {
|
| 3953 |
+
$temp_val = $_POST[$key."_element_property_value".$id.$k];
|
| 3954 |
+
if (isset($temp_val)) {
|
| 3955 |
+
$new_value .= '<br/>'.$_POST[$key."_element_property_label".$id.$k].': '.$_POST[$key."_element_property_value".$id.$k];
|
| 3956 |
+
}
|
| 3957 |
+
}
|
| 3958 |
+
break;
|
| 3959 |
+
}
|
| 3960 |
+
case "type_paypal_radio": {
|
| 3961 |
+
$new_value = $_POST[$key."_element_label".$id].' - '.$_POST[$key."_element".$id].$form_currency;
|
| 3962 |
+
$element_quantity_label = $_POST[$key."_element_quantity_label".$id];
|
| 3963 |
+
if (isset($element_quantity_label)) {
|
| 3964 |
+
$quantity = ((isset($_POST[$key . "_element_quantity" . $id]) && ($_POST[$key . "_element_quantity" . $id] >= 1)) ? $_POST[$key . "_element_quantity" . $id] : 1);
|
| 3965 |
+
$new_value .= '<br/>'.$_POST[$key."_element_quantity_label".$id].': '.$quantity;
|
| 3966 |
+
}
|
| 3967 |
+
for ($k = 0; $k < 50; $k++) {
|
| 3968 |
+
$temp_val = $_POST[$key."_element_property_value".$id.$k];
|
| 3969 |
+
if (isset($temp_val)) {
|
| 3970 |
+
$new_value .= '<br/>'.$_POST[$key."_element_property_label".$id.$k].': '.$_POST[$key."_element_property_value".$id.$k];
|
| 3971 |
+
}
|
| 3972 |
+
}
|
| 3973 |
+
break;
|
| 3974 |
+
}
|
| 3975 |
+
case "type_paypal_shipping": {
|
| 3976 |
+
$new_value = $_POST[$key."_element_label".$id].' : '.$_POST[$key."_element".$id].$form_currency;
|
| 3977 |
+
break;
|
| 3978 |
+
}
|
| 3979 |
+
case "type_paypal_checkbox": {
|
| 3980 |
+
$start = -1;
|
| 3981 |
+
for ($j = 0; $j < 100; $j++) {
|
| 3982 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3983 |
+
if (isset($element)) {
|
| 3984 |
+
$start = $j;
|
| 3985 |
+
break;
|
| 3986 |
+
}
|
| 3987 |
+
}
|
| 3988 |
+
if ($start != -1) {
|
| 3989 |
+
for ($j = $start; $j < 100; $j++) {
|
| 3990 |
+
$element = $_POST[$key."_element".$id.$j];
|
| 3991 |
+
if (isset($element)) {
|
| 3992 |
+
$new_value = $new_value.$_POST[$key."_element".$id.$j."_label"].' - '.(($_POST[$key."_element".$id.$j] == '') ? '0'.$form_currency : $_POST[$key."_element".$id.$j]).$form_currency.'<br>';
|
| 3993 |
+
}
|
| 3994 |
+
}
|
| 3995 |
+
}
|
| 3996 |
+
$element_quantity_label = $_POST[$key."_element_quantity_label".$id];
|
| 3997 |
+
if (isset($element_quantity_label)) {
|
| 3998 |
+
$quantity = ((isset($_POST[$key . "_element_quantity" . $id]) && ($_POST[$key . "_element_quantity" . $id] >= 1)) ? $_POST[$key . "_element_quantity" . $id] : 1);
|
| 3999 |
+
$new_value .= '<br/>'.$_POST[$key."_element_quantity_label".$id].': '.$quantity;
|
| 4000 |
+
}
|
| 4001 |
+
for ($k = 0; $k < 50; $k++) {
|
| 4002 |
+
$temp_val = $_POST[$key."_element_property_value".$id.$k];
|
| 4003 |
+
if (isset($temp_val)) {
|
| 4004 |
+
$new_value .= '<br/>'.$_POST[$key."_element_property_label".$id.$k].': '.$_POST[$key."_element_property_value".$id.$k];
|
| 4005 |
+
}
|
| 4006 |
+
}
|
| 4007 |
+
break;
|
| 4008 |
+
}
|
| 4009 |
+
case "type_star_rating":
|
| 4010 |
+
{
|
| 4011 |
+
$element=$_POST[$key."_star_amount".$id];
|
| 4012 |
+
$selected=(isset($_POST[$key."_selected_star_amount".$id]) ? $_POST[$key."_selected_star_amount".$id] : 0);
|
| 4013 |
+
if(isset($element))
|
| 4014 |
+
{
|
| 4015 |
+
$new_value=$new_value.$selected.'/'.$element;
|
| 4016 |
+
}
|
| 4017 |
+
break;
|
| 4018 |
+
}
|
| 4019 |
+
|
| 4020 |
+
|
| 4021 |
+
case "type_scale_rating":
|
| 4022 |
+
{
|
| 4023 |
+
$element=$_POST[$key."_scale_amount".$id];
|
| 4024 |
+
$selected=(isset($_POST[$key."_scale_radio".$id]) ? $_POST[$key."_scale_radio".$id] : 0);
|
| 4025 |
+
|
| 4026 |
+
|
| 4027 |
+
if(isset($element))
|
| 4028 |
+
{
|
| 4029 |
+
$new_value=$new_value.$selected.'/'.$element;
|
| 4030 |
+
}
|
| 4031 |
+
break;
|
| 4032 |
+
}
|
| 4033 |
+
|
| 4034 |
+
case "type_spinner":
|
| 4035 |
+
{
|
| 4036 |
+
|
| 4037 |
+
if(isset($_POST[$key."_element".$id]))
|
| 4038 |
+
{
|
| 4039 |
+
$new_value=$new_value.$_POST[$key."_element".$id];
|
| 4040 |
+
}
|
| 4041 |
+
break;
|
| 4042 |
+
}
|
| 4043 |
+
|
| 4044 |
+
case "type_slider":
|
| 4045 |
+
{
|
| 4046 |
+
|
| 4047 |
+
$element=$_POST[$key."_slider_value".$id];
|
| 4048 |
+
if(isset($element))
|
| 4049 |
+
{
|
| 4050 |
+
$new_value=$new_value.$element;
|
| 4051 |
+
}
|
| 4052 |
+
break;
|
| 4053 |
+
}
|
| 4054 |
+
case "type_range":
|
| 4055 |
+
{
|
| 4056 |
+
|
| 4057 |
+
$element0=$_POST[$key."_element".$id.'0'];
|
| 4058 |
+
$element1=$_POST[$key."_element".$id.'1'];
|
| 4059 |
+
if(isset($element0) || isset($element1))
|
| 4060 |
+
{
|
| 4061 |
+
$new_value=$new_value.$element0.'-'.$element1;
|
| 4062 |
+
}
|
| 4063 |
+
break;
|
| 4064 |
+
}
|
| 4065 |
+
|
| 4066 |
+
case "type_grading":
|
| 4067 |
+
{
|
| 4068 |
+
$element=$_POST[$key."_hidden_item".$id];
|
| 4069 |
+
$grading = explode(":",$element);
|
| 4070 |
+
$items_count = sizeof($grading)-1;
|
| 4071 |
+
|
| 4072 |
+
$element = "";
|
| 4073 |
+
$total = "";
|
| 4074 |
+
|
| 4075 |
+
for($k=0;$k<$items_count;$k++)
|
| 4076 |
+
|
| 4077 |
+
{
|
| 4078 |
+
$element .= $grading[$k].":".$_POST[$key."_element".$id.$k]." ";
|
| 4079 |
+
$total += $_POST[$key."_element".$id.$k];
|
| 4080 |
+
}
|
| 4081 |
+
|
| 4082 |
+
$element .="Total:".$total;
|
| 4083 |
+
|
| 4084 |
+
|
| 4085 |
+
if(isset($element))
|
| 4086 |
+
{
|
| 4087 |
+
$new_value=$new_value.$element;
|
| 4088 |
+
}
|
| 4089 |
+
break;
|
| 4090 |
+
}
|
| 4091 |
+
|
| 4092 |
+
case "type_matrix":
|
| 4093 |
+
{
|
| 4094 |
+
|
| 4095 |
+
|
| 4096 |
+
$input_type=$_POST[$key."_input_type".$id];
|
| 4097 |
+
|
| 4098 |
+
$mat_rows = $_POST[$key."_hidden_row".$id];
|
| 4099 |
+
$mat_rows = explode('***', $mat_rows);
|
| 4100 |
+
$mat_rows = array_slice($mat_rows,0, count($mat_rows)-1);
|
| 4101 |
+
|
| 4102 |
+
$mat_columns = $_POST[$key."_hidden_column".$id];
|
| 4103 |
+
$mat_columns = explode('***', $mat_columns);
|
| 4104 |
+
$mat_columns = array_slice($mat_columns,0, count($mat_columns)-1);
|
| 4105 |
+
|
| 4106 |
+
$row_ids=explode(",",substr($_POST[$key."_row_ids".$id], 0, -1));
|
| 4107 |
+
$column_ids=explode(",",substr($_POST[$key."_column_ids".$id], 0, -1));
|
| 4108 |
+
|
| 4109 |
+
|
| 4110 |
+
$matrix="<table>";
|
| 4111 |
+
|
| 4112 |
+
$matrix .='<tr><td></td>';
|
| 4113 |
+
|
| 4114 |
+
for( $k=0;$k< count($mat_columns) ;$k++)
|
| 4115 |
+
$matrix .='<td style="background-color:#BBBBBB; padding:5px; ">'.$mat_columns[$k].'</td>';
|
| 4116 |
+
$matrix .='</tr>';
|
| 4117 |
+
|
| 4118 |
+
$aaa=Array();
|
| 4119 |
+
$k=0;
|
| 4120 |
+
foreach($row_ids as $row_id)
|
| 4121 |
+
{
|
| 4122 |
+
$matrix .='<tr><td style="background-color:#BBBBBB; padding:5px;">'.$mat_rows[$k].'</td>';
|
| 4123 |
+
|
| 4124 |
+
if($input_type=="radio"){
|
| 4125 |
+
|
| 4126 |
+
$mat_radio = (isset($_POST[$key."_input_element".$id.$row_id]) ? $_POST[$key."_input_element".$id.$row_id] : 0);
|
| 4127 |
+
if($mat_radio==0){
|
| 4128 |
+
$checked="";
|
| 4129 |
+
$aaa[1]="";
|
| 4130 |
+
}
|
| 4131 |
+
else{
|
| 4132 |
+
$aaa=explode("_",$mat_radio);
|
| 4133 |
+
}
|
| 4134 |
+
|
| 4135 |
+
foreach($column_ids as $column_id){
|
| 4136 |
+
if($aaa[1]==$column_id)
|
| 4137 |
+
$checked="checked";
|
| 4138 |
+
else
|
| 4139 |
+
$checked="";
|
| 4140 |
+
$matrix .='<td style="text-align:center"><input type="radio" '.$checked.' disabled /></td>';
|
| 4141 |
+
|
| 4142 |
+
}
|
| 4143 |
+
|
| 4144 |
+
}
|
| 4145 |
+
else{
|
| 4146 |
+
if($input_type=="checkbox")
|
| 4147 |
+
{
|
| 4148 |
+
foreach($column_ids as $column_id){
|
| 4149 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
| 4150 |
+
if($checked==1)
|
| 4151 |
+
$checked = "checked";
|
| 4152 |
+
else
|
| 4153 |
+
$checked = "";
|
| 4154 |
+
|
| 4155 |
+
$matrix .='<td style="text-align:center"><input type="checkbox" '.$checked.' disabled /></td>';
|
| 4156 |
+
|
| 4157 |
+
}
|
| 4158 |
+
|
| 4159 |
+
}
|
| 4160 |
+
else
|
| 4161 |
+
{
|
| 4162 |
+
if($input_type=="text")
|
| 4163 |
+
{
|
| 4164 |
+
|
| 4165 |
+
foreach($column_ids as $column_id){
|
| 4166 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
| 4167 |
+
|
| 4168 |
+
$matrix .='<td style="text-align:center"><input type="text" value="'.$checked.'" disabled /></td>';
|
| 4169 |
+
|
| 4170 |
+
}
|
| 4171 |
+
|
| 4172 |
+
}
|
| 4173 |
+
else{
|
| 4174 |
+
foreach($column_ids as $column_id){
|
| 4175 |
+
$checked = $_POST[$i."_select_yes_no".$id.$row_id.'_'.$column_id];
|
| 4176 |
+
$matrix .='<td style="text-align:center">'.$checked.'</td>';
|
| 4177 |
+
|
| 4178 |
+
|
| 4179 |
+
|
| 4180 |
+
}
|
| 4181 |
+
}
|
| 4182 |
+
|
| 4183 |
+
}
|
| 4184 |
+
|
| 4185 |
+
}
|
| 4186 |
+
$matrix .='</tr>';
|
| 4187 |
+
$k++;
|
| 4188 |
+
}
|
| 4189 |
+
$matrix .='</table>';
|
| 4190 |
+
|
| 4191 |
+
|
| 4192 |
+
|
| 4193 |
+
|
| 4194 |
+
|
| 4195 |
+
if(isset($matrix))
|
| 4196 |
+
{
|
| 4197 |
+
$new_value=$new_value.$matrix;
|
| 4198 |
+
}
|
| 4199 |
+
|
| 4200 |
+
break;
|
| 4201 |
+
}
|
| 4202 |
+
default: break;
|
| 4203 |
+
}
|
| 4204 |
+
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
| 4205 |
+
}
|
| 4206 |
+
}
|
| 4207 |
+
}
|
| 4208 |
+
if (strpos($new_script, "%all%") !== FALSE) {
|
| 4209 |
+
$new_script = str_replace("%all%", $list, $new_script);
|
| 4210 |
+
}
|
| 4211 |
+
$body = $new_script;
|
| 4212 |
+
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment);
|
| 4213 |
+
}
|
| 4214 |
+
}
|
| 4215 |
+
if ($row->mail) {
|
| 4216 |
+
if ($send != TRUE) {
|
| 4217 |
+
$_SESSION['error_or_no' . $id] = 1;
|
| 4218 |
+
$msg = addslashes(__('Error, email was not sent.', 'form_maker'));
|
| 4219 |
+
}
|
| 4220 |
+
else {
|
| 4221 |
+
$_SESSION['error_or_no' . $id] = 0;
|
| 4222 |
+
$msg = addslashes(__('Your form was successfully submitted.', 'form_maker'));
|
| 4223 |
+
}
|
| 4224 |
+
}
|
| 4225 |
+
else {
|
| 4226 |
+
$_SESSION['error_or_no' . $id] = 0;
|
| 4227 |
+
$msg = addslashes(__('Your form was successfully submitted.', 'form_maker'));
|
| 4228 |
+
}
|
| 4229 |
+
}
|
| 4230 |
+
|
| 4231 |
+
// delete files from uploads (save_upload = 0)
|
| 4232 |
+
if($row->save_uploads == 0){
|
| 4233 |
+
foreach ($all_files as &$all_file) {
|
| 4234 |
+
if (file_exists(ABSPATH.'/'.$all_file['tmp_name'])) {
|
| 4235 |
+
unlink(ABSPATH.'/'.$all_file['tmp_name']);
|
| 4236 |
+
}
|
| 4237 |
+
}
|
| 4238 |
+
|
| 4239 |
+
}
|
| 4240 |
+
$https = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
|
| 4241 |
+
switch ($row->submit_text_type) {
|
| 4242 |
+
case "2":
|
| 4243 |
+
case "5": {
|
| 4244 |
+
if ($row->submit_text_type != 4) {
|
| 4245 |
+
$_SESSION['massage_after_submit' . $id] = $msg;
|
| 4246 |
+
}
|
| 4247 |
+
$_SESSION['form_submit_type' . $id] = $row->submit_text_type . "," . $row->id;
|
| 4248 |
+
if ($row->article_id) {
|
| 4249 |
+
$redirect_url = $row->article_id;
|
| 4250 |
+
}
|
| 4251 |
+
else {
|
| 4252 |
+
$redirect_url = $https . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
|
| 4253 |
+
}
|
| 4254 |
+
break;
|
| 4255 |
+
}
|
| 4256 |
+
case "3": {
|
| 4257 |
+
if ($row->submit_text_type != 4) {
|
| 4258 |
+
$_SESSION['massage_after_submit' . $id] = $msg;
|
| 4259 |
+
}
|
| 4260 |
+
$_SESSION['form_submit_type' . $id] = $row->submit_text_type . "," . $row->id;
|
| 4261 |
+
$redirect_url = $https . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
|
| 4262 |
+
break;
|
| 4263 |
+
}
|
| 4264 |
+
case "4": {
|
| 4265 |
+
if ($row->submit_text_type != 4) {
|
| 4266 |
+
$_SESSION['massage_after_submit' . $id] = $msg;
|
| 4267 |
+
}
|
| 4268 |
+
$_SESSION['form_submit_type' . $id] = $row->submit_text_type . "," . $row->id;
|
| 4269 |
+
$redirect_url = $row->url;
|
| 4270 |
+
break;
|
| 4271 |
+
}
|
| 4272 |
+
default: {
|
| 4273 |
+
if ($row->submit_text_type != 4) {
|
| 4274 |
+
$_SESSION['massage_after_submit' . $id] = $msg;
|
| 4275 |
+
}
|
| 4276 |
+
$_SESSION['form_submit_type' . $id] = $row->submit_text_type . "," . $row->id;
|
| 4277 |
+
$redirect_url = $https . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
|
| 4278 |
+
break;
|
| 4279 |
+
}
|
| 4280 |
+
}
|
| 4281 |
+
if (!$str) {
|
| 4282 |
+
wp_redirect($redirect_url);
|
| 4283 |
+
exit;
|
| 4284 |
+
}
|
| 4285 |
+
else {
|
| 4286 |
+
$_SESSION['redirect_paypal'.$id] = 1;
|
| 4287 |
+
|
| 4288 |
+
$str .= "&return=" . urlencode($redirect_url);
|
| 4289 |
+
wp_redirect($str);
|
| 4290 |
+
exit;
|
| 4291 |
+
}
|
| 4292 |
+
}
|
| 4293 |
+
|
| 4294 |
+
public static function custom_fields_mail($type, $key, $id, $attachment, $form_currency)
|
| 4295 |
+
{
|
| 4296 |
+
$new_value ="";
|
| 4297 |
+
|
| 4298 |
+
$disabled_fields = explode(',', isset($_REQUEST["disabled_fields".$id]) ? $_REQUEST["disabled_fields".$id] : "");
|
| 4299 |
+
$disabled_fields = array_slice($disabled_fields,0, count($disabled_fields)-1);
|
| 4300 |
+
|
| 4301 |
+
if($type!="type_submit_reset" or $type!="type_map" or $type!="type_editor" or $type!="type_captcha" or $type != "type_arithmetic_captcha" or $type!="type_recaptcha" or $type!="type_button") {
|
| 4302 |
+
switch ($type) {
|
| 4303 |
+
case 'type_text':
|
| 4304 |
+
case 'type_password':
|
| 4305 |
+
case 'type_textarea':
|
| 4306 |
+
case "type_date":
|
| 4307 |
+
case "type_own_select":
|
| 4308 |
+
case "type_country":
|
| 4309 |
+
case "type_number": {
|
| 4310 |
+
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
| 4311 |
+
if(isset($element)) {
|
| 4312 |
+
$new_value = $element;
|
| 4313 |
+
}
|
| 4314 |
+
break;
|
| 4315 |
+
}
|
| 4316 |
+
case "type_file_upload": {
|
| 4317 |
+
if($attachment)
|
| 4318 |
+
foreach($attachment as $attachment_temp)
|
| 4319 |
+
{
|
| 4320 |
+
$uploadedFileNameParts = explode('.',$attachment_temp[1]);
|
| 4321 |
+
$uploadedFileExtension = array_pop($uploadedFileNameParts);
|
| 4322 |
+
|
| 4323 |
+
$invalidFileExts = array('gif', 'jpg', 'jpeg', 'png', 'swf', 'psd', 'bmp', 'tiff', 'jpc', 'jp2', 'jpf', 'jb2', 'swc', 'aiff', 'wbmp', 'xbm' );
|
| 4324 |
+
$extOk = false;
|
| 4325 |
+
|
| 4326 |
+
foreach($invalidFileExts as $key => $valuee)
|
| 4327 |
+
{
|
| 4328 |
+
if(is_numeric(strpos(strtolower($valuee), strtolower($uploadedFileExtension) )) )
|
| 4329 |
+
$extOk = true;
|
| 4330 |
+
}
|
| 4331 |
+
|
| 4332 |
+
if ($extOk == true)
|
| 4333 |
+
$new_value .= '<img src="'.site_url().'/'.$attachment_temp.'" alt="'.$attachment_temp[1].'"/>';
|
| 4334 |
+
|
| 4335 |
+
}
|
| 4336 |
+
break;
|
| 4337 |
+
}
|
| 4338 |
+
case "type_hidden": {
|
| 4339 |
+
$element = isset($_POST[$key]) ? $_POST[$key] : NULL;
|
| 4340 |
+
if(isset($element)) {
|
| 4341 |
+
$new_value = $element;
|
| 4342 |
+
}
|
| 4343 |
+
break;
|
| 4344 |
+
}
|
| 4345 |
+
case "type_mark_map": {
|
| 4346 |
+
$element = isset($_POST['wdform_'.$key."_long".$id]) ? $_POST['wdform_'.$key."_long".$id] : NULL;
|
| 4347 |
+
if(isset($element)) {
|
| 4348 |
+
$new_value = 'Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_'.$key."_lat".$id]) ? $_POST['wdform_'.$key."_lat".$id] : "");
|
| 4349 |
+
}
|
| 4350 |
+
break;
|
| 4351 |
+
}
|
| 4352 |
+
case "type_submitter_mail": {
|
| 4353 |
+
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
| 4354 |
+
if(isset($element)) {
|
| 4355 |
+
$new_value = $element;
|
| 4356 |
+
}
|
| 4357 |
+
break;
|
| 4358 |
+
}
|
| 4359 |
+
case "type_time": {
|
| 4360 |
+
$hh = isset($_POST['wdform_'.$key."_hh".$id]) ? $_POST['wdform_'.$key."_hh".$id] : NULL;
|
| 4361 |
+
if(isset($hh)) {
|
| 4362 |
+
$ss = isset($_POST['wdform_'.$key."_ss".$id]) ? $_POST['wdform_'.$key."_ss".$id] : NULL;
|
| 4363 |
+
if(isset($ss)) {
|
| 4364 |
+
$new_value = $hh . ':' . (isset($_POST['wdform_'.$key."_mm".$id]) ? $_POST['wdform_'.$key."_mm".$id] : "") . ':' . $ss;
|
| 4365 |
+
}
|
| 4366 |
+
else {
|
| 4367 |
+
$new_value = $hh . ':' . (isset($_POST['wdform_'.$key."_mm".$id]) ? $_POST['wdform_'.$key."_mm".$id] : "");
|
| 4368 |
+
}
|
| 4369 |
+
$am_pm = isset($_POST['wdform_'.$key."_am_pm".$id]) ? $_POST['wdform_'.$key."_am_pm".$id] : NULL;
|
| 4370 |
+
if(isset($am_pm)) {
|
| 4371 |
+
$new_value = $new_value . ' ' . $am_pm;
|
| 4372 |
+
}
|
| 4373 |
+
}
|
| 4374 |
+
break;
|
| 4375 |
+
}
|
| 4376 |
+
|
| 4377 |
+
case "type_phone": {
|
| 4378 |
+
$element_first = isset($_POST['wdform_'.$key."_element_first".$id]) ? $_POST['wdform_'.$key."_element_first".$id] : NULL;
|
| 4379 |
+
if(isset($element_first)) {
|
| 4380 |
+
$new_value = $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "");
|
| 4381 |
+
}
|
| 4382 |
+
break;
|
| 4383 |
+
}
|
| 4384 |
+
case "type_name": {
|
| 4385 |
+
$element_first = isset($_POST['wdform_'.$key."_element_first".$id]) ? $_POST['wdform_'.$key."_element_first".$id] : NULL;
|
| 4386 |
+
if(isset($element_first)) {
|
| 4387 |
+
$element_title = isset($_POST['wdform_'.$key."_element_title".$id]) ? $_POST['wdform_'.$key."_element_title".$id] : NULL;
|
| 4388 |
+
if(isset($element_title)) {
|
| 4389 |
+
$new_value = $element_title . ' ' . $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "") . ' ' . (isset($_POST['wdform_'.$key."_element_middle".$id]) ? $_POST['wdform_'.$key."_element_middle".$id] : "");
|
| 4390 |
+
}
|
| 4391 |
+
else {
|
| 4392 |
+
$new_value = $element_first . ' ' . (isset($_POST['wdform_'.$key."_element_last".$id]) ? $_POST['wdform_'.$key."_element_last".$id] : "");
|
| 4393 |
+
}
|
| 4394 |
+
}
|
| 4395 |
+
break;
|
| 4396 |
+
}
|
| 4397 |
+
case "type_address": {
|
| 4398 |
+
$street1 = isset($_POST['wdform_'.$key."_street1".$id]) ? $_POST['wdform_'.$key."_street1".$id] : NULL;
|
| 4399 |
+
if(isset($street1)) {
|
| 4400 |
+
$new_value = $street1;
|
| 4401 |
+
break;
|
| 4402 |
+
}
|
| 4403 |
+
$street2 = isset($_POST['wdform_'.$key."_street2".$id]) ? $_POST['wdform_'.$key."_street2".$id] : NULL;
|
| 4404 |
+
if(isset($street2)) {
|
| 4405 |
+
$new_value = $street2;
|
| 4406 |
+
break;
|
| 4407 |
+
}
|
| 4408 |
+
$city = isset($_POST['wdform_'.$key."_city".$id]) ? $_POST['wdform_'.$key."_city".$id] : NULL;
|
| 4409 |
+
if(isset($city)) {
|
| 4410 |
+
$new_value = $city;
|
| 4411 |
+
break;
|
| 4412 |
+
}
|
| 4413 |
+
$state = isset($_POST['wdform_'.$key."_state".$id]) ? $_POST['wdform_'.$key."_state".$id] : NULL;
|
| 4414 |
+
if(isset($state)) {
|
| 4415 |
+
$new_value = $state;
|
| 4416 |
+
break;
|
| 4417 |
+
}
|
| 4418 |
+
$postal = isset($_POST['wdform_'.$key."_postal".$id]) ? $_POST['wdform_'.$key."_postal".$id] : NULL;
|
| 4419 |
+
if(isset($postal)) {
|
| 4420 |
+
$new_value = $postal;
|
| 4421 |
+
break;
|
| 4422 |
+
}
|
| 4423 |
+
$country = isset($_POST['wdform_'.$key."_country".$id]) ? $_POST['wdform_'.$key."_country".$id] : NULL;
|
| 4424 |
+
if(isset($country)) {
|
| 4425 |
+
$new_value = $country;
|
| 4426 |
+
break;
|
| 4427 |
+
}
|
| 4428 |
+
break;
|
| 4429 |
+
}
|
| 4430 |
+
case "type_date_fields": {
|
| 4431 |
+
$day = isset($_POST['wdform_'.$key."_day".$id]) ? $_POST['wdform_'.$key."_day".$id] : NULL;
|
| 4432 |
+
if(isset($day)) {
|
| 4433 |
+
$new_value = $day . '-' . (isset($_POST['wdform_'.$key."_month".$id]) ? $_POST['wdform_'.$key."_month".$id] : "") . '-' . (isset($_POST['wdform_'.$key."_year".$id]) ? $_POST['wdform_'.$key."_year".$id] : "");
|
| 4434 |
+
}
|
| 4435 |
+
break;
|
| 4436 |
+
}
|
| 4437 |
+
|
| 4438 |
+
case "type_radio": {
|
| 4439 |
+
$element = isset($_POST['wdform_'.$key."_other_input".$id]) ? $_POST['wdform_'.$key."_other_input".$id] : NULL;
|
| 4440 |
+
if(isset($element)) {
|
| 4441 |
+
$new_value = $element;
|
| 4442 |
+
break;
|
| 4443 |
+
}
|
| 4444 |
+
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
| 4445 |
+
if(isset($element)) {
|
| 4446 |
+
$new_value = $element;
|
| 4447 |
+
}
|
| 4448 |
+
break;
|
| 4449 |
+
}
|
| 4450 |
+
case "type_checkbox": {
|
| 4451 |
+
$start = -1;
|
| 4452 |
+
for($j = 0; $j < 100; $j++) {
|
| 4453 |
+
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
| 4454 |
+
if(isset($element)) {
|
| 4455 |
+
$start = $j;
|
| 4456 |
+
break;
|
| 4457 |
+
}
|
| 4458 |
+
}
|
| 4459 |
+
$other_element_id = -1;
|
| 4460 |
+
$is_other = isset($_POST['wdform_'.$key."_allow_other".$id]) ? $_POST['wdform_'.$key."_allow_other".$id] : "";
|
| 4461 |
+
if($is_other == "yes") {
|
| 4462 |
+
$other_element_id = isset($_POST['wdform_'.$key."_allow_other_num".$id]) ? $_POST['wdform_'.$key."_allow_other_num".$id] : "";
|
| 4463 |
+
}
|
| 4464 |
+
if($start != -1) {
|
| 4465 |
+
for($j = $start; $j < 100; $j++) {
|
| 4466 |
+
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
| 4467 |
+
if(isset($element)) {
|
| 4468 |
+
if($j == $other_element_id) {
|
| 4469 |
+
$new_value = $new_value . (isset($_POST['wdform_'.$key."_other_input".$id]) ? $_POST['wdform_'.$key."_other_input".$id] : "") . '<br>';
|
| 4470 |
+
}
|
| 4471 |
+
else {
|
| 4472 |
+
$new_value = $new_value . $element . '<br>';
|
| 4473 |
+
}
|
| 4474 |
+
}
|
| 4475 |
+
}
|
| 4476 |
+
}
|
| 4477 |
+
break;
|
| 4478 |
+
}
|
| 4479 |
+
case "type_paypal_price": {
|
| 4480 |
+
$new_value = 0;
|
| 4481 |
+
if(isset($_POST['wdform_'.$key."_element_dollars".$id])) {
|
| 4482 |
+
$new_value = $_POST['wdform_'.$key."_element_dollars".$id];
|
| 4483 |
+
}
|
| 4484 |
+
if(isset($_POST['wdform_'.$key."_element_cents".$id])) {
|
| 4485 |
+
$new_value = $new_value . '.' . $_POST['wdform_'.$key."_element_cents".$id];
|
| 4486 |
+
}
|
| 4487 |
+
$new_value = $new_value . $form_currency;
|
| 4488 |
+
break;
|
| 4489 |
+
}
|
| 4490 |
+
case "type_paypal_select": {
|
| 4491 |
+
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ':' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
| 4492 |
+
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
| 4493 |
+
$element_quantity = (isset($_POST['wdform_'.$key."_element_quantity".$id]) && $_POST['wdform_'.$key."_element_quantity".$id]) ? $_POST['wdform_'.$key."_element_quantity".$id] : NULL;
|
| 4494 |
+
if (isset($element_quantity)) {
|
| 4495 |
+
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
| 4496 |
+
}
|
| 4497 |
+
for($k = 0; $k < 50; $k++) {
|
| 4498 |
+
$temp_val = isset($_POST['wdform_'.$key."_property".$id.$k]) ? $_POST['wdform_'.$key."_property".$id.$k] : NULL;
|
| 4499 |
+
if(isset($temp_val)) {
|
| 4500 |
+
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 4501 |
+
}
|
| 4502 |
+
}
|
| 4503 |
+
break;
|
| 4504 |
+
}
|
| 4505 |
+
case "type_paypal_radio": {
|
| 4506 |
+
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ' - ' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
| 4507 |
+
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
| 4508 |
+
$element_quantity = (isset($_POST['wdform_'.$i."_element_quantity".$id]) && $_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
|
| 4509 |
+
if (isset($element_quantity)) {
|
| 4510 |
+
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
| 4511 |
+
}
|
| 4512 |
+
for($k = 0; $k < 50; $k++) {
|
| 4513 |
+
$temp_val = isset($_POST['wdform_'.$key."_property".$id.$k]) ? $_POST['wdform_'.$key."_property".$id.$k] : NULL;
|
| 4514 |
+
if(isset($temp_val)) {
|
| 4515 |
+
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 4516 |
+
}
|
| 4517 |
+
}
|
| 4518 |
+
break;
|
| 4519 |
+
}
|
| 4520 |
+
case "type_paypal_shipping": {
|
| 4521 |
+
$new_value = (isset($_POST['wdform_'.$key."_element_label".$id]) ? $_POST['wdform_'.$key."_element_label".$id] : "") . ' : ' . (isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : "") . $form_currency;
|
| 4522 |
+
break;
|
| 4523 |
+
}
|
| 4524 |
+
case "type_paypal_checkbox": {
|
| 4525 |
+
$start = -1;
|
| 4526 |
+
for($j = 0; $j < 100; $j++) {
|
| 4527 |
+
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
| 4528 |
+
if(isset($element)) {
|
| 4529 |
+
$start = $j;
|
| 4530 |
+
break;
|
| 4531 |
+
}
|
| 4532 |
+
}
|
| 4533 |
+
if($start != -1) {
|
| 4534 |
+
for($j = $start; $j < 100; $j++) {
|
| 4535 |
+
$element = isset($_POST['wdform_'.$key."_element".$id.$j]) ? $_POST['wdform_'.$key."_element".$id.$j] : NULL;
|
| 4536 |
+
if(isset($element)) {
|
| 4537 |
+
$new_value = $new_value . (isset($_POST['wdform_'.$key."_element".$id.$j."_label"]) ? $_POST['wdform_'.$key."_element".$id.$j."_label"] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . '<br>';
|
| 4538 |
+
}
|
| 4539 |
+
}
|
| 4540 |
+
}
|
| 4541 |
+
$element_quantity_label = isset($_POST['wdform_'.$key."_element_quantity_label".$id]) ? $_POST['wdform_'.$key."_element_quantity_label".$id] : NULL;
|
| 4542 |
+
$element_quantity = (isset($_POST['wdform_'.$key."_element_quantity".$id]) && $_POST['wdform_'.$key."_element_quantity".$id]) ? $_POST['wdform_'.$key."_element_quantity".$id] : NULL;
|
| 4543 |
+
if (isset($element_quantity)) {
|
| 4544 |
+
$new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
|
| 4545 |
+
}
|
| 4546 |
+
for($k = 0; $k < 50; $k++) {
|
| 4547 |
+
$temp_val = isset($_POST['wdform_'.$key."_property".$id.$k]) ? $_POST['wdform_'.$key."_property".$id.$k] : NULL;
|
| 4548 |
+
if(isset($temp_val)) {
|
| 4549 |
+
$new_value .= '<br/>' . (isset($_POST['wdform_'.$key."_element_property_label".$id.$k]) ? $_POST['wdform_'.$key."_element_property_label".$id.$k] : "") . ': ' . $temp_val;
|
| 4550 |
+
}
|
| 4551 |
+
}
|
| 4552 |
+
break;
|
| 4553 |
+
}
|
| 4554 |
+
case "type_paypal_total": {
|
| 4555 |
+
$element = isset($_POST['wdform_'.$key."_paypal_total".$id]) ? $_POST['wdform_'.$key."_paypal_total".$id] : "";
|
| 4556 |
+
$new_value = $new_value . $element;
|
| 4557 |
+
break;
|
| 4558 |
+
}
|
| 4559 |
+
case "type_star_rating": {
|
| 4560 |
+
$element = isset($_POST['wdform_'.$key."_star_amount".$id]) ? $_POST['wdform_'.$key."_star_amount".$id] : NULL;
|
| 4561 |
+
$selected = isset($_POST['wdform_'.$key."_selected_star_amount".$id]) ? $_POST['wdform_'.$key."_selected_star_amount".$id] : 0;
|
| 4562 |
+
if(isset($element)) {
|
| 4563 |
+
$new_value = $new_value . $selected . '/' . $element;
|
| 4564 |
+
}
|
| 4565 |
+
break;
|
| 4566 |
+
}
|
| 4567 |
+
case "type_scale_rating": {
|
| 4568 |
+
$element = isset($_POST['wdform_'.$key."_scale_amount".$id]) ? $_POST['wdform_'.$key."_scale_amount".$id] : NULL;
|
| 4569 |
+
$selected = isset($_POST['wdform_'.$key."_scale_radio".$id]) ? $_POST['wdform_'.$key."_scale_radio".$id] : 0;
|
| 4570 |
+
if(isset($element)) {
|
| 4571 |
+
$new_value = $new_value . $selected . '/' . $element;
|
| 4572 |
+
}
|
| 4573 |
+
break;
|
| 4574 |
+
}
|
| 4575 |
+
case "type_spinner": {
|
| 4576 |
+
$element = isset($_POST['wdform_'.$key."_element".$id]) ? $_POST['wdform_'.$key."_element".$id] : NULL;
|
| 4577 |
+
if(isset($element)) {
|
| 4578 |
+
$new_value = $new_value . $element;
|
| 4579 |
+
}
|
| 4580 |
+
break;
|
| 4581 |
+
}
|
| 4582 |
+
case "type_slider": {
|
| 4583 |
+
$element = isset($_POST['wdform_'.$key."_slider_value".$id]) ? $_POST['wdform_'.$key."_slider_value".$id] : NULL;
|
| 4584 |
+
if(isset($element)) {
|
| 4585 |
+
$new_value = $new_value . $element;
|
| 4586 |
+
}
|
| 4587 |
+
break;
|
| 4588 |
+
}
|
| 4589 |
+
case "type_range": {
|
| 4590 |
+
$element0 = isset($_POST['wdform_'.$key."_element".$id.'0']) ? $_POST['wdform_'.$key."_element".$id.'0'] : NULL;
|
| 4591 |
+
$element1 = isset($_POST['wdform_'.$key."_element".$id.'1']) ? $_POST['wdform_'.$key."_element".$id.'1'] : NULL;
|
| 4592 |
+
if(isset($element0) || isset($element1)) {
|
| 4593 |
+
$new_value = $new_value . $element0 . '-' . $element1;
|
| 4594 |
+
}
|
| 4595 |
+
break;
|
| 4596 |
+
}
|
| 4597 |
+
case "type_grading": {
|
| 4598 |
+
$element = isset($_POST['wdform_'.$key."_hidden_item".$id]) ? $_POST['wdform_'.$key."_hidden_item".$id] : "";
|
| 4599 |
+
$grading = explode(":", $element);
|
| 4600 |
+
$items_count = sizeof($grading) - 1;
|
| 4601 |
+
$element = "";
|
| 4602 |
+
$total = "";
|
| 4603 |
+
for($k = 0;$k < $items_count; $k++) {
|
| 4604 |
+
$element .= $grading[$k] . ":" . (isset($_POST['wdform_'.$key."_element".$id.'_'.$k]) ? $_POST['wdform_'.$key."_element".$id.'_'.$k] : "") . " ";
|
| 4605 |
+
$total += (isset($_POST['wdform_'.$key."_element".$id.'_'.$k]) ? $_POST['wdform_'.$key."_element".$id.'_'.$k] : 0);
|
| 4606 |
+
}
|
| 4607 |
+
$element .="Total:" . $total;
|
| 4608 |
+
if(isset($element)) {
|
| 4609 |
+
$new_value = $new_value . $element;
|
| 4610 |
+
}
|
| 4611 |
+
break;
|
| 4612 |
+
}
|
| 4613 |
+
case "type_matrix": {
|
| 4614 |
+
$input_type = isset($_POST['wdform_'.$key."_input_type".$id]) ? $_POST['wdform_'.$key."_input_type".$id] : "";
|
| 4615 |
+
$mat_rows = explode("***", isset($_POST['wdform_'.$key."_hidden_row".$id]) ? $_POST['wdform_'.$key."_hidden_row".$id] : "");
|
| 4616 |
+
$rows_count = sizeof($mat_rows) - 1;
|
| 4617 |
+
$mat_columns = explode("***", isset($_POST['wdform_'.$key."_hidden_column".$id]) ? $_POST['wdform_'.$key."_hidden_column".$id] : "");
|
| 4618 |
+
$columns_count = sizeof($mat_columns) - 1;
|
| 4619 |
+
$matrix="<table>";
|
| 4620 |
+
$matrix .='<tr><td></td>';
|
| 4621 |
+
for( $k=1;$k< count($mat_columns) ;$k++) {
|
| 4622 |
+
$matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[$k] . '</td>';
|
| 4623 |
+
}
|
| 4624 |
+
$matrix .= '</tr>';
|
| 4625 |
+
$aaa=Array();
|
| 4626 |
+
for($k=1; $k<=$rows_count; $k++) {
|
| 4627 |
+
$matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[$k] . '</td>';
|
| 4628 |
+
if($input_type=="radio") {
|
| 4629 |
+
$mat_radio = isset($_POST['wdform_'.$key."_input_element".$id.$k]) ? $_POST['wdform_'.$key."_input_element".$id.$k] : 0;
|
| 4630 |
+
if($mat_radio == 0) {
|
| 4631 |
+
$checked = "";
|
| 4632 |
+
$aaa[1] = "";
|
| 4633 |
+
}
|
| 4634 |
+
else {
|
| 4635 |
+
$aaa = explode("_", $mat_radio);
|
| 4636 |
+
}
|
| 4637 |
+
|
| 4638 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 4639 |
+
if($aaa[1]==$j) {
|
| 4640 |
+
$checked="checked";
|
| 4641 |
+
}
|
| 4642 |
+
else {
|
| 4643 |
+
$checked="";
|
| 4644 |
+
}
|
| 4645 |
+
$matrix .= '<td style="text-align:center"><input type="radio" ' . $checked . ' disabled /></td>';
|
| 4646 |
+
}
|
| 4647 |
+
}
|
| 4648 |
+
else {
|
| 4649 |
+
if($input_type == "checkbox") {
|
| 4650 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 4651 |
+
$checked = isset($_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j] : 0;
|
| 4652 |
+
if($checked==1) {
|
| 4653 |
+
$checked = "checked";
|
| 4654 |
+
}
|
| 4655 |
+
else {
|
| 4656 |
+
$checked = "";
|
| 4657 |
+
}
|
| 4658 |
+
$matrix .= '<td style="text-align:center"><input type="checkbox" ' . $checked . ' disabled /></td>';
|
| 4659 |
+
}
|
| 4660 |
+
}
|
| 4661 |
+
else {
|
| 4662 |
+
if($input_type == "text") {
|
| 4663 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 4664 |
+
$checked = isset($_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_input_element".$id.$k.'_'.$j] : "";
|
| 4665 |
+
$matrix .= '<td style="text-align:center"><input type="text" value="' . $checked . '" disabled /></td>';
|
| 4666 |
+
}
|
| 4667 |
+
}
|
| 4668 |
+
else {
|
| 4669 |
+
for($j = 1; $j <= $columns_count; $j++) {
|
| 4670 |
+
$checked = isset($_POST['wdform_'.$key."_select_yes_no".$id.$k.'_'.$j]) ? $_POST['wdform_'.$key."_select_yes_no".$id.$k.'_'.$j] : "";
|
| 4671 |
+
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
| 4672 |
+
}
|
| 4673 |
+
}
|
| 4674 |
+
}
|
| 4675 |
+
}
|
| 4676 |
+
$matrix .= '</tr>';
|
| 4677 |
+
}
|
| 4678 |
+
$matrix .= '</table>';
|
| 4679 |
+
if(isset($matrix)) {
|
| 4680 |
+
$new_value = $new_value . $matrix;
|
| 4681 |
+
}
|
| 4682 |
+
break;
|
| 4683 |
+
}
|
| 4684 |
+
default: break;
|
| 4685 |
+
}
|
| 4686 |
+
// $new_script = str_replace("%" . $label_each . "%", $new_value, $new_script);
|
| 4687 |
+
}
|
| 4688 |
+
|
| 4689 |
+
return $new_value;
|
| 4690 |
+
}
|
| 4691 |
+
|
| 4692 |
+
public function empty_field($element, $mail_emptyfields) {
|
| 4693 |
+
if(!$mail_emptyfields)
|
| 4694 |
+
if(empty($element))
|
| 4695 |
+
return 0;
|
| 4696 |
+
|
| 4697 |
+
return 1;
|
| 4698 |
+
}
|
| 4699 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 4700 |
+
// Getters & Setters //
|
| 4701 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 4702 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 4703 |
+
// Private Methods //
|
| 4704 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 4705 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 4706 |
+
// Listeners //
|
| 4707 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
| 4708 |
}
|
readme.txt
CHANGED
|
@@ -1,420 +1,425 @@
|
|
| 1 |
-
=== Contact Form ===
|
| 2 |
-
Contributors: webdorado
|
| 3 |
-
Donate link: http://web-dorado.com/products/wordpress-contact-form-maker-plugin.html
|
| 4 |
-
Tags: captcha, contact, contact form, contact forms, custom form, email, feedback, form, form builder, form manager, forms, survey
|
| 5 |
-
Requires at least: 3.4
|
| 6 |
-
Tested up to: 4.7
|
| 7 |
-
Stable tag: 1.8.
|
| 8 |
-
License: GPLv2 or later
|
| 9 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
-
|
| 11 |
-
Form plugin is a simple contact form builder tool, which allows the user to create and edit different type of contact forms.
|
| 12 |
-
|
| 13 |
-
== Description ==
|
| 14 |
-
Create simple contact forms or complex applications forms with this FREE and intuitive WordPress plugin. No coding knowledge is required.
|
| 15 |
-
|
| 16 |
-
[WordPress Contact Form Maker](http://web-dorado.com/products/wordpress-contact-form-maker-plugin.html)
|
| 17 |
-
|
| 18 |
-
WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms. The product is similar to the WordPress Form Maker using most of its functionality, whereas there are also some differences. If want to build complicated contact forms with various field types like Date, Time, Single choice, Multiple choice, etc., than you can use [WordPress Form Builder](http://wordpress.org/extend/plugins/form-maker).
|
| 19 |
-
|
| 20 |
-
The number of fields for the Contact Form Maker is unlimited and having large amount of fields will not cause any malfunctioning of the contact form. You can add different types of contact form fields, including inputs (e.g. e-mail, password, textarea, text input and etc.), Captcha (as well as possibility of adding Google standard ReCaptcha), custom and standard buttons, as well as Map field.
|
| 21 |
-
|
| 22 |
-
WordPress Contact Form Maker uses simple and easy to manage backend interface, thus the users which are not able to make code-level changes, will be able to make customization and changes using parameters.
|
| 23 |
-
|
| 24 |
-
This contact form builder will be equally fit the needs of the novice and experienced developers and designers.
|
| 25 |
-
|
| 26 |
-
The product has cross-browser compatibility, which allows using the Contact form for with any browser.
|
| 27 |
-
###IMPORTANT: If you think you found a bug in the Contact Form Maker or have any problem or question concerning Contact Form Maker, do not hesitate to contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
###Features of the Contact Form Maker
|
| 31 |
-
|
| 32 |
-
* WordPress 3.0+
|
| 33 |
-
* 7 field types of the Contact Form Maker.
|
| 34 |
-
* Custom HTML
|
| 35 |
-
* Text Input (10 sub-types)
|
| 36 |
-
* Captcha
|
| 37 |
-
* Page break
|
| 38 |
-
* Section break
|
| 39 |
-
* Map
|
| 40 |
-
* Button
|
| 41 |
-
* Possibility to add Custom HTML between the fields .
|
| 42 |
-
* Pagination.
|
| 43 |
-
* Support for section break.
|
| 44 |
-
* Possibility of add custom CSS and Javascript.
|
| 45 |
-
* Additional attributes for each field to add certain properties using Java Script.
|
| 46 |
-
* Submissions are send to the provided admin address(es) and submitter (optional).
|
| 47 |
-
* Custom text for admin and users
|
| 48 |
-
* Shortcode for easier input of the created contact form into Pages/Posts.
|
| 49 |
-
* Chance to add custom HTML.
|
| 50 |
-
* Detailed parameters for each field type.
|
| 51 |
-
* Data validation before the submission of the contact form.
|
| 52 |
-
* Detailed Submissions field including the submissions of all contact forms.
|
| 53 |
-
* 10 built-in templates.
|
| 54 |
-
* Required and hidden fields for advanced contact forms.
|
| 55 |
-
* Conditional fields
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
### Supported languages Of the Contact Form Maker
|
| 59 |
-
|
| 60 |
-
*If you need language of the Contact Form Maker which is not included in this list, please contact us and we will do the translation of Contact Form Maker within 3 days. If you find any mistakes in the translation of the Contact Form Maker, please contact us and we will make relevant corrections within 3 days.*
|
| 61 |
-
|
| 62 |
-
Afrikaans (af)
|
| 63 |
-
Albanian (sq)
|
| 64 |
-
Arabic (ar)
|
| 65 |
-
Armenian (hy_AM)
|
| 66 |
-
Belarusian (be_BY)
|
| 67 |
-
Bulgarian (bg_BG)
|
| 68 |
-
Catalan (ca)
|
| 69 |
-
Chinese, Simplified (zh_CN)
|
| 70 |
-
Croatian (hr)
|
| 71 |
-
Czech (cs_CZ)
|
| 72 |
-
Danish (da_DK)
|
| 73 |
-
Dutch (nl_NL)
|
| 74 |
-
Esperanto (eo_EO)
|
| 75 |
-
Estonian (et)
|
| 76 |
-
Finnish (fi)
|
| 77 |
-
French (fr_FR)
|
| 78 |
-
Galician (gl_ES)
|
| 79 |
-
Georgian (ka_GE)
|
| 80 |
-
German (de_DE)
|
| 81 |
-
Greek (el)
|
| 82 |
-
Hebrew (he_IL)
|
| 83 |
-
Hindi (hi_IN)
|
| 84 |
-
Hungarian (hu_HU)
|
| 85 |
-
Indonesian (id_ID)
|
| 86 |
-
Italian (it_IT)
|
| 87 |
-
Japanese (ja)
|
| 88 |
-
Korean (ko_KR)
|
| 89 |
-
Latvian (lv)
|
| 90 |
-
Lithuanian (lt_LT)
|
| 91 |
-
Macedonian (mk_MK)
|
| 92 |
-
Malay (ms_MY)
|
| 93 |
-
Maltese (mt_MT)
|
| 94 |
-
Norwegian (nb_NO)
|
| 95 |
-
Persian (fa_IR)
|
| 96 |
-
Polish (pl_PL)
|
| 97 |
-
Portuguese (pt_PT)
|
| 98 |
-
Russian (ru_RU)
|
| 99 |
-
Romanian (ro_RO)
|
| 100 |
-
Serbian (sr_RS)
|
| 101 |
-
Slovak (sk_SK)
|
| 102 |
-
Spanish (es_ES)
|
| 103 |
-
Swedish (sv_SE)
|
| 104 |
-
Tamil (ta)
|
| 105 |
-
Thai (th)
|
| 106 |
-
Turkish (tr_TR)
|
| 107 |
-
Ukrainian (uk_UA)
|
| 108 |
-
Vietnamese (vi)
|
| 109 |
-
|
| 110 |
-
== Installation ==
|
| 111 |
-
|
| 112 |
-
####Thank you for your interest in [WordPress Contact Form](http://wordpress.org/plugins/contact-form-maker/).
|
| 113 |
-
|
| 114 |
-
### Minimum requirements.
|
| 115 |
-
* Wordpress 3.0+
|
| 116 |
-
* PHP 5.x
|
| 117 |
-
* MySQL 5.x
|
| 118 |
-
|
| 119 |
-
### Perform a new installation
|
| 120 |
-
|
| 121 |
-
After downloading the ZIP file,
|
| 122 |
-
|
| 123 |
-
1. Log in to the administrator panel.
|
| 124 |
-
2. Go to Plugins Add > New > Upload.
|
| 125 |
-
3. Click “Choose file” (“Browse”) and select the downloaded zip file.
|
| 126 |
-
*For Mac Users*
|
| 127 |
-
*Go to your Downloads folder and locate the folder with the plugin. Right-click on the folder and select Compress. Now you have a newly created .zip file which can be installed as described here.*
|
| 128 |
-
4. Click “Install Now” button.
|
| 129 |
-
5. Click “Activate Plugin” button for activating the plugin.
|
| 130 |
-
6.If the installation does not succeed, please contact us at info@web-dorado.com.
|
| 131 |
-
|
| 132 |
-
### Updating the contact form.
|
| 133 |
-
|
| 134 |
-
If you want to update the plugin while preserving your existing contact forms, you need to deactivate and delete the Contact Form Maker from the list of installed plugins (Do not uninstall it using the Uninstall Contact Form Maker option of the plugin) and install the new plugin. Afterwards, go to Contact Form Maker>Manager and on the upper hand of the screen click on the “Update Contact Forms” button. If the update is successful, you will see a notification message saying, “All Contact forms are updated!”.
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
== Screenshots ==
|
| 138 |
-
1. [WordPress Contact Form](http://wordpress.org/plugins/contact-form-maker/) - Sample RSVP
|
| 139 |
-
2. Contact Form Maker - Sample contact form
|
| 140 |
-
3. Contact Form Maker - Manage contact forms
|
| 141 |
-
4. Contact Form Maker - Creating a new conact contact form
|
| 142 |
-
5. Contact Form Maker - Text input field type
|
| 143 |
-
6. Contact Form Maker - Captcha field type
|
| 144 |
-
7. Contact Form Maker - Manage submissions
|
| 145 |
-
8. Contact Form Maker - Select Columns
|
| 146 |
-
|
| 147 |
-
== Changelog ==
|
| 148 |
-
|
| 149 |
-
= 1.8.
|
| 150 |
-
* Bug
|
| 151 |
-
*
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
* Fixed: Google Maps API key
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
*
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
-
|
| 246 |
-
-
|
| 247 |
-
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
*
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
1.
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
If
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
3.
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
3.
|
| 295 |
-
Here you
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
3.3
|
| 306 |
-
3.3.
|
| 307 |
-
3.3.
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
3.
|
| 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 |
-
4.
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
4.
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
4.
|
| 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 |
-
6.
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
6.
|
| 412 |
-
|
| 413 |
-
6.
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
6.
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 420 |
6.9 The submissions can be exported to the CSV and XML formats.
|
| 1 |
+
=== Contact Form ===
|
| 2 |
+
Contributors: webdorado
|
| 3 |
+
Donate link: http://web-dorado.com/products/wordpress-contact-form-maker-plugin.html
|
| 4 |
+
Tags: captcha, contact, contact form, contact forms, custom form, email, feedback, form, form builder, form manager, forms, survey
|
| 5 |
+
Requires at least: 3.4
|
| 6 |
+
Tested up to: 4.7
|
| 7 |
+
Stable tag: 1.8.39
|
| 8 |
+
License: GPLv2 or later
|
| 9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
+
|
| 11 |
+
Form plugin is a simple contact form builder tool, which allows the user to create and edit different type of contact forms.
|
| 12 |
+
|
| 13 |
+
== Description ==
|
| 14 |
+
Create simple contact forms or complex applications forms with this FREE and intuitive WordPress plugin. No coding knowledge is required.
|
| 15 |
+
|
| 16 |
+
[WordPress Contact Form Maker](http://web-dorado.com/products/wordpress-contact-form-maker-plugin.html)
|
| 17 |
+
|
| 18 |
+
WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms. The product is similar to the WordPress Form Maker using most of its functionality, whereas there are also some differences. If want to build complicated contact forms with various field types like Date, Time, Single choice, Multiple choice, etc., than you can use [WordPress Form Builder](http://wordpress.org/extend/plugins/form-maker).
|
| 19 |
+
|
| 20 |
+
The number of fields for the Contact Form Maker is unlimited and having large amount of fields will not cause any malfunctioning of the contact form. You can add different types of contact form fields, including inputs (e.g. e-mail, password, textarea, text input and etc.), Captcha (as well as possibility of adding Google standard ReCaptcha), custom and standard buttons, as well as Map field.
|
| 21 |
+
|
| 22 |
+
WordPress Contact Form Maker uses simple and easy to manage backend interface, thus the users which are not able to make code-level changes, will be able to make customization and changes using parameters.
|
| 23 |
+
|
| 24 |
+
This contact form builder will be equally fit the needs of the novice and experienced developers and designers.
|
| 25 |
+
|
| 26 |
+
The product has cross-browser compatibility, which allows using the Contact form for with any browser.
|
| 27 |
+
###IMPORTANT: If you think you found a bug in the Contact Form Maker or have any problem or question concerning Contact Form Maker, do not hesitate to contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
###Features of the Contact Form Maker
|
| 31 |
+
|
| 32 |
+
* WordPress 3.0+
|
| 33 |
+
* 7 field types of the Contact Form Maker.
|
| 34 |
+
* Custom HTML
|
| 35 |
+
* Text Input (10 sub-types)
|
| 36 |
+
* Captcha
|
| 37 |
+
* Page break
|
| 38 |
+
* Section break
|
| 39 |
+
* Map
|
| 40 |
+
* Button
|
| 41 |
+
* Possibility to add Custom HTML between the fields .
|
| 42 |
+
* Pagination.
|
| 43 |
+
* Support for section break.
|
| 44 |
+
* Possibility of add custom CSS and Javascript.
|
| 45 |
+
* Additional attributes for each field to add certain properties using Java Script.
|
| 46 |
+
* Submissions are send to the provided admin address(es) and submitter (optional).
|
| 47 |
+
* Custom text for admin and users
|
| 48 |
+
* Shortcode for easier input of the created contact form into Pages/Posts.
|
| 49 |
+
* Chance to add custom HTML.
|
| 50 |
+
* Detailed parameters for each field type.
|
| 51 |
+
* Data validation before the submission of the contact form.
|
| 52 |
+
* Detailed Submissions field including the submissions of all contact forms.
|
| 53 |
+
* 10 built-in templates.
|
| 54 |
+
* Required and hidden fields for advanced contact forms.
|
| 55 |
+
* Conditional fields
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
### Supported languages Of the Contact Form Maker
|
| 59 |
+
|
| 60 |
+
*If you need language of the Contact Form Maker which is not included in this list, please contact us and we will do the translation of Contact Form Maker within 3 days. If you find any mistakes in the translation of the Contact Form Maker, please contact us and we will make relevant corrections within 3 days.*
|
| 61 |
+
|
| 62 |
+
Afrikaans (af)
|
| 63 |
+
Albanian (sq)
|
| 64 |
+
Arabic (ar)
|
| 65 |
+
Armenian (hy_AM)
|
| 66 |
+
Belarusian (be_BY)
|
| 67 |
+
Bulgarian (bg_BG)
|
| 68 |
+
Catalan (ca)
|
| 69 |
+
Chinese, Simplified (zh_CN)
|
| 70 |
+
Croatian (hr)
|
| 71 |
+
Czech (cs_CZ)
|
| 72 |
+
Danish (da_DK)
|
| 73 |
+
Dutch (nl_NL)
|
| 74 |
+
Esperanto (eo_EO)
|
| 75 |
+
Estonian (et)
|
| 76 |
+
Finnish (fi)
|
| 77 |
+
French (fr_FR)
|
| 78 |
+
Galician (gl_ES)
|
| 79 |
+
Georgian (ka_GE)
|
| 80 |
+
German (de_DE)
|
| 81 |
+
Greek (el)
|
| 82 |
+
Hebrew (he_IL)
|
| 83 |
+
Hindi (hi_IN)
|
| 84 |
+
Hungarian (hu_HU)
|
| 85 |
+
Indonesian (id_ID)
|
| 86 |
+
Italian (it_IT)
|
| 87 |
+
Japanese (ja)
|
| 88 |
+
Korean (ko_KR)
|
| 89 |
+
Latvian (lv)
|
| 90 |
+
Lithuanian (lt_LT)
|
| 91 |
+
Macedonian (mk_MK)
|
| 92 |
+
Malay (ms_MY)
|
| 93 |
+
Maltese (mt_MT)
|
| 94 |
+
Norwegian (nb_NO)
|
| 95 |
+
Persian (fa_IR)
|
| 96 |
+
Polish (pl_PL)
|
| 97 |
+
Portuguese (pt_PT)
|
| 98 |
+
Russian (ru_RU)
|
| 99 |
+
Romanian (ro_RO)
|
| 100 |
+
Serbian (sr_RS)
|
| 101 |
+
Slovak (sk_SK)
|
| 102 |
+
Spanish (es_ES)
|
| 103 |
+
Swedish (sv_SE)
|
| 104 |
+
Tamil (ta)
|
| 105 |
+
Thai (th)
|
| 106 |
+
Turkish (tr_TR)
|
| 107 |
+
Ukrainian (uk_UA)
|
| 108 |
+
Vietnamese (vi)
|
| 109 |
+
|
| 110 |
+
== Installation ==
|
| 111 |
+
|
| 112 |
+
####Thank you for your interest in [WordPress Contact Form](http://wordpress.org/plugins/contact-form-maker/).
|
| 113 |
+
|
| 114 |
+
### Minimum requirements.
|
| 115 |
+
* Wordpress 3.0+
|
| 116 |
+
* PHP 5.x
|
| 117 |
+
* MySQL 5.x
|
| 118 |
+
|
| 119 |
+
### Perform a new installation
|
| 120 |
+
|
| 121 |
+
After downloading the ZIP file,
|
| 122 |
+
|
| 123 |
+
1. Log in to the administrator panel.
|
| 124 |
+
2. Go to Plugins Add > New > Upload.
|
| 125 |
+
3. Click “Choose file” (“Browse”) and select the downloaded zip file.
|
| 126 |
+
*For Mac Users*
|
| 127 |
+
*Go to your Downloads folder and locate the folder with the plugin. Right-click on the folder and select Compress. Now you have a newly created .zip file which can be installed as described here.*
|
| 128 |
+
4. Click “Install Now” button.
|
| 129 |
+
5. Click “Activate Plugin” button for activating the plugin.
|
| 130 |
+
6.If the installation does not succeed, please contact us at info@web-dorado.com.
|
| 131 |
+
|
| 132 |
+
### Updating the contact form.
|
| 133 |
+
|
| 134 |
+
If you want to update the plugin while preserving your existing contact forms, you need to deactivate and delete the Contact Form Maker from the list of installed plugins (Do not uninstall it using the Uninstall Contact Form Maker option of the plugin) and install the new plugin. Afterwards, go to Contact Form Maker>Manager and on the upper hand of the screen click on the “Update Contact Forms” button. If the update is successful, you will see a notification message saying, “All Contact forms are updated!”.
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
== Screenshots ==
|
| 138 |
+
1. [WordPress Contact Form](http://wordpress.org/plugins/contact-form-maker/) - Sample RSVP
|
| 139 |
+
2. Contact Form Maker - Sample contact form
|
| 140 |
+
3. Contact Form Maker - Manage contact forms
|
| 141 |
+
4. Contact Form Maker - Creating a new conact contact form
|
| 142 |
+
5. Contact Form Maker - Text input field type
|
| 143 |
+
6. Contact Form Maker - Captcha field type
|
| 144 |
+
7. Contact Form Maker - Manage submissions
|
| 145 |
+
8. Contact Form Maker - Select Columns
|
| 146 |
+
|
| 147 |
+
== Changelog ==
|
| 148 |
+
|
| 149 |
+
= 1.8.39 =
|
| 150 |
+
* Fixed: Bug with Hidden field in custom text in Email
|
| 151 |
+
* Fixed: Bug on email verification custom post
|
| 152 |
+
* Changed: Filters now apply to CSV and XML export
|
| 153 |
+
|
| 154 |
+
= 1.8.38 =
|
| 155 |
+
* Bug On Search by ID in Submissions
|
| 156 |
+
* Added: Mailchimp in featured plugins
|
| 157 |
+
|
| 158 |
+
= 1.8.37 =
|
| 159 |
+
* Fixed: Bug on edit_old() function for old forms.
|
| 160 |
+
|
| 161 |
+
= 1.8.36 =
|
| 162 |
+
* Changed: Featured Themes page
|
| 163 |
+
|
| 164 |
+
= 1.8.35 =
|
| 165 |
+
* Fixed: Update from very old version
|
| 166 |
+
|
| 167 |
+
= 1.8.34 =
|
| 168 |
+
* Changed: Featured plugins page
|
| 169 |
+
|
| 170 |
+
= 1.8.33 =
|
| 171 |
+
* Fixed: Unexpected behaviour on pressing "Enter" key on back end
|
| 172 |
+
|
| 173 |
+
= 1.8.32 =
|
| 174 |
+
* Fixed: JS error on incorrect Google Maps API key
|
| 175 |
+
* Added: Alert about incorrect Google Maps API key
|
| 176 |
+
|
| 177 |
+
= 1.8.31 =
|
| 178 |
+
* Added: Global option for Google Maps API key
|
| 179 |
+
* Fixed: Google Maps API key warning in browser
|
| 180 |
+
|
| 181 |
+
= 1.8.30 =
|
| 182 |
+
* Fixed: bug in new form
|
| 183 |
+
|
| 184 |
+
= 1.8.29 =
|
| 185 |
+
* Fixed: bug in widget
|
| 186 |
+
|
| 187 |
+
= 1.8.28 =
|
| 188 |
+
* minor bug fixed
|
| 189 |
+
|
| 190 |
+
= 1.8.27 =
|
| 191 |
+
* Major update
|
| 192 |
+
|
| 193 |
+
= 1.7.33 =
|
| 194 |
+
* Changed: Compability with WordPress 4.3
|
| 195 |
+
|
| 196 |
+
= 1.7.32 =
|
| 197 |
+
* Minor bug fixed
|
| 198 |
+
|
| 199 |
+
= 1.7.31 =
|
| 200 |
+
* Security issue fixed
|
| 201 |
+
|
| 202 |
+
= 1.7.29 =
|
| 203 |
+
* Cache issue fixed
|
| 204 |
+
|
| 205 |
+
= 1.7.28 =
|
| 206 |
+
* Bug fixed: Empty email "From name"
|
| 207 |
+
|
| 208 |
+
= 1.7.27 =
|
| 209 |
+
* bug fixed in csv\xml export
|
| 210 |
+
|
| 211 |
+
= 1.7.26 =
|
| 212 |
+
* bug fixed in email content
|
| 213 |
+
|
| 214 |
+
= 1.7.25 =
|
| 215 |
+
* remove fancybox
|
| 216 |
+
|
| 217 |
+
= 1.7.24 =
|
| 218 |
+
* display php function to publish form
|
| 219 |
+
|
| 220 |
+
= 1.7.20 =
|
| 221 |
+
* 4.0.1 shortcode issue fixed
|
| 222 |
+
|
| 223 |
+
= 1.6.1 =
|
| 224 |
+
* Added featured plugins
|
| 225 |
+
|
| 226 |
+
= 1.6.0 =
|
| 227 |
+
* From Name, From Email in Contact Form options
|
| 228 |
+
|
| 229 |
+
= 1.5.0 =
|
| 230 |
+
* Survey Tools (Star Rating, Scale Rating, Spinner, Slider, Range, Grading, Matrix)
|
| 231 |
+
|
| 232 |
+
= 1.4.0 =
|
| 233 |
+
* Customizable Email message for Administrator and Users
|
| 234 |
+
|
| 235 |
+
= 1.3.0 =
|
| 236 |
+
* Actions after [WordPress Contact Form](http://wordpress.org/plugins/contact-form-maker/) Submission:
|
| 237 |
+
- Stay on contact form:
|
| 238 |
+
- To go to Post,Page after the contact form submission:
|
| 239 |
+
- Custom text after the contact form submission:
|
| 240 |
+
- URL: The user is redirected to the provided URL after the contact form submission.
|
| 241 |
+
* Edit javascript of the contact form:
|
| 242 |
+
* Save as the copy of the contact form:
|
| 243 |
+
* Themes: There are 43 standard themes included in Contact Form Maker
|
| 244 |
+
* New contact form fields:
|
| 245 |
+
- Address field
|
| 246 |
+
- Address mark on map contact form field
|
| 247 |
+
- Number contact form field
|
| 248 |
+
- Phone contact form field
|
| 249 |
+
- Date 3 different contact form field
|
| 250 |
+
- Time contact form field
|
| 251 |
+
- Country list contact form field
|
| 252 |
+
- Recapthca contact form field
|
| 253 |
+
* Pagebreak of the Contact Form Maker: This can be used to break the contact form into distinct pages.
|
| 254 |
+
* Section Break of the Contact Form Maker: This option allows adding a section break to the contact form page.
|
| 255 |
+
* For each contact form certain types of statistical data are available in the Contact Form Maker:
|
| 256 |
+
* Entries of a contact form: The number of submitted contact forms in the Contact Form Maker.
|
| 257 |
+
* Views of a contact form: The number of times the contact form has been viewed.
|
| 258 |
+
* Conversion Rate of a contact form: The percentage of submitted contact forms to the overall number of views.
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
==Contact Form Maker Step by step guide==
|
| 262 |
+
### Step 1: Installing the [wordpress contact form](http://wordpress.org/plugins/contact-form-maker/)
|
| 263 |
+
|
| 264 |
+
1.1 Minimum requirements.
|
| 265 |
+
Wordpress 3.0+
|
| 266 |
+
PHP 5.x
|
| 267 |
+
MySQL 5.x
|
| 268 |
+
|
| 269 |
+
1.2 Perform a new installation.
|
| 270 |
+
Log in to the administrator panel.
|
| 271 |
+
Go to Plugins Add > New > Upload.
|
| 272 |
+
Click “Choose file” (“Browse”) and select the Contact Form Maker zip file.
|
| 273 |
+
*For Mac Users*
|
| 274 |
+
*Go to your Downloads folder and locate the folder with the plugin. Right-click on the folder and select Compress. Now you have a newly created .zip file which can be installed as described here.*
|
| 275 |
+
Click “Install Now” button.
|
| 276 |
+
If the installation succeeded you will see the message in the picture. Click “Activate Plugin” button for activating the plugin.
|
| 277 |
+
If any problem occurs, please contact us at info@web-dorado.com.
|
| 278 |
+
|
| 279 |
+
1.3 Updating the contact form.
|
| 280 |
+
|
| 281 |
+
If you want to update the plugin while preserving your existing contact forms, you need to deactivate and delete the Contact Form Maker from the list of installed plugins (Do not uninstall it using the Uninstall Contact Form Maker option of the plugin) and install the new plugin. Afterwards, go to Contact Form Maker>Manager and on the upper hand of the screen click on the “Update Contact Forms” button. If the update is successful, you will see a notification message saying, “All Contact forms are updated!”.
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
= Step 2: Creating a new contact form =
|
| 285 |
+
|
| 286 |
+
2.1 On the left menu select Contact Form Maker > Manager
|
| 287 |
+
2.2 In the upper left corner click on the “Add a form” button.
|
| 288 |
+
2.3 Contact Form Title. Specify a title for the contact form.
|
| 289 |
+
|
| 290 |
+
|
| 291 |
+
= Step 3: Configuring Contact Form Options =
|
| 292 |
+
|
| 293 |
+
3.1 General Options
|
| 294 |
+
3.1.1 Email to send submissions to. Here you provide e-mails to which submitted contact form information is sent. If you need more than one e-mail address, you must separate them by commas. This field is not required. In any case, the submitted information is stored in “Submissions” part, where it can be easily managed.
|
| 295 |
+
3.1.2 Email From. Here you define the email address from which the users receive the submission email (sender’s email).
|
| 296 |
+
3.1.3 From Name. Here you define the sender’s name which is shown in submission email.
|
| 297 |
+
3.1.4 Theme. A distinct theme can be applied to each new contact form. The themes can be accessed by selecting Contact Form Maker > Themes on the top menu. 41 themes are available for selection. There is an option for creating new themes, which you can access by clicking “New” on the upper right corner of the section.
|
| 298 |
+
|
| 299 |
+
3.2 Actions after Submission
|
| 300 |
+
Here you can select the action that takes place after contact form submission. Following options are available:
|
| 301 |
+
- Stay on contact form: The user stays on the contact form page.
|
| 302 |
+
- Article: The user is redirected to the selected article.
|
| 303 |
+
- Custom text: Custom text is displayed on the screen.
|
| 304 |
+
- URL: The user is redirected to the provided URL.
|
| 305 |
+
3.3 Payment Options
|
| 306 |
+
3.3.1 Turn on PayPal. Allows making PayPal paymentsusing Contact Form Maker.
|
| 307 |
+
3.3.2 Checkout Mode. Choose the checkout mode:
|
| 308 |
+
Production (https://developer.paypal.com/webapps/developer/docs/classic/lifecycle/goingLive/)
|
| 309 |
+
Test Mode (https://developer.paypal.com/webapps/developer/docs/integration/direct/test-the-api/)
|
| 310 |
+
3.3.3 PayPal Email. Enter your PayPal email.
|
| 311 |
+
3.3.4 PayPal Currency. Choose your PayPal currency.
|
| 312 |
+
3.3.5 Tax. Add the tax amount if any.
|
| 313 |
+
3.4 JavaScript
|
| 314 |
+
Here you can define new JavaScript functions, which can be applied to the contact form. Three empty event functions are included:
|
| 315 |
+
- before_load(): before the contact form is loaded
|
| 316 |
+
- before_submit(): before the contact form is submitted
|
| 317 |
+
- before_reset(): before the contact form is reset
|
| 318 |
+
3.5 Custom Text in Email
|
| 319 |
+
For Administrator. Here you can add custom texts, images, and custom HTML to the e-mail message that is sent to the administrator, as well as choose which fields of the submitted contact form are included in the e-mail (set to ‘all’ by default).
|
| 320 |
+
For User. Here you can add custom texts, images, and custom HTML to the e-mail message that is sent to the users, as well as choose which fields of the submitted contact form are included in the e-mail (set to ‘all’ by default).
|
| 321 |
+
|
| 322 |
+
= Step 4: Description of the contact form fields =
|
| 323 |
+
|
| 324 |
+
4.1 Custom HTML:An HTML editor. You can insert your own HTML content to your WordPress contact form.
|
| 325 |
+
|
| 326 |
+
4.2 Text Input: At first choose the Field Type according to your preference. There are several options:
|
| 327 |
+
Simple Text: This can be used for typing some text. It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Field Size, Value If Empty, Class Name, Required, Allow only unique values, Additional Attributes
|
| 328 |
+
|
| 329 |
+
Password: This field can be used for adding a password field to your contact form. It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Field Size, Class Name, Required, Allow only unique values, Additional Attributes
|
| 330 |
+
Text Area: This field can be used for typing some text. The difference between Text Area and Simple Text is that Simple Text has only one row while Text Area can have several rows. It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Field Size, Value If Empty, Class Name, Required, Allow only unique values, Additional Attributes
|
| 331 |
+
Name: This can be used for typing a name. Default field labels can be edited clicking on the field label and typing in a custom label. It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Value If Empty, Field Size, Name Format, Class Name, Required, Allow only unique values, Additional Attributes
|
| 332 |
+
Address: This field can be used for adding an address. Default field labels can be edited clicking on the label and typing in a custom label. It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Overall Size, Class Name, Disable Fields, Required, Additional Attributes
|
| 333 |
+
Address (Mark on Map):This filed can be used for adding an address by directly marking it on the map. It has several attributes: Field Label, Field Label Position, Default Location, Map Size, Marker Info, Class Name, Additional Attributes
|
| 334 |
+
E-mail:This field can be used for typing the submitter’s e-mail. The submitted e-mail validation is checked. It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Field Size, Value If Empty, Class Name, Send mail to submitter, Required, Allow only unique values, Additional Attributes.
|
| 335 |
+
Number: This field can be used to provide numbers for different purposes (e.g. serial number). It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Field Size, Value If Empty, Class Name, Required, Allow only unique values, Additional Attributes
|
| 336 |
+
Phone: This field can be used to provide a phone number. Default field labels can be edited clicking on the label and typing in a custom label. It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Value If Empty, Field Size, Class Name, Required, Allow only unique values, Additional Attributes
|
| 337 |
+
Hidden Field: This field can be used to store additional information that does not need to be displayed. It has several attributes : Field ld, Field Name, Field Value, Additional Attributes.
|
| 338 |
+
4.3 Time and Date: Choose the Field Type according to your preference. There are several options:
|
| 339 |
+
Date (single field with a picker): This field can be used for typing a date or choosing by the picker. It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Date format, Date Picker Label, Class Name, Required, Additional Attributes.
|
| 340 |
+
Date (3 separate fields): This field can be used for typing a date in 3 field format(day, month, year). Default field labels can be edited clicking on the field label and typing in a custom label. Each of the 3 fields can be set as text input or select list. Each of the 3 fields has the attributes Field Size and Field Label. For year field the select list interval can be defined. These 3 fields can be separated in the format set by the fields separator attribute. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Class Name, Required, Additional Attributes.
|
| 341 |
+
Time: This field can be used for typing a time. Default field labels can be edited clicking on the field label and typing in a custom label. Time can be shown in 24 hour or 12 hour formats by setting the time format attribute. The seconds preview can be enabled/disabled by setting the Display Seconds attribute. The field has several standard attributes: Field Id, Field Name, Field Label, Field Label Position, Class Name, Required, Additional Attributes.
|
| 342 |
+
4.4 Select: Choose the Field Type according to your preference. There are several options:
|
| 343 |
+
Custom select: This field can be used for selecting the values from a list. The list can be defined by Options attribute. You can easily add and remove list items. The checked items are considered as empty values. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Field Size, Class Name, Required, Additional Attributes.
|
| 344 |
+
Country list: This field can be used for selecting a country from a list. It has several attributes: Field Id, Field Name, Field Label, Field Label Position, Field Size, Class Name, Required, Additional Attributes.
|
| 345 |
+
4.5 Checkbox: This field can be used for selecting the values from a list of checkboxes. The list can be defined by Options attribute. You can easily add and remove list items. The list can be displayed in horizontal/vertical positions by setting the Relative Position attribute. You can use Rows/Columns field if you want the options to be displayed in a row/column (depending on the positioning choice). The number of rows/columns should be specified. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Field Size, Class Name, Required, Randomize in frontend, Allow other, Additional Attributes.
|
| 346 |
+
|
| 347 |
+
4.6Radio:This field can be used for selecting the values from a list of radio buttons. The list can be defined by Options attribute. You can use Rows/Columns field if you want the options to be displayed in a row/column (depending on the positioning choice). The number of rows/columns should be specified. You can easily add and remove list items. The list can be displayed in horizontal/vertical positions by setting the Relative Position attribute.The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Field Size, Class Name, Required, Randomize in frontend, Allow other, Additional Attributes.
|
| 348 |
+
|
| 349 |
+
4.7 File Upload: This field can be used for uploading a file. The size of the uploaded file can be limited by setting the value of Maximum Size attribute in KB. The upload folder can be mentioned by setting the Destination attribute. Only files with extensions listed in Allowed file extensions attribute can be uploaded. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Class Name, Required, Additional Attributes.
|
| 350 |
+
|
| 351 |
+
4.8 Captcha:This field can be used for the ensuring that the submission is generated by a person. Choose the Field Type according to your preference. There are several options:
|
| 352 |
+
Simple Captcha This is a easy to configure Simple Captcha. The number of randomly generated symbols can be set by the value of Captcha size attribute. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Class Name, Additional Attributes.
|
| 353 |
+
Recaptcha This is an alternative option for Captcha that uses Public and Private Keys. You will need to create reCaptcha keys with the help of a dedicated tool.The tool can be found on https://www.google.com/recaptcha/admin/create.
|
| 354 |
+
|
| 355 |
+
4.9 Page Break: This can be used to break the contact form into distinct pages. Use Page Title to provide a title for the given page. Furthermore, the following parameters of the “Next” and “Previous” navigation buttons can be customized:
|
| 356 |
+
Type, Name, Class Name, Check the required fields , Additional Attributes.
|
| 357 |
+
|
| 358 |
+
4.10 Section Break: This option allows adding a section break to the contact form page.
|
| 359 |
+
|
| 360 |
+
4.11 Map: This field can be used for pointing out some position on the map. The position of the marker is fixed at the front end. Multiple locations can be selected by clicking the + button. The field has several attributes:
|
| 361 |
+
Location, Map Size, Marker Info, Class Name, Additional Attributes.
|
| 362 |
+
|
| 363 |
+
4.12 PayPal: Choose the Field Type. The following options are available:
|
| 364 |
+
Amount (Price) This field is for indicating the amount of payment. Default field labels can be edited clicking on the field label and typing in a custom label. You can configure the following attributes: Field Label, Field Label Position, Range, Value If Empty, Field Size, Class Name, Required, Hide Cents, and Additional Attributes.
|
| 365 |
+
Select This field can be used for selecting a product/service for which the payment is being made. The list (each item consists of “Product name” and its “Price”)can be specified by the Options attribute. You can easily add and remove list items. There is also a Product Properties parameter, where you can add different properties (e.g. size) by specifying the type, the name, and adding options for selection. The checked items are considered as empty values. You can configure the following attributes: Field Label, Field Label Position, Field Size, Class Name, Required, and Additional Attributes.
|
| 366 |
+
Checkbox This field can be used for selecting multiple products/services for which the payment is being made. The options (each item consists of “Product name” and its “Price”) can be specified by the Options attribute. You can easily add and remove list items. There is also a quantity property parameter where the quantity of products/services can be specified. Moreover, there is a Product Properties parameter, where you can add different properties (e.g. size) by specifying the type, the name, and adding options for selection. You can configure the following attributes: Field Label, Field Label Position, Relative Position, Class Name, Required, and Additional Attributes.
|
| 367 |
+
Radio This field can be used for selecting the product/service for which the payment is being made. The options (each item consists of “Product name” and its “Price”) can be specified by the Options attribute. You can easily add and remove list items. There is also a quantity property parameter where the quantity of products/services can be specified. Moreover, there is a Product Properties parameter, where you can add different properties (e.g. size) by specifying the type, the name, and adding options for selection. You can configure the following attributes: Field Label, Field Label Position, Relative Position, Class Name, Required, and Additional Attributes.
|
| 368 |
+
Shipping This field can be used for selecting the shipping option for the selected product. The options (each item consists of a “Type” and “Price” parameters) can be specified by the Options attribute. You can easily add and remove list items. You can configure the following attributes: Field Label, Field Label Position, Relative Position, Class Name, Required, and Additional Attributes.
|
| 369 |
+
Total This field calculates the total sum to be paid via PayPal, including the payments for the shipping and taxes (if applicable).
|
| 370 |
+
|
| 371 |
+
4.13 Survey Tools: Choose the Field Type according to your preferences. There are several options:
|
| 372 |
+
Star Rating: This field can be used for inserting star rating field in the contact form. Type the name of the field to be displayed with the rating system. The field has several attributes: Field Label Position, Star Amount, Star Color, Class Name, Required, and Additional Attributes.
|
| 373 |
+
Scale Rating: This field can be used for inserting scale rating in the contact form. Type the name of the field to be displayed with the rating system.Default field labels for lowest/highest satisfaction/grading can be edited clicking on the field label and typing in a custom label. The field has several attributes: Field Label Position, Scale Amount, Class Name, Required, and Additional Attributes.
|
| 374 |
+
Spinner: This field can be used for inserting spinner as a rating system in the contact form. Type the name of the field to be displayed with the rating system. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Width, Min Value, Max Value, Step, Class Name, Required, and Additional Attributes.
|
| 375 |
+
Slider: This field can be used for inserting slider as a rating system in the contact form. Type the name of the field to be displayed with the rating system. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Width, Min Value, Max Value, Class Name, Required, and Additional Attributes.
|
| 376 |
+
Range: This field can be used for inserting range system in the contact form. Type the name of the field to be displayed with the range system. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Width, Step, Class Name, Required, and Additional Attributes.
|
| 377 |
+
Grading: This field can be used for inserting grading system in the contact form. Type the name of the field to be displayed with the grading system. The field has several attributes: Field Id, Field Name, Field Label, Field Label Position, Total, Items, Class Name, Required, and Additional Attributes.
|
| 378 |
+
Matrix: This field can be used for inserting a matrix in the contact form. Type the name of the field to be displayed with the matrix. The field has several attributes: Field Label, Field Label Position, Input Type, Rows, Columns, Class Name, Required, and Additional Attributes.
|
| 379 |
+
4.14 Submit Button: Choose the Field Type according to your preference. There are several options:
|
| 380 |
+
Submit and Reset: This field can be used for inserting a submit/reset button into the contact form. You can display reset button by checking the box called Display reset button. Type the name of the submit and reset buttons in Submit button label and Reset button label. The field also has several attributes: Class Name and Additional Attributes.
|
| 381 |
+
Custom: This field can be used for inserting custom buttons into the contact form. Type the name of each button in button name field. You can define click functions for each button. The field also has several attributes: Class Name and Additional Attributes.
|
| 382 |
+
|
| 383 |
+
= Step 5: Publishing the created contact form. =
|
| 384 |
+
|
| 385 |
+
To insert a contact form into a Page or a Post.
|
| 386 |
+
|
| 387 |
+
|
| 388 |
+
|
| 389 |
+
5.1. Press the button named Insert Contact Form Maker in a post or a page you want to show the contact form.
|
| 390 |
+
|
| 391 |
+
5.2. Select a contact form from the list.
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
|
| 395 |
+
5.3. Save the page or the post.
|
| 396 |
+
|
| 397 |
+
Alternatively, you can use Contact Form Maker without the button on the toolbar: Add the shortcode [wd_contact_form id="N"] (where N is the id of the contact form, for the contact form with id=2, the shortcode must be [wd_contact_form id="2"]) to the pages and posts, where you want the contact form to appear.
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
= Step 6: Managing submissions of the contact form. =
|
| 401 |
+
|
| 402 |
+
6.1 On the left menu select Contact Form Maker > Submissions
|
| 403 |
+
|
| 404 |
+
6.2 In order to manage a contact form's submissions, select the contact form from the list.
|
| 405 |
+
|
| 406 |
+
6.3 For each contact form certain types of statistical data are available:
|
| 407 |
+
- Entries: The number of submitted contact forms.
|
| 408 |
+
- Views: The number of times the contact form has been viewed.
|
| 409 |
+
- Conversion Rate: The percentage of submitted contact forms to the overall number of views.
|
| 410 |
+
|
| 411 |
+
6.4 For the contact forms that contain checkboxes or radio buttons a separate statistics is available. It shows how many times a particular checkbox/radio button has been checked, and what is the ratio of that number to the overall number of checks.
|
| 412 |
+
|
| 413 |
+
6.5 There is a possibility to search the submissions database by all the relevant fields of the given contact form. Submissions can be sorted by any of the fields of the contact form by clicking the labels.
|
| 414 |
+
|
| 415 |
+
|
| 416 |
+
6.6 You can delete any of submissions by selecting them and pressing the “Delete” button on the top of the page.
|
| 417 |
+
|
| 418 |
+
6.7 It is also possible to edit the submissions by clicking on the “Edit” icon on the upper right corner of the “Submissions” section.
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
6.8 You can add/remove any column of the submissions by “Add/Remove Columns” button.
|
| 422 |
+
|
| 423 |
+
|
| 424 |
+
|
| 425 |
6.9 The submissions can be exported to the CSV and XML formats.
|
