| @@ -49,9 +49,9 @@ | ||
| 49 | 49 | . " WHERE {$trash_bookings} " ; |
| 50 | 50 | if ($my_resources!='') $sql_req .= " AND bk.booking_type IN ({$my_resources}) "; |
| 51 | 51 | |
| 52 | 52 | $sql_req .= "ORDER BY dt.booking_date" ; |
| 53 | - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared | |
| 53 | + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter | |
| 54 | 54 | $sql_results = $wpdb->get_results( $sql_req ); |
| 55 | 55 | |
| 56 | 56 | // </editor-fold> |
| 57 | 57 | |
| @@ -510,12 +510,18 @@ | ||
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | function wpbc_dashboard_info_get_version_type_sites() { |
| 513 | 513 | |
| 514 | + $json_version = wpbc_get_json_property_from_meta( 'max usage' ); | |
| 515 | + if ( ! empty( $json_version ) ) { | |
| 516 | + // $json_edition = wpbc_get_json_property_from_meta( 'edition' ); if ( ! empty( $json_edition ) ) { $json_version = $json_version . ' | ' . $json_edition; } | |
| 517 | + return $json_version; | |
| 518 | + } | |
| 519 | + | |
| 514 | 520 | $v_type = ''; |
| 515 | - if ( strpos( strtolower( WPDEV_BK_VERSION ), 'multisite' ) !== false ) { | |
| 521 | + if ( false !== strpos( strtolower( WPDEV_BK_VERSION ), 'multisite' ) ) { | |
| 516 | 522 | $v_type = '5'; |
| 517 | - } else if ( strpos( strtolower( WPDEV_BK_VERSION ), 'develop' ) !== false ) { | |
| 523 | + } else if ( false !== strpos( strtolower( WPDEV_BK_VERSION ), 'develop' ) ) { | |
| 518 | 524 | $v_type = '2'; |
| 519 | 525 | } |
| 520 | 526 | |
| 521 | 527 | if ( ! empty( $v_type ) ) { |
| @@ -520,9 +526,9 @@ | ||
| 520 | 526 | |
| 521 | 527 | if ( ! empty( $v_type ) ) { |
| 522 | 528 | return ' ' . $v_type . ' ' . __( 'websites', 'booking' ); |
| 523 | 529 | } else { |
| 524 | - return ' 1' . ' ' . __( 'website', 'booking' ); | |
| 530 | + return ' 1' . ' ' . __( 'website', 'booking' ); | |
| 525 | 531 | } |
| 526 | 532 | } |
| 527 | 533 | |
| 528 | 534 | function wpbc_dashboard_info_get_version_number() { |
| @@ -530,8 +536,12 @@ | ||
| 530 | 536 | if ( substr( WPDEV_BK_VERSION, 0, 3 ) == '11.' ) { |
| 531 | 537 | |
| 532 | 538 | $show_version = substr( WPDEV_BK_VERSION, 3 ); |
| 533 | 539 | |
| 540 | + if ( ( '' === trim( $show_version ) ) || ( '0' === trim( $show_version ) ) ) { | |
| 541 | + return esc_attr( WP_BK_VERSION_NUM ); | |
| 542 | + } | |
| 543 | + | |
| 534 | 544 | if ( substr( $show_version, ( - 1 * ( strlen( WP_BK_VERSION_NUM ) ) ) ) === WP_BK_VERSION_NUM ) { |
| 535 | 545 | $show_version = substr( $show_version, 0, ( - 1 * ( strlen( WP_BK_VERSION_NUM ) ) - 1 ) ); |
| 536 | 546 | $show_version = str_replace( '.', ' ', $show_version ) . " <sup><strong style='font-size:12px;'>" . esc_attr( WP_BK_VERSION_NUM ) . "</strong></sup>"; |
| 537 | 547 | } |
| @@ -552,9 +562,9 @@ | ||
| 552 | 562 | |
| 553 | 563 | Disbale hidded notice about Upgrade to higher version in paid versions |
| 554 | 564 | // FixIn: 8.0.1.6. |
| 555 | 565 | if ( ( $version !== 'free' ) && ( class_exists('wpdev_bk_multiuser') === false ) ) { ?> |
| 556 | - <div class="wpbc_dashboard_section border_orrange" id="bk_upgrade_section"> | |
| 566 | + <div class="wpbc_dashboard_section border_orrange" id="bk_upgrade_section"> | |
| 557 | 567 | <div style="padding:0px 10px;width:96%;"> |
| 558 | 568 | <h4><?php esc_html_e('Upgrade to higher versions' , 'booking' ); ?>:</h4> |
| 559 | 569 | <p>Check additional advanced functionality, which exist in higher versions and can be interesting for you <a href="https://wpbookingcalendar.com/features/" target="_blank">here »</a></p> |
| 560 | 570 | <p><a class="button button-primary" style="margin-top: 10px;font-weight: 600;" href="<?php echo wpbc_up_link(); ?>" target="_blank"><?php if ( wpbc_get_ver_sufix() == '' ) { esc_html_e('Purchase' ,'booking'); } else { esc_html_e('Upgrade Now' ,'booking'); } ?></a> </p> |
| @@ -567,9 +577,9 @@ | ||
| 567 | 577 | jQuery('#bk_upgrade_section').animate({opacity:1},7000).fadeOut(2000); |
| 568 | 578 | }); |
| 569 | 579 | </script> |
| 570 | 580 | <?php } ?> |
| 571 | - <?php } | |
| 581 | + <?php } | |
| 572 | 582 | */ |
| 573 | 583 | ?> |
| 574 | 584 | <div id="wpbc_dashboard_section_current_version" class="wpbc_dashboard_section" > |
| 575 | 585 | <span class="bk_header"><?php esc_html_e('Current version' ,'booking'); ?>:</span> |
| @@ -581,10 +591,10 @@ | ||
| 581 | 591 | </tr> |
| 582 | 592 | <?php } ?> |
| 583 | 593 | <tr class="first"> |
| 584 | 594 | <td style="width:35%;text-align: right;;" class=""><?php esc_html_e('Version' ,'booking'); ?>:</td> |
| 585 | - <td style="color: #e50;font-size: 13px;font-weight: 600;text-align: left;text-shadow: 0 -1px 0 #eee;;" | |
| 586 | - class="bk_spec_font"><?php | |
| 595 | + <td style="color: #e50;font-size: 13px;font-weight: 600;text-align: left;text-shadow: 0 -1px 0 #eee;;" | |
| 596 | + class="bk_spec_font"><?php | |
| 587 | 597 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 588 | 598 | echo wpbc_dashboard_info_get_version_number(); |
| 589 | 599 | |
| 590 | 600 | ?></td> |
| @@ -630,10 +640,10 @@ | ||
| 630 | 640 | </tr> |
| 631 | 641 | </table> |
| 632 | 642 | </div> |
| 633 | 643 | </div> |
| 634 | - | |
| 635 | - <?php | |
| 644 | + | |
| 645 | + <?php | |
| 636 | 646 | } |
| 637 | 647 | |
| 638 | 648 | |
| 639 | 649 | /** Dashboard Statistic Section */ |
| @@ -928,5 +938,5 @@ | ||
| 928 | 938 | </div> |
| 929 | 939 | </div> |
| 930 | 940 | <?php |
| 931 | 941 | |
| 932 | - } | |
| 942 | + } | |