PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.1
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.1
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
← All changes | includes/class-form-entry.php +5 -43 1.6.241.6.1 View file →
@@ -109,16 +109,11 @@
109 109 $grid_css = '<style>.wpufTable {display: table; width: 100%; } .wpufTableRow {display: table-row; } .wpufTableRow:nth-child(even) {background-color: #f5f5f5; } .wpufTableHeading {background-color: #eee; display: table-header-group; font-weight: bold; } .wpufTableCell, .wpufTableHead {border: none; display: table-cell; padding: 3px 10px; } .wpufTableFoot {background-color: #eee; display: table-footer-group; font-weight: bold; } .wpufTableBody {display: table-row-group; }</style>';
110 110
111 111 $values = [];
112 112
113 - $query = $wpdb->prepare(
114 - "
115 - SELECT * FROM {$wpdb->weforms_entries} as entry
116 - LEFT JOIN {$wpdb->weforms_entrymeta} AS meta ON entry.id = meta.weforms_entry_id
117 - WHERE entry.id = %d
118 - ",
119 - $this->id
120 - );
113 + $query = "SELECT * FROM {$wpdb->weforms_entries} as entry
114 + LEFT JOIN {$wpdb->weforms_entrymeta} AS meta ON entry.id = meta.weforms_entry_id
115 + WHERE entry.id = {$this->id}";
121 116
122 117 $results = $wpdb->get_results( $query );
123 118
124 119 if ( $results ) {
@@ -357,18 +352,15 @@
357 352
358 353 $value = implode( '<br> ', $serialized_value );
359 354 }
360 355 } elseif ( $field['type'] == 'signature_field' ) {
361 - $url = $value;
356 + $url = content_url() . $value;
357 + $value = $url;
362 358
363 359 if ( isset( $_REQUEST['action'] ) != 'weforms_pdf_download' ) {
364 - $url = content_url() . '/' . $value;
365 360 $value = sprintf( '<img src="%s">', $url );
366 361 $value .= sprintf( '<a style="margin-left: -200px" href="%s">Download</a>', $url );
367 362 }
368 - else{
369 - $value = sprintf( '<img src="%s">', $url );
370 - }
371 363 }
372 364
373 365 $this->fields[ $result->meta_key ]['value'] = apply_filters( 'weforms_entry_meta_field', $value, $field );
374 366 }
@@ -424,36 +416,6 @@
424 416 return;
425 417 }
426 418
427 419 return $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}weforms_payments WHERE entry_id = {$this->id} " );
428 - }
429 -
430 - /**
431 - * Get Form from entry id.
432 - *
433 - * @param int $entry_id The entry id.
434 - * @global object $wpdb The Wordpress database object.
435 - *
436 - * @return object The form object.
437 - */
438 - public static function get_form( $entry_id ) {
439 - $form_id = self::get_form_id( $entry_id );
440 -
441 - return ! empty( $form_id ) ? weforms()->form->get( $form_id ) : null;
442 - }
443 -
444 - /**
445 - * Get form id from entry id.
446 - *
447 - * @param int $entry_id The entry id.
448 - * @global object $wpdb The Wordpress database object.
449 - *
450 - * @return int The form id.
451 - */
452 - public static function get_form_id( $entry_id ) {
453 - global $wpdb;
454 -
455 - $results = $wpdb->get_results( $wpdb->prepare( "SELECT form_id FROM {$wpdb->prefix}weforms_entries WHERE id = %d ", $entry_id ) );
456 -
457 - return ! empty( $results[0]->form_id ) ? $results[0]->form_id : null;
458 420 }
459 421 }