CWE-89• Year: 2025
Analyzed CVEs:CVE-2025-10586,CVE-2025-28983,CVE-2025-10587,CVE-2025-47671,CVE-2025-52773,CVE-2025-10862,CVE-2025-52832,CVE-2025-54678,CVE-2025-9172,CVE-2025-6970
--- cache/community-events_1.5.1/community-events.php 2025-12-04 20:27:54.125396960 +0000+++ cache/community-events_1.5.2/community-events.php 2025-12-04 20:27:57.793630238 +0000@@ -2,7 +2,7 @@ /*Plugin Name: Community Events Plugin URI: https://ylefebvre.github.io/wordpress-plugins/community-events/ Description: A plugin used to manage events and display them in a widget-Version: 1.5.1+Version: 1.5.2 Author: Yannick Lefebvre Author URI: https://ylefebvre.github.io Copyright 2024 Yannick Lefebvre (email : [email protected])@@ -3205,10 +3205,10 @@ } } else- $venueid = $_POST['event_venue'];+ $venueid = intval( $_POST['event_venue'] ); $newevent = array("event_name" => sanitize_text_field($_POST['event_name']), "event_start_date" => sanitize_text_field($_POST['event_start_date']), "event_start_hour" => sanitize_text_field($_POST['event_start_hour']), "event_start_minute" => sanitize_text_field($_POST['event_start_minute']), "event_start_ampm" => sanitize_text_field($_POST['event_start_ampm']),- "event_description" => sanitize_text_field($_POST['event_description']), "event_url" => sanitize_url($_POST['event_url']), "event_ticket_url" => sanitize_url($_POST['event_ticket_url']), "event_venue" => intval( $venueid ), "event_category" => sanitize_text_field( $_POST['event_category'] ),+ "event_description" => sanitize_text_field($_POST['event_description']), "event_url" => sanitize_url($_POST['event_url']), "event_ticket_url" => sanitize_url($_POST['event_ticket_url']), "event_venue" => $venueid, "event_category" => intval( sanitize_text_field( $_POST['event_category'] ) ), "event_submitter" => sanitize_text_field( $username ), "event_end_hour" => sanitize_text_field( ( isset( $_POST['event_end_hour'] ) ? $_POST['event_end_hour'] : '' ) ), "event_end_minute" => sanitize_text_field( ( isset( $_POST['event_end_minute'] ) ? $_POST['event_end_minute'] : '' ) ), "event_end_ampm" => sanitize_text_field(( isset( $_POST['event_end_ampm'] ) ? $_POST['event_end_ampm'] : '' ))); if (isset($_POST['submiteventnew']))@@ -3257,7 +3257,7 @@ $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; - $venuenamequery = "select ce_venue_name from " . $wpdb->prefix . "ce_venues where ce_venue_id = " . $venueid;+ $venuenamequery = "select ce_venue_name from " . $wpdb->prefix . "ce_venues where ce_venue_id = " . intval( $venueid ); $venuename = $wpdb->get_var($venuenamequery); $categorynamequery = "select event_cat_name from " . $wpdb->prefix . "ce_category where event_cat_id = " . $newevent['event_category'];
--- cache/community-events_1.5.1/community-events.php 2025-12-04 20:27:54.125396960 +0000+++ cache/community-events_1.5.2/community-events.php 2025-12-04 20:29:09.490190883 +0000@@ -2,7 +2,7 @@ /*Plugin Name: Community Events Plugin URI: https://ylefebvre.github.io/wordpress-plugins/community-events/ Description: A plugin used to manage events and display them in a widget-Version: 1.5.1+Version: 1.5.2 Author: Yannick Lefebvre Author URI: https://ylefebvre.github.io Copyright 2024 Yannick Lefebvre (email : [email protected])@@ -3205,10 +3205,10 @@ } } else- $venueid = $_POST['event_venue'];+ $venueid = intval( $_POST['event_venue'] ); $newevent = array("event_name" => sanitize_text_field($_POST['event_name']), "event_start_date" => sanitize_text_field($_POST['event_start_date']), "event_start_hour" => sanitize_text_field($_POST['event_start_hour']), "event_start_minute" => sanitize_text_field($_POST['event_start_minute']), "event_start_ampm" => sanitize_text_field($_POST['event_start_ampm']),- "event_description" => sanitize_text_field($_POST['event_description']), "event_url" => sanitize_url($_POST['event_url']), "event_ticket_url" => sanitize_url($_POST['event_ticket_url']), "event_venue" => intval( $venueid ), "event_category" => sanitize_text_field( $_POST['event_category'] ),+ "event_description" => sanitize_text_field($_POST['event_description']), "event_url" => sanitize_url($_POST['event_url']), "event_ticket_url" => sanitize_url($_POST['event_ticket_url']), "event_venue" => $venueid, "event_category" => intval( sanitize_text_field( $_POST['event_category'] ) ), "event_submitter" => sanitize_text_field( $username ), "event_end_hour" => sanitize_text_field( ( isset( $_POST['event_end_hour'] ) ? $_POST['event_end_hour'] : '' ) ), "event_end_minute" => sanitize_text_field( ( isset( $_POST['event_end_minute'] ) ? $_POST['event_end_minute'] : '' ) ), "event_end_ampm" => sanitize_text_field(( isset( $_POST['event_end_ampm'] ) ? $_POST['event_end_ampm'] : '' ))); if (isset($_POST['submiteventnew']))@@ -3257,7 +3257,7 @@ $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; - $venuenamequery = "select ce_venue_name from " . $wpdb->prefix . "ce_venues where ce_venue_id = " . $venueid;+ $venuenamequery = "select ce_venue_name from " . $wpdb->prefix . "ce_venues where ce_venue_id = " . intval( $venueid ); $venuename = $wpdb->get_var($venuenamequery); $categorynamequery = "select event_cat_name from " . $wpdb->prefix . "ce_category where event_cat_id = " . $newevent['event_category'];
--- cache/popup-builder-block_2.1.3/build/admin/dashboard/index.asset.php 2025-12-04 20:27:52.681305128 +0000+++ cache/popup-builder-block_2.1.4/build/admin/dashboard/index.asset.php 2025-12-04 20:28:00.649811879 +0000@@ -1 +1 @@-<?php return array('dependencies' => array('jquery', 'moment', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-url'), 'version' => '03438635b2e58890a597');+<?php return array('dependencies' => array('jquery', 'moment', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-url'), 'version' => '128855d21f0c9167697c');
--- cache/popup-builder-block_2.1.3/build/blocks/advanced-image/index.asset.php 2025-12-04 20:27:52.697306144 +0000+++ cache/popup-builder-block_2.1.4/build/blocks/advanced-image/index.asset.php 2025-12-04 20:28:00.665812897 +0000@@ -1 +1 @@-<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '80bb5def42e46330aabd');+<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '63455aaea59366663108');
--- cache/popup-builder-block_2.1.3/build/blocks/advanced-paragraph/index.asset.php 2025-12-04 20:27:52.697306144 +0000+++ cache/popup-builder-block_2.1.4/build/blocks/advanced-paragraph/index.asset.php 2025-12-04 20:28:00.665812897 +0000@@ -1 +1 @@-<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '40b46ad3ad28874ff5f4');+<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '05d70e75853d4566362f');
--- cache/popup-builder-block_2.1.3/build/blocks/button/index.asset.php 2025-12-04 20:27:52.697306144 +0000+++ cache/popup-builder-block_2.1.4/build/blocks/button/index.asset.php 2025-12-04 20:28:00.665812897 +0000@@ -1 +1 @@-<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '32d8afe5632296859ab0');+<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '07fc9d20b22d38f18632');
--- cache/popup-builder-block_2.1.3/build/blocks/form/index.asset.php 2025-12-04 20:27:52.701306399 +0000+++ cache/popup-builder-block_2.1.4/build/blocks/form/index.asset.php 2025-12-04 20:28:00.669813151 +0000@@ -1 +1 @@-<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '5bd6d28d65c134eec595');+<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '6b2f7dd05f5a82f8c159');
--- cache/popup-builder-block_2.1.3/build/blocks/heading/index.asset.php 2025-12-04 20:27:52.701306399 +0000+++ cache/popup-builder-block_2.1.4/build/blocks/heading/index.asset.php 2025-12-04 20:28:00.669813151 +0000@@ -1 +1 @@-<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '46fc60cc50b84bd800e5');+<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'd48479cff02ca31ce684');
--- cache/popup-builder-block_2.1.3/build/popup/components.asset.php 2025-12-04 20:27:52.705306653 +0000+++ cache/popup-builder-block_2.1.4/build/popup/components.asset.php 2025-12-04 20:28:00.681813914 +0000@@ -1 +1 @@-<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '1cfa3b2486bdd4016fe8');+<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-url'), 'version' => '905ca6f8217998009b26');
--- cache/popup-builder-block_2.1.3/includes/Routes/FetchDemo.php 2025-12-04 20:27:52.741308943 +0000+++ cache/popup-builder-block_2.1.4/includes/Routes/FetchDemo.php 2025-12-04 20:28:00.713815949 +0000@@ -9,20 +9,24 @@ protected function get_routes(): array { return [ [ - 'endpoint' => '/live-preview', - 'methods' => 'POST', + 'endpoint' => '/live-preview-template', + 'methods' => 'GET', 'callback' => 'fetch_external_content', - 'permission_callback' => '__return_true', ], [ 'endpoint' => '/live-preview', 'methods' => 'GET', 'callback' => 'get_popup_preview', - 'permission_callback' => '__return_true', + 'permission_callback' => [$this, 'permission_callback'], ] ]; } + public function permission_callback(): bool { + // check for nonce + return isset( $_SERVER['HTTP_X_WP_NONCE'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_WP_NONCE'] ) ), 'wp_rest' ); + } + public function fetch_external_content( \WP_REST_Request $request ) { $url = $request->get_param( 'url' );
--- cache/popup-builder-block_2.1.3/includes/Routes/Onboard.php 2025-12-04 20:27:52.741308943 +0000+++ cache/popup-builder-block_2.1.4/includes/Routes/Onboard.php 2025-12-04 20:28:00.713815949 +0000@@ -16,13 +16,11 @@ 'endpoint' => '/onboard', 'methods' => "GET", 'callback' => 'get_onboard', - 'permission_callback' => '__return_true' ], [ 'endpoint' => '/onboard', 'methods' => "POST", 'callback' => 'post_onboard', - 'permission_callback' => '__return_true' ], ]; }
--- cache/popup-builder-block_2.1.3/includes/Routes/Popup.php 2025-12-04 20:27:52.741308943 +0000+++ cache/popup-builder-block_2.1.4/includes/Routes/Popup.php 2025-12-04 20:28:00.713815949 +0000@@ -31,23 +31,27 @@ 'endpoint' => '/popup/logs', 'methods' => 'POST', 'callback' => 'insert_logs', - 'permission_callback' => '__return_true', + 'permission_callback' => [$this, 'permission_callback'], ], [ 'endpoint' => '/popup/logs', 'methods' => 'DELETE', 'callback' => 'delete_logs', - 'permission_callback' => '__return_true', ], [ 'endpoint' => '/popup/logs', 'methods' => 'PUT', 'callback' => 'update_logs', - 'permission_callback' => '__return_true', + 'permission_callback' => [$this, 'permission_callback'], ], ]; } + public function permission_callback(): bool { + // check for nonce + return isset( $_SERVER['HTTP_X_WP_NONCE'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_WP_NONCE'] ) ), 'wp_rest' ); + } + public function get_campaigns($request) { $params = $request->get_params(); $is_subscribers = isset( $params['subscribers'] ) ? (bool) $params['subscribers'] : false; @@ -227,7 +231,7 @@ ); } - $id = $request['id']; + $id = absint( $request['id'] ); $logs = DataBase::getDB( "*", 'pbb_logs', 'id = ' . $id );
--- cache/popup-builder-block_2.1.3/includes/Routes/SettingsData.php 2025-12-04 20:27:52.741308943 +0000+++ cache/popup-builder-block_2.1.4/includes/Routes/SettingsData.php 2025-12-04 20:28:00.713815949 +0000@@ -14,13 +14,11 @@ 'endpoint' => '/settings', 'methods' => \WP_REST_Server::READABLE, 'callback' => 'action_get_settings', - 'permission_callback' => '__return_true', ], [ 'endpoint' => '/settings', 'methods' => \WP_REST_Server::EDITABLE, 'callback' => 'action_edit_settings', - 'permission_callback' => '__return_true', ], ]; }
--- cache/popup-builder-block_2.1.3/includes/Routes/Subscribers.php 2025-12-04 20:27:52.741308943 +0000+++ cache/popup-builder-block_2.1.4/includes/Routes/Subscribers.php 2025-12-04 20:28:00.713815949 +0000@@ -14,7 +14,7 @@ 'endpoint' => '/subscribers', 'methods' => 'POST', 'callback' => 'increase_subscribers', - 'permission_callback' => '__return_true', + 'permission_callback' => [$this, 'permission_callback'], ], [ 'endpoint' => '/subscribers', @@ -29,6 +29,11 @@ ]; } + public function permission_callback(): bool { + // check for nonce + return isset( $_SERVER['HTTP_X_WP_NONCE'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_WP_NONCE'] ) ), 'wp_rest' ); + } + public function increase_subscribers( $param ) { // Decode request body $data = json_decode($param->get_body(), true);
--- cache/popup-builder-block_2.1.3/popup-builder-block.php 2025-12-04 20:27:52.741308943 +0000+++ cache/popup-builder-block_2.1.4/popup-builder-block.php 2025-12-04 20:28:00.713815949 +0000@@ -7,7 +7,7 @@ * Requires PHP: 7.4 * Plugin URI: https://wpmet.com/plugin/popupkit * Author: Wpmet - * Version: 2.1.3 + * Version: 2.1.4 * Author URI: https://wpmet.com/ * License: GPL-3.0-or-later * License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -33,7 +33,7 @@ * * @var string */ - const VERSION = '2.1.3'; + const VERSION = '2.1.4'; /** * \PopupKit class constructor.
--- cache/click-pledge-connect_25.04010101-WP6.8/Functions/Install_CNP.php 2025-12-04 20:27:47.872999360 +0000+++ cache/click-pledge-connect_25.07000000-WP6.8.1/Functions/Install_CNP.php 2025-12-04 20:29:24.935173620 +0000@@ -1,95 +1,95 @@-<?php -function Install_CNP_DB() { - /* Add in the required globals to be able to create the tables */ - global $wpdb; - global $CNP_db_version; - global $cnp_table_name; - global $cnp_formtable_name; - global $cnp_settingtable_name; - global $cnp_channelgrptable_name; - global $cnp_channeltable_name; - $sql = "CREATE TABLE $cnp_formtable_name ( - cnpform_id int(15) NOT NULL AUTO_INCREMENT, - cnpform_cnpform_ID int(15) NOT NULL, - cnpform_CampaignName varchar(250) NOT NULL, - cnpform_FormName varchar(250) NOT NULL, - cnpform_GUID varchar(250) NOT NULL, - cnpform_FormStartDate datetime NOT NULL, - cnpform_FormEndDate datetime NOT NULL, - cnpform_FormStatus char(1) NOT NULL DEFAULT 'a', - cnpform_DateCreated datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - cnpform_DateModified datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (cnpform_id),KEY cnpfrm_id (cnpform_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; - - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); - dbDelta($sql); - $sql = "CREATE TABLE $cnp_table_name ( - cnpform_ID int(9) NOT NULL AUTO_INCREMENT, - cnpform_groupname varchar(250) NOT NULL, - cnpform_cnpstngs_ID int(15) NOT NULL, - cnpform_AccountNumber varchar(250) NOT NULL, - cnpform_guid text NOT NULL, - cnpform_type text NOT NULL, - cnpform_ptype text NOT NULL, - cnpform_text varchar(250) NOT NULL, - cnpform_img blob NOT NULL, - cnpform_shortcode text, - cnpform_custommsg varchar(250) NOT NULL, - cnpform_Form_StartDate datetime NOT NULL, - cnpform_Form_EndDate datetime NOT NULL, - cnpform_status char(1) DEFAULT 'a', - cnpform_Date_Created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - cnpform_Date_Modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (cnpform_ID), - KEY cnpfrm_id (cnpform_ID)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"; - - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); - dbDelta($sql); - - $sql = "CREATE TABLE $cnp_channelgrptable_name ( - cnpchannelgrp_ID int(9) NOT NULL AUTO_INCREMENT, - cnpchannelgrp_groupname varchar(250) NOT NULL, - cnpchannelgrp_cnpstngs_ID int(15) NOT NULL, - cnpchannelgrp_shortcode text, - cnpchannelgrp_custommsg varchar(250) NOT NULL, - cnpchannelgrp_channel_StartDate datetime NOT NULL, - cnpchannelgrp_channel_EndDate datetime NOT NULL, - cnpchannelgrp_status char(1) DEFAULT 'a', - cnpchannelgrp_Date_Created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - cnpchannelgrp_Date_Modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (cnpchannelgrp_ID), - KEY cnpfrm_id (cnpchannelgrp_ID)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"; - - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); - dbDelta($sql); - - $sql = "CREATE TABLE $cnp_channeltable_name ( - cnpchannel_id int(15) NOT NULL AUTO_INCREMENT, - cnpchannel_cnpchannelgrp_ID int(15) NOT NULL, - cnpchannel_channelName varchar(250) NOT NULL, - cnpchannel_channelStartDate datetime NOT NULL, - cnpchannel_channelEndDate datetime NOT NULL, - cnpchannel_channelStatus char(1) NOT NULL DEFAULT 'a', - cnpchannel_DateCreated datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - cnpchannel_DateModified datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (cnpchannel_id),KEY cnpfrm_id (cnpchannel_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; - - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); - dbDelta($sql); - - $sql = "CREATE TABLE $cnp_settingtable_name ( - cnpstngs_ID int(9) NOT NULL AUTO_INCREMENT, - cnpstngs_frndlyname varchar(250) NOT NULL, - cnpstngs_AccountNumber varchar(250) NOT NULL, - cnpstngs_guid text NOT NULL, - cnpstngs_status char(1) DEFAULT 'a', - cnpstngs_Date_Created datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - cnpstngs_Date_Modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (cnpstngs_ID), - KEY cnpstngs_id (cnpstngs_ID)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"; - - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); - dbDelta($sql); - -} +<?php+function Install_CNP_DB() {+ /* Add in the required globals to be able to create the tables */+ global $wpdb;+ global $CNP_db_version;+ global $cnp_table_name;+ global $cnp_formtable_name;+ global $cnp_settingtable_name;+ global $cnp_channelgrptable_name;+ global $cnp_channeltable_name;+ $sql = "CREATE TABLE $cnp_formtable_name (+ cnpform_id int(15) NOT NULL AUTO_INCREMENT,+ cnpform_cnpform_ID int(15) NOT NULL,+ cnpform_CampaignName varchar(250) NOT NULL,+ cnpform_FormName varchar(250) NOT NULL,+ cnpform_GUID varchar(250) NOT NULL,+ cnpform_FormStartDate datetime NOT NULL,+ cnpform_FormEndDate datetime NOT NULL,+ cnpform_FormStatus char(1) NOT NULL DEFAULT 'a',+ cnpform_DateCreated datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ cnpform_DateModified datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ PRIMARY KEY (cnpform_id),KEY cnpfrm_id (cnpform_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;";++ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');+ dbDelta($sql);+ $sql = "CREATE TABLE $cnp_table_name (+ cnpform_ID int(9) NOT NULL AUTO_INCREMENT,+ cnpform_groupname varchar(250) NOT NULL,+ cnpform_cnpstngs_ID int(15) NOT NULL,+ cnpform_AccountNumber varchar(250) NOT NULL,+ cnpform_guid text NOT NULL,+ cnpform_type text NOT NULL,+ cnpform_ptype text NOT NULL,+ cnpform_text varchar(250) NOT NULL,+ cnpform_img blob NOT NULL,+ cnpform_shortcode text,+ cnpform_custommsg varchar(250) NOT NULL,+ cnpform_Form_StartDate datetime NOT NULL,+ cnpform_Form_EndDate datetime NOT NULL,+ cnpform_status char(1) DEFAULT 'a',+ cnpform_Date_Created datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ cnpform_Date_Modified datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ PRIMARY KEY (cnpform_ID),+ KEY cnpfrm_id (cnpform_ID)) ENGINE=InnoDB DEFAULT CHARSET=utf8;";+ + require_once(ABSPATH . 'wp-admin/includes/upgrade.php');+ dbDelta($sql);+ + $sql = "CREATE TABLE $cnp_channelgrptable_name (+ cnpchannelgrp_ID int(9) NOT NULL AUTO_INCREMENT,+ cnpchannelgrp_groupname varchar(250) NOT NULL,+ cnpchannelgrp_cnpstngs_ID int(15) NOT NULL,+ cnpchannelgrp_shortcode text,+ cnpchannelgrp_custommsg varchar(250) NOT NULL,+ cnpchannelgrp_channel_StartDate datetime NOT NULL,+ cnpchannelgrp_channel_EndDate datetime NOT NULL,+ cnpchannelgrp_status char(1) DEFAULT 'a',+ cnpchannelgrp_Date_Created datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ cnpchannelgrp_Date_Modified datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ PRIMARY KEY (cnpchannelgrp_ID),+ KEY cnpfrm_id (cnpchannelgrp_ID)) ENGINE=InnoDB DEFAULT CHARSET=utf8;";+ + require_once(ABSPATH . 'wp-admin/includes/upgrade.php');+ dbDelta($sql);+ + $sql = "CREATE TABLE $cnp_channeltable_name (+ cnpchannel_id int(15) NOT NULL AUTO_INCREMENT,+ cnpchannel_cnpchannelgrp_ID int(15) NOT NULL,+ cnpchannel_channelName varchar(250) NOT NULL,+ cnpchannel_channelStartDate datetime NOT NULL,+ cnpchannel_channelEndDate datetime NOT NULL,+ cnpchannel_channelStatus char(1) NOT NULL DEFAULT 'a',+ cnpchannel_DateCreated datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ cnpchannel_DateModified datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ PRIMARY KEY (cnpchannel_id),KEY cnpfrm_id (cnpchannel_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;";++ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');+ dbDelta($sql);+ + $sql = "CREATE TABLE $cnp_settingtable_name (+ cnpstngs_ID int(9) NOT NULL AUTO_INCREMENT,+ cnpstngs_frndlyname varchar(250) NOT NULL,+ cnpstngs_AccountNumber varchar(250) NOT NULL,+ cnpstngs_guid text NOT NULL,+ cnpstngs_status char(1) DEFAULT 'a',+ cnpstngs_Date_Created datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ cnpstngs_Date_Modified datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,+ PRIMARY KEY (cnpstngs_ID),+ KEY cnpstngs_id (cnpstngs_ID)) ENGINE=InnoDB DEFAULT CHARSET=utf8;";+ + require_once(ABSPATH . 'wp-admin/includes/upgrade.php');+ dbDelta($sql);+ +} ?>\ No newline at end of file
--- cache/click-pledge-connect_25.04010101-WP6.8/Functions/functionscnp.php 2025-12-04 20:27:47.872999360 +0000+++ cache/click-pledge-connect_25.07000000-WP6.8.1/Functions/functionscnp.php 2025-12-04 20:29:24.935173620 +0000@@ -4,15 +4,17 @@ { global $wpdb; global $cnp_table_name;-global $cnp_formtable_name;-global $cnprtrnstr;--$cnpGetImagesql = $wpdb->prepare(- "SELECT * FROM $cnp_table_name WHERE cnpform_groupname = %s AND cnpform_ptype = %s",- $guid,- $cnptxt-); + $guid = sanitize_text_field($guid);+ $cnptyp = sanitize_text_field($cnptyp);+ $cnptxt = sanitize_text_field($cnptxt);+ + $cnpGetImagesql = $wpdb->prepare(+ "SELECT * FROM " . esc_sql($cnp_table_name) . " + WHERE cnpform_groupname = %s AND cnpform_ptype = %s",+ $guid,+ $cnptxt+ ); $cnpimgresult = $wpdb->get_results($cnpGetImagesql); @@ -40,32 +42,35 @@ { global $wpdb; global $cnp_table_name;-global $cnprtrnstr; $currentdate = CFCNP_PLUGIN_CURRENTTIME;+$cnpshortcode = sanitize_text_field($cnpshortcode);+ $table = esc_sql($cnp_table_name); -$cnpGetImagesql = $wpdb->prepare(- "SELECT * FROM $cnp_table_name - WHERE - (cnpform_shortcode = %s OR cnpform_shortcode = %s) - AND cnpform_status = 1 - AND (- (cnpform_Form_EndDate != '0000-00-00 00:00:00' - AND %s BETWEEN cnpform_Form_StartDate AND cnpform_Form_EndDate) - OR - (cnpform_Form_EndDate = '0000-00-00 00:00:00' - AND cnpform_Form_StartDate <= %s)- ) - ORDER BY cnpform_Date_Modified ASC - LIMIT 1",- '[CnPConnect ' . $cnpshortcode . ']',- '[CnP.Form ' . $cnpshortcode . ']',- $currentdate,- $currentdate-);+$shortcode1 = '[CnPConnect ' . $cnpshortcode . ']';+$shortcode2 = '[CnP.Form ' . $cnpshortcode . ']'; + // Prepare SQL with placeholders for values only+ $sql = $wpdb->prepare(+ "SELECT * FROM {$table} + WHERE (cnpform_shortcode = %s OR cnpform_shortcode = %s) + AND cnpform_status = 1 + AND (+ (cnpform_Form_EndDate != '0000-00-00 00:00:00' + AND %s BETWEEN cnpform_Form_StartDate AND cnpform_Form_EndDate) + OR + (cnpform_Form_EndDate = '0000-00-00 00:00:00' + AND cnpform_Form_StartDate <= %s)+ ) + ORDER BY cnpform_Date_Modified ASC + LIMIT 1",+ $shortcode1,+ $shortcode2,+ $currentdate,+ $currentdate+ ); -$cnpimgresult = $wpdb->get_results($cnpGetImagesql);+$cnpimgresult = $wpdb->get_results($sql); return !empty($cnpimgresult);@@ -74,33 +79,40 @@ } function CNPCF_isExistchannelShortcode($cnpshortcode) {- global $wpdb; +global $wpdb; global $cnp_channelgrptable_name;-global $cnprtrnstr; -$currentdate = CFCNP_PLUGIN_CURRENTTIME;+$cnpshortcode = sanitize_text_field($cnpshortcode); + + $currentdate = CFCNP_PLUGIN_CURRENTTIME; -$cnpGetImagesql = $wpdb->prepare(- "SELECT * FROM $cnp_channelgrptable_name - WHERE - cnpchannelgrp_shortcode = %s - AND cnpchannelgrp_status = 1 - AND (- (cnpchannelgrp_channel_EndDate != '0000-00-00 00:00:00' - AND %s BETWEEN cnpchannelgrp_channel_StartDate AND cnpchannelgrp_channel_EndDate) - OR - (cnpchannelgrp_channel_EndDate = '0000-00-00 00:00:00' - AND cnpchannelgrp_channel_StartDate <= %s)- ) - ORDER BY cnpchannelgrp_Date_Modified ASC - LIMIT 1",- '[CnP.pledgeTV ' . $cnpshortcode . ']',- $currentdate,- $currentdate-);+ + $table = esc_sql($cnp_channelgrptable_name); -$cnpimgresult = $wpdb->get_results($cnpGetImagesql);+ + $shortcodeFormatted = '[CnP.pledgeTV ' . $cnpshortcode . ']';++ // Prepare the SQL query with placeholders for values only+ $sql = $wpdb->prepare(+ "SELECT * FROM {$table}+ WHERE cnpchannelgrp_shortcode = %s+ AND cnpchannelgrp_status = 1+ AND (+ (cnpchannelgrp_channel_EndDate != '0000-00-00 00:00:00' + AND %s BETWEEN cnpchannelgrp_channel_StartDate AND cnpchannelgrp_channel_EndDate)+ OR+ (cnpchannelgrp_channel_EndDate = '0000-00-00 00:00:00' + AND cnpchannelgrp_channel_StartDate <= %s)+ )+ ORDER BY cnpchannelgrp_Date_Modified ASC+ LIMIT 1",+ $shortcodeFormatted,+ $currentdate,+ $currentdate+ );++$cnpimgresult = $wpdb->get_results($sql); return !empty($cnpimgresult); @@ -110,12 +122,13 @@ { global $wpdb; global $cnp_table_name;-global $cnprtrnstr;+$cnpshortcode = sanitize_text_field($cnpshortcode); + $cnp_table_name = esc_sql($cnp_table_name); $cnpGetImagesql = $wpdb->prepare( "SELECT cnpform_custommsg - FROM $cnp_table_name + FROM {$cnp_table_name} WHERE cnpform_shortcode = %s OR cnpform_shortcode = %s", '[CnPConnect ' . $cnpshortcode . ']',@@ -137,25 +150,28 @@ { global $wpdb; global $cnp_channelgrptable_name;-global $cnprtrnstr;+$cnpshortcode = sanitize_text_field($cnpshortcode);+ $formatted_shortcode = '[CnP.pledgeTV ' . $cnpshortcode . ']';+ $cnprtrnstr = ''; $cnpGetImagesql = $wpdb->prepare( "SELECT cnpchannelgrp_custommsg - FROM $cnp_channelgrptable_name + FROM {$cnp_channelgrptable_name} WHERE cnpchannelgrp_shortcode = %s",- '[CnP.pledgeTV ' . $cnpshortcode . ']'+ $formatted_shortcode+ ); -$cnperrresult = $wpdb->get_results($cnpGetImagesql);+$cnperrresult = $wpdb->get_row($cnpGetImagesql); if (!empty($cnperrresult)) { - foreach ($cnperrresult as $cnperrresultsarr) {- $cnprtrnstr = $cnperrresultsarr->cnpchannelgrp_custommsg;- }+ + $cnprtrnstr = $cnperrresult->cnpchannelgrp_custommsg;+ } return $cnprtrnstr;@@ -165,11 +181,12 @@ { global $wpdb; global $cnp_table_name;-global $cnprtrnstr;+$cnpshortcode = sanitize_text_field($cnpshortcode);+ $cnp_table_name = esc_sql($cnp_table_name); $cnpGetguidsql = $wpdb->prepare( "SELECT cnpform_guid - FROM $cnp_table_name + FROM {$cnp_table_name} WHERE cnpform_shortcode = %s OR cnpform_shortcode = %s", '[CnP ' . $cnpshortcode . ']', '[CnP.Form ' . $cnpshortcode . ']'@@ -187,7 +204,6 @@ { global $wpdb; global $cnp_table_name;-global $cnprtrnstr; $currentdate = CFCNP_PLUGIN_CURRENTTIME; $cnpGetguidsql = $wpdb->prepare(@@ -606,6 +622,7 @@ function CNPCF_addSettings($tblname,$forminfo) { global $wpdb, $cnp_settingtable_name;+ $cnp_settingtable_name = esc_sql($cnp_settingtable_name); $count = sizeof($forminfo); @@ -617,7 +634,7 @@ $scnpSQL = $wpdb->prepare(- "SELECT * FROM $cnp_settingtable_name WHERE cnpstngs_frndlyname = %s OR cnpstngs_AccountNumber = %s",+ "SELECT * FROM {$cnp_settingtable_name} WHERE cnpstngs_frndlyname = %s OR cnpstngs_AccountNumber = %s", $friendly_name, $account_id );@@ -749,7 +766,7 @@ global $wpdb; global $cnp_formtable_name;-+ $wherefldid_sanitized = intval($wherefldid); $cnpGetFrmDtsql = $wpdb->prepare(@@ -823,18 +840,37 @@ $active = 1; - $sSQL = "UPDATE " . $cnp_channelgrptable_name . " SET - cnpchannelgrp_channel_StartDate = '$frmgrpstartdt1',- cnpchannelgrp_channel_EndDate = '$frmgrpenddt1',- cnpchannelgrp_status = '" . $forminfo['lstchnlsts'] . "',- cnpchannelgrp_custommsg = '" . $forminfo['txterrortxt'] . "',- cnpchannelgrp_Date_Modified = '$current_time'- WHERE cnpchannelgrp_ID = '" . $forminfo['hdnfrmid'] . "'";- $wpdb->query($sSQL);++$sSQL = $wpdb->prepare(+ "UPDATE {$cnp_channelgrptable_name} SET + cnpchannelgrp_channel_StartDate = %s,+ cnpchannelgrp_channel_EndDate = %s,+ cnpchannelgrp_status = %s,+ cnpchannelgrp_custommsg = %s,+ cnpchannelgrp_Date_Modified = %s+ WHERE cnpchannelgrp_ID = %d",+ sanitize_text_field($frmgrpstartdt1),+ sanitize_text_field($frmgrpenddt1),+ sanitize_text_field($forminfo['lstchnlsts']),+ sanitize_text_field($forminfo['txterrortxt']),+ sanitize_text_field($current_time),+ intval($forminfo['hdnfrmid'])+);++$wpdb->query($sSQL);+ $noofforms = $forminfo['hidnoofforms']; - $wpdb->query("DELETE FROM " . $cnp_channeltable_name . " WHERE cnpchannel_cnpchannelgrp_ID = " . $forminfo['hdnfrmid']);++$channel_group_id = intval($forminfo['hdnfrmid']);++$sql = $wpdb->prepare(+ "DELETE FROM {$cnp_channeltable_name} WHERE cnpchannel_cnpchannelgrp_ID = %d",+ $channel_group_id+);++$wpdb->query($sql); for ($inc = 0; $inc < $noofforms; $inc++) {@@ -860,15 +896,30 @@ if ($forminfo[$lstcnpactivecamp] != "") {- $sSQL = "INSERT INTO " . $cnp_channeltable_name . " - (cnpchannel_cnpchannelgrp_ID, cnpchannel_channelName, - cnpchannel_channelStartDate, cnpchannel_channelEndDate, - cnpchannel_channelStatus, cnpchannel_DateCreated) - VALUES - ('" . $forminfo['hdnfrmid'] . "', '" . $forminfo[$lstcnpactivecamp] . "', - '$txtcnpformstrtdt1', '$txtcnpformenddt1', $active, - '$current_time')";- $wpdb->query($sSQL);+ +$group_id = intval($forminfo['hdnfrmid']);+$channel_name = sanitize_text_field($forminfo[$lstcnpactivecamp]);+$start_date = sanitize_text_field($txtcnpformstrtdt1);+$end_date = sanitize_text_field($txtcnpformenddt1);+$channel_status = intval($active);+$date_created = sanitize_text_field($current_time);++$sql = $wpdb->prepare(+ "INSERT INTO {$cnp_channeltable_name} + (cnpchannel_cnpchannelgrp_ID, cnpchannel_channelName, + cnpchannel_channelStartDate, cnpchannel_channelEndDate, + cnpchannel_channelStatus, cnpchannel_DateCreated)+ VALUES (%d, %s, %s, %s, %d, %s)",+ $group_id,+ $channel_name,+ $start_date,+ $end_date,+ $channel_status,+ $date_created+);++$wpdb->query($sql);+ } } return true;@@ -937,18 +988,51 @@ // cnpform_shortcode='$frmcode', $active =1;//cnpform_groupname ='$forminfo[txtcnpfrmgrp]',- $sSQL = "UPDATE ".$cnp_table_name." set cnpform_type='$forminfo[lstfrmtyp]',- cnpform_ptype='$forminfo[lstpopuptyp]',- cnpform_text='$forminfo[txtpopuptxt]',- cnpform_Form_StartDate='$frmgrpstartdt1',- cnpform_Form_EndDate='$frmgrpenddt1',- cnpform_status='$forminfo[lstfrmsts]',- cnpform_custommsg='$forminfo[txterrortxt]',- cnpform_Date_Modified='$current_time'- where cnpform_ID ='".$forminfo['hdnfrmid']."'"; - $wpdb->query($sSQL);+ +$form_id = intval($forminfo['hdnfrmid']);+$form_type = sanitize_text_field($forminfo['lstfrmtyp']);+$popup_type = sanitize_text_field($forminfo['lstpopuptyp']);+$popup_text = sanitize_text_field($forminfo['txtpopuptxt']);+$start_date = sanitize_text_field($frmgrpstartdt1);+$end_date = sanitize_text_field($frmgrpenddt1);+$form_status = sanitize_text_field($forminfo['lstfrmsts']);+$error_text = sanitize_text_field($forminfo['txterrortxt']);+$date_modified = sanitize_text_field($current_time);++$sql = $wpdb->prepare(+ "UPDATE {$cnp_table_name} SET + cnpform_type = %s,+ cnpform_ptype = %s,+ cnpform_text = %s,+ cnpform_Form_StartDate = %s,+ cnpform_Form_EndDate = %s,+ cnpform_status = %s,+ cnpform_custommsg = %s,+ cnpform_Date_Modified = %s+ WHERE cnpform_ID = %d",+ $form_type,+ $popup_type,+ $popup_text,+ $start_date,+ $end_date,+ $form_status,+ $error_text,+ $date_modified,+ $form_id+);++$wpdb->query($sql);+ $noofforms = $forminfo['hidnoofforms'];- $wpdb->query("delete from ".$cnp_formtable_name." where cnpform_cnpform_ID =".$forminfo['hdnfrmid']);++$form_id = intval($forminfo['hdnfrmid']);++$sql = $wpdb->prepare(+ "DELETE FROM {$cnp_formtable_name} WHERE cnpform_cnpform_ID = %d",+ $form_id+);++$wpdb->query($sql); for($inc=0;$inc< $noofforms;$inc++) { @@ -980,12 +1064,36 @@ } - - $sSQL = "INSERT INTO ".$cnp_formtable_name."(cnpform_cnpform_ID,cnpform_CampaignName,cnpform_FormName,cnpform_GUID, cnpform_FormStartDate,cnpform_FormEndDate,cnpform_FormStatus,cnpform_DateCreated,cnpform_urlparameters)values('".$forminfo['hdnfrmid']."','$forminfo[$lstcnpactivecamp]',- '$forminfo[$lstcnpfrmtyp]','$forminfo[$txtcnpguid]',- '$txtcnpformstrtdt1','$txtcnpformenddt1',$active,- '$current_time','$forminfo[$txtcnpformurlparms]')"; - $wpdb->query($sSQL);+$form_id = intval($forminfo['hdnfrmid']);+$campaign_name = sanitize_text_field($forminfo[$lstcnpactivecamp]);+$form_name = sanitize_text_field($forminfo[$lstcnpfrmtyp]);+$form_guid = sanitize_text_field($forminfo[$txtcnpguid]);+$start_date = sanitize_text_field($txtcnpformstrtdt1);+$end_date = sanitize_text_field($txtcnpformenddt1);+$form_status = intval($active);+$date_created = sanitize_text_field($current_time);+$url_params = sanitize_text_field($forminfo[$txtcnpformurlparms]);+++$sql = $wpdb->prepare(+ "INSERT INTO {$cnp_formtable_name} + (cnpform_cnpform_ID, cnpform_CampaignName, cnpform_FormName, cnpform_GUID,+ cnpform_FormStartDate, cnpform_FormEndDate, cnpform_FormStatus,+ cnpform_DateCreated, cnpform_urlparameters)+ VALUES (%d, %s, %s, %s, %s, %s, %d, %s, %s)",+ $form_id,+ $campaign_name,+ $form_name,+ $form_guid,+ $start_date,+ $end_date,+ $form_status,+ $date_created,+ $url_params+);++$wpdb->query($sql);+ }@@ -1140,6 +1248,7 @@ global $wpdb; global $cnp_channelgrptable_name; global $cnp_channeltable_name;+$groupname = sanitize_text_field($groupname); $returnarr = []; $currentdate = CFCNP_PLUGIN_CURRENTTIME;
--- cache/click-pledge-connect_25.04010101-WP6.8/channelAdd.php 2025-12-04 20:27:47.856998344 +0000+++ cache/click-pledge-connect_25.07000000-WP6.8.1/channelAdd.php 2025-12-04 20:29:24.923172856 +0000@@ -5,7 +5,11 @@ if (isset($_POST["cnpchnlbtnsave"])) { - $addform = !empty($_POST["addchannelval"]) ? sanitize_text_field(wp_unslash($_POST["addchannelval"])) : '';+ // $addform = !empty($_POST["addchannelval"]) ? sanitize_text_field(wp_unslash($_POST["addchannelval"])) : '';+$addform = isset($_POST["addchannelval"]) ? intval($_POST["addchannelval"]) : 0;+++ global $wpdb, $cnp_channelgrptable_name; if ($addform == 1) {@@ -32,15 +36,16 @@ } $hidval = 1;-$act = !empty($_REQUEST["cnpviewid"]) ? sanitize_text_field(wp_unslash($_REQUEST["cnpviewid"])) : '';+//$act = !empty($_REQUEST["cnpviewid"]) ? sanitize_text_field(wp_unslash($_REQUEST["cnpviewid"])) : '';+$act = isset($_REQUEST["cnpviewid"]) ? intval($_REQUEST["cnpviewid"]) : 0; if (!empty($act)) { global $wpdb; global $cnp_channelgrptable_name; global $cnp_channeltable_name; - $cnpviewid = isset($_GET['cnpviewid']) ? sanitize_text_field(wp_unslash($_GET['cnpviewid'])) : '';-+ //$cnpviewid = isset($_GET['cnpviewid']) ? sanitize_text_field(wp_unslash($_GET['cnpviewid'])) : '';+$cnpviewid = isset($_GET['cnpviewid']) ? intval($_GET['cnpviewid']) : 0; if (!empty($cnpviewid)) { $cnpfrmdtresult = CNPCF_GetCnPGroupDetails($cnp_channelgrptable_name, 'cnpchannelgrp_ID', $cnpviewid);
--- cache/click-pledge-connect_25.04010101-WP6.8/clickandpledge_form.php 2025-12-04 20:27:47.856998344 +0000+++ cache/click-pledge-connect_25.07000000-WP6.8.1/clickandpledge_form.php 2025-12-04 20:29:24.923172856 +0000@@ -3,12 +3,13 @@ Plugin Name: Click & Pledge Connect Plugin URI: https://manual.clickandpledge.com/ Description: The Click & Pledge CONNECT plugin provides a flexible and easy to add process for adding CONNECT forms to any WordPress template.-Version:25.04010101-WP6.8+Version: 25.07000000-WP6.8.1 Author: Click & Pledge+Text Domain: click-pledge-connect Author URI: https://www.clickandpledge.com+License: GPLv2 or later+License URI: https://www.gnu.org/licenses/gpl-2.0.html */--error_reporting(E_ALL); global $cnp_table_name; global $wpdb; global $cnp_formtable_name;@@ -35,21 +36,26 @@ if ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; }-$wpcnp_version = '25.04010101-WP6.8';+$wpcnp_version = '25.07000000-WP6.8'; $all_plugins = get_plugins(); -foreach ( array_keys( $all_plugins ) as $plugin_candidate ) { - if ( $plugin_candidate === "click-pledge-connect/clickandpledge_form.php" ) {- - if($wpcnp_version < $all_plugins[$plugin_candidate]['Version']) {- $alertvar = "CRITICAL UPDATE: There is a new version of <strong>Click & Pledge Connect</strong> plugin. Please <a href='plugins.php'>Update Now<a>";- ?>- <div class="error notice">- <p><?php _e( $alertvar, 'my_plugin_textdomain'); ?></p>- </div>- <?php }- break;- }+foreach ( array_keys( $all_plugins ) as $plugin_candidate ) {+ if ( $plugin_candidate === "click-pledge-connect/clickandpledge_form.php" ) {++ if ( version_compare( $wpcnp_version, $all_plugins[$plugin_candidate]['Version'], '<' ) ) {+ $alertvar = __(+ "CRITICAL UPDATE: There is a new version of <strong>Click & Pledge Connect</strong> plugin. Please <a href='plugins.php'>Update Now</a>",+ 'click-pledge-connect'+ );+ ?>+ <div class="error notice">+ <p><?php echo wp_kses_post( $alertvar ); ?></p>+ </div>+ <?php+ }++ break;+ } } } add_action( 'admin_notices', 'cnpconnect_update_notice' );@@ -92,7 +98,7 @@ define( 'CNP_CF_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); define( 'CNP_CF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); define( 'CFCNP_PLUGIN_NAME', basename(dirname(__FILE__)) );-define( 'CFCNP_PLUGIN_CURRENTTIME',date("Y-m-d H:i:00",$blogtime));+define( 'CFCNP_PLUGIN_CURRENTTIME', gmdate("Y-m-d H:i:00", $blogtime) ); define( 'CFCNP_PLUGIN_CURRENTDATETIMEFORMAT',$wp_dateformat." ".$wp_timeformat); /* When plugin is activated */@@ -116,35 +122,42 @@ 'cnpform_urlparameters' ) );+$expected_table = $wpdb->prefix . 'cnp_formsdtl'; - if ((int) $check_column === 0) {- $wpdb->query(- "ALTER TABLE $cnp_formtable_name ADD COLUMN `cnpform_urlparameters` TEXT NOT NULL"- );- }+if ( $cnp_formtable_name === $expected_table && (int) $check_column === 0 ) {+ $query = "ALTER TABLE `$expected_table` ADD COLUMN `cnpform_urlparameters` TEXT NOT NULL";+ $wpdb->query( $query );+}+ - if ($wpdb->get_var("SHOW TABLES LIKE '{$cnp_channelgrptable_name}'") != $cnp_channelgrptable_name) {- $sql = "CREATE TABLE $cnp_channelgrptable_name (- cnpchannelgrp_ID INT(9) NOT NULL AUTO_INCREMENT,- cnpchannelgrp_groupname VARCHAR(250) NOT NULL,- cnpchannelgrp_cnpstngs_ID INT(15) NOT NULL,- cnpchannelgrp_shortcode TEXT,- cnpchannelgrp_custommsg VARCHAR(250) NOT NULL,- cnpchannelgrp_channel_StartDate DATETIME NOT NULL,- cnpchannelgrp_channel_EndDate DATETIME NOT NULL,- cnpchannelgrp_status CHAR(1) DEFAULT 'a',- cnpchannelgrp_Date_Created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',- cnpchannelgrp_Date_Modified DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',- PRIMARY KEY (cnpchannelgrp_ID),- KEY cnpfrm_id (cnpchannelgrp_ID)- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";- require_once ABSPATH . 'wp-admin/includes/upgrade.php';- dbDelta($sql);- }+ $table_exists = $wpdb->get_var(+ $wpdb->prepare( "SHOW TABLES LIKE %s", $cnp_channelgrptable_name )+);++if ( $table_exists !== $cnp_channelgrptable_name ) {+ $sql = "CREATE TABLE $cnp_channelgrptable_name (+ cnpchannelgrp_ID INT(9) NOT NULL AUTO_INCREMENT,+ cnpchannelgrp_groupname VARCHAR(250) NOT NULL,+ cnpchannelgrp_cnpstngs_ID INT(15) NOT NULL,+ cnpchannelgrp_shortcode TEXT,+ cnpchannelgrp_custommsg VARCHAR(250) NOT NULL,+ cnpchannelgrp_channel_StartDate DATETIME NOT NULL,+ cnpchannelgrp_channel_EndDate DATETIME NOT NULL,+ cnpchannelgrp_status CHAR(1) DEFAULT 'a',+ cnpchannelgrp_Date_Created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',+ cnpchannelgrp_Date_Modified DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',+ PRIMARY KEY (cnpchannelgrp_ID),+ KEY cnpfrm_id (cnpchannelgrp_ID)+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;";++ require_once ABSPATH . 'wp-admin/includes/upgrade.php';+ dbDelta( $sql );+}+ - if ($wpdb->get_var("SHOW TABLES LIKE '{$cnp_channeltable_name}'") != $cnp_channeltable_name) {+ if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $cnp_channeltable_name ) ) !== $cnp_channeltable_name ) { $sql = "CREATE TABLE $cnp_channeltable_name ( cnpchannel_id INT(15) NOT NULL AUTO_INCREMENT, cnpchannel_cnpchannelgrp_ID INT(15) NOT NULL,@@ -161,8 +174,7 @@ dbDelta($sql); } - - if ($wpdb->get_var("SHOW TABLES LIKE '{$cnp_formtable_name}'") != $cnp_formtable_name) {+ if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $cnp_formtable_name ) ) !== $cnp_formtable_name ) { $sql = "CREATE TABLE $cnp_formtable_name ( cnpform_id INT(15) NOT NULL AUTO_INCREMENT, cnpform_cnpform_ID INT(15) NOT NULL,@@ -181,8 +193,8 @@ dbDelta($sql); } - - if ($wpdb->get_var("SHOW TABLES LIKE '{$cnp_table_name}'") != $cnp_table_name) {+ if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $cnp_table_name ) ) !== $cnp_table_name ) {+ $sql = "CREATE TABLE $cnp_table_name ( cnpform_ID INT(9) NOT NULL AUTO_INCREMENT, cnpform_groupname VARCHAR(250) NOT NULL,@@ -208,7 +220,7 @@ } - if ($wpdb->get_var("SHOW TABLES LIKE '{$cnp_settingtable_name}'") != $cnp_settingtable_name) {+ if ( $wpdb->get_var( $wpdb->prepare( "SHOW TABLES LIKE %s", $cnp_settingtable_name ) ) !== $cnp_settingtable_name ) { $sql = "CREATE TABLE $cnp_settingtable_name ( cnpstngs_ID INT(9) NOT NULL AUTO_INCREMENT, cnpstngs_frndlyname VARCHAR(250) NOT NULL,@@ -296,14 +308,15 @@ </tr>'; } - echo $cnptblresltdsply;+ echo esc_html($cnptblresltdsply); } else { echo '<tr><td colspan="4">No channels found.</td></tr>'; } } } catch (Exception $e) { // Log error and output a friendly error message- error_log('SOAP Error: ' . $e->getMessage());+ + // error_log('SOAP Error: ' . $e->getMessage()); echo '<tr><td colspan="4">An error occurred while fetching data. Please try again later.</td></tr>'; } } else {@@ -316,8 +329,8 @@ /* Admin Page setup */ function CNP_Plugin_Menu() { global $CNP_Menu_page;- $CNP_Menu_page = add_menu_page(__('Click & Pledge'),'Click & Pledge', 8,'cnpcf_formshelp', 'cnpcf_formshelp');- + $CNP_Menu_page = add_menu_page(__('Click & Pledge', 'click-pledge-connect'),'Click & Pledge', 8,'cnpcf_formshelp','cnpcf_formshelp');+ $cnpsettingscount = CNPCF_getAccountNumbersCount(); if($cnpsettingscount > 0){ $CNP_Menu_page = add_submenu_page('cnpcf_formshelp','CONNECT Forms','Form', 8,'CNP_formsdetails', 'CNP_formsdetails');@@ -355,7 +368,7 @@ return; $args = array(- 'label' => __('Products per page', 'UPCP'),+ 'label' => __('Products per page', 'click-pledge-connect'), 'default' => 20, 'option' => 'cnp_products_per_page' );@@ -386,84 +399,61 @@ return $whitelist; } function Add_CNP_Scripts() {- -- if (isset($_GET['page']) && ($_GET['page'] == 'cnpform_add' || $_GET['page'] == 'cnps_addchannel' || $_GET['page'] == 'cnpforms_add' || $_GET['page'] == 'cnp_formssettings') )- {- $jsurl = plugins_url(CFCNP_PLUGIN_NAME."/js/Admin.js");- wp_enqueue_script('Page-Builder', $jsurl, array('jquery'));-- if($_GET['page'] == 'cnpforms_add' || $_GET['page'] == 'cnps_addchannel')- {- $datamomentjsurl = plugins_url(CFCNP_PLUGIN_NAME."/js/moment.js");- wp_enqueue_script('Page-Moment', $datamomentjsurl);- $bootstrapminurl = plugins_url(CFCNP_PLUGIN_NAME."/js/bootstrap.min.js");-- wp_enqueue_script('Page-Calendar', $bootstrapminurl, array('jquery'));- -- $bootstrapdtpkrminurl = plugins_url(CFCNP_PLUGIN_NAME."/js/bootstrap-datetimepicker.min.js");- wp_enqueue_script('Page-DatePickermin', $bootstrapdtpkrminurl, array('jquery'));-- $databtstrapmincssurl = plugins_url(CFCNP_PLUGIN_NAME."/css/bootstrap.min.css");- wp_enqueue_style('Page-calcss', $databtstrapmincssurl);--- $datadtpkrmincssurl = plugins_url(CFCNP_PLUGIN_NAME."/css/bootstrap-datetimepicker.min.css");- wp_enqueue_style('Page-dtpkrmincss', $datadtpkrmincssurl);-- $datadtpkrstandalonecssurl = plugins_url(CFCNP_PLUGIN_NAME."/css/bootstrap-datetimepicker-standalone.css");- wp_enqueue_style('Page-standalonecss', $datadtpkrstandalonecssurl);- }- }+ if (!current_user_can('manage_options')) {+ return; // restrict to admins or suitable capability+ } - $datatableurl = plugins_url(CFCNP_PLUGIN_NAME."/js/jquery.dataTables.min.js");- wp_enqueue_script('Page-Table', $datatableurl, array('jquery'));- /*$datadialougeurl = plugins_url(CFCNP_PLUGIN_NAME."/js/jquery-ui.js");- wp_enqueue_script('Page-dialoge', $datadialougeurl, array('jquery'));*/- $datatablecssurl = plugins_url(CFCNP_PLUGIN_NAME."/css/cnptable.css");- wp_enqueue_style('Page-Tablecss', $datatablecssurl);- $datatabledcssurl = plugins_url(CFCNP_PLUGIN_NAME."/css/jquery.dataTables.min.css");- wp_enqueue_style('Page-Tablescss', $datatabledcssurl);+ $page = isset($_GET['page']) ? sanitize_text_field($_GET['page']) : '';+ $act = isset($_GET['act']) ? sanitize_text_field($_GET['act']) : ''; - $datatablefontcssurl = "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css";- wp_enqueue_style('Page-Fontcss', $datatablefontcssurl);- - if (isset($_GET['page']) && ($_GET['page'] == 'cnp_formsdetails') )- {- wp_add_inline_script( 'jquery-migrate', 'jQuery(document).ready(function(){- jQuery("#cnpformslist").dataTable();- jQuery("tr:even").css("background-color", "#f1f1f1");-- });- ');}- if (isset($_GET['page']) && ($_GET['page'] == 'cnpforms_add' || $_GET['page'] == 'cnps_addchannel') && ($_GET['act'] == 'add' || $_GET['act'] == 'edit'|| !isset($_GET['act']) ))- {- if($_GET['act'] == 'add' || !isset($_GET['act'])){+ if ( in_array($page, ['cnpform_add', 'cnps_addchannel', 'cnpforms_add', 'cnp_formssettings'], true) ) {+ $jsurl = plugins_url(CFCNP_PLUGIN_NAME."/js/Admin.js");+ wp_enqueue_script('Page-Builder', esc_url($jsurl), ['jquery']); - + if ( $page === 'cnpforms_add' || $page === 'cnps_addchannel' ) {+ wp_enqueue_script('Page-Moment', esc_url(plugins_url(CFCNP_PLUGIN_NAME."/js/moment.js")));+ wp_enqueue_script('Page-Calendar', esc_url(plugins_url(CFCNP_PLUGIN_NAME."/js/bootstrap.min.js")), ['jquery']);+ wp_enqueue_script('Page-DatePickermin', esc_url(plugins_url(CFCNP_PLUGIN_NAME."/js/bootstrap-datetimepicker.min.js")), ['jquery']); - - - }- elseif($_GET['act'] == 'edit'){- - }- }+ wp_enqueue_style('Page-calcss', esc_url(plugins_url(CFCNP_PLUGIN_NAME."/css/bootstrap.min.css")));+ wp_enqueue_style('Page-dtpkrmincss', esc_url(plugins_url(CFCNP_PLUGIN_NAME."/css/bootstrap-datetimepicker.min.css")));+ wp_enqueue_style('Page-standalonecss', esc_url(plugins_url(CFCNP_PLUGIN_NAME."/css/bootstrap-datetimepicker-standalone.css")));+ }+ } + wp_enqueue_script('Page-Table', esc_url(plugins_url(CFCNP_PLUGIN_NAME."/js/jquery.dataTables.min.js")), ['jquery']);+ wp_enqueue_style('Page-Tablecss', esc_url(plugins_url(CFCNP_PLUGIN_NAME."/css/cnptable.css")));+ wp_enqueue_style('Page-Tablescss', esc_url(plugins_url(CFCNP_PLUGIN_NAME."/css/jquery.dataTables.min.css")));+ wp_enqueue_style('Page-Fontcss', esc_url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"));++ if ($page === 'cnp_formsdetails') {+ wp_add_inline_script( 'jquery-migrate', 'jQuery(document).ready(function(){+ jQuery("#cnpformslist").dataTable();+ jQuery("tr:even").css("background-color", "#f1f1f1");+ });');+ }++ if ( ($page === 'cnpforms_add' || $page === 'cnps_addchannel') && in_array($act, ['add', 'edit', ''], true) ) {+ if ($act === 'add' || $act === '') {+ // Your add logic here+ } elseif ($act === 'edit') {+ // Your edit logic here+ }+ } } -require(dirname(__FILE__) . '/Functions/Install_CNP.php');-require(dirname(__FILE__) . '/Functions/functionscnp.php');-require(dirname(__FILE__) . '/cnpSettings.php');-require(dirname(__FILE__) . '/cnpFormDetails.php');-require(dirname(__FILE__) . '/FormDetails.php');-require(dirname(__FILE__) . '/FormAdd.php');-require(dirname(__FILE__) . '/cnphelpmanual.php');-require(dirname(__FILE__) . '/cnpPledgeTVDetails.php');-require(dirname(__FILE__) . '/cnptvchannelsDetails.php');-require(dirname(__FILE__) . '/channelAdd.php');-require(dirname(__FILE__) . '/ChannelDetails.php');++require(__DIR__ . '/Functions/Install_CNP.php');+require(__DIR__ . '/Functions/functionscnp.php');+require(__DIR__ . '/cnpSettings.php');+require(__DIR__. '/cnpFormDetails.php');+require(__DIR__. '/FormDetails.php');+require(__DIR__ . '/FormAdd.php');+require(__DIR__ . '/cnphelpmanual.php');+require(__DIR__ . '/cnpPledgeTVDetails.php');+require(__DIR__ . '/cnptvchannelsDetails.php');+require(__DIR__. '/channelAdd.php');+require(__DIR__. '/ChannelDetails.php'); function CNPCF_friendlyname() { global $wpdb, $cnp_settingtable_name; @@ -618,8 +608,12 @@ global $cnp_table_name; global $rtrnstr; +$grpfrmkey = isset($frmid[0]) ? sanitize_text_field($frmid[0]) : ''; -$chkshortcodexit = CNPCF_isExistShortcode($frmid[0]);+ if (empty($grpfrmkey)) {+ return 'Invalid.';+ }+$chkshortcodexit = CNPCF_isExistShortcode($grpfrmkey); if ($chkshortcodexit) { @@ -667,7 +661,7 @@ if ($mimeType === 'image/jpg') { $mimeType = 'image/jpeg'; }-$rtrnstrarr .= '<img class="CnP_formlink" src="data:' . $mimeType . ';base64,' . base64_encode($blobData) . '" data-guid="' . $formid[$frminc] . '" style="cursor: pointer;">';+$rtrnstrarr .= '<img class="CnP_formlink" src="data:' . esc_attr($mimeType) . ';base64,' . base64_encode($blobData) . '" data-guid="' . $formid[$frminc] . '" style="cursor: pointer;">'; } }@@ -675,11 +669,11 @@ return $rtrnstrarr; } else {- $rtrnstr = CNPCF_getGroupCustomerrmsg($frmid[0]);+ $rtrnstr = esc_html(CNPCF_getGroupCustomerrmsg($frmid[0])); return $rtrnstr; } } else {- $rtrnstr = CNPCF_getGroupCustomerrmsg($frmid[0]);+ $rtrnstr = esc_html(CNPCF_getGroupCustomerrmsg($frmid[0])); return $rtrnstr; } @@ -745,7 +739,7 @@ } }-function cnpform_GetPledgeTVChannelShortCode($chanelid){+/*function cnpform_GetPledgeTVChannelShortCode($chanelid){ global $wpdb; global $cnp_table_name;@@ -780,63 +774,75 @@ $tvrtrnstr.='<div '.$attrs .'></div>'; return $tvrtrnstr;-}+}*/ add_shortcode('CnPConnect','cnpform_GetShortCode'); add_shortcode('CnP.Form','cnpform_GetShortCode'); add_shortcode('CnP.pledgeTV','cnpform_GetPledgeTVChannelsShortCode');-function cnpadddatetimepicker(){- if (isset($_GET['page']) && ($_GET['page'] == 'cnpforms_add' || $_GET['page'] == 'cnps_addchannel') && ($_GET['act'] == 'add' || $_GET['act'] == 'edit'|| !isset($_GET['act']) ))- {- if($_GET['act'] == 'add' || !isset($_GET['act'])){- ?>- <script>- jQuery(function () {- - jQuery("#txtcnpformstrtdt").datetimepicker({format: '<?php echo CFCNP_PLUGIN_CURRENTDATETIMEFORMAT; ?>',defaultDate:new Date()});- jQuery("#txtcnpformenddt").datetimepicker({format: '<?php echo CFCNP_PLUGIN_CURRENTDATETIMEFORMAT; ?>'});- jQuery("#txtcnpformstrtdt1").datetimepicker({format: '<?php echo CFCNP_PLUGIN_CURRENTDATETIMEFORMAT; ?>'});- jQuery("#txtcnpformenddt1").datetimepicker({format: '<?php echo CFCNP_PLUGIN_CURRENTDATETIMEFORMAT; ?>'});- - jQuery("#txtcnpchnlstrtdt").datetimepicker({format: '<?php echo CFCNP_PLUGIN_CURRENTDATETIMEFORMAT; ?>',defaultDate:new Date()});- jQuery("#txtcnpchnlenddt").datetimepicker({format: '<?php echo CFCNP_PLUGIN_CURRENTDATETIMEFORMAT; ?>'});- jQuery("#txtcnpchnlstrtdt1").datetimepicker({format: '<?php echo CFCNP_PLUGIN_CURRENTDATETIMEFORMAT; ?>'});- jQuery("#txtcnpchnlenddt1").datetimepicker({format: '<?php echo CFCNP_PLUGIN_CURRENTDATETIMEFORMAT; ?>'});- - });- </script>- <?php- }}- }+function cnpadddatetimepicker() {+ + $page = isset($_GET['page']) ? sanitize_key($_GET['page']) : '';+ $act = isset($_GET['act']) ? sanitize_key($_GET['act']) : '';++ + if (($page === 'cnpforms_add' || $page === 'cnps_addchannel') && + ($act === 'add' || $act === 'edit' || empty($act))) {++ if ($act === 'add' || empty($act)) {+ ?>+ <script>+ jQuery(function () {+ const format = "<?php echo esc_js(CFCNP_PLUGIN_CURRENTDATETIMEFORMAT); ?>";+ jQuery("#txtcnpformstrtdt").datetimepicker({ format: format, defaultDate: new Date() });+ jQuery("#txtcnpformenddt").datetimepicker({ format: format });+ jQuery("#txtcnpformstrtdt1").datetimepicker({ format: format });+ jQuery("#txtcnpformenddt1").datetimepicker({ format: format });++ jQuery("#txtcnpchnlstrtdt").datetimepicker({ format: format, defaultDate: new Date() });+ jQuery("#txtcnpchnlenddt").datetimepicker({ format: format });+ jQuery("#txtcnpchnlstrtdt1").datetimepicker({ format: format });+ jQuery("#txtcnpchnlenddt1").datetimepicker({ format: format });+ });+ </script>+ <?php+ }+ }+}+ add_action('admin_footer', 'cnpadddatetimepicker',1000); function cnphook_js() {- echo '<div style="display:none;"><input type="hidden" name="cnpversion" id="cnpversion" value="25.04010101-WP6.8" /></div>';- ?>- - <script>- - var list = document.getElementsByTagName('script');- var i = list.length, flag = false;- while (i--) { - if (list[i].src === 'https://resources.connect.clickandpledge.com/Library/iframe-1.0.0.min.js') {- flag = true;- break;- }- }+ $version = '25.07000000-WP6.8.1'; // plugin version+ $safe_version = esc_attr($version);+ ?>+ <div style="display:none;">+ <input type="hidden" name="cnpversion" id="cnpversion" value="<?php echo esc_html($safe_version); ?>" />+ </div>++ <script>+ (function() {+ var list = document.getElementsByTagName('script');+ var i = list.length, flag = false;++ while (i--) {+ if (list[i].src === 'https://resources.connect.clickandpledge.com/Library/iframe-1.0.0.min.js') {+ flag = true;+ break;+ }+ }++ if (!flag) {+ var tag = document.createElement('script');+ tag.className = 'CnP_formloader'; // fixed assignment bug+ tag.src = 'https://resources.connect.clickandpledge.com/Library/iframe-1.0.0.min.js';+ document.body.appendChild(tag);+ }+ })();+ </script>+ <?php+} - if (!flag) {- var tag = document.createElement('script');- - tag.class ='CnP_formloader';- tag.src = 'https://resources.connect.clickandpledge.com/Library/iframe-1.0.0.min.js';- document.getElementsByTagName('body')[0].appendChild(tag);- }- - </script>- <?php- } ?>\ No newline at end of file
--- cache/click-pledge-connect_25.04010101-WP6.8/cnpSettingmsgs.php 2025-12-04 20:27:47.860998598 +0000+++ cache/click-pledge-connect_25.07000000-WP6.8.1/cnpSettingmsgs.php 2025-12-04 20:29:24.923172856 +0000@@ -1,69 +1,77 @@-<?php - define( 'CFCNP_PLUGIN_UID', "14059359-D8E8-41C3-B628-E7E030537905"); - define( 'CFCNP_PLUGIN_SKY', "5DC1B75A-7EFA-4C01-BDCD-E02C536313A3"); - -if(extension_loaded('soap')) { - - $connect = array('soap_version' => SOAP_1_1, 'trace' => 1, 'exceptions' => 0); - $client = new SoapClient('https://resources.connect.clickandpledge.com/wordpress/Auth2.wsdl', $connect); - - if(!isset($_REQUEST['verfication']) && isset($_REQUEST['AccountId_val']) && $_REQUEST['AccountId_val']!="" && isset($_REQUEST['AccountGUId_val']) && $_REQUEST['AccountGUId_val']!="") - { - - $accountid = $_REQUEST['AccountId_val']; - $accountguid = $_REQUEST['AccountGUId_val']; - $xmlr = new SimpleXMLElement("<GetAccountDetail></GetAccountDetail>"); - $xmlr->addChild('accountId', $accountid); - $xmlr->addChild('accountGUID', $accountguid); - $xmlr->addChild('username', CFCNP_PLUGIN_UID); - $xmlr->addChild('password', CFCNP_PLUGIN_SKY); - $response = $client->GetAccountDetail($xmlr); - - $responsearr = $response->GetAccountDetailResult->AccountNickName; - - echo $responsearr; - - - } - else if(isset($_REQUEST['verfication']) && isset($_REQUEST['AccountId_val']) && $_REQUEST['AccountId_val']!="" && isset($_REQUEST['AccountGUId_val']) && $_REQUEST['AccountGUId_val']!="") - { global $wpdb; - if (@file_exists(dirname(dirname(dirname(dirname(__FILE__))))."/wp-config.php")) - { define( 'BLOCK_LOAD', true ); - require_once(dirname(dirname(dirname(dirname(__FILE__))))."/wp-config.php"); - require_once( dirname(dirname(dirname(dirname(__FILE__)))).'/wp-includes/wp-db.php' ); - $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); - - } - $accountid = $_REQUEST['AccountId_val']; - $accountguid = $_REQUEST['AccountGUId_val']; - $xmlr = new SimpleXMLElement("<GetAccountDetail></GetAccountDetail>"); - $xmlr->addChild('accountId', $accountid); - $xmlr->addChild('accountGUID', $accountguid); - $xmlr->addChild('username', CFCNP_PLUGIN_UID); - $xmlr->addChild('password', CFCNP_PLUGIN_SKY); - $response = $client->GetAccountDetail($xmlr); - - $responsearr = addslashes($response->GetAccountDetailResult->AccountNickName); - - if($responsearr!="") - { - $cnp_settingtable_name = $_REQUEST['cnptblnm']; - $current_time = date('Y-m-d H:i:s'); - $active =1; - - $sSQL = "UPDATE ".$cnp_settingtable_name." set - cnpstngs_frndlyname = '$responsearr', - cnpstngs_Date_Modified='$current_time' - where cnpstngs_ID ='".$_REQUEST['verfication']."'"; - $wpdb->query($sSQL); - echo "true";; - } - else{echo "False";} - - } - } -else{ - echo "SOAP"; -} - +<?php+ define( 'CFCNP_PLUGIN_UID', "14059359-D8E8-41C3-B628-E7E030537905");+ define( 'CFCNP_PLUGIN_SKY', "5DC1B75A-7EFA-4C01-BDCD-E02C536313A3");+ +if(extension_loaded('soap')) {++ $connect = array('soap_version' => SOAP_1_1, 'trace' => 1, 'exceptions' => 0);+ $client = new SoapClient('https://resources.connect.clickandpledge.com/wordpress/Auth2.wsdl', $connect);++ if(!isset($_REQUEST['verfication']) && isset($_REQUEST['AccountId_val']) && $_REQUEST['AccountId_val']!="" && isset($_REQUEST['AccountGUId_val']) && $_REQUEST['AccountGUId_val']!="")+ { + + $accountid = isset($_POST['AccountId_val']) ? intval($_POST['AccountId_val']) : 0;+ $accountguid = '';+if (isset($_POST['AccountGUId_val'])) {+ $accountguid = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_POST['AccountGUId_val']);+} $xmlr = new SimpleXMLElement("<GetAccountDetail></GetAccountDetail>");+ $xmlr->addChild('accountId', $accountid);+ $xmlr->addChild('accountGUID', $accountguid);+ $xmlr->addChild('username', CFCNP_PLUGIN_UID);+ $xmlr->addChild('password', CFCNP_PLUGIN_SKY);+ $response = $client->GetAccountDetail($xmlr); ++ $responsearr = $response->GetAccountDetailResult->AccountNickName;+ + echo $responsearr;+ ++ }+ else if(isset($_REQUEST['verfication']) && isset($_REQUEST['AccountId_val']) && $_REQUEST['AccountId_val']!="" && isset($_REQUEST['AccountGUId_val']) && $_REQUEST['AccountGUId_val']!="")+ { + require_once( dirname(__FILE__, 4) . '/wp-load.php' );++$accountid = isset($_POST['AccountId_val']) ? intval($_POST['AccountId_val']) : 0;+$accountguid = '';+if (isset($_POST['AccountGUId_val'])) {+ $accountguid = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_POST['AccountGUId_val']);+} + global $wpdb;+ $verfication = $_POST['verfication'];+ $xmlr = new SimpleXMLElement("<GetAccountDetail></GetAccountDetail>");+ $xmlr->addChild('accountId', $accountid);+ $xmlr->addChild('accountGUID', $accountguid);+ $xmlr->addChild('username', CFCNP_PLUGIN_UID);+ $xmlr->addChild('password', CFCNP_PLUGIN_SKY);+ $response = $client->GetAccountDetail($xmlr); ++ $responsearr = addslashes($response->GetAccountDetailResult->AccountNickName);+ + if($responsearr!="")+ {+ $cnp_settingtable_name = $wpdb->prefix . "cnp_settingsdtl";+ $current_time = date('Y-m-d H:i:s');+ $active =1;+ + $sSQL = $wpdb->prepare(+ "UPDATE $cnp_settingtable_name + SET cnpstngs_frndlyname = %s, + cnpstngs_Date_Modified = %s + WHERE cnpstngs_ID = %d",+ $responsearr,+ $current_time,+ intval($verfication)+ );++ $wpdb->query($sSQL);+ echo "true";;+ }+ else{echo "False";}+ + }+ }+else{+ echo "SOAP";+}+ ?>\ No newline at end of file
--- cache/click-pledge-connect_25.04010101-WP6.8/cnphelpmanual.php 2025-12-04 20:27:47.860998598 +0000+++ cache/click-pledge-connect_25.07000000-WP6.8.1/cnphelpmanual.php 2025-12-04 20:29:24.923172856 +0000@@ -2,17 +2,38 @@ function cnpcf_formshelp() { ?>-<div class="logo"><a href="https://clickandpledge.com" target="_blank"><img src="<?php print plugins_url(); ?>/click-pledge-connect/images/logo-cp.png"></a></div>+<div class="logo">+ <a href="https://clickandpledge.com" target="_blank" rel="noopener noreferrer">+ <img src="<?php echo esc_url(plugins_url('click-pledge-connect/images/logo-cp.png')); ?>" alt="Click & Pledge Logo">+ </a>+ </div> <div class="instructions">- <h2>Welcome to Click & Pledge CONNECT</h2>- <p>For quick start, follow these instructions</p>+ <h2><?php esc_html_e('Welcome to Click & Pledge CONNECT', 'click-pledge-connect'); ?></h2>+ <p><?php esc_html_e('For quick start, follow these instructions', 'click-pledge-connect'); ?></p> <ol>- <li>Go to <a href="admin.php?page=cnp_formssettings">Settings</a> and add Click & Pledge Account Number, Account GUID and Nickname. Account GUID can be found in your Click & Pledge CONNECT portal. Find out <a href="https://support.clickandpledge.com/s/article/how-to-locate-account-id--api-account-guid" target="_blank">how</a>.</li>- <li>Once the Account information is added, additional item (Click & Pledge) will appear on the left menu that allows you to add <strong><a href="admin.php?page=cnp_formsdetails">Form</a></strong> and <strong><a href="admin.php?page=cnp_pledgetvchannelsdetails">pledgeTV</a><sup class="cnpc-regsymbol">®</sup> Channel</strong> Groups.</li>- <li>After saving the Group details,a new table will appear on the same page where you may select one or more forms/TVchannels from different campaigns. <br><small><strong>Note:</strong> All campaigns and forms are retrieved from <a href="https://connect.clickandpledge.com/" target="_blank">Click & Pledge CONNECT</a>.</small></li>+ <li>+ <?php esc_html_e('Go to', 'click-pledge-connect'); ?>+ <a href="<?php echo esc_url(admin_url('admin.php?page=cnp_formssettings')); ?>">Settings</a>+ <?php esc_html_e('and add Click & Pledge Account Number, Account GUID and Nickname. Account GUID can be found in your Click & Pledge CONNECT portal.', 'click-pledge-connect'); ?>+ <a href="https://support.clickandpledge.com/s/article/how-to-locate-account-id--api-account-guid" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Find out how', 'click-pledge-connect'); ?></a>.+ </li>+ <li>+ <?php esc_html_e('Once the Account information is added, additional item (Click & Pledge) will appear on the left menu that allows you to add', 'click-pledge-connect'); ?>+ <strong><a href="<?php echo esc_url(admin_url('admin.php?page=cnp_formsdetails')); ?>">Form</a></strong>+ <?php esc_html_e('and', 'click-pledge-connect'); ?>+ <strong><a href="<?php echo esc_url(admin_url('admin.php?page=cnp_pledgetvchannelsdetails')); ?>">pledgeTV</a><sup class="cnpc-regsymbol">®</sup> Channel</strong>+ <?php esc_html_e('Groups.', 'click-pledge-connect'); ?>+ </li>+ <li>+ <?php esc_html_e('After saving the Group details, a new table will appear on the same page where you may select one or more forms/TVchannels from different campaigns.', 'click-pledge-connect'); ?><br>+ <small><strong><?php esc_html_e('Note:', 'click-pledge-connect'); ?></strong>+ <?php esc_html_e('All campaigns and forms are retrieved from', 'click-pledge-connect'); ?>+ <a href="https://connect.clickandpledge.com/" target="_blank" rel="noopener noreferrer">Click & Pledge CONNECT</a>.+ </small>+ </li> </ol> <p>- For step by step guide follow our manual <a href="https://manual.clickandpledge.com/WordPress-Connect-Plugin.html" target="_blank">here</a>.+ For step by step guide follow our manual <a href="https://support.clickandpledge.com/hc/en-us/articles/36982886486811-CONNECT-WordPress-Plugin" target="_blank">here</a>. </p> </div> <div class="news" style="border-top:1px solid #d8d8d8;">@@ -22,7 +43,7 @@ $feed = 'https://forums.clickandpledge.com/external?type=rss2&nodeid=20'; //replace this with the RSS's URL $xml = simplexml_load_file($feed); // Iterate through feed items-if ($xml!=''){+ if ($xml && isset($xml->channel->item)) { ?> <ul> <?php@@ -30,13 +51,10 @@ foreach ($xml->channel->item as $item) { $i++; - // Extract necessary fields from the feed- $title = htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8');- $description = htmlspecialchars($item->description, ENT_QUOTES, 'UTF-8');- $date = htmlspecialchars($item->pubDate, ENT_QUOTES, 'UTF-8');- $user = htmlspecialchars($item->children('dc', true)->creator ?? '', ENT_QUOTES, 'UTF-8');- $link = htmlspecialchars($item->link, ENT_QUOTES, 'UTF-8');-+ $title = esc_html((string)$item->title);+ $description = esc_html(wp_strip_all_tags((string)$item->description));+ $date = esc_html((string)$item->pubDate);+ $link = esc_url((string)$item->link); // Display formatted output echo '<li>'; echo '<h4 style="margin:5px 0;"><a href="' . $link . '" target="_blank">' . $title . '</a></h4>';
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/binary-mlm-plan.php@@ -0,0 +1,42 @@+<?php++/**+ * Plugin Name: Binary MLM Plan+ * Plugin URI: https://www.mlmtrees.com/product/bmp-pro-wordpress/+ * Description: Binary MLM Plan with ePin is a plug-and-play plugin which helps to manage binary networks within WordPress. Binary MLM Plan Software is suitable for all MLM organizations.+ * Version: 5.0+ * Author: LetsCMS+ * Author URI: https://letscms.com+ * Text Domain: binary-mlm-plan+ * License: GPL-2.0 or later+ * License URI: https://www.gnu.org/licenses/gpl-2.0.html+ * Requires at least: 6.0.2+ * Tested up to: 6.8+ * Requires PHP: 8.0+ *+ * @package BMP+ */+++if (!defined('ABSPATH')) {+ exit; // Exit if accessed directly.+}++// Define BMP_PLUGIN_FILE.+if (!defined('BMP_PLUGIN_FILE')) {+ define('BMP_PLUGIN_FILE', __FILE__);+}++// Include the main WooCommerce class.+if (!class_exists('binary-mlm-plan')) {+ include_once dirname(__FILE__) . '/includes/class-bmp.php';+}+++function BMP()+{+ return Bmp::instance();+}++// Global for backwards compatibility.+$GLOBALS['bmp'] = BMP();
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin-assets.php@@ -0,0 +1,72 @@+<?php++if (! defined('ABSPATH')) {+ exit;+}++if (! class_exists('BMP_Admin_Assets', false)) :+++ class BMP_Admin_Assets+ {++ /**+ * Hook in tabs.+ */+ public function __construct() {}++ public static function bmp_scripts()+ {++ add_action('admin_enqueue_scripts', array(BMP_Admin_Assets::class, 'admin_styles'));+ add_action('admin_enqueue_scripts', array(BMP_Admin_Assets::class, 'admin_scripts'));+ }++ /**+ * Enqueue styles.+ */+ public static function admin_styles()+ {+++ wp_enqueue_style('bmp_admin_styles', BMP()->plugin_url() . '/assets/css/admin/admin.css', array(), time(), 'all');+ wp_enqueue_style('bmp_admin_bootstrap', BMP()->plugin_url() . '/assets/css/bootstrap.css', [], time(), 'all');+ wp_enqueue_style('bmp_fs_css', BMP()->plugin_url() . '/assets/fontawesome/css/all.min.css', [], true, 'all');+ }+++ /**+ * Enqueue scripts.+ */+ public static function admin_scripts()+ {++ // Register scripts.+ wp_enqueue_script('jquery');+ wp_enqueue_script('bmp_admin_jquery', BMP()->plugin_url() . '/assets/js/admin/admin.js', array(), time(), false);+ wp_enqueue_style('bmp_admin_bootstrap', BMP()->plugin_url() . '/assets/js/bootstrap.js', [], time(), false);+ wp_enqueue_script('bmp-fs-js', BMP()->plugin_url() . '/assets/fontawesome/js/all.min.js', array(), time(), true);+ }+ public static function dataTableScript()+ {+ // Register scripts.+ // wp_enqueue_script('jquery');+ wp_enqueue_style('bmp_dataTable_css', BMP()->plugin_url() . '/assets/datatable/datatables.css', time(), 'all');+ wp_enqueue_script('bmp_dataTable_js', BMP()->plugin_url() . '/assets/datatable/datatables.js', ['jquery'], time(), true);+ wp_enqueue_script('bmp_dataTable', BMP()->plugin_url() . '/assets/js/dataTable.js', [], time(), false);+ }++ public static function admin_genealogy_scripts()+ {+ // Register scripts.+ $data = bmp_get_all_members_array();+ $data = json_encode($data);+ wp_enqueue_style('bmp_admin_gene_css', BMP()->plugin_url() . '/assets/js/genealogy/genealogy.css', [], true, 'all');+ wp_enqueue_script('bmp-genboot-js', BMP()->plugin_url() . '/assets/js/genealogy/genealogy_boot.js', array('jquery'), time(), true);+ wp_enqueue_script('bmp-gen-js', BMP()->plugin_url() . '/assets/js/genealogy/genealogy_main.js', array('jquery'), time(), true);+ wp_localize_script('bmp-gen-js', 'genealogy_data', array($data));+ }+ }+endif;++// return new BMP_Admin_Assets();
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin-epins.php@@ -0,0 +1,28 @@+<?php++if (!defined('ABSPATH')) {+ exit;+}++if (!class_exists('BMP_Admin_ePin_Reports', false)) :++ class BMP_Admin_ePin_Reports+ {++ public function get_epins_reports()+ {++ BMP_Admin_Assets::admin_styles();+ $bmp_admin_epin_list = new bmp_admin_epin_list();+ $bmp_admin_epin_list->prepare_items(); ?>+ <div class='wrap'>+ <div id="icon-users" class="icon32"></div>+ <h4 class="bg-secondary p-2 text-white "><?php esc_html_e('ePin Reports', 'binary-mlm-plan'); ?></h4>+ <?php+ $bmp_admin_epin_list->display();+ ?>+ </div>+<?php+ }+ }+endif;
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin-genealogy.php@@ -0,0 +1,39 @@+<?php +class Bmp_Admin_Genealogy +{ + public function view_genealogy() + { ?> + <div id="full-container " class="container" style="position: relative;top: 25px;"> + <button class="btn btn-dark" onclick="params.funcs.toggleFullScreen()"><i class="fa fa-expand" aria-hidden="true"></i></button> + <button class="btn btn-dark" onclick="params.funcs.search()"><i class="fa fa-search" aria-hidden="true"></i></button> + <button class="btn btn-dark" onclick="params.funcs.showMySelf()"><span class='icon'> <i class="fa fa-user" aria-hidden="true"></i></span></button> + <button class="btn btn-dark" onclick="params.funcs.expandAll()"><i class="fa fa-plus-circle" aria-hidden="true"></i></button> + <button class="btn btn-dark" onclick="params.funcs.collapseAll()"><i class="fa fa-minus-circle" aria-hidden="true"></i> + </button> + <div class="user-search-box"> + <div class="input-box"> + <div class="fs-3 ps-2 text-danger"> + <i onclick="params.funcs.closeSearchBox()" class="fa fa-close" aria-hidden="true"></i> + </div> + <div class="input-wrapper"> + <input type="text" class="search-input" placeholder="<?php esc_html_e('Search', 'binary-mlm-plan'); ?>" /> + <div class="input-bottom-placeholder"> + <?php esc_html_e('By Username, Sponsor, userkey, position', 'binary-mlm-plan'); ?> + </div> + </div> + <div> + </div> + </div> + <div class="result-box"> + <div class="result-header"><?php esc_html_e('RESULTS', 'binary-mlm-plan'); ?> </div> + <div class="result-list"> + <div class="buffer"></div> + </div> + </div> + </div> + <div id="svgChart" class="container col-md-12"></div> + </div> +<?php + + } +}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin-menus.php@@ -0,0 +1,122 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}++if (class_exists('BMP_Admin_Menus', false)) {+ return new BMP_Admin_Menus();+}++/**+ * BMP_Admin_Menus Class.+ */+class BMP_Admin_Menus+{++ public function __construct()+ {+ // Add menus.+ add_action('admin_menu', array($this, 'admin_menu'), 9);+ add_action('admin_menu', array($this, 'settings_menu'), 50);+ }+++ public function admin_menu()+ {+ global $menu;++ if (current_user_can('manage_bmp')) {+ $menu[] = array('', 'read', 'separator-bmp', '', 'wp-menu-separator bmp');+ }+ $icon_url = BMP()->plugin_url() . '/image/mlm_tree.png';+ add_menu_page(__('Binary MLM Plan', 'binary-mlm-plan'), __('Binary MLM Plan', 'binary-mlm-plan'), 'manage_bmp', 'bmp-settings', null, $icon_url, '56.5');+ add_submenu_page('bmp-settings', __('Binary MLM Plan', 'binary-mlm-plan'), __('Binary MLM Plan', 'binary-mlm-plan'), 'manage_bmp', 'bmp-settings', null, null, '56.5');+ }++ public function settings_menu()+ {+ if (!current_user_can('administrator') ) {+ return;+ }+ $settings_page = add_submenu_page('binary-mlm-plan', __('Binary MLM Plan settings', 'binary-mlm-plan'), __('Settings', 'binary-mlm-plan'), 'manage_bmp', 'bmp-settings', array($this, 'settings_page'));+ add_action('load-' . $settings_page, array($this, 'settings_page_init'));+ add_submenu_page('bmp-settings', __('User Reports', 'binary-mlm-plan'), __('User Reports', 'binary-mlm-plan'), 'manage_bmp', 'bmp-user-reports', array($this, 'bmp_user_reports'));+ add_submenu_page('bmp-settings', __('ePin Report', 'binary-mlm-plan'), __('ePin Reports', 'binary-mlm-plan'), 'manage_bmp', 'bmp-epin-reports', array($this, 'bmp_epin_reports'));+ add_submenu_page('bmp-settings', __('Payout Reports', 'binary-mlm-plan'), __('Payout Reports', 'binary-mlm-plan'), 'manage_bmp', 'bmp-payout-reports', array($this, 'bmp_payout_reports'));+ add_submenu_page('bmp-settings', __('Genealogy', 'binary-mlm-plan'), __('Genealogy', 'binary-mlm-plan'), 'manage_bmp', 'bmp-genealogy', array($this, 'bmp_genealogy'));+ }+++++ public function bmp_user_reports()+ {+ // BMP_Admin_Assets::bmp_scripts();+ $BMP_Admin_users_Reports = new BMP_Admin_users_Reports;+ $BMP_Admin_users_Reports->get_users_reports();+ }++ public function bmp_epin_reports()+ {++ // BMP_Admin_Assets::bmp_scripts();+ $BMP_Admin_epins_Reports = new BMP_Admin_ePin_Reports;+ $BMP_Admin_epins_Reports->get_epins_reports();+ }++ public function bmp_payout_reports()+ {++ // BMP_Admin_Assets::bmp_scripts();+ $BMP_Admin_payout_Reports = new BMP_Admin_payout_Reports;+ $BMP_Admin_payout_Reports->get_payout_reports();+ }++ public function bmp_genealogy()+ {++ BMP_Admin_Assets::admin_styles();+ BMP_Admin_Assets::admin_scripts();+ BMP_Admin_Assets::admin_genealogy_scripts();+ $BMP_Admin_genealogy = new Bmp_Admin_Genealogy;+ $BMP_Admin_genealogy->view_genealogy();+ }+++ public function settings_page_init()+ {+ global $current_tab, $current_section;+ BMP_Admin_Assets::bmp_scripts();+ // Include settings pages.+ BMP_Admin_Settings::get_settings_pages();++ // Get current tab/section.+ $current_tab = empty($_GET['tab']) ? 'general' : sanitize_title(wp_unslash($_GET['tab'])); // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $current_section = empty($_REQUEST['section']) ? '' : sanitize_title(wp_unslash($_REQUEST['section'])); // phpcs:ignore WordPress.Security.NonceVerification.Recommended++ // Save settings if data has been posted.++ if ('' !== $current_section && apply_filters("bmp_save_settings_{$current_tab}_{$current_section}", !empty($_POST))) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing+ BMP_Admin_Settings::save();+ } elseif ('' === $current_section && apply_filters("bmp_save_settings_{$current_tab}", !empty($_POST))) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing + BMP_Admin_Settings::save();+ }++ // Add any posted messages.+ if (isset($_GET['bmp_error']) && !empty($_GET['bmp_error'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ BMP_Admin_Settings::add_error(sanitize_text_field(wp_unslash($_GET['bmp_error']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ }++ if (isset($_GET['bmp_message']) && !empty($_GET['bmp_message'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ BMP_Admin_Settings::add_message(sanitize_text_field(wp_unslash($_GET['bmp_message']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ }+ do_action('bmp_settings_page_init');+ }++ public function settings_page()+ {+ BMP_Admin_Settings::output();+ }+}++return new BMP_Admin_Menus();
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin-payout-detail.php@@ -0,0 +1,25 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}+global $wpdb;+if (isset($_GET['payout_id']) && !empty($_GET['payout_id'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $payout_id = sanitize_text_field(wp_unslash($_GET['payout_id'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended+} else {+ $payout_id = 0;+}++if (isset($_GET['user_id']) && !empty($_GET['user_id'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $user_id = sanitize_text_field(wp_unslash($_GET['user_id'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended++} else {+ $user_id = 0;+}+?>+<div id="profile-page">+ <h1 class="wp-heading-inline"><?php esc_html_e('Payout Detail', 'binary-mlm-plan'); ?></h1>+ <?php+ do_action('bmp_admin_payout_detail');+ do_action('bmp_admin_bonus_details');+ ?>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin-payout.php@@ -0,0 +1,31 @@+<?php++if (!defined('ABSPATH')) {+ exit;+}++if (!class_exists('BMP_Admin_payout_Reports', false)) :++ class BMP_Admin_payout_Reports+ {++ public function get_payout_reports()+ {+ BMP_Admin_Assets::admin_styles();+ if (isset($_GET['payout_id']) && !empty($_GET['payout_id'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended+ BMP_Admin_Assets::dataTableScript();+ include_once dirname(__FILE__) . '/class-bmp-admin-payout-detail.php';+ } else {+ $bmp_admin_payout_list = new bmp_admin_payout_list();+ $bmp_admin_payout_list->prepare_items(); ?>+ <div class='wrap'>+ <div id="icon-users" class="icon32"></div>+ <h2 class="bg-secondary text-white ps-2"><?php esc_html_e('Payout Reports', 'binary-mlm-plan'); ?></h2>+ <?php $bmp_admin_payout_list->display(); ?>+ </div>+<?php+ }+ }+ }++endif;
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin-settings.php@@ -0,0 +1,666 @@+<?php++/**+ * WooCommerce Admin Settings Class+ *+ * @package WooCommerce/Admin+ * @version 3.4.0+ */++if (!defined('ABSPATH')) {+ exit;+}++if (!class_exists('BMP_Admin_Settings', false)) :+++ class BMP_Admin_Settings+ {+++ private static $settings = array();+++ private static $errors = array();+++ private static $messages = array();++ public static function get_settings_pages()+ {+ if (empty(self::$settings)) {+ $settings = array();++ include_once dirname(__FILE__) . '/settings/class-bmp-settings-page.php';++ $settings[] = include dirname(__FILE__) . '/settings/class-bmp-settings-general.php';+ $settings[] = include dirname(__FILE__) . '/settings/class-bmp-settings-payout.php';++ self::$settings = apply_filters('bmp_get_settings_pages', $settings);+ }++ return self::$settings;+ }++ /**+ * Save the settings.+ */+ public static function save()+ {+ global $current_tab;++ check_admin_referer('bmp-settings');+ // Trigger actions.+ do_action('bmp_settings_save_' . $current_tab);+ do_action('bmp_update_options_' . $current_tab);+ do_action('bmp_update_options');+ do_action('bmp_settings_saved');+ }++ /**+ * Add a message.+ *+ * @param string $text Message.+ */+ public static function add_message($text)+ {+ self::$messages[] = $text;+ }++ /**+ * Add an error.+ *+ * @param string $text Message.+ */+ public static function add_error($text)+ {+ self::$errors[] = $text;+ }++ /**+ * Output messages + errors.+ */+ public static function show_messages()+ {+ global $wp_session;++ if (!empty($wp_session['bmp_save_error'])) {+ echo '<div id="message" class="error inline"><p><strong>' . esc_html($wp_session['bmp_save_error']) . '</strong></p></div>';+ unset($wp_session['bmp_save_error']);+ }+ if (!empty($wp_session['bmp_save_message'])) {+ echo '<div id="message" class="updated inline"><p><strong>' . esc_html($wp_session['bmp_save_message']) . '</strong></p></div>';+ unset($wp_session['bmp_save_message']);+ }+ }++ /**+ * Settings page.+ *+ * Handles the display of the main woocommerce settings page in admin.+ */++ public static function output()+ {+ global $current_section, $current_tab;++ $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';++ do_action('bmp_settings_start');++ // Get tabs for the settings page.+ $tabs = apply_filters('bmp_settings_tabs_array', array());++ include dirname(__FILE__) . '/views/html-admin-settings.php';+ }++ /**+ * Get a setting from the settings API.+ *+ * @param string $option_name Option name.+ * @param mixed $default Default value.+ * @return mixed+ */+ public static function get_option($option_name, $default = '')+ {+ // Array value.+ if (strstr($option_name, '[')) {++ parse_str($option_name, $option_array);++ // Option name is first key.+ $option_name = current(array_keys($option_array));++ // Get value.+ $option_values = get_option($option_name, '');++ $key = key($option_array[$option_name]);++ if (isset($option_values[$key])) {+ $option_value = $option_values[$key];+ } else {+ $option_value = null;+ }+ } else {+ // Single value.+ $option_value = get_option($option_name, null);+ }++ if (is_array($option_value)) {+ $option_value = array_map('stripslashes', $option_value);+ } elseif (!is_null($option_value)) {+ $option_value = stripslashes($option_value);+ }++ return (null === $option_value) ? $default : $option_value;+ }++ /**+ * Output admin fields.+ *+ * Loops though the woocommerce options array and outputs each field.+ *+ * @param array[] $options Opens array to output.+ */+ public static function output_fields($options)+ {++ echo '<div class="container-fluid bmp-setting">';+ echo '<div class="form-row">';+ if (!empty($options)) {+ foreach ($options as $value) {+ if (!isset($value['type'])) {+ continue;+ }+ if (!isset($value['id'])) {+ $value['id'] = '';+ }+ if (!isset($value['title'])) {+ $value['title'] = isset($value['name']) ? $value['name'] : '';+ }+ if (!isset($value['class'])) {+ $value['class'] = '';+ }+ if (!isset($value['css'])) {+ $value['css'] = '';+ }+ if (!isset($value['default'])) {+ $value['default'] = '';+ }+ if (!isset($value['desc'])) {+ $value['desc'] = '';+ }+ if (!isset($value['desc_tip'])) {+ $value['desc_tip'] = false;+ }+ if (!isset($value['placeholder'])) {+ $value['placeholder'] = '';+ }+ if (!isset($value['suffix'])) {+ $value['suffix'] = '';+ }+ if (!isset($value['readonly'])) {+ $value['readonly'] = '';+ }++ if (!isset($value['row_class'])) {+ $value['row_class'] = 'col-md-6';+ }++ if (!isset($value['col_left'])) {+ $value['col_left'] = 'float:left;';+ }++ if (!isset($value['lebel_hide'])) {+ $value['lebel_hide'] = '';+ }++ if (!isset($value['required'])) {+ $value['required'] = '';+ }++ if (!isset($value['onclick'])) {+ $value['onclick'] = '';+ }+++ // Custom attribute handling.+ $custom_attributes = array();++ if (!empty($value['custom_attributes']) && is_array($value['custom_attributes'])) {+ foreach ($value['custom_attributes'] as $attribute => $attribute_value) {+ $custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';+ }+ }++ // Description handling.+ $field_description = self::get_field_description($value);+ $description = $field_description['description'];+ $tooltip_html = $field_description['tooltip_html'];++ // Switch based on type.+ switch ($value['type']) {++ case 'group_title_start':++ if (!empty($value['title'])) {+?>+ <div id="<?php echo isset($value['id']) ? esc_attr($value['id']) : ''; ?>-description" class="<?php echo isset($value['row_class']) ? esc_html($value['row_class']) : ''; ?>">++ <label for="<?php echo isset($value['id']) ? esc_attr($value['id']) : ''; ?>" data-toggle="tooltip" title="<?php echo esc_attr($tooltip_html); ?>"><?php echo isset($value['title']) ? esc_html($value['title']) : ''; ?></label>+ <div class="form-group">+ <?php }+ break;++ case 'group_title_end':++ echo '</div></div>';++ break;++ case 'div':+ ?>+ <div id="<?php echo isset($value['id']) ? esc_attr($value['id']) : ''; ?>" class="<?php echo isset($value['row_class']) ? esc_html($value['row_class']) : ''; ?>" style="<?php echo isset($value['col_left']) ? esc_attr($value['col_left']) : ''; ?>">+ <div class="form-group"> </div>+ </div>+ <?php+ break;++ case 'button':+ ?>+ <div class="<?php echo isset($value['row_class']) ? esc_attr($value['row_class']) : ''; ?>" style="<?php echo isset($value['col_left']) ? esc_attr($value['col_left']) : ''; ?>">+ <div class="form-group">+ <button class="btn <?php echo isset($value['btn_class']) ? esc_attr($value['btn_class']) : ''; ?>" type="button" onclick="<?php echo isset($value['onclick']) ? esc_attr($value['onclick']) : ''; ?>"><?php echo isset($value['title']) ? esc_html($value['title']) : ''; ?></button>+ </div>+ </div>+ <?php+ break;++ // Section Titles.+ case 'title':+ if (!empty($value['title'])) {+ echo '<div class="col-md-12"><h2>' . esc_html($value['title']) . '</h2></div><br>';+ }+ if (!empty($value['desc'])) {+ echo '<div id="' . esc_attr(sanitize_title($value['id'])) . '-description" class="col-md-12">';+ echo wp_kses_post(wpautop(wptexturize($value['desc'])));+ echo '</div>';+ }+ if (!empty($value['id'])) {+ do_action('bmp_settings_' . sanitize_title($value['id']));+ }+ break;++ // Section Ends.+ case 'sectionend':+ if (!empty($value['id'])) {+ do_action('bmp_settings_' . sanitize_title($value['id']) . '_end');+ }+ if (!empty($value['id'])) {+ do_action('bmp_settings_' . sanitize_title($value['id']) . '_after');+ }+ break;++ // Standard text inputs and subtypes like 'number'.+ case 'text':+ case 'password':+ case 'datetime':+ case 'datetime-local':+ case 'date':+ case 'month':+ case 'time':+ case 'week':+ case 'number':+ case 'email':+ case 'url':+ case 'tel':+ $option_value = self::get_option($value['id'], $value['default']);+ ?>+ <div class="<?php echo isset($value['row_class']) ? esc_attr($value['row_class']) : ''; ?> bmp-section" style="<?php echo isset($value['col_left']) ? esc_attr($value['col_left']) : ''; ?>">+ <div class="form-group">+ <?php if (isset($value['lebel_hide']) && $value['lebel_hide'] == 'yes') { ?>++ <?php } else { ?>+ <label for="<?php echo esc_attr($value['id']); ?>" data-toggle="tooltip" title="<?php echo esc_attr($tooltip_html); ?>!"><?php echo esc_html($value['title']); ?></label>+ <?php } ?>++ <input name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" type="<?php echo esc_attr($value['type']); ?>" style="<?php echo esc_attr($value['css']); ?>" value="<?php echo esc_attr($option_value); ?>" class="form-control <?php echo esc_attr($value['class']); ?>" placeholder="<?php echo esc_attr($value['placeholder']); ?>" <?php echo isset($value['readonly']) ? esc_attr($value['readonly']) : ''; ?> <?php echo isset($value['required']) ? esc_attr($value['required']) : ''; ?>>++ <small id="<?php echo esc_attr($value['id']); ?>Help" class="form-text text-muted"><?php echo esc_attr($tooltip_html); ?></small>++ </div>+ </div>+ <?php+ break;++ // Textarea.+ case 'textarea':+ $option_value = self::get_option($value['id'], $value['default']);++ ?>+ <div class="<?php echo isset($value['row_class']) ? esc_attr($value['row_class']) : ''; ?> bmp-section" style="<?php echo isset($value['col_left']) ? esc_attr($value['col_left']) : ''; ?>">+ <div class="form-group ">+ <?php if (isset($value['lebel_hide']) && $value['lebel_hide'] == 'yes') { ?>++ <?php } else { ?>+ <label for="<?php echo esc_attr($value['id']); ?>" data-toggle="tooltip" title="<?php echo esc_attr($tooltip_html); ?>!"><?php echo esc_html($value['title']); ?></label>+ <?php } ?>++ <textarea name="<?php echo esc_attr($value['id']); ?>" id="<?php echo esc_attr($value['id']); ?>" style="<?php echo esc_attr($value['css']); ?>" class="form-control <?php echo esc_attr($value['class']); ?>" placeholder="<?php echo esc_attr($value['placeholder']); ?>" <?php echo esc_html(implode(' ', $custom_attributes)); ?> <?php echo isset($value['readonly']) ? esc_attr($value['readonly']) : ''; ?> <?php echo isset($value['required']) ? esc_attr($value['required']) : ''; ?>><?php echo esc_textarea($option_value); ?></textarea>++ </textarea>+ <small id="<?php echo esc_attr($value['id']); ?>Help" class="form-text text-muted"><?php echo esc_attr($tooltip_html); ?></small>+ </div>+ </div>+ <?php+ break;++ // Select boxes.+ case 'select':+ case 'multiselect':+ $option_value = self::get_option($value['id'], $value['default']);+ ?>+ <div class="<?php echo isset($value['row_class']) ? esc_attr($value['row_class']) : ''; ?> bmp-section" style="<?php echo isset($value['col_left']) ? esc_attr($value['col_left']) : ''; ?>">+ <div class="form-group">+ <?php if (isset($value['lebel_hide']) && $value['lebel_hide'] == 'yes') { ?>++ <?php } else { ?>+ <label for="<?php echo esc_attr($value['id']); ?>" data-toggle="tooltip" title="<?php echo esc_attr($tooltip_html); ?>!"><?php echo esc_html($value['title']); ?></label>+ <?php } ?>++ <select name="<?php echo esc_attr($value['id']); ?><?php echo ('multiselect' === $value['type']) ? '[]' : ''; ?>" id="<?php echo esc_attr($value['id']); ?>" style="<?php echo esc_attr($value['css']); ?>" class="form-control <?php echo esc_attr($value['class']); ?>" placeholder="<?php echo esc_attr($value['placeholder']); ?>"+ <?php echo esc_html(implode(' ', $custom_attributes)); ?>+ <?php echo 'multiselect' === $value['type'] ? 'multiple="multiple"' : ''; ?> <?php echo isset($value['readonly']) ? esc_attr($value['readonly']) : ''; ?> <?php echo isset($value['required']) ? esc_attr($value['required']) : ''; ?>>+ <?php+ foreach ($value['options'] as $key => $val) {+ ?>+ <option value="<?php echo esc_attr($key); ?>"+ <?php++ if (is_array($option_value)) {+ selected(in_array((string) $key, $option_value, true), true);+ } else {+ selected($option_value, (string) $key);+ }++ ?>>+ <?php echo esc_html($val); ?></option>+ <?php+ }+ ?>+ </select>++ <small id="<?php echo esc_attr($value['id']); ?>Help" class="form-text text-muted"><?php echo esc_attr($tooltip_html); ?></small>++ </div>+ </div>++ <?php+ break;++ // Radio inputs.+ case 'radio':+ $option_value = self::get_option($value['id'], $value['default']);+ ?>++ <div class="<?php echo isset($value['row_class']) ? esc_attr($value['row_class']) : ''; ?> bmp-section" style="<?php echo isset($value['col_left']) ? esc_attr($value['col_left']) : ''; ?>">+ <div class="form-group">+ <?php if (isset($value['lebel_hide']) && $value['lebel_hide'] == 'yes') { ?>++ <?php } else { ?>+ <label for="<?php echo esc_attr($value['id']); ?>" data-toggle="tooltip" title="<?php echo esc_attr($tooltip_html); ?>!"><?php echo esc_html($value['title']); ?></label>+ <?php } ?>+ <div class="fieldset">+ <ul>+ <?php+ foreach ($value['options'] as $key => $val) {+ ?>+ <li>+ <label>+ <input type="radio" id="<?php echo esc_attr($value['id']); ?>-<?php echo esc_attr($key); ?>" name="<?php echo esc_attr($value['id']); ?>" value="<?php echo esc_attr($key); ?>" class=" <?php echo esc_attr($value['class']); ?>" style="<?php echo esc_attr($value['css']); ?>" <?php echo isset($value['readonly']) ? esc_attr($value['readonly']) : ''; ?> <?php checked($key, $option_value); ?> <?php echo isset($value['required']) ? esc_attr($value['required']) : ''; ?> placeholder="<?php echo esc_attr($value['placeholder']); ?>">+ <?php echo esc_html($val); ?>+ </label>+ </li>+ <?php+ }+ ?>+ </ul>+ </div>+ <small id="<?php echo esc_attr($value['id']); ?>Help" class="form-text text-muted"><?php echo esc_attr($tooltip_html); ?>++ </small>+ </div>+ </div>++ <?php+ break;++ // Checkbox input.+ case 'checkbox':+ $option_value = self::get_option($value['id'], $value['default']);+ $visibility_class = array();++ if (!isset($value['hide_if_checked'])) {+ $value['hide_if_checked'] = false;+ }+ if (!isset($value['show_if_checked'])) {+ $value['show_if_checked'] = false;+ }+ if ('yes' === $value['hide_if_checked'] || 'yes' === $value['show_if_checked']) {+ $visibility_class[] = 'hidden_option';+ }+ if ('option' === $value['hide_if_checked']) {+ $visibility_class[] = 'hide_options_if_checked';+ }+ if ('option' === $value['show_if_checked']) {+ $visibility_class[] = 'show_options_if_checked';+ }++ ?>+ <div class="<?php echo isset($value['row_class']) ? esc_attr($value['row_class']) : ''; ?> bmp-section" style="<?php echo isset($value['col_left']) ? esc_attr($value['col_left']) : ''; ?>">+ <div class="form-group">+ <?php if (isset($value['lebel_hide']) && $value['lebel_hide'] == 'yes') { ?>++ <?php } else { ?>+ <label for="<?php echo esc_attr($value['id']); ?>" data-toggle="tooltip" title="<?php echo esc_attr($tooltip_html); ?>!"><?php echo esc_html($value['title']); ?></label>+ <?php } ?>+ <div class="fieldset">+ <ul>+ <?php+ foreach ($value['options'] as $key => $val) {+ ?>+ <li>+ <label>+ <input type="checkbox" id="<?php echo esc_attr($value['id']); ?>-<?php echo esc_attr($key); ?>" name="<?php echo esc_attr($value['id']); ?>" value="<?php echo esc_attr($key); ?>" class="<?php echo esc_attr($value['class']); ?>" style="<?php echo esc_attr($value['css']); ?>" <?php echo isset($value['readonly']) ? esc_attr($value['readonly']) : ''; ?> <?php checked($option_value, 'yes'); ?> <?php echo isset($value['required']) ? esc_attr($value['required']) : ''; ?>>+ <?php echo esc_html($val); ?></label>+ </li>++ <?php+ }+ ?>+ </ul>+ </div>++ </div>+ </div>+ <?php++ break;++ case 'script':++ echo '<script>';+ echo isset($value['desc']) ? esc_attr($value['desc']) : '';+ echo '</script>';++ // Default: run an action.+ default:+ do_action('bmp_admin_field_' . $value['type'], $value);+ break;+ }+ }+ }+ echo '</div></div>';+ echo '<script>$(document).ready(function(){$(\'[data-toggle="tooltip"]\').tooltip();});</script>';+ }++++ public static function get_field_description($value)+ {+ $description = '';+ $tooltip_html = '';++ if (true === $value['desc_tip']) {+ $tooltip_html = $value['desc'];+ } elseif (!empty($value['desc_tip'])) {+ $description = $value['desc'];+ $tooltip_html = $value['desc_tip'];+ } elseif (!empty($value['desc'])) {+ $description = $value['desc'];+ }++ if ($description && in_array($value['type'], array('textarea', 'radio'), true)) {+ $description = wp_kses_post($description);+ } elseif ($description && in_array($value['type'], array('checkbox'), true)) {+ $description = wp_kses_post($description);+ } elseif ($description) {+ $description = wp_kses_post($description);+ }++ if ($tooltip_html && in_array($value['type'], array('checkbox'), true)) {+ $tooltip_html = $tooltip_html;+ } elseif ($tooltip_html) {+ $tooltip_html = $tooltip_html;+ }++ return array(+ 'description' => $description,+ 'tooltip_html' => $tooltip_html,+ );+ }+++ public static function save_fields($options, $data = null)+ {+ if (is_null($data)) {+ $data = sanitize_text_field($_POST); //phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing+ }+ if (empty($data)) {+ return false;+ }++ // Options to update will be stored here and saved later.+ $update_options = array();+ $autoload_options = array();++ // Loop options and get values to save.+ foreach ($options as $option) {+ if (!isset($option['id']) || !isset($option['type'])) {+ continue;+ }++ // Get posted value.+ if (strstr($option['id'], '[')) {+ parse_str($option['id'], $option_name_array);+ $option_name = current(array_keys($option_name_array));+ $setting_name = key($option_name_array[$option_name]);+ $raw_value = isset($data[$option_name][$setting_name]) ? sanitize_text_field(wp_unslash($data[$option_name][$setting_name])) : null;+ } else {+ $option_name = $option['id'];+ $setting_name = '';+ $raw_value = isset($data[$option['id']]) ? sanitize_text_field(wp_unslash($data[$option['id']])) : null;+ }++ // Format the value based on option type.+ switch ($option['type']) {+ case 'checkbox':+ $value = '1' === $raw_value || 'yes' === $raw_value ? 'yes' : 'no';+ break;+ case 'textarea':+ $value = wp_kses_post(trim($raw_value));+ break;+ case 'multiselect':+ case 'multi_select_countries':+ $value = array_filter(array_map('wc_clean', (array) $raw_value));+ break;+ case 'image_width':+ $value = array();+ if (isset($raw_value['width'])) {+ $value['width'] = wc_clean($raw_value['width']);+ $value['height'] = wc_clean($raw_value['height']);+ $value['crop'] = isset($raw_value['crop']) ? 1 : 0;+ } else {+ $value['width'] = $option['default']['width'];+ $value['height'] = $option['default']['height'];+ $value['crop'] = $option['default']['crop'];+ }+ break;+ case 'select':+ $allowed_values = empty($option['options']) ? array() : array_map('strval', array_keys($option['options']));+ if (empty($option['default']) && empty($allowed_values)) {+ $value = null;+ break;+ }+ $default = (empty($option['default']) ? $allowed_values[0] : $option['default']);+ $value = in_array($raw_value, $allowed_values, true) ? $raw_value : $default;+ break;+ case 'relative_date_selector':+ $value = wc_parse_relative_date_option($raw_value);+ break;+ default:+ $value = wc_clean($raw_value);+ break;+ }++++ /**+ * Sanitize the value of an option.+ *+ * @since 2.4.0+ */+ $value = apply_filters('bmp_admin_settings_sanitize_option', $value, $option, $raw_value);++ /**+ * Sanitize the value of an option by option name.+ *+ * @since 2.4.0+ */+ $value = apply_filters("bmp_admin_settings_sanitize_option_$option_name", $value, $option, $raw_value);++ if (is_null($value)) {+ continue;+ }++ // Check if option is an array and handle that differently to single values.+ if ($option_name && $setting_name) {+ if (!isset($update_options[$option_name])) {+ $update_options[$option_name] = get_option($option_name, array());+ }+ if (!is_array($update_options[$option_name])) {+ $update_options[$option_name] = array();+ }+ $update_options[$option_name][$setting_name] = $value;+ } else {+ $update_options[$option_name] = $value;+ }++ $autoload_options[$option_name] = isset($option['autoload']) ? (bool) $option['autoload'] : true;++ /**+ * Fire an action before saved.+ *+ * @deprecated 2.4.0 - doesn't allow manipulation of values!+ */+ do_action('bmp_update_option', $option);+ }++ // Save all options in our array.+ foreach ($update_options as $name => $value) {+ update_option($name, $value, $autoload_options[$name] ? 'yes' : 'no');+ }+ return true;+ }+ }+ endif;
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin-user-detail.php@@ -0,0 +1,8 @@+<div class="wrap" id="profile-page">+ <?php++ do_action('bmp_admin_user_account_detail');+ do_action('bmp_admin_user_downlines_list');+ do_action('bmp_admin_user_payout_list');+ ?>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin-users.php@@ -0,0 +1,36 @@+<?php++/**+ * + *+ * @package + * @version 3.4.0+ */++if (!defined('ABSPATH')) {+ exit;+}++if (!class_exists('BMP_Admin_users_Reports', false)) :++ class BMP_Admin_users_Reports+ {+ public function get_users_reports()+ {+ BMP_Admin_Assets::admin_styles();+ $bmp_admin_users_list = new bmp_admin_users_list();+ if (isset($_GET['user_id']) && !empty($_GET['user_id'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended+ BMP_Admin_Assets::dataTableScript();+ include_once dirname(__FILE__) . '/class-bmp-admin-user-detail.php';+ } else {+ $bmp_admin_users_list->prepare_items(); ?>+ <div class='wrap'>+ <div id="icon-users" class="icon32"></div>+ <h2 class="bg-secondary text-white ps-2"><?php esc_html_e('MLM Users reports', 'binary-mlm-plan'); ?></h2>+ <?php $bmp_admin_users_list->display(); ?>+ </div>+<?php+ }+ }+ }+endif;
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/class-bmp-admin.php@@ -0,0 +1,37 @@+<?php+if (!defined('ABSPATH')) {+ exit; // Exit if accessed directly+}++/**+ * BMP_Admin class.+ */+class BMP_Admin+{++ public function __construct()+ {+ add_action('init', array($this, 'includes'));+ }+++ public function includes()+ {++ include_once dirname(__FILE__) . '/tables/class-bmp-admin-epins-list-table.php';+ include_once dirname(__FILE__) . '/tables/class-bmp-admin-users-list-table.php';+ include_once dirname(__FILE__) . '/tables/class-bmp-admin-payout-list-table.php';+ include_once dirname(__FILE__) . '/class-bmp-admin-menus.php';+++ include_once dirname(__FILE__) . '/class-bmp-admin-settings.php';+ include_once dirname(__FILE__) . '/class-bmp-admin-epins.php';+ include_once dirname(__FILE__) . '/class-bmp-admin-users.php';+ include_once dirname(__FILE__) . '/class-bmp-admin-users.php';+ //include_once dirname( __FILE__ ) . '/class-bmp-admin-reset-data.php';+ include_once dirname(__FILE__) . '/class-bmp-admin-payout.php';+ include_once dirname(__FILE__) . '/class-bmp-admin-genealogy.php';+ include_once dirname(__FILE__) . '/class-bmp-admin-assets.php';+ }+}+return new BMP_Admin();
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/class-bmp-settings-general.php@@ -0,0 +1,363 @@+<?php++/**+ * UMW General Settings+ *+ * @package UMW/Admin+ */+++if (!defined('ABSPATH')) {+ exit;+}++if (class_exists('BMP_Settings_General', false)) {+ return new BMP_Settings_General();+}++/**+ * BMP_Admin_Settings_General.+ */+class BMP_Settings_General extends BMP_Settings_Page+{++ /**+ * Constructor.+ */+ public function __construct()+ {+ $this->id = 'setting';+ $this->label = __('Setting', 'binary-mlm-plan');++ parent::__construct();++ add_action('bmp_settings_save_' . $this->id, array($this, 'save'));+ add_action('bmp_sections_' . $this->id, array($this, 'output_sections'));+ add_action('bmp_settings_' . $this->id, array($this, 'output'));+ }+++ public function get_sections()+ {+ global $wpdb;++ $general_settings = get_option('bmp_manage_general');+ $sections = array();++ $user_count = $this->bmpUserCount();++ if ($user_count < 1) {+ $sections['first_user'] = __('First User', 'binary-mlm-plan');+ }++ $sections['general'] = esc_html__('General', 'binary-mlm-plan');+ $sections['eligibility'] = esc_html__('Eligibility', 'binary-mlm-plan');+ $sections['payout'] = esc_html__('Payout', 'binary-mlm-plan');+ $sections['generate-epin'] = esc_html__('Generate Epin', 'binary-mlm-plan');+ $sections['pro-features'] = esc_html__('Pro Features', 'binary-mlm-plan');+ return apply_filters('bmp_get_sections_' . $this->id, $sections);+ }++ public function output_sections()+ {+ global $current_section;++ $sections = $this->get_sections();++ if (empty($sections) || 1 === sizeof($sections)) {+ return;+ }++ $array_keys = array_keys($sections);++ echo '<div class="wrap_style"><ul>';+ foreach ($sections as $id => $label) {+ echo '<li class="list_style ' . ($current_section == $id ? 'current' : '') . '"><a href="' . esc_html(admin_url('admin.php?page=bmp-settings&tab=' . $this->id . '§ion=' . sanitize_title($id))) . '">' . esc_attr($label) . '</a></li>';+ }+ echo '</ul></div>';+ }++++ /**+ * Get settings array.+ *+ * @return array+ */+ public function get_settings($current_section = '')+ {+ $settings = array();+ if ('' === $current_section) {+ $array_setings = include 'view/view_general_settings.php';+ $settings = apply_filters('bmp_general_settings', $array_setings);+ } elseif ('eligibility' === $current_section) {+ $array_setings = include 'view/view_eligibility_settings.php';+ $settings = apply_filters('bmp_eligibility_settings', $array_setings);+ } elseif ('payout' === $current_section) {+ $array_setings = include 'view/view_payout_settings.php';+ $settings = apply_filters('bmp_payout_settings', $array_setings);+ } elseif ('generate-epin' === $current_section) {+ $array_setings = include 'view/view_epin_settings.php';+ $settings = apply_filters('bmp_epin_settings', $array_setings);+ } elseif ('pro-features' === $current_section) {+ $array_setings = include 'view/pro-features.php';+ }+++ return apply_filters('bmp_get_settings_' . $this->id, $settings);+ }+++ public function getepinlength()+ {+ return array('5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12');+ }++ public function output()+ {+ global $current_section; ?>++ <div class="content_style">+ <div class="container-fluid p-0">+ <?php+ if ($current_section == 'payout') {+ $this->bmpUserRedirect();+ include 'view/view_payout_settings.php';+ } elseif ($current_section == 'eligibility') {+ $this->bmpUserRedirect();+ include 'view/view_eligibility_settings.php';+ } elseif ($current_section == 'generate-epin') {+ $this->bmpUserRedirect();+ include 'view/view_epin_settings.php';+ } elseif ($current_section == 'pro-features') {+ include 'view/pro-features.php';+ } elseif ($current_section == 'general') {+ $this->bmpUserRedirect();+ include 'view/view_general_settings.php';+ } elseif ($current_section == 'first_user') {+ $bmp_user_count = $this->bmpUserCount();+ if ($bmp_user_count > 0) {+ wp_redirect(admin_url('admin.php?page=bmp-settings&tab=' . $this->id . '§ion=general'));+ exit;+ }+ include 'view/view_first_user_settings.php';+ } else {+ $this->bmpUserRedirect();+ include 'view/view_general_settings.php';+ } ?>+ </div>+ </div>+<?php++ }++ public function bmpUserRedirect()+ {+ $bmp_user_count = $this->bmpUserCount();+ if ($bmp_user_count == 0) {+ wp_redirect(admin_url('admin.php?page=bmp-settings&tab=' . $this->id . '§ion=first_user'));+ exit;+ }+ }++ /**+ * Save settings.+ */++ public function save()+ {+ global $current_section;+ + if (isset($_POST['bmp_nonce']) && !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['bmp_nonce'])), 'bmp_nonce_action')) {+ wp_die('Security check');+ } else {+ if (!$current_section) {+ $this->manageGeneral($_POST);+ }++ if ($current_section) {+ if ($current_section == 'payout') {+ $this->managePayout($_POST);+ } elseif ($current_section == 'eligibility') {+ $this->manageEligibility($_POST);+ } elseif ($current_section == 'general') {+ $this->manageGeneral($_POST);+ } elseif ($current_section == 'generate-epin') {+ $this->manageEpin($_POST);+ } elseif ($current_section == 'first_user') {++ $this->manageFirstUser($_POST);+ } else {+ $this->manageGeneral($_POST);+ }+ }+ }+ }++ public function manageFirstUser($data)+ {+ global $wpdb;+ global $wp_session;+ $flag = true;+ if ($data['new_bmp_user']) {+ if (username_exists($data['bmp_first_username'])) {+ $wp_session['bmp_save_error'] = __('User Name Already Exist. Please try another user name.', 'binary-mlm-plan');+ BMP_Admin_Settings::add_error(__('User Name Already Exist. Please try another user name.', 'binary-mlm-plan'));+ $flag = false;+ }++ if (email_exists($data['bmp_first_email'])) {+ $wp_session['bmp_save_error'] = __('User Email Alraedy Exists.Please use another email', 'binary-mlm-plan');+ BMP_Admin_Settings::add_error(__('User Email Alraedy Exists.Please use another email', 'binary-mlm-plan'));+ $flag = false;+ }++ if ($data['bmp_first_password'] != $data['bmp_first_confirm_password']) {+ $wp_session['bmp_save_error'] = __('Password Does not match', 'binary-mlm-plan');+ BMP_Admin_Settings::add_error(__('Password Does not match', 'binary-mlm-plan'));+ $flag = false;+ }++ if ($flag) {+ $userdata = array(+ 'user_login' => $data['bmp_first_username'],+ 'user_email' => $data['bmp_first_email'],+ 'user_pass' => $data['bmp_first_password']+ );++ $user_id = wp_insert_user($userdata);++ // On success.+ if (!is_wp_error($user_id)) {+ $bmp_user = new WP_User($user_id);+ $bmp_user->set_role('bmp_user');+ $user_key = bmp_generateKey();++ $wpdb->query($wpdb->prepare( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ "INSERT INTO {$wpdb->prefix}bmp_users (user_id, user_name, user_key, parent_key, sponsor_key, position, payment_status, payment_date)+ VALUES(%d, %s, %s, %s, %s, %s, %s, %s)",+ $user_id,+ $data['bmp_first_username'],+ $user_key,+ '0',+ '0',+ 'left',+ '1',+ gmdate('Y-m-d H:i:s')+ ));+ $wp_session['bmp_save_message'] = __('Binary MLM Plan User created successfully.', 'binary-mlm-plan');+ BMP_Admin_Settings::add_message(__('Binary MLM Plan User created successfully.', 'binary-mlm-plan'));+ }+ }+ } else {+ $user_id = $data['bmp_existing_user'];+ $bmp_user = new WP_User($user_id);+ $bmp_user->set_role('bmp_user');+ $user_key = bmp_generateKey();++ $wpdb->query($wpdb->prepare( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ "INSERT INTO {$wpdb->prefix}bmp_users (user_id, user_name, user_key, parent_key, sponsor_key, position, payment_status, payment_date)+ VALUES(%d, %s, %s, %d, %d, %s, %s, %s)",+ $user_id,+ $bmp_user->user_login,+ $user_key,+ '0',+ '0',+ 'left',+ '1',+ gmdate('Y-m-d H:i:s')+ ));+ $wp_session['bmp_save_message'] = __('Binary MLM Plan User created successfully.', 'binary-mlm-plan');+ BMP_Admin_Settings::add_message(__('Binary MLM Plan User created successfully.', 'binary-mlm-plan'));+ }++ wp_safe_redirect(admin_url('admin.php?page=bmp-settings&tab=setting§ion=general'));+ }++ public function bmpUserCount()+ {+ global $wpdb;+ return $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}bmp_users"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ }++++ public function manageGeneral($data)+ {+ global $wp_session;++ update_option('bmp_manage_general', $data);+ $wp_session['bmp_save_message'] = __('General Settings Has been save successfully.', 'binary-mlm-plan');+ // BMP_Admin_Settings::add_message(__('General Settings Has been save successfully.', 'binary-mlm-plan'));++ wp_safe_redirect(admin_url('admin.php?page=bmp-settings&tab=setting§ion=eligibility'));+ }++ public function manageEligibility($data)+ {+ global $wp_session;+ if (isset($data['bmp_referral']) && is_numeric($data['bmp_referral']) && isset($data['bmp_referral_left']) && is_numeric($data['bmp_referral_left']) && isset($data['bmp_referral_right']) && is_numeric($data['bmp_referral_right'])) {+ update_option('bmp_manage_eligibility', $data);+ $wp_session['bmp_save_message'] = __('Eligibility Settings Has been save successfully.', 'binary-mlm-plan');+ BMP_Admin_Settings::add_message(__('Eligibility Settings Has been save successfully.', 'binary-mlm-plan'));+ wp_safe_redirect(admin_url('admin.php?page=bmp-settings&tab=setting§ion=payout'));+ }+ }+ public function manageEpin($data)+ {+ global $wpdb;+ $epin_type = '';+ $epin_numbrer = 0;+ $epin_length = 0;+ $epin_name = '';+ $epins = [];+ $epin_price = 0;+ if (isset($data['bmp_epin_name']) && !empty($data['bmp_epin_name'])) {+ $epin_name = $data['bmp_epin_name'];+ }+ if (isset($data['bmp_epin_type']) && !empty($data['bmp_epin_type'])) {+ $epin_type = $data['bmp_epin_type'];+ }+ if (isset($data['bmp_epin_number']) && !empty($data['bmp_epin_number'])) {+ $epin_numbrer = $data['bmp_epin_number'];+ }+ if (isset($data['bmp_epin_length']) && !empty($data['bmp_epin_length'])) {+ $epin_length = $data['bmp_epin_length'];+ }+ if (isset($data['bmp_epin_price']) && !empty($data['bmp_epin_price'])) {+ $epin_price = $data['bmp_epin_price'];+ }+ if (!empty($epin_name) && !empty($epin_type) && !empty($epin_numbrer) && !empty($epin_length) && !empty($epin_price)) {+ $epins = bmp_epinGenarate($epin_length, $epin_numbrer, $epin_name);+ if (!empty($epins)) {+ foreach ($epins as $epin) {+ $wpdb->query($wpdb->prepare( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ "INSERT INTO {$wpdb->prefix}bmp_epins (epin_name, epin_no, type, date_generated, user_key, date_used, status, epin_price) + VALUES (%s, %s, %s, %s, %s, %s, %s, %f)",+ $epin_name,+ $epin,+ $epin_type,+ gmdate('Y-m-d'),+ '0',+ '0000-00-00',+ '0',+ $epin_price+ ));+ }+ }+ }+ }++ public function managePayout($data)+ {+ global $wp_session;+ if (isset($data['bmp_referral_commission_amount']) && is_numeric($data['bmp_referral_commission_amount']) && isset($data['bmp_service_charge_amount']) && is_numeric($data['bmp_service_charge_amount']) && isset($data['bmp_tds']) && is_numeric($data['bmp_tds']) && isset($data['bmp_cap_limit_amount']) && is_numeric($data['bmp_cap_limit_amount'])) {+ update_option('bmp_manage_payout', $data);+ $wp_session['bmp_save_message'] = __('Payout Settings Has been save successfully.', 'binary-mlm-plan');+ BMP_Admin_Settings::add_message(__('Payout Settings Has been save successfully.', 'binary-mlm-plan'));+ wp_safe_redirect(admin_url('admin.php?page=bmp-settings&tab=setting§ion=generate-epin'));+ }+ }+}++//return new BMP_Settings_General();
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/class-bmp-settings-page.php@@ -0,0 +1,135 @@+<?php+++if (!defined('ABSPATH')) {+ exit;+}++if (!class_exists('BMP_Settings_Page', false)) :++ /**+ * WC_Settings_Page.+ */+ abstract class BMP_Settings_Page+ {++ /**+ * Setting page id.+ *+ * @var string+ */+ protected $id = '';++ /**+ * Setting page label.+ *+ * @var string+ */+ protected $label = '';++ /**+ * Constructor.+ */+ public function __construct()+ {++ add_filter('bmp_settings_tabs_array', array($this, 'add_settings_page'), 20);+ add_action('bmp_sections_' . $this->id, array($this, 'output_sections'));+ add_action('bmp_settings_' . $this->id, array($this, 'output'));+ add_action('bmp_settings_save_' . $this->id, array($this, 'save'));+ }++++ public function get_id()+ {+ return $this->id;+ }++++ public function get_label()+ {+ return $this->label;+ }+++ public function add_settings_page($pages)+ {+ $pages[$this->id] = $this->label;++ return $pages;+ }+++ public function get_settings()+ {+ return apply_filters('bmp_get_settings_' . $this->id, array());+ }+++ public function get_sections()+ {+ return apply_filters('bmp_get_sections_' . $this->id, array());+ }+++ public function output_sections()+ {+ global $current_section;++ $sections = $this->get_sections();++ if (empty($sections) || 1 === sizeof($sections)) {+ return;+ }++ echo '<ul class="subsubsub">';+ $array_keys = array_keys($sections);+ foreach ($sections as $id => $label) {+ echo '<li><a href="' . esc_html(admin_url('admin.php?page=bmp-settings&tab=' . $this->id . '§ion=' . sanitize_title($id))) . '" class="' . ($current_section == $id ? 'current' : '') . '">' . esc_attr($label) . '</a> ' . (end($array_keys) == $id ? '' : '|') . ' </li>';+ }+ echo '</ul><br class="clear" />';+ }++++ public function output()+ {+ $settings = $this->get_settings();++ BMP_Admin_Settings::output_fields($settings);+ }++ /**+ * Save settings.+ */+ public function save()+ {+ global $current_section;++ $settings = $this->get_settings();+ BMP_Admin_Settings::save_fields($settings);+ if ($current_section) {+ do_action('bmp_update_options_' . $this->id . '_' . $current_section);+ }+ }++++ public function getCurrency()+ {+ global $wpdb;+ $currency_array = array('' => __('Select Currency', 'binary-mlm-plan'));+ $results = $wpdb->get_results("SELECT * from {$wpdb->prefix}bmp_currency"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $rows = $wpdb->num_rows;+ if (!empty($rows)) {+ foreach ($results as $result) {+ $currency_array[$result->iso3] = $result->iso3 . '-' . $result->currency;+ }+ }+ return $currency_array;+ }+ }++endif;
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/class-bmp-settings-payout.php@@ -0,0 +1,70 @@+<?php++/**+ * UMW General Settings+ *+ * @package UMW/Admin+ */++if (!defined('ABSPATH')) {+ exit;+}++if (class_exists('BMP_Settings_Payout', false)) {+ return new BMP_Settings_Payout();+}+++/**+ * BMP_Admin_Settings_Payoutl.+ */+class BMP_Settings_Payout extends BMP_Settings_Page+{++ /**+ * Constructor.+ */+ public function __construct()+ {+ $this->id = 'payout';+ $this->label = __('Payout Run', 'binary-mlm-plan');++ parent::__construct();++ add_action('bmp_sections_' . $this->id, array($this, 'output_sections'));+ add_action('bmp_settings_' . $this->id, array($this, 'output'));+ add_action('bmp_settings_save_' . $this->id, array($this, 'save'));+ }+++ public function get_sections()+ {+ global $wpdb;+ $sections = array();++ $sections['run_payout'] = __('Run Payout', 'binary-mlm-plan');++ return apply_filters('bmp_get_sections_' . $this->id, $sections);+ }+++ public function output_sections()+ {+ global $current_section;++ $sections = $this->get_sections();+ echo '<div class="wrap_style"><ul>';+ foreach ($sections as $id => $label) {+ echo '<li class="list_style ' . (($current_section == $id) ? 'current' : '') . '"><a href="' . esc_html(admin_url('admin.php?page=bmp-settings&tab=' . $this->id . '§ion=' . sanitize_title($id))) . '">' . esc_attr($label) . '</a></li>';+ }+ echo '</ul></div>';+ }++ public function output()+ {+ global $current_section;+ if ($current_section == 'run_payout') {+ include 'payout/view_payout.php';+ }+ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/payout/view_payout.php@@ -0,0 +1,56 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}+$dataarray = [];++if (isset($_POST['bmp_nonce']) && wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['bmp_nonce'])), 'bmp_nonce_action') && !empty($_POST)) {+ $dataarray = bmp_run_payout_functions();+} else {+ $dataarray = bmp_run_payout_display_functions();+}+BMP_Admin_Assets::dataTableScript();+?>+<h4 class="text-center bg-secondary text-white p-2"><?php esc_html_e('Payout Run', 'binary-mlm-plan'); ?></h4>+<div class="card w-100 p-0 mw-100">+ <div class="card-header">+ <?php esc_html_e('Payout Run', 'binary-mlm-plan'); ?>+ </div>+ <div class="card-body">+ <div class="table-responsive">+ <table class="table-bordered table ml-1 table-striped" id="runPayouts">+ <thead class="text-center table-dark">+ <tr>+ <th>#</th>+ <th><?php esc_html_e('User Name', 'binary-mlm-plan'); ?></th>+ <th><?php esc_html_e('Direct Refferal Commission', 'binary-mlm-plan'); ?></th>+ <th><?php esc_html_e('Total Amount', 'binary-mlm-plan'); ?></th>+ <th><?php esc_html_e('Cap Limit', 'binary-mlm-plan'); ?></th>+ <th><?php esc_html_e('Tax', 'binary-mlm-plan'); ?></th>+ <th><?php esc_html_e('Service Charge', 'binary-mlm-plan'); ?></th>+ <th><?php esc_html_e('Net Amount', 'binary-mlm-plan'); ?></th>+ </tr>+ </thead>+ <tbody class="text-center">+ <?php+ if (!empty($dataarray) || $dataarray != null) {+ foreach ($dataarray as $key => $row) { ?>+ <tr>+ <td><?php echo esc_html(++$key); ?></td>+ <td><?php echo esc_html($row['username']); ?></td>+ <td><?php echo esc_attr(bmpPrice($row['direct_refferal_commission'])); ?></td>+ <td><?php echo esc_attr(bmpPrice($row['total_amount'])); ?></td>+ <td><?php echo esc_attr(bmpPrice($row['cap_limit'])); ?></td>+ <td><?php echo esc_attr(bmpPrice($row['tax'])); ?></td>+ <td><?php echo esc_attr(bmpPrice($row['service_charge'])); ?></td>+ <td><?php echo esc_attr(bmpPrice($row['net_amount'])); ?></td>+ </tr>+ <?php+ }+ }+ ?>+ </tbody>+ </table>+ </div>+ </div>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/view/pro-features.php@@ -0,0 +1,39 @@+<?php +global $wpdb; +$setting = get_option('bmp_manage_payout'); +?> +<style> + .bmp-save-button { + display: none !important; + } +</style> +<div class="card w-100 p-0 mw-100"> + <div class="card-header"> + <?php esc_html_e('Pro Features', 'binary-mlm-plan'); ?> + </div> + <div class="card-body"> + <div class="form-row container-fluid"> + <div class="col-md-12"> + <h2 class="text-center"><?php esc_html_e('Pro Features', 'binary-mlm-plan'); ?></h2> + <hr> + </div> + <div class="col-12"> + <h4 class="text-center">Level Commssions</h4> + <p class="fs-6"><strong>Level Commissions: </strong> In a Binary MLM Plan, Level Commission is typically earned based on the depth or levels within your binary structure. For example, you might earn a commission for sales made by members down to a certain level in your binary tree. The specifics can vary depending on the MLM company's compensation plan.</p> + </div> + <div class="col-12"> + <h4 class="text-center">Pair Commssions</h4> + <p class="fs-6"><strong>Pair Commissions: </strong> Pair Commission is a core component of the Binary MLM Plan. It is based on the pairing of members in your binary structure. In this system, you are usually paid a commission when there is a balanced pair of members on your left and right legs (typically referred to as the power leg and weak leg). + The pairing may be defined in various ways, such as matching the sales volume, points, or product purchases of the members on both legs. When a pair is created, you receive a commission, and the system typically flushes the excess or unpaired volume.</p> + </div> + <div class="col-12"> + <h4 class="text-center">Regular Bonus</h4> + <p class="fs-6"><strong>Regular Bonus: </strong> Binary Mlm Regular Bonus work on the basis of No. of Refferals or No. of Pairs.</p> + </div> + <div class="col-12 text-center"> + <a href="https://www.mlmtrees.com/product/bmp-pro-wordpress/" target="_blank" class="text-decoration-none button-primary fs-6 text-white"> Upgrade Now</a> + </div> + + </div> + </div> +</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/view/view_eligibility_settings.php@@ -0,0 +1,25 @@+<?php+global $wpdb;+$setting = get_option('bmp_manage_eligibility'); ?>+<div class="card w-100 p-0 mw-100">+ <div class="card-header">+ <?php esc_html_e('Eligibility Settings', 'binary-mlm-plan'); ?>+ </div>+ <div class="card-body">+ <div class="mb-3">+ <label for="bmp_referral" class="form-label"><?php esc_html_e('Direct Paid Referral(s)', 'binary-mlm-plan'); ?></label>+ <input name="bmp_referral" id="bmp_referral" type="text" class="form-control" value="<?php echo (isset($setting['bmp_referral']) && is_numeric($setting['bmp_referral'])) ? esc_attr($setting['bmp_referral']) : ''; ?>" placeholder="<?php esc_html_e('Initial Pair', 'binary-mlm-plan'); ?>" required class="regular-text">+ <small id="bmp_referral_help" class="form-text text-muted"></small>+ </div>+ <div class="mb-3">+ <label for="bmp_referral_left" class="form-label"><?php esc_html_e('Left Leg Referral(s)', 'binary-mlm-plan'); ?></label>+ <input name="bmp_referral_left" id="bmp_referral_left" class="form-control" type="text" value="<?php echo (isset($setting['bmp_referral_left']) && is_numeric($setting['bmp_referral_left'])) ? esc_attr($setting['bmp_referral_left']) : ''; ?>" placeholder="<?php esc_html_e('Referral Left', 'binary-mlm-plan'); ?>" required class="regular-text">+ <small id="bmp_referral_left_help" class="form-text text-muted"></small>+ </div>+ <div class="mb-3">+ <label for="bmp_referral_right" class="form-label"><?php esc_html_e('Right Leg Referral(s)', 'binary-mlm-plan'); ?></label>+ <input name="bmp_referral_right" id="bmp_referral_right" class="form-control" type="text" value="<?php echo (isset($setting['bmp_referral_right']) && is_numeric($setting['bmp_referral_right'])) ? esc_attr($setting['bmp_referral_right']) : ''; ?>" placeholder="<?php esc_html_e('Referral Right', 'binary-mlm-plan'); ?>" required class="regular-text"></td>+ <small id="bmp_referral_right_help" class="form-text text-muted"></small>+ </div>+ </div>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/view/view_email_settings.php@@ -0,0 +1,184 @@+<div class="form-row">+ <?php $row_num = 0;+ $settings = get_option('bmp_manage_email');+ ?>+ <div class="col-md-12">+ <h2><?php esc_html_e('Email Settings', 'binary-mlm-plan'); ?></h2>+ </div><br>++ <div class="email-shortcodes" style="background: #cecece1a;">+ <div class="col-md-12">+ <h4><?php esc_html_e('Please use the short code in the email description.', 'binary-mlm-plan'); ?></h4>+ </div>+ <table class="form-table text-center e_table_style">+ <tr>+ <td><?php esc_html_e('First Name', 'binary-mlm-plan'); ?></td>+ <td>:</td>+ <td>[firstname]</td>+ </tr>+ <tr>+ <td><?php esc_html_e('Last Name', 'binary-mlm-plan'); ?></td>+ <td>:</td>+ <td>[lastname]</td>+ </tr>+ <tr>+ <td><?php esc_html_e('Email', 'binary-mlm-plan'); ?></td>+ <td>:</td>+ <td>[email]</td>+ </tr>+ <tr>+ <td><?php esc_html_e('User Name', 'binary-mlm-plan'); ?></td>+ <td>:</td>+ <td>[username]</td>+ </tr>+ <tr>+ <td><?php esc_html_e('Amount', 'binary-mlm-plan'); ?></td>+ <td>:</td>+ <td>[amount]</td>+ </tr>+ <tr>+ <td><?php esc_html_e('Withdrawal', 'binary-mlm-plan'); ?></td>+ <td>:</td>+ <td>[withdrawalmode]</td>+ </tr>+ <tr>+ <td><?php esc_html_e('Payout Id', 'binary-mlm-plan'); ?></td>+ <td>:</td>+ <td>[payoutid]</td>+ </tr>+ <tr>+ <td><?php esc_html_e('Site Name', 'binary-mlm-plan'); ?></td>+ <td>:</td>+ <td>[sitename]</td>+ </tr>+ </table>+ </div>++ <div class="form-group">+ <div class="col-md-12 float-left">+ <div class="form-group ">+ <table class="form-table">+ <tbody>+ <tr>+ <h5 for="bmp_payout_email" class="thick" data-toggle="tooltip" title="" data-original-title="!"><?php esc_html_e('Payout Recieve Mail', 'binary-mlm-plan'); ?> </h5>+ <th scope="row"><label for=""><?php esc_html_e('Subject', 'binary-mlm-plan'); ?></label></th>++ <td><input name="bmp_runpayout_email_subject" id="bmp_runpayout_email_subject" type="text" style="" value="<?php echo esc_attr(isset($settings['bmp_runpayout_email_subject']) ? $settings['bmp_runpayout_email_subject'] : ''); ?>" required class="regular-text" placeholder="<?php esc_html_e('Subject', 'binary-mlm-plan'); ?>"></td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>++ <div class="col-md-12 float-left">+ <div class="form-group ">+ <table class="form-table">+ <tbody>+ <tr>+ <th scope="row"><label for="bmp_payout_email_message"><?php esc_html_e('Message', 'binary-mlm-plan'); ?></label></th>+ <td>+ <textarea type="text" name="bmp_runpayout_email_message" rows="6" id="bmp_runpayout_email_message" class="form-control textareawidth" placeholder="<?php esc_html_e('Message', 'binary-mlm-plan'); ?>" required><?php echo esc_textarea(isset($settings['bmp_runpayout_email_message']) ? $settings['bmp_runpayout_email_message'] : ''); ?></textarea>+ <input type="checkbox" name="bmp_payout_mail" value="1" <?php echo (isset($settings['bmp_payout_mail']) && $settings['bmp_payout_mail'] == 1) ? 'checked' : ''; ?>> <?php esc_html_e('Enabled this Mail functionality', 'binary-mlm-plan'); ?>+ </td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>+ </div>+ <div class="form-group">+ <div class="col-md-12 float-left">+ <div class="form-group ">+ <table class="form-table">+ <tbody>+ <tr>+ <h5 for="bmp_networkgrowing_email" class="thick" data-toggle="tooltip" title="" data-original-title="!"><?php esc_html_e('Network Growing Mail', 'binary-mlm-plan'); ?> </h5>+ <th scope="row"><label for="bmp_networkgrowing_email_subject"><?php esc_html_e('Subject', 'binary-mlm-plan'); ?></label></th>++ <td><input name="bmp_networkgrowing_email_subject" id="bmp_networkgrowing_email_subject" type="text" style="" value="<?php echo esc_attr(isset($settings['bmp_networkgrowing_email_subject']) ? $settings['bmp_networkgrowing_email_subject'] : ''); ?>" required class="regular-text" placeholder="<?php esc_html_e('Subject', 'binary-mlm-plan'); ?>"></td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>++ <div class="col-md-12 float-left">+ <div class="form-group ">+ <table class="form-table">+ <tbody>+ <tr>+ <th scope="row"><label for="bmp_networkgrowing_email_message"><?php esc_html_e('Message', 'binary-mlm-plan'); ?> </label></th>+ <td>+ <textarea type="text" name="bmp_networkgrowing_email_message" rows="6" id="bmp_networkgrowing_email_message" class="form-control textareawidth" placeholder="<?php esc_html_e('Message', 'binary-mlm-plan'); ?>" required><?php echo esc_textarea(isset($settings['bmp_networkgrowing_email_message']) ? $settings['bmp_networkgrowing_email_message'] : ''); ?></textarea>+ <input type="checkbox" name="bmp_networkgrowing_mail" value="1" <?php echo (isset($settings['bmp_networkgrowing_mail']) && $settings['bmp_networkgrowing_mail'] == 1) ? 'checked' : ''; ?>> <?php esc_html_e('Enabled this Mail functionality', 'binary-mlm-plan'); ?>+ </td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>+ </div>+ <div class="form-group ">+ <div class="col-md-12 float-left">+ <div class="form-group ">+ <table class="form-table">+ <tbody>+ <tr>+ <h5 for="bmp_withdrawalInitiate_email" class="thick" data-toggle="tooltip" title="" data-original-title="!"><?php esc_html_e('Withdrawal Initiated Mail', 'binary-mlm-plan'); ?> </h5>+ <th scope="row"><label for="bmp_withdrawalInitiate_email_subject"><?php esc_html_e('Subject', 'binary-mlm-plan'); ?> </label></th>+ <td><input name="bmp_withdrawalInitiate_email_subject" id="bmp_withdrawalInitiate_email_subject" type="text" style="" value="<?php echo esc_attr(isset($settings['bmp_withdrawalInitiate_email_subject']) ? $settings['bmp_withdrawalInitiate_email_subject'] : ''); ?>" required class="regular-text" placeholder="<?php esc_html_e('Subject', 'binary-mlm-plan'); ?>"></td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>++ <div class="col-md-12 float-left">+ <div class="form-group ">+ <table class="form-table">+ <tbody>+ <tr>+ <th scope="row"><label for="bmp_withdrawalInitiate_email_message"><?php esc_html_e('Message', 'binary-mlm-plan'); ?> </label></th>+ <td>+ <textarea type="text" name="bmp_withdrawalInitiate_email_message" rows="6" id="bmp_withdrawalInitiate_email_message" class="form-control textareawidth" placeholder="<?php esc_html_e('Message', 'binary-mlm-plan'); ?>" required><?php echo esc_textarea(isset($settings['bmp_withdrawalInitiate_email_message']) ? $settings['bmp_withdrawalInitiate_email_message'] : ''); ?></textarea>+ <input type="checkbox" name="bmp_withdrawalInitiate_mail" value="1" <?php echo (isset($settings['bmp_withdrawalInitiate_mail']) && $settings['bmp_withdrawalInitiate_mail'] == 1) ? 'checked' : ''; ?>> <?php esc_html_e('Enabled this Mail functionality', 'binary-mlm-plan'); ?>+ </td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>+ </div>++ <div class="form-group ">+ <div class="col-md-12 float-left">+ <div class="form-group ">+ <table class="form-table">+ <tbody>+ <tr>+ <h5 for="bmp_withdrawalProcess_email" class="thick" data-toggle="tooltip" title="" data-original-title="!"><?php esc_html_e('Withdrawal Processed Mail', 'binary-mlm-plan'); ?> </h5>+ <th scope="row"><label for="bmp_withdrawalProcess_email_subject"><?php esc_html_e('Subject', 'binary-mlm-plan'); ?> </label></th>+ <td><input name="bmp_withdrawalProcess_email_subject" id="bmp_withdrawalProcess_email_subject" type="text" style="" value="<?php echo esc_attr(isset($settings['bmp_withdrawalProcess_email_subject']) ? $settings['bmp_withdrawalProcess_email_subject'] : ''); ?>" required class="regular-text" placeholder="<?php esc_html_e('Subject', 'binary-mlm-plan'); ?>"></td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>++ <div class="col-md-12 float-left">+ <div class="form-group ">+ <table class="form-table">+ <tbody>+ <tr>+ <th scope="row"><label for="bmp_withdrawalProcess_email_message"><?php esc_html_e('Message', 'binary-mlm-plan'); ?> </label></th>+ <td>+ <textarea type="text" name="bmp_withdrawalProcess_email_message" rows="6" id="bmp_withdrawalProcess_email_message" class="form-control textareawidth" placeholder="<?php esc_html_e('Message', 'binary-mlm-plan'); ?>" required><?php echo esc_textarea(isset($settings['bmp_withdrawalProcess_email_message']) ? $settings['bmp_withdrawalProcess_email_message'] : ''); ?></textarea>+ <input type="checkbox" name="bmp_withdrawalProcess_mail" value="1" <?php echo (isset($settings['bmp_withdrawalProcess_mail']) && $settings['bmp_withdrawalProcess_mail'] == 1) ? 'checked' : ''; ?>> <?php esc_html_e('Enabled this Mail functionality', 'binary-mlm-plan'); ?>+ </td>+ </tr>+ </tbody>+ </table>+ </div>+ </div>+ </div>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/view/view_epin_settings.php@@ -0,0 +1,43 @@+<?php+global $wpdb;+$row_num = 0;+$gen = new BMP_Settings_General();+$epin_length = $gen->getepinlength();++?>+<div class="card w-100 p-0 mw-100">+ <div class="card-header">+ <?php esc_html_e('ePin Settings', 'binary-mlm-plan'); ?>+ </div>+ <div class="card-body">+ <div class="form-group mb-3">+ <label for="bmp_epin_name" class="form-label"><?php esc_html_e('ePin Name', 'binary-mlm-plan'); ?></label>+ <input type="text" class="form-control" name="bmp_epin_name" placeholder="<?php esc_html_e('ePin name', 'binary-mlm-plan'); ?>" id="bmp_epin_name">+ </div>+ <div class="form-group mb-3">+ <label for="bmp_epin_type" class="form-label"><?php esc_html_e('ePin Type', 'binary-mlm-plan'); ?></label>+ <select name="bmp_epin_type" id="bmp_epin_type" class="form-control" required>+ <option value=""><?php esc_html_e('Select ePin Type', 'binary-mlm-plan'); ?></option>+ <option value="regular"><?php esc_html_e('Regular', 'binary-mlm-plan'); ?></option>+ <option value="free"><?php esc_html_e('Free', 'binary-mlm-plan'); ?></option>+ </select>+ </div>+ <div class="form-group mb-3">+ <label for="bmp_epin_number" class="form-label"><?php esc_html_e('Number Of ePins', 'binary-mlm-plan'); ?></label>+ <input name="bmp_epin_number" type="text" id="bmp_epin_number" class="form-control" placeholder="<?php esc_html_e('number of ePins', 'binary-mlm-plan'); ?>" required>+ </div>+ <div class="form-group mb-3">+ <label for="bmp_epin_length" class="form-label"><?php esc_html_e('ePin length', 'binary-mlm-plan'); ?></label>+ <select name="bmp_epin_length" id="bmp_epin_length" class="form-control" required>+ <option value=""><?php esc_html_e('Select ePin Length', 'binary-mlm-plan'); ?></option>+ <?php foreach ($epin_length as $key => $value) { ?>+ <option value="<?php echo esc_attr($key); ?>"><?php echo esc_attr($value); ?></option>+ <?php } ?>+ </select>+ </div>+ <div class="form-group mb-3">+ <label for="bmp_epin_price" class="form-label"><?php esc_html_e('ePin Price', 'binary-mlm-plan'); ?></label>+ <input name="bmp_epin_price" id="bmp_epin_price" type="text" placeholder="<?php esc_html_e('ePin price', 'binary-mlm-plan'); ?>" class="form-control" required>+ </div>+ </div>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/view/view_first_user_settings.php@@ -0,0 +1,90 @@+<?php+global $wpdb;+$users = $wpdb->get_results($wpdb->prepare("SELECT u.* FROM {$wpdb->prefix}users as u JOIN {$wpdb->prefix}usermeta as um On u.ID=um.user_id WHERE um.meta_key=%s AND um.meta_value NOT LIKE %s", 'wp_capabilities', '%administrator%')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching +?>+<div class="card w-100 p-0 mw-100">+ <div class="card-header">+ <?php esc_html_e('Binary MLM Fisrt User Create', 'binary-mlm-plan'); ?>+ </div>+ <div class="card-body">+ <div class="col-md-12 mb-3">+ <div class="form-group">+ <label for="" data-toggle="tooltip" class="label-control" title="" data-original-title="!"><?php esc_html_e('Binary MLM User By Existing User', 'binary-mlm-plan'); ?> </label>+ <select name="bmp_existing_user" id="bmp_existing_user" class="form-control" required>+ <option value=""><?php esc_html_e('Select User', 'binary-mlm-plan'); ?></option>+ <?php foreach ($users as $user) { ?>+ <option value="<?php echo esc_attr($user->ID); ?>"><?php echo esc_attr($user->user_login); ?></option>+ <?php } ?>+ </select>+ </div>+ </div>+ <div class="col-md-12 mb-3">+ <div class="form-group">+ <input type="checkbox" name="new_bmp_user" id="new_bmp_user" value="1">+ <span class="ml-5">+ <?php esc_html_e(' New Binary MLM User Create', 'binary-mlm-plan'); ?>+ </span>+ </div>+ </div>+ <div id="bmp_new_user" class="col-md-12">+ <div class="row">+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <label for="" data-toggle="tooltip" title="" data-original-title="!"><?php esc_html_e('User Name', 'binary-mlm-plan'); ?> </label>+ <input type="text" class="form-control" name="bmp_first_username" id="bmp_first_username">+ </div>+ </div>+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <label for="" data-toggle="tooltip" title="" data-original-title="!"><?php esc_html_e('User Email', 'binary-mlm-plan'); ?> </label>+ <input type="email" class="form-control" name="bmp_first_email" id="bmp_first_email">+ </div>+ </div>+ </div>+ <div class="row">+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <label for="" data-toggle="tooltip" title="" data-original-title="!"><?php esc_html_e('Password', 'binary-mlm-plan'); ?> </label>+ <input type="password" class="form-control" name="bmp_first_password" id="bmp_first_password">+ </div>+ </div>+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <label for="" data-toggle="tooltip" title="" data-original-title="!"><?php esc_html_e('Confirm Password', 'binary-mlm-plan'); ?> </label>+ <input type="password" class="form-control" name="bmp_first_confirm_password" id="bmp_first_confirm_password">+ </div>+ </div>+ </div>+ </div>+ <script>+ $(document).ready(function() {+ if ($('#new_bmp_user').is(':checked')) {+ $('#bmp_new_user').css('display', 'block');+ $('#bmp_existing_user').removeAttr('required');+ $('#bmp_first_username').attr('required', true);+ $('#bmp_first_email').attr('required', true);+ $('#bmp_first_password').attr('required', true);+ $('#bmp_first_confirm_password').attr('required', true);+ }++ $('#new_bmp_user').click(function() {+ if ($(this).is(':checked')) {+ $('#bmp_new_user').css('display', 'block');+ $('#bmp_existing_user').removeAttr('required');+ $('#bmp_first_username').attr('required', true);+ $('#bmp_first_email').attr('required', true);+ $('#bmp_first_password').attr('required', true);+ $('#bmp_first_confirm_password').attr('required', true);+ } else {+ $('#bmp_new_user').css('display', 'none');+ $('#bmp_existing_user').attr('required', true);+ $('#bmp_first_username').removeAttr('required');+ $('#bmp_first_email').removeAttr('required');+ $('#bmp_first_password').removeAttr('required');+ $('#bmp_first_confirm_password').removeAttr('required');+ }+ });+ });+ </script>+ </div>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/view/view_general_settings.php@@ -0,0 +1,25 @@+<?php+global $wpdb;++$currencies = $this->getCurrency();+$settings = get_option('bmp_manage_general');+?>+<div class="card w-100 p-0 mw-100">+ <div class="card-header">+ <?php esc_html_e('General Settings', 'binary-mlm-plan'); ?>+ </div>+ <div class="card-body">+ <h5 class="card-title"><?php esc_html_e('Select Currency', 'binary-mlm-plan'); ?></h5>+ <div class="col-md-12">+ <div class="form-group mb-3">+ <label for="bmp_currency" class="label-contol"></label>+ <select name="bmp_currency" class="form-control" id="bmp_currency" required="" placeholder="" required="">+ <?php foreach ($currencies as $key => $value) { ?>+ <option value="<?php echo esc_attr($key); ?>" <?php echo (!empty($settings['bmp_currency']) && $settings['bmp_currency'] == $key) ? 'selected' : ''; ?>><?php echo esc_attr($value); ?></option>+ <?php } ?>+ </select>+ <small id="bmp_currencyHelp" class="form-text text-muted"><?php esc_html_e('Select your currency which will you use.', 'binary-mlm-plan'); ?></small>+ </div>+ </div>+ </div>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/settings/view/view_payout_settings.php@@ -0,0 +1,75 @@+<?php+global $wpdb;+$setting = get_option('bmp_manage_payout');+?>+<div class="card w-100 p-0 mw-100">+ <div class="card-header">+ <?php esc_html_e('Payout Settings', 'binary-mlm-plan'); ?>+ </div>+ <div class="card-body">+ <div class="row">+ <div class="col-md-6 ">+ <div class="form-group mb-3">+ <label for="bmp_referral_commission_amount" class="form-label"><?php esc_html_e('Direct Referral Commission', 'binary-mlm-plan'); ?></label>+ <input name="bmp_referral_commission_amount" class="form-control" id="bmp_referral_commission_amount" type="text" style="" value="<?php echo (isset($setting['bmp_referral_commission_amount']) && is_numeric($setting['bmp_referral_commission_amount'])) ? esc_attr($setting['bmp_referral_commission_amount']) : ''; ?>" class="regular-text" placeholder="<?php esc_html_e('Referral Commission Amount', 'binary-mlm-plan'); ?>" required>+ <small id="bmp_referral_commission_amount_help" class="form-text text-muted"></small>+ </div>+ </div>+ <div class="col-md-6 ">+ <div class="form-group mb-3">+ <label for="bmp_referral_commission_type" class="form-label"><?php esc_html_e('Type', 'binary-mlm-plan'); ?></label>+ <select name="bmp_referral_commission_type" class="form-control" id="bmp_referral_commission_type" type="text" value="1" required>+ <option value="fixed" <?php echo (isset($setting['bmp_referral_commission_type']) && $setting['bmp_referral_commission_type'] == 'fixed') ? 'selected' : ''; ?>><?php esc_html_e('Fixed', 'binary-mlm-plan'); ?></option>+ <option value="percentage" <?php echo (isset($setting['bmp_referral_commission_type']) && $setting['bmp_referral_commission_type'] == 'percentage') ? 'selected' : ''; ?>><?php esc_html_e('Percentage', 'binary-mlm-plan'); ?></option>+ </select>+ <small id="bmp_referral_commission_type_help" class="form-text text-muted"></small>+ </div>+ </div>+ </div>+ <div class="row">+ <div class="col-md-6 ">+ <div class="form-group mb-3">+ <label for="bmp_service_charge_amount" class="form-label"><?php esc_html_e('Service Charge (If any)', 'binary-mlm-plan'); ?></label>+ <input name="bmp_service_charge_amount" class="form-control" id="bmp_service_charge_amount" type="text" style="" value="<?php echo (isset($setting['bmp_service_charge_amount']) && is_numeric($setting['bmp_service_charge_amount'])) ? esc_attr($setting['bmp_service_charge_amount']) : ''; ?>" class="regular-text" placeholder="<?php esc_html_e('Bmp Service Charge Amount', 'binary-mlm-plan'); ?>" required>+ <small id="bmp_service_charge_amount_help" class="form-text text-muted"></small>+ </div>+ </div>+ <div class="col-md-6 ">+ <div class="form-group mb-3">+ <label for="bmp_service_charge_type" class="form-label"><?php esc_html_e('Type', 'binary-mlm-plan'); ?></label>+ <select name="bmp_service_charge_type" class="form-control" id="bmp_service_charge_type" type="text" value="1" required>+ <option value="fixed" <?php echo (isset($setting['bmp_service_charge_type']) && $setting['bmp_service_charge_type'] == 'fixed') ? 'selected' : ''; ?>><?php esc_html_e('Fixed', 'binary-mlm-plan'); ?></option>+ <option value="percentage" <?php echo (isset($setting['bmp_service_charge_type']) && $setting['bmp_service_charge_type'] == 'percentage') ? 'selected' : ''; ?>><?php esc_html_e('Percentage', 'binary-mlm-plan'); ?></option>+ </select>+ <small id="bmp_service_charge_type_help" class="form-text text-muted"></small>+ </div>+ </div>+ </div>+ <div class="row">+ <div class="col-md-6 ">+ <div class="form-group mb-3">+ <label for="bmp_tds" class="form-label"><?php esc_html_e('Tax Deduction', 'binary-mlm-plan'); ?></label>+ <input name="bmp_tds" id="bmp_tds" class="form-control" type="text" style="" value="<?php echo (isset($setting['bmp_tds']) && is_numeric($setting['bmp_tds'])) ? esc_attr($setting['bmp_tds']) : ''; ?>" class="regular-text" placeholder="<?php esc_html_e('Bmp Tds', 'binary-mlm-plan'); ?>" required>+ <small id="bmp_tds_help" class="form-text text-muted"></small>+ </div>+ </div>+ <div class="col-md-6 ">+ <div class="form-group mb-3">+ <label for="bmp_service_charge_type" class="form-label"><?php esc_html_e('Type', 'binary-mlm-plan'); ?></label>+ <select name="bmp_service_charge_type" class="form-control" id="bmp_service_charge_type" type="text" style="" value="1" class="" required>+ <option value="fixed" <?php echo (isset($setting['bmp_service_charge_type']) && $setting['bmp_service_charge_type'] == 'fixed') ? 'selected' : ''; ?>><?php esc_html_e('Fixed', 'binary-mlm-plan'); ?></option>+ <option value="percentage" <?php echo (isset($setting['bmp_service_charge_type']) && $setting['bmp_service_charge_type'] == 'percentage') ? 'selected' : ''; ?>><?php esc_html_e('Percentage', 'binary-mlm-plan'); ?></option>+ </select>+ <small id="bmp_service_charge_type_help" class="form-text text-muted"></small>+ </div>+ </div>+ </div>+ <div class="col-md-12 float-left">+ <div class="form-group mb-3">+ <label for="bmp_cap_limit_amount" class="form-label"><?php esc_html_e('Bmp Cap Limit Amount', 'binary-mlm-plan'); ?></label>+ <input name="bmp_cap_limit_amount" class="form-control" id="bmp_cap_limit_amount" type="text" style="" value="<?php echo (isset($setting['bmp_cap_limit_amount']) && is_numeric($setting['bmp_cap_limit_amount'])) ? esc_attr($setting['bmp_cap_limit_amount']) : ''; ?>" class="regular-text" placeholder="<?php esc_html_e('Bmp Cap Limit Amount', 'binary-mlm-plan'); ?>" required>+ <small id="bmp_cap_limit_amount_help" class="form-text text-muted"></small>+ </div>+ </div>+ </div>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/tables/class-bmp-admin-epins-list-table.php@@ -0,0 +1,131 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}++if (!class_exists('WP_List_Table')) {+ require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');+}+++class bmp_admin_epin_list extends WP_List_Table+{++ /** Class constructor */+ function __construct()+ {+ global $status, $page;++ parent::__construct(array(+ 'singular' => __('id', 'binary-mlm-plan'),+ 'plural' => __('id', 'binary-mlm-plan'),+ 'ajax' => false++ ));+ }++ function get_sortable_columns()+ {+ $sortable_columns = array(+ 'epin_name' => array('epin_name', true),+ 'epin_no' => array('epin_no', true),+ 'type' => array('type', true),+ 'date_generated' => array('date_generated', true),+ 'user_key' => array('user_key', true),+ 'date_used' => array('date_used', true),+ 'status' => array('status', true),+ 'epin_price' => array('epin_price', true)+ );+ return $sortable_columns;+ }++ function column_default($item, $column_name)+ {+ switch ($column_name) {+ case 'epin_name':+ case 'epin_no':+ case 'type':+ case 'date_generated':+ case 'user_key':+ case 'date_used':+ case 'status':+ case 'epin_price':+ return $item[$column_name];+ default:+ return esc_html__('Unknown column', 'binary-mlm-plan');+ }+ }++ function get_columns()+ {+ $columns = array(+ 'epin_name' => __('ePin Name', 'binary-mlm-plan'),+ 'epin_no' => __('ePin No', 'binary-mlm-plan'),+ 'type' => __('Type', 'binary-mlm-plan'),+ 'date_generated' => __('Date Generated', 'binary-mlm-plan'),+ 'user_key' => __('User Key', 'binary-mlm-plan'),+ 'date_used' => __('Date Used', 'binary-mlm-plan'),+ 'status' => __('Status', 'binary-mlm-plan'),+ 'epin_price' => __('ePin Price', 'binary-mlm-plan')++ );++ return $columns;+ }+++ function prepare_items()+ {++ global $wpdb;++ $per_page = 10;++ $columns = $this->get_columns();+ $hidden = array();+ $sortable = $this->get_sortable_columns();+ $this->_column_headers = array($columns, $hidden, $sortable);+ $allowed_orderby = ['id', 'epin_no', 'type', 'epin_name', 'user_key', 'date_generated','date_used', 'status', 'epin_price'];+ $allowed_order = ['ASC', 'DESC'];++ // Get and sanitize++ $orderby = isset($_GET['orderby']) ? sanitize_text_field(wp_unslash($_GET['orderby'])) : 'id'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $order = isset($_GET['order']) ? sanitize_text_field(wp_unslash($_GET['order'])) : 'ASC'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended++ // Enforce whitelist+ $orderby = in_array($orderby, $allowed_orderby, true) ? $orderby : 'id';+ $order = in_array(strtoupper($order), $allowed_order, true) ? strtoupper($order) : 'ASC';+ $sql = "SELECT * FROM {$wpdb->prefix}bmp_epins ORDER BY $orderby $order";+ $results = $wpdb->get_results($sql, ARRAY_A); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared++ $i = 0;+ $listdata = array();+ $num = $wpdb->num_rows;+ if ($num > 0) {+ foreach ($results as $row) {+ $listdata[$i]['epin_name'] = $row['epin_name'];+ $listdata[$i]['epin_no'] = $row['epin_no'];+ $listdata[$i]['type'] = $row['type'];+ $listdata[$i]['date_generated'] = $row['date_generated'];+ $listdata[$i]['user_key'] = $row['user_key'];+ $listdata[$i]['date_used'] = $row['date_used'];+ $listdata[$i]['status'] = $row['status'];+ $listdata[$i]['epin_price'] = $row['epin_price'];+ $i++;+ }+ }++ $data = $listdata;++ $current_page = $this->get_pagenum();+ $total_items = count($data);+ $data = array_slice($data, (($current_page - 1) * $per_page), $per_page);+ $this->items = $data;+ $this->set_pagination_args(array(+ 'total_items' => $total_items,+ 'per_page' => $per_page,+ 'total_pages' => ceil($total_items / $per_page)+ ));+ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/tables/class-bmp-admin-payout-list-table.php@@ -0,0 +1,125 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}++if (!class_exists('WP_List_Table')) {+ require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');+}+++class bmp_admin_payout_list extends WP_List_Table+{++ /** Class constructor */+ function __construct()+ {+ global $status, $page;++ parent::__construct(array(+ 'singular' => __('id', 'binary-mlm-plan'),+ 'plural' => __('id', 'binary-mlm-plan'),+ 'ajax' => false++ ));+ }++ function get_sortable_columns()+ {+ $sortable_columns = array(+ 'user_id' => array('user_id', true),+ 'date' => array('date', true),+ 'commission_amount' => array('commission_amount', true),+ 'referral_commission_amount' => array('referral_commission_amount', true),+ 'total_amount' => array('total_amount', true),++ );+ return $sortable_columns;+ }++ function column_default($item, $column_name)+ {+ switch ($column_name) {+ case 'user_id':+ case 'date':+ case 'commission_amount':+ case 'referral_commission_amount':+ case 'total_amount':+ case 'cap_limit':+ case 'action';++ return $item[$column_name];+ default:+ return esc_html__('Unknown column', 'binary-mlm-plan');+ }+ }++ function get_columns()+ {+ $columns = array(+ 'user_id' => __('User Id', 'binary-mlm-plan'),+ 'date' => __('Date', 'binary-mlm-plan'),+ 'commission_amount' => __('Commission Amount', 'binary-mlm-plan'),+ 'referral_commission_amount' => __('Referral Commission Amount', 'binary-mlm-plan'),+ 'total_amount' => __('total amount', 'binary-mlm-plan'),+ 'cap_limit' => __('Cap Limit', 'binary-mlm-plan'),+ 'action' => __('Action', 'binary-mlm-plan'),+ );++ return $columns;+ }+++ function prepare_items()+ {++ global $wpdb;+ $per_page = 10;+ $columns = $this->get_columns();+ $hidden = array();+ $sortable = $this->get_sortable_columns();+ $this->_column_headers = array($columns, $hidden, $sortable);++ $allowed_orderby = ['id', 'user_id', 'date', 'commission_amount', 'referral_commission_amount', 'total_amount'];+ $allowed_order = ['ASC', 'DESC'];++ // Get and sanitize+ $orderby = isset($_GET['orderby']) ? sanitize_text_field(wp_unslash($_GET['orderby'])) : 'id';// phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $order = isset($_GET['order']) ? sanitize_text_field(wp_unslash($_GET['order'])) : 'ASC';// phpcs:ignore WordPress.Security.NonceVerification.Recommended++ // Enforce whitelist+ $orderby = in_array($orderby, $allowed_orderby, true) ? $orderby : 'id';+ $order = in_array(strtoupper($order), $allowed_order, true) ? strtoupper($order) : 'ASC';++ $sql = "SELECT * FROM {$wpdb->prefix}bmp_payout ORDER BY $orderby $order";+ $results = $wpdb->get_results($sql, ARRAY_A); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared++ $i = 0;+ $listdata = array();+ $num = $wpdb->num_rows;+ if ($num > 0) {+ foreach ($results as $row) {+ $listdata[$i]['user_id'] = $row['user_id'];+ $listdata[$i]['date'] = $row['date'];+ $listdata[$i]['commission_amount'] = ($row['commission_amount']) ? 'Paid' : 'Un Paid';+ $listdata[$i]['referral_commission_amount'] = isset($row['referral_commission_amount']) ? bmpPrice($row['referral_commission_amount']) : 0;+ $listdata[$i]['total_amount'] = bmpPrice($row['total_amount']);+ $listdata[$i]['cap_limit'] = !empty($row['cap_limit']) ? bmpPrice($row['cap_limit']) : 0;+ $listdata[$i]['action'] = '<a href="' . admin_url() . 'admin.php?page=bmp-payout-reports&payout_id=' . $row['id'] . '">View</a>';+ $i++;+ }+ }++ $data = $listdata;++ $current_page = $this->get_pagenum();+ $total_items = count($data);+ $data = array_slice($data, (($current_page - 1) * $per_page), $per_page);+ $this->items = $data;+ $this->set_pagination_args(array(+ 'total_items' => $total_items,+ 'per_page' => $per_page,+ 'total_pages' => ceil($total_items / $per_page)+ ));+ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/tables/class-bmp-admin-users-list-table.php@@ -0,0 +1,133 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}+if (!class_exists('WP_List_Table')) {+ require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');+}+class bmp_admin_users_list extends WP_List_Table+{++ /** Class constructor */+ function __construct()+ {+ global $status, $page;++ parent::__construct(array(+ 'singular' => __('id', 'binary-mlm-plan'),+ 'plural' => __('id', 'binary-mlm-plan'),+ 'ajax' => false++ ));+ }++ function get_sortable_columns()+ {+ $sortable_columns = array(+ 'user_id' => array('user_id', true),+ 'user_name' => array('user_name', true),+ 'payment_status' => array('payment_status', true),+ 'user_key' => array('user_key', true),+ 'parent_key' => array('parent_key', true),+ 'sponsor_key' => array('sponsor_key', true),+ 'position' => array('position', true),++ );+ return $sortable_columns;+ }++ function column_default($item, $column_name)+ {+ switch ($column_name) {+ case 'user_id':+ case 'user_name':+ case 'payment_status':+ case 'user_key':+ case 'parent_key':+ case 'sponsor_key':+ case 'position':+ case 'product_price':+ case 'pair_commission':+ case 'referral_commission':+ case 'action';+ return $item[$column_name];+ default:+ return esc_html__('Unknown column', 'binary-mlm-plan');+ }+ }++ function get_columns()+ {+ $columns = array(+ 'user_id' => __('User Id', 'binary-mlm-plan'),+ 'user_name' => __('User Name', 'binary-mlm-plan'),+ 'payment_status' => __('Payment Status', 'binary-mlm-plan'),+ 'user_key' => __('User key', 'binary-mlm-plan'),+ 'parent_key' => __('Parent Key', 'binary-mlm-plan'),+ 'sponsor_key' => __('Sponsor Key', 'binary-mlm-plan'),+ 'position' => __('Position', 'binary-mlm-plan'),+ 'referral_commission' => __('Referral Commission', 'binary-mlm-plan'),+ 'action' => __('Action', 'binary-mlm-plan'),++ );++ return $columns;+ }+++ function prepare_items()+ {++ global $wpdb;+ global $date_format;+ $per_page = 10;++ $columns = $this->get_columns();+ $hidden = array();+ $sortable = $this->get_sortable_columns();+ $this->_column_headers = array($columns, $hidden, $sortable);+ $allowed_orderby = ['id', 'user_id', 'user_name', 'user_key', 'payment_status', 'parent_key', 'sponsor_key', 'position'];+ $allowed_order = ['ASC', 'DESC'];++ // Get and sanitize+ $orderby = isset($_GET['orderby']) ? sanitize_text_field(wp_unslash($_GET['orderby'])) : 'id';// phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $order = isset($_GET['order']) ? sanitize_text_field(wp_unslash($_GET['order'])) : 'ASC';// phpcs:ignore WordPress.Security.NonceVerification.Recommended++ // Enforce whitelist+ $orderby = in_array($orderby, $allowed_orderby, true) ? $orderby : 'id';+ $order = in_array(strtoupper($order), $allowed_order, true) ? strtoupper($order) : 'ASC';+ $sql = "SELECT * FROM {$wpdb->prefix}bmp_users ORDER BY $orderby $order";+ $results = $wpdb->get_results($wpdb->prepare($sql), ARRAY_A); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared+++ $i = 0;+ $listdata = array();+ $num = $wpdb->num_rows;+ if ($num > 0) {+ foreach ($results as $row) {+ $listdata[$i]['user_id'] = $row['user_id'];+ $listdata[$i]['user_name'] = $row['user_name'];+ $listdata[$i]['payment_status'] = ($row['payment_status']) ? 'Paid' : 'Un Paid';+ $listdata[$i]['user_key'] = $row['user_key'];+ $listdata[$i]['parent_key'] = $row['parent_key'];+ $listdata[$i]['sponsor_key'] = $row['sponsor_key'];+ $listdata[$i]['position'] = $row['position'];+ $listdata[$i]['referral_commission'] = bmp_user_referral_commission($row['user_id']);+ $listdata[$i]['action'] = '<a href="' . admin_url() . 'admin.php?page=bmp-user-reports&user_id=' . $row['user_id'] . '&user_key=' . $row['user_key'] . '">View</a>';+ $i++;+ }+ }++ $data = $listdata;++ $current_page = $this->get_pagenum();+ $total_items = count($data);+ $data = array_slice($data, (($current_page - 1) * $per_page), $per_page);+ $this->items = $data;+ $this->set_pagination_args(array(+ 'total_items' => $total_items,+ 'per_page' => $per_page,+ 'total_pages' => ceil($total_items / $per_page)+ ));+ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/admin/views/html-admin-settings.php@@ -0,0 +1,87 @@+<?php++if (!defined('ABSPATH')) {+ exit;+}++global $wpdb;+$current_tab = empty($_GET['tab']) ? 'setting' : sanitize_title(wp_unslash($_GET['tab'])); // phpcs:ignore WordPress.Security.NonceVerification.Recommended+$tab_exists = isset($tabs[$current_tab]) || has_action('bmp_sections_' . $current_tab) || has_action('bmp_settings_' . $current_tab) || has_action('bmp_settings_tabs_' . $current_tab);+$current_tab_label = isset($tabs[$current_tab]) ? $tabs[$current_tab] : '';++if (!$tab_exists) {+ wp_safe_redirect(admin_url('admin.php?page=bmp-settings'));+ exit;+}++if ($current_tab == 'payout' && $current_section == '') {+ $current_section = 'run_payout';+}++if ($current_tab == 'setting') {+ $bmp_users = $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}bmp_users"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $settings = get_option('bmp_manage_general');++ if ($bmp_users == 0) {+ $current_section = 'first_user';+ }++ if ($current_tab == 'setting' && $current_section == '') {+ $current_section = 'general';+ }+}+$post_url = admin_url('admin.php');+if (isset($_GET['page'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $post_url .= '?page=' . sanitize_text_field(wp_unslash($_GET['page'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended++}+if ($current_tab) {+ $post_url .= '&tab=' . $current_tab;+}+if ($current_section) {+ $post_url .= '§ion=' . $current_section;+}++?>+<div id="bmp" class="wrap bmp">+ <nav class="nav-tab-wrapper woo-nav-tab-wrapper">+ <?php+ foreach ($tabs as $slug => $label) {+ echo '<a href="' . esc_html(admin_url('admin.php?page=bmp-settings&tab=' . esc_attr($slug))) . '" class="nav-tab ' . ($current_tab === $slug ? 'nav-tab-active' : '') . '">' . esc_html($label) . '</a>';+ }+ do_action('bmp_settings_tabs');+ ?>+ </nav>+ <div class="row">+ <div class="col-md-2">+ <?php do_action('bmp_sections_' . $current_tab); ?>+ </div>+ <div class="col-md-10">+ <form method="<?php echo esc_attr(apply_filters('bmp_settings_form_method_tab_' . $current_tab, 'post')); ?>" id="mainform" action="<?php echo esc_html($post_url); ?>" enctype="multipart/form-data">+ <input type="hidden" name="bmp_nonce" value="<?php echo esc_attr(wp_create_nonce('bmp_nonce_action')); ?>" />+ <h1 class="screen-reader-text"><?php echo esc_html($current_tab_label); ?></h1>+ <?php+ BMP_Admin_Settings::show_messages();+ do_action('bmp_settings_' . $current_tab);+ do_action('bmp_settings_tabs_' . $current_tab);+ ?>+ <div class="mt-3">+ <?php if (empty($GLOBALS['hide_save_button'])) : ?>+ <?php if ($current_section) { ?>+ <button name="save" class="button-primary bmp-save-button fs-6" type="submit" value="<?php esc_attr_e('Save changes', 'binary-mlm-plan'); ?>">+ <?php if ($current_section == 'run_payout') { ?>+ <?php esc_html_e('Payout Run', 'binary-mlm-plan'); ?>++ <?php } else { ?>+ <?php esc_html_e('Save changes', 'binary-mlm-plan'); ?>+ <?php } ?>++ </button>+ <?php } ?>+ <?php endif; ?>+ <?php wp_nonce_field('bmp-settings'); ?>+ </div>+ </form>+ </div>+ </div>+</div>
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/bmp-hook-functions.php@@ -0,0 +1,2189 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}++function bmp_epinGenarate($pin_length = '', $no_of_epin = '', $epin_name = '')+{+ global $wpdb;+ $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';+ $epins = [];+ for ($i = 0; $i < $no_of_epin; $i++) {+ do {+ $randomString = '';+ for ($j = 0; $j < $pin_length; $j++) {+ $index = wp_rand(0, strlen($characters) - 1);+ $randomString .= $characters[$index];+ }+ $has_epin = $wpdb->get_var($wpdb->prepare("SELECT count(*) from {$wpdb->prefix}bmp_epins WHERE epin_name=%s AND epin_no=%s", $epin_name, $randomString)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ } while ($has_epin > 0);++ if (!array_search($randomString, $epins)) {+ $epins[] = $randomString;+ }+ }++ return $epins;+}++function bmp_run_payout_functions()+{+ global $wpdb;+ $results = bmp_run_payout_display_functions();++ if ($wpdb->num_rows > 0) {+ if ($results) {+ foreach ($results as $row) {+ /***********************************************************+ INSERT INTO PAYOUT TABLE+ ***********************************************************/+ $wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $wpdb->prepare(+ "INSERT INTO {$wpdb->prefix}bmp_payout(user_id, date, commission_amount,referral_commission_amount,bonus_amount,total_amount,capped_amount,cap_limit,tax, service_charge) VALUES (%d, %s, %f, %f, %f, %f, %f, %f, %f, %f)",+ $row['user_id'],+ gmdate('Y-m-d H:i:s'),+ $row['commission_amount'],+ $row['direct_refferal_commission'],+ 0,+ $row['net_amount'],+ $row['net_amount'],+ $row['cap_limit'],+ $row['tax'],+ $row['service_charge']+ )+ );++ $payout_id = $wpdb->insert_id;++ $wpdb->query($wpdb->prepare("UPDATE {$wpdb->prefix}bmp_referral_commission set payout_id=%d where sponsor_id=%d AND payout_id=0", $payout_id, $row['user_id'])); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ $bmp_manage_email = get_option('bmp_manage_email');++ if (isset($bmp_manage_email['bmp_payout_mail']) && !empty($bmp_manage_email['bmp_payout_mail']) && $bmp_manage_email['bmp_payout_mail'] == 1) {+ bmp_payout_generated_mail($row['user_id'], $row['net_amount'], $payout_id);+ }+ }+ }+ }+ //return "Payout Run Successfully";+}+++function bmp_run_payout_display_functions()+{+ global $wpdb;+ $displayDataArray = [];++ $results = $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $wpdb->prepare(+ "SELECT user_id FROM {$wpdb->prefix}bmp_users + WHERE user_id IN (+ SELECT sponsor_id AS user_id FROM {$wpdb->prefix}bmp_referral_commission + WHERE payout_id = %d + UNION + SELECT sponsor_id AS user_id FROM {$wpdb->prefix}bmp_referral_commission + WHERE payout_id = %d+ )",+ 0,+ 0+ )+ );++ if ($wpdb->num_rows > 0) {+ $i = 0;+ foreach ($results as $key => $row) {+ $userId = $row->user_id;+ $directReffComm = bmp_getReferralCommissionById($row->user_id);++ $totalamount = $directReffComm;++ $bmp_manage_payout = get_option('bmp_manage_payout');+ $tax = $bmp_manage_payout['bmp_tds'];+ $service_charge = $bmp_manage_payout['bmp_service_charge_amount'];+ $capLimitAmt = !empty($bmp_manage_payout['bmp_cap_limit_amount']) ? $bmp_manage_payout['bmp_cap_limit_amount'] : '';++ if ($totalamount <= $capLimitAmt) {+ $total = $totalamount;+ } else {+ $total = empty($capLimitAmt) ? $totalamount : ($capLimitAmt == '0.00' ? $totalamount : $capLimitAmt);+ }+ if (!empty($totalamount) && $totalamount > 0) {+ $commission_amount = $totalamount;+ $taxamount = round(($total) * $tax / 100, 2);+ if ($bmp_manage_payout['bmp_service_charge_type'] == 'fixed')+ $service_charge = $service_charge;+ if ($bmp_manage_payout['bmp_service_charge_type'] == 'percentage')+ $service_charge = round(($total) * $service_charge / 100, 2);+ $user_info = get_userdata($row->user_id);+ $displayDataArray[$key]['user_id'] = $userId;+ $displayDataArray[$key]['username'] = $user_info->user_login;+ $displayDataArray[$key]['first_name'] = $user_info->first_name == "" ? $user_info->user_login : $user_info->first_name;+ $displayDataArray[$key]['last_name'] = $user_info->last_name == "" ? $user_info->user_login : $user_info->last_name;+ $displayDataArray[$key]['direct_refferal_commission'] = $directReffComm;+ $displayDataArray[$key]['total_amount'] = $totalamount;+ $displayDataArray[$key]['cap_limit'] = $capLimitAmt;+ $displayDataArray[$key]['commission_amount'] = $commission_amount;+ $displayDataArray[$key]['tax'] = $taxamount;+ $displayDataArray[$key]['service_charge'] = $service_charge == "" ? 0.00 : $service_charge;+ $displayDataArray[$key]['net_amount'] = ($total - $service_charge - $taxamount);+ $i++;+ }+ }+ } else {+ $displayDataArray = "";+ }+++ return $displayDataArray;+}++function bmp_eligibility_check_for_commission($user_key)+{+ global $wpdb;+ //get the eligibility for commission and bonus+ $bmp_manage_eligibility = get_option('bmp_manage_eligibility');++ $left_referrals = 0;+ $right_referrals = 0;+ $direct_referrals = 0;+ $setting_left_ref = isset($bmp_manage_eligibility['bmp_referral_left']) ? $bmp_manage_eligibility['bmp_referral_left'] : 0;+ $setting_right_ref = isset($bmp_manage_eligibility['bmp_referral_right']) ? $bmp_manage_eligibility['bmp_referral_right'] : 0;+ $setting_direct_ref = isset($bmp_manage_eligibility['bmp_referral']) ? $bmp_manage_eligibility['bmp_referral'] : 0;+ $paid_sponsor = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM {$wpdb->prefix}bmp_users WHERE user_key = %s AND payment_status = '1'", $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ if ($paid_sponsor == 0) {+ return false;+ } else {+ $left_referrals = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM {$wpdb->prefix}bmp_users WHERE sponsor_key = %s AND position = 'left'", $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $right_referrals = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM {$wpdb->prefix}bmp_users WHERE sponsor_key = %s AND position = 'right'", $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ $direct_referrals = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM {$wpdb->prefix}bmp_users WHERE parent_key=%s AND sponsor_key = %s", $user_key, $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ }++ if ($left_referrals >= $setting_left_ref && $right_referrals >= $setting_right_ref && $direct_referrals >= $setting_direct_ref) {+ return true;+ } else {+ return false;+ }+}++function bmp_distribute_calculate_commission($user_key)+{+ global $wpdb;+ $returnarray = array();++ $bmp_manage_payout = get_option('bmp_manage_payout');++ $pair1 = $bmp_manage_payout['bmp_pair1'];+ $pair2 = $bmp_manage_payout['bmp_pair2'];++ $leftquery = $wpdb->get_results($wpdb->prepare("SELECT `lp`.`user_key` FROM {$wpdb->prefix}bmp_leftposition as lp join {$wpdb->prefix}bmp_users as u on `u`.`user_key`=`lp`.`user_key` Where `lp`.`parent_key` = %s AND u.sponsor_key=%s AND lp.commission_status = '0' AND u.payment_status = '1' ORDER BY u.id LIMIT %d", $user_key, $user_key, $pair1)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ $left_position_no = $wpdb->num_rows;++ if ($left_position_no >= $pair1) {+ $rightquery = $wpdb->get_results($wpdb->prepare("SELECT `rp`.`user_key` FROM {$wpdb->prefix}bmp_rightposition as rp join {$wpdb->prefix}bmp_users as u on `u`.`user_key`=`rp`.`user_key` Where `rp`.`parent_key` = %s AND u.sponsor_key=%s AND rp.commission_status = '0' AND u.payment_status = '1' ORDER BY u.id LIMIT %d", $user_key, $user_key, $pair2)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ $right_position_no = $wpdb->num_rows;++ if ($right_position_no >= $pair2) {+ // $returnarray[] = bmp_insert_pair_commission($leftquery, $rightquery, $user_key);+ }+ }++ //check users from right leg tabl++ $rightquery = $wpdb->get_results($wpdb->prepare("SELECT rp.user_key FROM {$wpdb->prefix}bmp_rightposition as rp join {$wpdb->prefix}bmp_users as u on u.user_key=rp.user_key Where rp.parent_key = %s AND rp.commission_status = '0' AND u.sponsor_key=%s AND u.payment_status = '1' ORDER BY u.id LIMIT %d", $user_key, $user_key, $pair1)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ $right_position_no = $wpdb->num_rows;++ if ($right_position_no >= $pair1) {+ //check users from left leg table++ $leftquery = $wpdb->get_results($wpdb->prepare("SELECT lp.user_key FROM {$wpdb->prefix}bmp_leftposition as lp join {$wpdb->prefix}bmp_users as u on u.user_key=lp.user_key Where lp.parent_key = %s AND lp.commission_status = '0' AND u.sponsor_key=%s AND u.payment_status = '1' ORDER BY u.id LIMIT %d", $user_key, $user_key, $pair2)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $left_position_no = $wpdb->num_rows;++ if ($left_position_no >= $pair2) {+ //mark users as paid and update commission table with child ids+ // $returnarray[] = bmp_insert_pair_commission($leftquery, $rightquery, $user_key);+ }+ }+ return $returnarray;+}++function bmp_getPair($leftcount, $rightcount)+{+ $bmp_manage_payout = get_option('bmp_manage_payout');++ $pair1 = $bmp_manage_payout['bmp_pair1'];+ $pair2 = $bmp_manage_payout['bmp_pair2'];++ $leftpair = (int)($leftcount / $pair1);+ $rightpair = (int)($rightcount / $pair2);++ if ($leftpair <= $rightpair)+ $pair = $leftpair;+ else+ $pair = $rightpair;++ $leftbalance = $leftcount - ($pair * $pair1);+ $rightbalance = $rightcount - ($pair * $pair2);++ $returnarray['leftbal'] = $leftbalance;+ $returnarray['rightbal'] = $rightbalance;+ $returnarray['pair'] = $pair;++ return $returnarray;+}++function bmp_getReferralCommissionById($user_id)+{+ global $wpdb;+ $refferal_comm = $wpdb->get_var($wpdb->prepare("SELECT SUM(amount) AS reff_comm FROM {$wpdb->prefix}bmp_referral_commission WHERE sponsor_id = %d AND payout_id = 0 GROUP BY sponsor_id", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $refferal_comm;+}++function bmp_getUserIdByUsername($username)+{+ global $wpdb;+ $id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM {$wpdb->prefix}bmp_users WHERE user_name = %s", $username)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $id;+}+function bmp_getuseridbykey($key)+{+ global $wpdb;+ $id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM {$wpdb->prefix}bmp_users WHERE user_key = %s", $key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $id;+}++function bmp_getUsernameByUserId($user_id)+{+ global $wpdb;+ $username = $wpdb->get_var($wpdb->prepare("SELECT user_name FROM {$wpdb->prefix}bmp_users WHERE user_id = %d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $username;+}+function bmp_getUserInfoByKey($key)+{+ global $wpdb;+ $user = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_users WHERE user_key = %s", $key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $user;+}++function bmp_getUsername($key)+{+ global $wpdb;+ $username = $wpdb->get_var($wpdb->prepare("SELECT user_name FROM {$wpdb->prefix}bmp_users WHERE user_key = %s", $key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $username;+}++function bmp_checkKey($key)+{+ global $wpdb;+ $user_key = $wpdb->get_var($wpdb->prepare("SELECT user_key FROM {$wpdb->prefix}bmp_users WHERE user_key = %s", $key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ if (!$user_key) {+ return false;+ } else {+ return true;+ }+}++function bmp_get_current_user_key()+{+ global $current_user, $wpdb;+ $username = $current_user->user_login;+ $user_key = $wpdb->get_var($wpdb->prepare("SELECT user_key FROM {$wpdb->prefix}bmp_users WHERE user_name = %s", $username)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $user_key;+}++function bmp_get_user_key($user_id)+{+ global $wpdb;+ $user_key = $wpdb->get_var($wpdb->prepare("SELECT user_key FROM {$wpdb->prefix}bmp_users WHERE user_id = %d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $user_key;+}++function bmp_getproducprice($user_id)+{+ global $wpdb;+ $product_price = $wpdb->get_var($wpdb->prepare("SELECT product_price FROM {$wpdb->prefix}bmp_users WHERE user_id = %d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $product_price;+}++function bmp_get_epin_price($user_key = '')+{+ global $wpdb;+ $epin_price = $wpdb->get_var($wpdb->prepare("SELECT epin_price FROM {$wpdb->prefix}bmp_epins WHERE user_key = %s AND `type`=%s", $user_key, 'regular')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return !empty($epin_price) ? $epin_price : 0;+}++function bmp_get_parent_key_by_userid($user_id)+{+ global $wpdb;+ $parent_key = $wpdb->get_var($wpdb->prepare("SELECT parent_key FROM {$wpdb->prefix}bmp_users WHERE user_id = %d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $parent_key;+}++function bmp_get_sponsor_key_by_userid($user_id)+{+ global $wpdb;+ $sponsor_key = $wpdb->get_var($wpdb->prepare("SELECT sponsor_key FROM {$wpdb->prefix}bmp_users WHERE user_id = %d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $sponsor_key;+}++function bmpPrice($price = 0)+{+ global $wpdb;+ $currency = get_option('bmp_manage_general');+ $currency = isset($currency['bmp_currency']) ? $currency['bmp_currency'] : 'USD';+ $currency_symbol = $wpdb->get_var($wpdb->prepare("SELECT symbol FROM {$wpdb->prefix}bmp_currency WHERE iso3 = %s", $currency)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $currency_symbol . $price;+}+function bmp_insert_refferal_commision($user_id = '')+{+ global $wpdb;+ $date = current_time('mysql');+ $bmp_manage_payout_setting = get_option('bmp_manage_payout');+ $refferal_amount = isset($bmp_manage_payout_setting['bmp_referral_commission_amount']) ? sanitize_text_field(wp_unslash($bmp_manage_payout_setting['bmp_referral_commission_amount'])) : 0.00;+ $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_users WHERE user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $sponsor_key = $row->sponsor_key;+ $child_id = $row->user_id;+ if ($bmp_manage_payout_setting['bmp_referral_commission_type'] == 'percentage') {+ $refferal_amount = bmp_get_epin_price($sponsor_key) * $refferal_amount / 100;+ }++ if ($sponsor_key != 0) {+ $sponsor = $wpdb->get_row($wpdb->prepare("SELECT user_id FROM {$wpdb->prefix}bmp_users WHERE user_key=%s", $sponsor_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $sponsor_user_id = $sponsor->user_id;+ $wpdb->query($wpdb->prepare("INSERT INTO {$wpdb->prefix}bmp_referral_commission SET date_notified=%s, sponsor_id=%d, child_id=%d, amount=%f, payout_id=%d", $date, $sponsor_user_id, $child_id, $refferal_amount, 0)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ }+}++function bmp_admin_reset_data_function()+{+ global $wpdb;+ $tables = array(+ "{$wpdb->prefix}bmp_users",+ "{$wpdb->prefix}bmp_leftposition",+ "{$wpdb->prefix}bmp_rightposition",+ "{$wpdb->prefix}bmp_payout",+ "{$wpdb->prefix}bmp_referral_commission",+ "{$wpdb->prefix}bmp_epins",+ );++ foreach ($tables as $table) {+ $wpdb->query("TRUNCATE " . $table); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.NotPrepared+ }++ return true;+}++function bmp_epin_exist($epin)+{+ global $wpdb;++ if (empty($epin)) {+ return false;+ }+ $myepin = $wpdb->get_var($wpdb->prepare("SELECT count(*) FROM {$wpdb->prefix}bmp_epins WHERE epin_no=%s AND status=%s", $epin, '1')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ if (!empty($myepin)) {+ return true;+ } else {+ return false;+ }+}++function bmp_generateKey()+{+ global $wpdb;+ $characters = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];+ $length = 9;+ do {+ $keys = array();+ while (count($keys) < $length) {+ $x = wp_rand(0, count($characters) - 1);+ if (!in_array($x, $keys))+ $keys[] = $x;+ }++ // extract each key from array+ $random_chars = '';+ foreach ($keys as $key)+ $random_chars .= $characters[$key];++ // display random key+ $haskey = $wpdb->get_var($wpdb->prepare("SELECT count(*) FROM {$wpdb->prefix}bmp_users WHERE user_key=%s", $random_chars)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ } while ($haskey > 0);++ return $random_chars;+}++function bmp_get_page_id($page)+{+ $page = apply_filters('bmp_get_' . $page . '_page_id', get_option('bmp_' . $page . '_page_id'));+ return $page ? absint($page) : -1;+}++function bmp_create_page($slug, $option = '', $page_title = '', $page_content = '', $post_parent = 0)+{+ global $wpdb;++ $option_value = get_option($option);++ if ($option_value > 0 && ($page_object = get_post($option_value))) {+ if ('page' === $page_object->post_type && !in_array($page_object->post_status, array('pending', 'trash', 'future', 'auto-draft'))) {+ // Valid page is already in place++ return $page_object->ID;+ }+ }++ if (strlen($page_content) > 0) {+ // Search for an existing page with the specified page content (typically a shortcode)+ $valid_page_found = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_content LIKE %s LIMIT 1;", "%{$page_content}%")); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ } else {+ // Search for an existing page with the specified page slug+ $valid_page_found = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status NOT IN ( 'pending', 'trash', 'future', 'auto-draft' ) AND post_name = %s LIMIT 1;", $slug)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ }++ $valid_page_found = apply_filters('bmp_create_page_id', $valid_page_found, $slug, $page_content);++ if ($valid_page_found) {+ if ($option) {+ update_option($option, $valid_page_found);+ }++ return $valid_page_found;+ }++ // Search for a matching valid trashed page+ if (strlen($page_content) > 0) {+ // Search for an existing page with the specified page content (typically a shortcode)+ $trashed_page_found = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_content LIKE %s LIMIT 1;", "%{$page_content}%")); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ } else {+ // Search for an existing page with the specified page slug+ $trashed_page_found = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_status = 'trash' AND post_name = %s LIMIT 1;", $slug)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ }++ if ($trashed_page_found) {+ $page_id = $trashed_page_found;+ $page_data = array(+ 'ID' => $page_id,+ 'post_status' => 'publish',+ );+ wp_update_post($page_data);+ } else {+ $page_data = array(+ 'post_status' => 'publish',+ 'post_type' => 'page',+ 'post_author' => 1,+ 'post_name' => $slug,+ 'post_title' => $page_title,+ 'post_content' => $page_content,+ 'post_parent' => $post_parent,+ 'comment_status' => 'closed',+ );++ $page_id = wp_insert_post($page_data);+ update_post_meta($page_id, 'is_bmp_page', true);+ }++ if ($option) {+ update_option($option, $page_id);+ }++ return $page_id;+}++// mail functions ++function bmp_payout_generated_mail($user_id, $amount, $payout_id)+{+ global $wpdb;++ $user_info = get_userdata($user_id);+ $siteownwer = get_bloginfo('name');+ $bmp_manage_email = get_option('bmp_manage_email');+ $headers = "MIME-Version: 1.0" . "\r\n";+ $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";+ $headers .= "From: " . get_option('admin_email') . "<" . get_option('admin_email') . ">" . "\r\n";++ $subject = $bmp_manage_email['bmp_runpayout_email_subject'];+ $message = nl2br(htmlspecialchars($bmp_manage_email['bmp_runpayout_email_message']));+ $message = str_replace('[firstname]', $user_info->first_name, $message);+ $message = str_replace('[lastname]', $user_info->last_name, $message);+ $message = str_replace('[email]', $user_info->user_email, $message);+ $message = str_replace('[username]', $user_info->user_login, $message);+ $message = str_replace('[amount]', $amount, $message);+ $message = str_replace('[payoutid]', $payout_id, $message);+ $message = str_replace('[sitename]', $siteownwer, $message);+ wp_mail(get_option('admin_email'), $subject, $message, $headers);+ wp_mail($user_info->user_email, $subject, $message, $headers);+}++// If apply for with drawal From Front End++function bmp_withdrawal_initiated_mail($user_id, $comment, $payout_id)+{+ global $wpdb;++ $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout WHERE `payout_id` = %d AND user_id=%d", $payout_id, $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ $user_info = get_userdata($user_id);++ $siteownwer = get_bloginfo('name');+ $bmp_manage_email = get_option('bmp_manage_email');++ $headers = "MIME-Version: 1.0" . "\r\n";+ $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";+ $headers .= "From: " . get_option('admin_email') . "<" . get_option('admin_email') . ">" . "\r\n";+ $subject = $bmp_manage_email['bmp_withdrawalInitiate_email_subject'];+ $message = nl2br(htmlspecialchars($bmp_manage_email['bmp_withdrawalInitiate_email_message']));+ $message = str_replace('[firstname]', $user_info->first_name, $message);+ $message = str_replace('[lastname]', $user_info->last_name, $message);+ $message = str_replace('[email]', $user_info->user_email, $message);+ $message = str_replace('[username]', $user_info->user_login, $message);+ $message = str_replace('[amount]', $row->capped_amt, $message);+ $message = str_replace('[mode]', $row->payment_mode, $message);+ $message = str_replace('[comment]', $comment, $message);+ $message = str_replace('[payoutid]', $payout_id, $message);+ $message = str_replace('[sitename]', $siteownwer, $message);+ wp_mail(get_option('admin_email'), $subject, $message, $headers);+ wp_mail($user_info->user_email, $subject, $message, $headers);+}++// mail functions ++function bmp_base_name_information()+{+ echo '<meta name="bmp_adminajax" content="' . esc_html(admin_url('admin-ajax.php')) . '" />';+ echo '<meta name="bmp_base_url" content="' . esc_html(site_url()) . '" />';+ echo '<meta name="bmp_author_url" content="https://www.letscms.com" />';+}++function bmp_add_query_vars($aVars)+{+ $aVars[] = "key";+ $aVars[] = "parent_key";+ $aVars[] = "position";+ return $aVars;+}++function bmp_add_rewrite_rules($aRules)+{+ $newrules = array();+ $newrules['/downlines/([^/]+)/?$'] = 'index.php?pagename=downlines&key=$matches[1]';+ $newrules['/register/([^/]+)/([^/]+)/?$'] = 'index.php?pagename=register&parent_key=$matches[1]&position=$matches[2]';++ $finalrules = $newrules + $aRules;+ return $finalrules;+}++function bmp_user_referral_commission($user_id)+{+ global $wpdb;+ $referral_commission = $wpdb->get_var($wpdb->prepare("SELECT SUM(amount) as total FROM {$wpdb->prefix}bmp_referral_commission WHERE sponsor_id=%d and payout_id!=0", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return ($referral_commission > 0) ? $referral_commission : '0';+}++function bmp_referral_by_commission_payout($payout_id, $user_id)+{+ global $wpdb;+ if ($user_id) {+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_referral_commission where payout_id=%d AND sponsor_id=%d", $payout_id, $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ } else {+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_referral_commission where payout_id=%d", $payout_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ }+ return $results;+}++function bmp_payout_summary_by_amount_payout($payout_id)+{+ global $wpdb;+ $results = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout where id=%d", $payout_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_user_personal_detail_by_userid($user_id)+{+ global $wpdb;+ $results = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_users where user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_user_personal_detail_by_leftuser($user_key)+{+ global $wpdb;+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_leftposition as lp join {$wpdb->prefix}bmp_users as u on u.user_key=lp.user_key Where lp.parent_key=%s AND u.sponsor_key=%s", $user_key, $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_user_personal_detail_by_rightuser($user_key)+{+ global $wpdb;+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_rightposition as lp join {$wpdb->prefix}bmp_users as u on u.user_key=lp.user_key Where lp.parent_key=%s AND u.sponsor_key=%s", $user_key, $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_user_payoutdetail($user_id)+{+ global $wpdb;+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout where user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_get_sum_commissionamount($user_id)+{+ global $wpdb;+ $totalComm = $wpdb->get_var($wpdb->prepare("SELECT sum(total_amount) FROM {$wpdb->prefix}bmp_payout where user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $totalComm = !empty($totalComm) ? bmpPrice($totalComm) : bmpPrice(0.00);+ return $totalComm;+}++function bmp_get_sum_referral_commission_amount($user_id)+{+ global $wpdb;+ $results = $wpdb->get_var($wpdb->prepare("SELECT sum(referral_commission_amount) FROM {$wpdb->prefix}bmp_payout where user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $results = number_format($results, 2);+ return $results;+}++function bmp_get_sum_bonus_amount($user_id)+{+ global $wpdb;+ $results = $wpdb->get_var($wpdb->prepare("SELECT sum(bonus_amount) FROM {$wpdb->prefix}bmp_payout where user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $results = number_format($results, 2);+ return $results;+}++function bmp_get_sum_total_amount($user_id)+{+ global $wpdb;+ $results = $wpdb->get_var($wpdb->prepare("SELECT sum(total_amount) FROM {$wpdb->prefix}bmp_payout where user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $results = number_format($results, 2);+ return $results;+}++function bmp_get_sum_capped_amount($user_id)+{+ global $wpdb;+ $results = $wpdb->get_var($wpdb->prepare("SELECT sum(capped_amount) FROM {$wpdb->prefix}bmp_payout where user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $results = number_format($results, 2);+ return $results;+}++function bmp_pair_referral_by_commission_user_id_and_payout_id($payout_id, $user_id)+{+ global $wpdb;+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_referral_commission where payout_id=%d AND sponsor_id=%d", $payout_id, $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_pair_summary_by_user_id_and_payout_id($payout_id, $user_id)+{+ global $wpdb;+ $results = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout where id=%d and user_id=%d", $payout_id, $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_payout_list_of_current_user()+{+ global $wpdb, $current_user;+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout WHERE user_id=%d", $current_user->ID)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_epin_of_current_user()+{+ global $wpdb, $current_user;+ $user_key = $wpdb->get_var($wpdb->prepare("SELECT user_key FROM {$wpdb->prefix}bmp_users WHERE user_id=%d", $current_user->ID)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_epins WHERE user_key=%s", $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_left_user_count_by_user_key($user_key)+{+ global $wpdb, $current_user;+ $total = $wpdb->get_var($wpdb->prepare("SELECT count(lp.user_key) as total FROM {$wpdb->prefix}bmp_leftposition as lp join {$wpdb->prefix}bmp_users as u on u.user_key=lp.user_key Where lp.parent_key=%s AND u.sponsor_key=%s", $user_key, $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $total;+}++function bmp_right_user_count_by_user_key($user_key)+{+ global $wpdb, $current_user;+ $total = $wpdb->get_var($wpdb->prepare("SELECT count(lp.user_key) as total FROM {$wpdb->prefix}bmp_rightposition as lp join {$wpdb->prefix}bmp_users as u on u.user_key=lp.user_key Where lp.parent_key=%s AND u.sponsor_key=%s", $user_key, $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $total;+}++function bmp_user_account_detail_of_current_user()+{+ global $wpdb, $current_user;+ $bmp_user_data = array();+ $bmp_user = bmp_user_personal_detail_by_userid($current_user->ID);+ $bmp_user_data['user_name'] = $bmp_user->user_name;+ $bmp_user_data['user_key'] = $bmp_user->user_key;+ $bmp_user_data['parent_key'] = $bmp_user->parent_key;+ $bmp_user_data['sponsor_key'] = $bmp_user->sponsor_key;+ $bmp_user_data['position'] = $bmp_user->position;+ $bmp_user_data['payment_status'] = $bmp_user->payment_status;+ $bmp_user_data['left_count'] = bmp_left_user_count_by_user_key($bmp_user->user_key);+ $bmp_user_data['right_count'] = bmp_right_user_count_by_user_key($bmp_user->user_key);+ return $bmp_user_data;+}++function bmp_user_left_downlines_of_current_user()+{+ global $wpdb, $current_user;+ $user_data = array();+ $bmp_user = bmp_user_personal_detail_by_userid($current_user->ID);+ $results = $wpdb->get_results($wpdb->prepare("SELECT lp.user_key FROM {$wpdb->prefix}bmp_leftposition as lp join {$wpdb->prefix}bmp_users as u on u.user_key=lp.user_key Where lp.parent_key=%s AND u.sponsor_key=%s", $bmp_user->user_key, $bmp_user->user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ foreach ($results as $result) {+ $user_data[] = bmp_getUserInfoByKey($result->user_key);+ }+ return $user_data;+}++function bmp_user_right_downlines_of_current_user()+{+ global $wpdb, $current_user;+ $user_data = array();+ $bmp_user = bmp_user_personal_detail_by_userid($current_user->ID);+ $results = $wpdb->get_results($wpdb->prepare("SELECT lp.user_key FROM {$wpdb->prefix}bmp_rightposition as lp join {$wpdb->prefix}bmp_users as u on u.user_key=lp.user_key Where lp.parent_key=%s AND u.sponsor_key=%s", $bmp_user->user_key, $bmp_user->user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ foreach ($results as $result) {+ $user_data[] = bmp_getUserInfoByKey($result->user_key);+ }+ return $user_data;+}++function bmp_user_left_downlines_by_key($key)+{+ global $wpdb, $current_user;+ $results = $wpdb->get_var($wpdb->prepare("SELECT count(lp.user_key) as total FROM {$wpdb->prefix}bmp_leftposition as lp join {$wpdb->prefix}bmp_users as u on u.user_key=lp.user_key Where lp.parent_key=%s AND u.sponsor_key=%s", $key, $key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_user_right_downlines_by_key($key)+{+ global $wpdb, $current_user;+ $results = $wpdb->get_var($wpdb->prepare("SELECT count(lp.user_key) as total FROM {$wpdb->prefix}bmp_rightposition as lp join {$wpdb->prefix}bmp_users as u on u.user_key=lp.user_key Where lp.parent_key=%s AND u.sponsor_key=%s", $key, $key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}+function bmp_user_my_total_earnings()+{+ global $wpdb, $current_user;+ $user_data = array();+ $commission_amount = 0;+ $referral_commission_amount = 0;+ $bonus_amount = 0;+ $total_amount = 0;+ $capped_amount = 0;+ $cap_limit = 0;+ $tax = 0;+ $service_charge = 0;+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout WHERE user_id=%d", $current_user->ID)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ foreach ($results as $result) {+ $commission_amount += $result->commission_amount;+ $referral_commission_amount += $result->referral_commission_amount;+ $bonus_amount += $result->bonus_amount;+ $total_amount += $result->total_amount;+ $capped_amount += $result->capped_amount;+ if (!empty($result->cap_limit)) {+ $cap_limit += $result->cap_limit;+ }+ $tax += $result->tax;+ $service_charge += $result->service_charge;+ }++ $user_data['commission_amount'] = $commission_amount;+ $user_data['referral_commission_amount'] = $referral_commission_amount;+ $user_data['bonus_amount'] = $bonus_amount;+ $user_data['total_amount'] = $total_amount;+ $user_data['capped_amount'] = $capped_amount;+ $user_data['cap_limit'] = $cap_limit;+ $user_data['tax'] = $tax;+ $user_data['service_charge'] = $service_charge;+ return $user_data;+}++function bmp_user_referral_commission_data($payout_id)+{+ global $wpdb, $current_user;++ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_referral_commission WHERE sponsor_id=%d AND payout_id=%d", $current_user->ID, $payout_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $results;+}++function bmp_user_payout_detail_of_current_user($payout_id = "")+{+ global $wpdb, $current_user;++ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout WHERE id=%d", $payout_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $results;+}++function bmp_user_payout_summary_data($payout_id)+{+ global $wpdb, $current_user;++ $results = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout WHERE user_id=%d AND id=%d", $current_user->ID, $payout_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ return $results;+}++function bmp_user_check_validate_function()+{+ global $wpdb, $current_user;+ $roles = (array) $current_user->roles;++ if (!is_user_logged_in()) {+ echo '<div class="container"><div class="user_error">' . esc_html__('You are not the Binary Mlm Plan Member. So you are not eligible to access this page.', 'binary-mlm-plan');+ echo '</div></div>';+ die;+ } else if ((isset($current_user->caps['administrator']) && $current_user->caps['administrator'] == 1)) {+ return true;+ } else if (!in_array('bmp_user', $roles)) {+ echo '<div class="container"><div class="user_error">' . esc_html__('You are not the Binary Mlm Plan Member. So you are not eligible to access this page.', 'binary-mlm-plan');+ echo '</div></div>';+ die;+ }+}++function bmp_user_check_payout_function()+{+ global $wpdb, $current_user;+ if (isset($_GET['id']) && !empty($_GET['id'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $id = sanitize_text_field(wp_unslash($_GET['id'])); // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ } else {+ $id = 0;+ }+ $var_payout = $wpdb->get_var($wpdb->prepare("SELECT id FROM {$wpdb->prefix}bmp_payout WHERE id=%d AND user_id=%d", $id, $current_user->ID)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ if ($var_payout) {+ } else {+ echo '<div class="container"><div class="user_error">' . esc_html__('Data not found.', 'binary-mlm-plan');+ echo '</div></div>';+ die;+ }+}++function bmp_admin_user_account_detail_of_current_user($user_id)+{+ global $wpdb, $current_user;+ $bmp_user_data = array();+ $bmp_user = bmp_user_personal_detail_by_userid($user_id);+ $bmp_user_data['user_name'] = $bmp_user->user_name;+ $bmp_user_data['user_key'] = $bmp_user->user_key;+ $bmp_user_data['parent_key'] = $bmp_user->parent_key;+ $bmp_user_data['sponsor_key'] = $bmp_user->sponsor_key;+ $bmp_user_data['position'] = $bmp_user->position;+ $bmp_user_data['payment_status'] = $bmp_user->payment_status;+ $bmp_user_data['left_count'] = bmp_left_user_count_by_user_key($bmp_user->user_key);+ $bmp_user_data['right_count'] = bmp_right_user_count_by_user_key($bmp_user->user_key);++ return $bmp_user_data;+}++function bmp_admin_user_my_total_earnings($user_id)+{+ global $wpdb, $current_user;+ $user_data = array();+ $commission_amount = 0;+ $referral_commission_amount = 0;+ $bonus_amount = 0;+ $total_amount = 0;+ $capped_amount = 0;+ $cap_limit = 0;+ $tax = 0;+ $service_charge = 0;+ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout WHERE user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ foreach ($results as $result) {+ $commission_amount += $result->commission_amount;+ $referral_commission_amount += $result->referral_commission_amount;+ $bonus_amount += $result->bonus_amount;+ $total_amount += $result->total_amount;+ $capped_amount += $result->capped_amount;+ if (!empty($result->cap_limit)) {+ $cap_limit += $result->cap_limit;+ }+ $tax += $result->tax;+ $service_charge += $result->service_charge;+ }++ $user_data['commission_amount'] = $commission_amount;+ $user_data['referral_commission_amount'] = $referral_commission_amount;+ $user_data['bonus_amount'] = $bonus_amount;+ $user_data['total_amount'] = $total_amount;+ $user_data['capped_amount'] = $capped_amount;+ $user_data['cap_limit'] = $cap_limit;+ $user_data['tax'] = $tax;+ $user_data['service_charge'] = $service_charge;++ return $user_data;+}++function bmp_admin_user_left_downlines_of_current_user($user_id)+{+ global $wpdb, $current_user;+ $user_data = array();+ $bmp_user = bmp_user_personal_detail_by_userid($user_id);+ $results = $wpdb->get_results($wpdb->prepare("SELECT `lp`.`user_key` FROM {$wpdb->prefix}bmp_leftposition as lp join {$wpdb->prefix}bmp_users as u on `u`.`user_key`=`lp`.`user_key` Where `lp`.`parent_key` = %s AND u.sponsor_key=%s", $bmp_user->user_key, $bmp_user->user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ foreach ($results as $result) {+ $user_data[] = bmp_getUserInfoByKey($result->user_key);+ }+ return $user_data;+}++function bmp_admin_user_right_downlines_of_current_user($user_id)+{+ global $wpdb, $current_user;+ $user_data = array();+ $bmp_user = bmp_user_personal_detail_by_userid($user_id);+ $results = $wpdb->get_results($wpdb->prepare("SELECT `lp`.`user_key` FROM {$wpdb->prefix}bmp_rightposition as lp join {$wpdb->prefix}bmp_users as u on `u`.`user_key`=`lp`.`user_key` Where `lp`.`parent_key` = %s AND u.sponsor_key=%s", $bmp_user->user_key, $bmp_user->user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ foreach ($results as $result) {+ $user_data[] = bmp_getUserInfoByKey($result->user_key);+ }+ return $user_data;+}++function bmp_admin_payout_list_of_current_user($user_id)+{+ global $wpdb, $current_user;++ $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_payout WHERE user_id=%d", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $results;+}++function bmp_mlm_deactivate_function()+{+ global $wpdb;+ $install = new BMP_Install;+ $tables = $install->get_tables();++ foreach ($tables as $table) {+ $sql = "DROP TABLE IF EXISTS $table";+ $wpdb->query($sql); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ }++ $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '%bmp_%';"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ // Delete users & usermeta.++ $wp_roles = new WP_Roles();+ $wp_roles->remove_role("bmp_user");+ session_destroy();++ // pages delete+ $results = $wpdb->get_results("SELECT post_id FROM {$wpdb->prefix}postmeta where meta_key='is_bmp_page' AND meta_value='1'"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ foreach ($results as $result) {+ wp_delete_post($result->post_id);+ }++ // menu delete+ $results = $wpdb->get_results("SELECT post_id FROM {$wpdb->prefix}postmeta where meta_key='_menu_item_classes' AND meta_value LIKE '%bmp%'"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/bmp-hooks.php@@ -0,0 +1,49 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}+// register hook+add_action('wp_ajax_bmp_user_register', 'bmp_front_register_function');+add_action('wp_ajax_nopriv_bmp_user_register', 'bmp_front_register_function');++// user name exist hook+add_action('wp_ajax_bmp_username_exist', 'bmp_username_exist_function');+add_action('wp_ajax_nopriv_bmp_username_exist', 'bmp_username_exist_function');++// Position exist hook+add_action('wp_ajax_bmp_position_exist', 'bmp_position_exist_function');+add_action('wp_ajax_nopriv_bmp_position_exist', 'bmp_position_exist_function');++// user email exist hook+add_action('wp_ajax_bmp_email_exist', 'bmp_email_exist_function');+add_action('wp_ajax_nopriv_bmp_email_exist', 'bmp_email_exist_function');++// user epin exist hook+add_action('wp_ajax_bmp_epin_exist', 'bmp_epin_exist_function');+add_action('wp_ajax_nopriv_bmp_epin_exist', 'bmp_epin_exist_function');++// user password validation hook+add_action('wp_ajax_bmp_password_validation', 'bmp_password_validation_function');+add_action('wp_ajax_nopriv_bmp_password_validation', 'bmp_password_validation_function');++add_action('bmp_check_downline_validate', 'bmp_user_check_validate_function');+add_action('bmp_user_check_validate', 'bmp_user_check_validate_function');+add_action('bmp_user_payout_list', 'bmp_user_payout_list_function');+add_action('bmp_user_account_detail', 'bmp_user_account_detail_function');+add_action('bmp_user_downlines_list', 'bmp_user_downlines_list_function');+add_action('bmp_user_check_payout', 'bmp_user_check_payout_function');+add_action('bmp_user_payout_detail', 'bmp_user_payout_detail_function', 10, 1);+add_action('wp_ajax_bmp_join_network', 'bmp_front_join_network_function');+add_action('wp_ajax_nopriv_bmp_join_network', 'bmp_front_join_network_function');+add_action('wp_head', 'bmp_base_name_information');+add_filter('query_vars', 'bmp_add_query_vars');+add_filter('rewrite_rules_array', 'bmp_add_rewrite_rules');++// admin hooks+add_action('bmp_admin_payout_detail', 'bmp_admin_payout_detail_function');+add_action('bmp_admin_bonus_details', 'bmp_admin_bonus_details_function');+add_action('bmp_admin_user_account_detail', 'bmp_admin_user_account_detail_function');+add_action('bmp_admin_user_downlines_list', 'bmp_admin_user_downlines_list_function');+add_action('bmp_admin_user_payout_list', 'bmp_admn_user_payout_list_function');+add_action('bmp_mlm_deactivate_hook', 'bmp_mlm_deactivate_function');+add_action('bmp_frontend_script', 'bmp_frontend_script_function');
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/catalog/class-bmp-template.php@@ -0,0 +1,35 @@+<?php++if (!defined('ABSPATH')) {+ exit;+}+add_shortcode('bmp_register', function () {+ do_action('bmp_frontend_script');+ ob_start();+ $bmp_register = new BmpRegistration();+ $bmp_register->getRegistrationForm();+ return ob_get_clean();+});+add_shortcode('join_network', function () {+ do_action('bmp_frontend_script');+ ob_start();+ $joinNetwork = new BmpJoinNetwork();+ $joinNetwork->joinNetwork();+ return ob_get_clean();+});+add_shortcode('bmp_genealogy', function () {+ ob_start();+ do_action('bmp_frontend_script');+ bmp_genealogy_scripts();+ $genealogy = new BmpGenealogy();+ $genealogy->view_genealogy();+ return ob_get_clean();+});+add_shortcode('bmp_account_detail', function () {+ do_action('bmp_frontend_script');+ bmp_dataTable();+ ob_start();+ $userDEtails = new BmpAccountDetials();+ $userDEtails->getUserDetails();+ return ob_get_clean();+});
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/class-bmp-install.php@@ -0,0 +1,801 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}++/**+ * BMP_Install Class.+ */++class BMP_Install+{++ /**+ * Hook in tabs.+ */+ public static function init()+ {+ add_filter('plugin_action_links_' . BMP_PLUGIN_BASENAME, array(__CLASS__, 'plugin_action_links'));+ }++ /**+ * Deactivate function + */++ public static function deactivate()+ {+ do_action('bmp_mlm_deactivate_hook');+ }+++ /**+ * Install BMP.+ */+ public static function install()+ {+ if (!is_blog_installed()) {+ return;+ }+ ob_start();+ self::create_tables();+ self::create_roles();+ self::insert_table_data();+ self::create_pages();++ return ob_get_clean();+ }+++ private static function create_tables()+ {+ global $wpdb;+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';+ $wpdb->hide_errors();+ $get_tables = self::get_schema();+ foreach ($get_tables as $get_table) {+ dbDelta($get_table);+ }+ }++ private static function get_schema()+ {+ global $wpdb;+ $tables = array();+ $collate = '';++ if ($wpdb->has_cap('collation')) {+ $collate = $wpdb->get_charset_collate();+ }++ $tables[] = "CREATE TABLE {$wpdb->prefix}bmp_users (+ id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY ,+ user_id BIGINT(20) NOT NULL COMMENT 'foreign key of the {$wpdb->prefix}users table',+ user_name VARCHAR(60) NOT NULL ,+ user_key VARCHAR(15) NOT NULL ,+ parent_key VARCHAR(15) NOT NULL ,+ sponsor_key VARCHAR(15) NOT NULL ,+ position ENUM( 'right', 'left' ) NOT NULL,+ payment_status ENUM( '0', '1','2' ) NOT NULL DEFAULT '0' COMMENT ' 0 indicate unpaid AND 1 indicate paid and 2 Indicate Special Paid Member',+ payment_date VARCHAR(255),+ product_price DOUBLE(10,2) NOT NULL DEFAULT '0.00',+ KEY index_user_key (user_key),+ KEY index_parent_key (parent_key),+ KEY index_sponsor_key (sponsor_key),+ UNIQUE (user_name)+) $collate;";+ $tables[] = "CREATE TABLE {$wpdb->prefix}bmp_leftposition (+ id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,+ user_key VARCHAR(25) NOT NULL,+ parent_key VARCHAR(25) NOT NULL,+ payout_id INT(11) default 0,+ commission_status ENUM('0','1') NOT NULL DEFAULT '0',+ status ENUM('0','1') NOT NULL DEFAULT '0',+ KEY index_parent_key (parent_key),+ KEY index_user_key (user_key)+) $collate;";+ $tables[] = "CREATE TABLE {$wpdb->prefix}bmp_rightposition (+ id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,+ user_key VARCHAR(25) NOT NULL,+ parent_key VARCHAR(25) NOT NULL,+ payout_id INT(11) default 0 ,+ commission_status ENUM('0','1') NOT NULL DEFAULT '0',+ status ENUM('0','1') NOT NULL DEFAULT '0',+ KEY index_parent_key(parent_key),+ KEY index_user_key(user_key)+) $collate;";+ $tables[] = "CREATE TABLE {$wpdb->prefix}bmp_country (+ id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,+ iso CHAR(2) NOT NULL,+ name VARCHAR(80) NOT NULL,+ iso3 CHAR(3) DEFAULT NULL,+ numcode SMALLINT(6) DEFAULT NULL+) $collate;";+ $tables[] = "CREATE TABLE {$wpdb->prefix}bmp_currency (+ id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY ,+ iso3 VARCHAR (5) NOT NULL,+ symbol VARCHAR (50) NULL,+ currency VARCHAR( 60 ) NOT NULL+) $collate;";+++ $tables[] = "CREATE TABLE {$wpdb->prefix}bmp_payout (+ id int(10) unsigned NOT NULL AUTO_INCREMENT,+ user_id bigint(20) NOT NULL,+ date date NOT NULL,+ commission_amount double(10,2) DEFAULT '0.00',+ referral_commission_amount DOUBLE( 10, 2 ) NOT NULL DEFAULT '0.00',+ bonus_amount double(10,2) DEFAULT '0.00',+ total_amount VARCHAR(100) NOT NULL DEFAULT '0.00',+ capped_amount VARCHAR(100) NOT NULL DEFAULT '0.00',+ cap_limit VARCHAR(100) NOT NULL DEFAULT '0.00',+ withdrawal_initiated BOOLEAN NOT NULL DEFAULT '0' COMMENT '0=>No, 1=> Yes',+ withdrawal_initiated_date DATE NOT NULL,+ payment_mode VARCHAR(100) NOT NULL,+ payment_processed BOOLEAN NOT NULL DEFAULT '0' COMMENT '0=>No, 1=> Yes',+ payment_processed_date DATE NOT NULL,+ beneficiary VARCHAR(100) NOT NULL,+ withdrawal_initiated_comment VARCHAR( 200 ) NOT NULL,+ banktransfer_code varchar(10) DEFAULT NULL,+ cheque_no varchar(10) DEFAULT NULL,+ cheque_date date DEFAULT NULL,+ bank_name varchar(50) DEFAULT NULL,+ user_bank_name varchar(50) DEFAULT NULL,+ user_bank_account_no varchar(10) DEFAULT NULL,+ other_comments VARCHAR(100) NOT NULL,+ tax double(10,2) DEFAULT '0.00',+ service_charge double(10,2) DEFAULT '0.00',+ dispatch_date date DEFAULT NULL,+ courier_name varchar(20) DEFAULT NULL,+ awb_no varchar(20) DEFAULT NULL,+ PRIMARY KEY (`id`)+) $collate;";+ $tables[] = "CREATE TABLE {$wpdb->prefix}bmp_referral_commission (+ id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,+ date_notified datetime NOT NULL,+ sponsor_id BIGINT(20) NOT NULL,+ child_id BIGINT(60) NOT NULL,+ amount DOUBLE(6,2) NOT NULL DEFAULT 0.00 ,+ payout_id int(11) NOT NULL DEFAULT '0',+ KEY index_sponsorid (sponsor_id),+ UNIQUE(child_id)+) $collate;";++ $tables[] = "CREATE TABLE {$wpdb->prefix}bmp_epins (+ id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,+ epin_name VARCHAR(155) NOT NULL,+ epin_no VARCHAR(155) NOT NULL,+ type VARCHAR(50) NOT NULL,+ date_generated date NOT NULL,+ user_key VARCHAR(155) NOT NULL DEFAULT 0,+ date_used date DEFAULT NULL,+ status ENUM('0','1') NOT NULL DEFAULT '0',+ epin_price DOUBLE(15,2) NOT NULL DEFAULT 0.00 + ) $collate;";+++ //print_r($tables); die;+ return $tables;+ }+++ public static function get_tables()+ {+ global $wpdb;++ $tables = array(+ "{$wpdb->prefix}bmp_users",+ "{$wpdb->prefix}bmp_leftposition",+ "{$wpdb->prefix}bmp_rightposition",+ "{$wpdb->prefix}bmp_country",+ "{$wpdb->prefix}bmp_currency",+ "{$wpdb->prefix}bmp_payout",+ "{$wpdb->prefix}bmp_referral_commission",+ "{$wpdb->prefix}bmp_epins",+ );++ $tables = apply_filters('bmp_install_get_tables', $tables);++ return $tables;+ }++ /**+ * Drop WooCommerce tables.+ *+ * @return void+ */+ public static function drop_tables()+ {+ global $wpdb;++ $tables = self::get_tables();++ foreach ($tables as $table) {+ $sql = "DROP TABLE IF EXISTS $table";+ $wpdb->query($sql); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ }+ }++ /**+ * Create roles and capabilities.+ */+ public static function create_roles()+ {+ global $wp_roles;++ if (!class_exists('WP_Roles')) {+ return;+ }++ if (!isset($wp_roles)) {+ $wp_roles = new WP_Roles();+ }++ add_role('bmp_user', 'Binary MLM Plan', array('read' => false));++ /* $capabilities = self::get_core_capabilities();++ foreach ($capabilities as $cap_group) {+ foreach ($cap_group as $cap) {+ $wp_roles->add_cap('bmp_user', $cap);+ $wp_roles->add_cap('administrator', $cap);+ }+ } */++ $role = get_role('administrator');+ if ($role && !$role->has_cap('manage_bmp')) {+ $role->add_cap('manage_bmp');+ }+ }++++ /**+ * Define plugin-specific capabilities.+ *+ * In the future, you can expand this if you introduce finer-grained permissions.+ */+ /* private static function get_core_capabilities() {+ return array(+ 'core' => array(+ 'manage_bmp',+ ),+ );+ } */++++ /**+ * Remove WooCommerce roles.+ */+ public static function remove_roles()+ {+ global $wp_roles;++ if (!class_exists('WP_Roles')) {+ return;+ }++ if (!isset($wp_roles)) {+ $wp_roles = new WP_Roles();+ }++ remove_role('bmp_user');+ }+++ /**+ * Show action links on the plugin screen.+ *+ * @param mixed $links Plugin Action links.+ *+ * @return array+ */+ public static function plugin_action_links($links)+ {+ $action_links = array(+ 'settings' => '<a href="' . admin_url('admin.php?page=bmp-settings') . '" aria-label="' . esc_attr__('View Binary MLM Plan settings', 'binary-mlm-plan') . '">' . esc_html__('Settings', 'binary-mlm-plan') . '</a>',+ );++ return array_merge($action_links, $links);+ }+++ public static function insert_table_data()+ {+ global $wpdb;+ $count = $wpdb->get_var($wpdb->prepare("SELECT count(*) from {$wpdb->prefix}bmp_country where 1=%d", 1)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ if (empty($count) || $count < 239) {++ $sql = "INSERT INTO {$wpdb->prefix}bmp_country (`id`, `iso`, `name`, `iso3`, `numcode`) VALUES+ (1, 'AF', 'Afghanistan', 'AFG', 4),+ (2, 'AL', 'Albania', 'ALB', 8),+ (3, 'DZ', 'Algeria', 'DZA', 12),+ (4, 'AS', 'American Samoa', 'ASM', 16),+ (5, 'AD', 'Andorra', 'AND', 20),+ (6, 'AO', 'Angola', 'AGO', 24),+ (7, 'AI', 'Anguilla', 'AIA', 660),+ (8, 'AQ', 'Antarctica', NULL, NULL),+ (9, 'AG', 'Antigua and Barbuda', 'ATG', 28),+ (10, 'AR', 'Argentina', 'ARG', 32),+ (11, 'AM', 'Armenia', 'ARM', 51),+ (12, 'AW', 'Aruba', 'ABW', 533),+ (13, 'AU', 'Australia', 'AUS', 36),+ (14, 'AT', 'Austria', 'AUT', 40),+ (15, 'AZ', 'Azerbaijan', 'AZE', 31),+ (16, 'BS', 'Bahamas', 'BHS', 44),+ (17, 'BH', 'Bahrain', 'BHR', 48),+ (18, 'BD', 'Bangladesh', 'BGD', 50),+ (19, 'BB', 'Barbados', 'BRB', 52),+ (20, 'BY', 'Belarus', 'BLR', 112),+ (21, 'BE', 'Belgium', 'BEL', 56),+ (22, 'BZ', 'Belize', 'BLZ', 84),+ (23, 'BJ', 'Benin', 'BEN', 204),+ (24, 'BM', 'Bermuda', 'BMU', 60),+ (25, 'BT', 'Bhutan', 'BTN', 64),+ (26, 'BO', 'Bolivia', 'BOL', 68),+ (27, 'BA', 'Bosnia and Herzegovina', 'BIH', 70),+ (28, 'BW', 'Botswana', 'BWA', 72),+ (29, 'BV', 'Bouvet Island', NULL, NULL),+ (30, 'BR', 'Brazil', 'BRA', 76),+ (31, 'IO', 'British Indian Ocean Territory', NULL, NULL),+ (32, 'BN', 'Brunei Darussalam', 'BRN', 96),+ (33, 'BG', 'Bulgaria', 'BGR', 100),+ (34, 'BF', 'Burkina Faso', 'BFA', 854),+ (35, 'BI', 'Burundi', 'BDI', 108),+ (36, 'KH', 'Cambodia', 'KHM', 116),+ (37, 'CM', 'Cameroon', 'CMR', 120),+ (38, 'CA', 'Canada', 'CAN', 124),+ (39, 'CV', 'Cape Verde', 'CPV', 132),+ (40, 'KY', 'Cayman Islands', 'CYM', 136),+ (41, 'CF', 'Central African Republic', 'CAF', 140),+ (42, 'TD', 'Chad', 'TCD', 148),+ (43, 'CL', 'Chile', 'CHL', 152),+ (44, 'CN', 'China', 'CHN', 156),+ (45, 'CX', 'Christmas Island', NULL, NULL),+ (46, 'CC', 'Cocos (Keeling) Islands', NULL, NULL),+ (47, 'CO', 'Colombia', 'COL', 170),+ (48, 'KM', 'Comoros', 'COM', 174),+ (49, 'CG', 'Congo', 'COG', 178),+ (50, 'CD', 'Congo, the Democratic Republic of the', 'COD', 180),+ (51, 'CK', 'Cook Islands', 'COK', 184),+ (52, 'CR', 'Costa Rica', 'CRI', 188),+ (53, 'CI', 'Cote D''Ivoire', 'CIV', 384),+ (54, 'HR', 'Croatia', 'HRV', 191),+ (55, 'CU', 'Cuba', 'CUB', 192),+ (56, 'CY', 'Cyprus', 'CYP', 196),+ (57, 'CZ', 'Czech Republic', 'CZE', 203),+ (58, 'DK', 'Denmark', 'DNK', 208),+ (59, 'DJ', 'Djibouti', 'DJI', 262),+ (60, 'DM', 'Dominica', 'DMA', 212),+ (61, 'DO', 'Dominican Republic', 'DOM', 214),+ (62, 'EC', 'Ecuador', 'ECU', 218),+ (63, 'EG', 'Egypt', 'EGY', 818),+ (64, 'SV', 'El Salvador', 'SLV', 222),+ (65, 'GQ', 'Equatorial Guinea', 'GNQ', 226),+ (66, 'ER', 'Eritrea', 'ERI', 232),+ (67, 'EE', 'Estonia', 'EST', 233),+ (68, 'ET', 'Ethiopia', 'ETH', 231),+ (69, 'FK', 'Falkland Islands (Malvinas)', 'FLK', 238),+ (70, 'FO', 'Faroe Islands', 'FRO', 234),+ (71, 'FJ', 'Fiji', 'FJI', 242),+ (72, 'FI', 'Finland', 'FIN', 246),+ (73, 'FR', 'France', 'FRA', 250),+ (74, 'GF', 'French Guiana', 'GUF', 254),+ (75, 'PF', 'French Polynesia', 'PYF', 258),+ (76, 'TF', 'French Southern Territories', NULL, NULL),+ (77, 'GA', 'Gabon', 'GAB', 266),+ (78, 'GM', 'Gambia', 'GMB', 270),+ (79, 'GE', 'Georgia', 'GEO', 268),+ (80, 'DE', 'Germany', 'DEU', 276),+ (81, 'GH', 'Ghana', 'GHA', 288),+ (82, 'GI', 'Gibraltar', 'GIB', 292),+ (83, 'GR', 'Greece', 'GRC', 300),+ (84, 'GL', 'Greenland', 'GRL', 304),+ (85, 'GD', 'Grenada', 'GRD', 308),+ (86, 'GP', 'Guadeloupe', 'GLP', 312),+ (87, 'GU', 'Guam', 'GUM', 316),+ (88, 'GT', 'Guatemala', 'GTM', 320),+ (89, 'GN', 'Guinea', 'GIN', 324),+ (90, 'GW', 'Guinea-Bissau', 'GNB', 624),+ (91, 'GY', 'Guyana', 'GUY', 328),+ (92, 'HT', 'Haiti', 'HTI', 332),+ (93, 'HM', 'Heard Island and Mcdonald Islands', NULL, NULL),+ (94, 'VA', 'Holy See (Vatican City State)', 'VAT', 336),+ (95, 'HN', 'Honduras', 'HND', 340),+ (96, 'HK', 'Hong Kong', 'HKG', 344),+ (97, 'HU', 'Hungary', 'HUN', 348),+ (98, 'IS', 'Iceland', 'ISL', 352),+ (99, 'IN', 'India', 'IND', 356),+ (100, 'ID', 'Indonesia', 'IDN', 360),+ (101, 'IR', 'Iran, Islamic Republic of', 'IRN', 364),+ (102, 'IQ', 'Iraq', 'IRQ', 368),+ (103, 'IE', 'Ireland', 'IRL', 372),+ (104, 'IL', 'Israel', 'ISR', 376),+ (105, 'IT', 'Italy', 'ITA', 380),+ (106, 'JM', 'Jamaica', 'JAM', 388),+ (107, 'JP', 'Japan', 'JPN', 392),+ (108, 'JO', 'Jordan', 'JOR', 400),+ (109, 'KZ', 'Kazakhstan', 'KAZ', 398),+ (110, 'KE', 'Kenya', 'KEN', 404),+ (111, 'KI', 'Kiribati', 'KIR', 296),+ (112, 'KP', 'Korea, Democratic People''s Republic of', 'PRK', 408),+ (113, 'KR', 'Korea, Republic of', 'KOR', 410),+ (114, 'KW', 'Kuwait', 'KWT', 414),+ (115, 'KG', 'Kyrgyzstan', 'KGZ', 417),+ (116, 'LA', 'Lao People''s Democratic Republic', 'LAO', 418),+ (117, 'LV', 'Latvia', 'LVA', 428),+ (118, 'LB', 'Lebanon', 'LBN', 422),+ (119, 'LS', 'Lesotho', 'LSO', 426),+ (120, 'LR', 'Liberia', 'LBR', 430),+ (121, 'LY', 'Libyan Arab Jamahiriya', 'LBY', 434),+ (122, 'LI', 'Liechtenstein', 'LIE', 438),+ (123, 'LT', 'Lithuania', 'LTU', 440),+ (124, 'LU', 'Luxembourg', 'LUX', 442),+ (125, 'MO', 'Macao', 'MAC', 446),+ (126, 'MK', 'Macedonia, the Former Yugoslav Republic of', 'MKD', 807),+ (127, 'MG', 'Madagascar', 'MDG', 450),+ (128, 'MW', 'Malawi', 'MWI', 454),+ (129, 'MY', 'Malaysia', 'MYS', 458),+ (130, 'MV', 'Maldives', 'MDV', 462),+ (131, 'ML', 'Mali', 'MLI', 466),+ (132, 'MT', 'Malta', 'MLT', 470),+ (133, 'MH', 'Marshall Islands', 'MHL', 584),+ (134, 'MQ', 'Martinique', 'MTQ', 474),+ (135, 'MR', 'Mauritania', 'MRT', 478),+ (136, 'MU', 'Mauritius', 'MUS', 480),+ (137, 'YT', 'Mayotte', NULL, NULL),+ (138, 'MX', 'Mexico', 'MEX', 484),+ (139, 'FM', 'Micronesia, Federated States of', 'FSM', 583),+ (140, 'MD', 'Moldova, Republic of', 'MDA', 498),+ (141, 'MC', 'Monaco', 'MCO', 492),+ (142, 'MN', 'Mongolia', 'MNG', 496),+ (143, 'MS', 'Montserrat', 'MSR', 500),+ (144, 'MA', 'Morocco', 'MAR', 504),+ (145, 'MZ', 'Mozambique', 'MOZ', 508),+ (146, 'MM', 'Myanmar', 'MMR', 104),+ (147, 'NA', 'Namibia', 'NAM', 516),+ (148, 'NR', 'Nauru', 'NRU', 520),+ (149, 'NP', 'Nepal', 'NPL', 524),+ (150, 'NL', 'Netherlands', 'NLD', 528),+ (151, 'AN', 'Netherlands Antilles', 'ANT', 530),+ (152, 'NC', 'New Caledonia', 'NCL', 540),+ (153, 'NZ', 'New Zealand', 'NZL', 554),+ (154, 'NI', 'Nicaragua', 'NIC', 558),+ (155, 'NE', 'Niger', 'NER', 562),+ (156, 'NG', 'Nigeria', 'NGA', 566),+ (157, 'NU', 'Niue', 'NIU', 570),+ (158, 'NF', 'Norfolk Island', 'NFK', 574),+ (159, 'MP', 'Northern Mariana Islands', 'MNP', 580),+ (160, 'NO', 'Norway', 'NOR', 578),+ (161, 'OM', 'Oman', 'OMN', 512),+ (162, 'PK', 'Pakistan', 'PAK', 586),+ (163, 'PW', 'Palau', 'PLW', 585),+ (164, 'PS', 'Palestinian Territory, Occupied', NULL, NULL),+ (165, 'PA', 'Panama', 'PAN', 591),+ (166, 'PG', 'Papua New Guinea', 'PNG', 598),+ (167, 'PY', 'Paraguay', 'PRY', 600),+ (168, 'PE', 'Peru', 'PER', 604),+ (169, 'PH', 'Philippines', 'PHL', 608),+ (170, 'PN', 'Pitcairn', 'PCN', 612),+ (171, 'PL', 'Poland', 'POL', 616),+ (172, 'PT', 'Portugal', 'PRT', 620),+ (173, 'PR', 'Puerto Rico', 'PRI', 630),+ (174, 'QA', 'Qatar', 'QAT', 634),+ (175, 'RE', 'Reunion', 'REU', 638),+ (176, 'RO', 'Romania', 'ROM', 642),+ (177, 'RU', 'Russian Federation', 'RUS', 643),+ (178, 'RW', 'Rwanda', 'RWA', 646),+ (179, 'SH', 'Saint Helena', 'SHN', 654),+ (180, 'KN', 'Saint Kitts and Nevis', 'KNA', 659),+ (181, 'LC', 'Saint Lucia', 'LCA', 662),+ (182, 'PM', 'Saint Pierre and Miquelon', 'SPM', 666),+ (183, 'VC', 'Saint Vincent and the Grenadines', 'VCT', 670),+ (184, 'WS', 'Samoa', 'WSM', 882),+ (185, 'SM', 'San Marino', 'SMR', 674),+ (186, 'ST', 'Sao Tome and Principe', 'STP', 678),+ (187, 'SA', 'Saudi Arabia', 'SAU', 682),+ (188, 'SN', 'Senegal', 'SEN', 686),+ (189, 'CS', 'Serbia and Montenegro', NULL, NULL),+ (190, 'SC', 'Seychelles', 'SYC', 690),+ (191, 'SL', 'Sierra Leone', 'SLE', 694),+ (192, 'SG', 'Singapore', 'SGP', 702),+ (193, 'SK', 'Slovakia', 'SVK', 703),+ (194, 'SI', 'Slovenia', 'SVN', 705),+ (195, 'SB', 'Solomon Islands', 'SLB', 90),+ (196, 'SO', 'Somalia', 'SOM', 706),+ (197, 'ZA', 'South Africa', 'ZAF', 710),+ (198, 'GS', 'South Georgia and the South Sandwich Islands', NULL, NULL),+ (199, 'ES', 'Spain', 'ESP', 724),+ (200, 'LK', 'Sri Lanka', 'LKA', 144),+ (201, 'SD', 'Sudan', 'SDN', 736),+ (202, 'SR', 'Suriname', 'SUR', 740),+ (203, 'SJ', 'Svalbard and Jan Mayen', 'SJM', 744),+ (204, 'SZ', 'Swaziland', 'SWZ', 748),+ (205, 'SE', 'Sweden', 'SWE', 752),+ (206, 'CH', 'Switzerland', 'CHE', 756),+ (207, 'SY', 'Syrian Arab Republic', 'SYR', 760),+ (208, 'TW', 'Taiwan, Province of China', 'TWN', 158),+ (209, 'TJ', 'Tajikistan', 'TJK', 762),+ (210, 'TZ', 'Tanzania, United Republic of', 'TZA', 834),+ (211, 'TH', 'Thailand', 'THA', 764),+ (212, 'TL', 'Timor-Leste', NULL, NULL),+ (213, 'TG', 'Togo', 'TGO', 768),+ (214, 'TK', 'Tokelau', 'TKL', 772),+ (215, 'TO', 'Tonga', 'TON', 776),+ (216, 'TT', 'Trinidad and Tobago', 'TTO', 780),+ (217, 'TN', 'Tunisia', 'TUN', 788),+ (218, 'TR', 'Turkey', 'TUR', 792),+ (219, 'TM', 'Turkmenistan', 'TKM', 795),+ (220, 'TC', 'Turks and Caicos Islands', 'TCA', 796),+ (221, 'TV', 'Tuvalu', 'TUV', 798),+ (222, 'UG', 'Uganda', 'UGA', 800),+ (223, 'UA', 'Ukraine', 'UKR', 804),+ (224, 'AE', 'United Arab Emirates', 'ARE', 784),+ (225, 'GB', 'United Kingdom', 'GBR', 826),+ (226, 'US', 'United States', 'USA', 840),+ (227, 'UM', 'United States Minor Outlying Islands', NULL, NULL),+ (228, 'UY', 'Uruguay', 'URY', 858),+ (229, 'UZ', 'Uzbekistan', 'UZB', 860),+ (230, 'VU', 'Vanuatu', 'VUT', 548),+ (231, 'VE', 'Venezuela', 'VEN', 862),+ (232, 'VN', 'Viet Nam', 'VNM', 704),+ (233, 'VG', 'Virgin Islands, British', 'VGB', 92),+ (234, 'VI', 'Virgin Islands, U.s.', 'VIR', 850),+ (235, 'WF', 'Wallis and Futuna', 'WLF', 876),+ (236, 'EH', 'Western Sahara', 'ESH', 732),+ (237, 'YE', 'Yemen', 'YEM', 887),+ (238, 'ZM', 'Zambia', 'ZMB', 894),+ (239, 'ZW', 'Zimbabwe', 'ZWE', 716)";++ $wpdb->query($sql); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ }++ $countCor = $wpdb->get_var($wpdb->prepare("SELECT count(*) from {$wpdb->prefix}bmp_currency where 1 = %d", 1)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $b = '$b';+ $U = '$U';+ if (empty($countCor) || $countCor < 168) {++ $sql = "INSERT INTO {$wpdb->prefix}bmp_currency (`id`, `iso3`, `symbol`, `currency`) VALUES+ (1, 'AED', '', 'Emirati Dirham'),+ (2, 'AFN', '؋', 'Afghan Afghani'),+ (3, 'ALL', 'Lek', 'Albanian Lek'),+ (4, 'AMD', '', 'Armenian Dram'),+ (5, 'ANG', 'ƒ', 'Dutch Guilder'),+ (6, 'AOA', '', 'Angolan Kwanza'),+ (7, 'ARS', '$', 'Argentine Peso'),+ (8, 'AUD', '$', 'Australian Dollar'),+ (9, 'AWG', 'ƒ', 'Aruban or Dutch Guilder'),+ (10, 'AZN', '₼', 'Azerbaijani New Manat'),+ (11, 'BAM', 'KM', 'Bosnian Convertible Marka'),+ (12, 'BBD', '$', 'Barbadian or Bajan Dollar'),+ (13, 'BDT', '', 'Bangladeshi Taka'),+ (14, 'BGN', 'лв', 'Bulgarian Lev'),+ (15, 'BHD', '', 'Bahraini Dinar'),+ (16, 'BIF', '', 'Burundian Franc'),+ (17, 'BMD', '$', 'Bermudian Dollar'),+ (18, 'BND', '$', 'Bruneian Dollar'),+ (19, 'BOB', '$b', 'Bolivian Boliviano'),+ (20, 'BRL', 'R$', 'Brazilian Real'),+ (21, 'BSD', '$', 'Bahamian Dollar'),+ (22, 'BTN', '', 'Bhutanese Ngultrum'),+ (23, 'BWP', 'P', 'Botswana Pula'),+ (24, 'BYR', 'Br', 'Belarusian Ruble'),+ (25, 'BZD', 'BZ$', 'Belizean Dollar'),+ (26, 'CAD', '$', 'Canadian Dollar'),+ (27, 'CDF', '', 'Congolese Franc'),+ (28, 'CHF', 'CHF', 'Swiss Franc'),+ (29, 'CLP', '$', 'Chilean Peso'),+ (30, 'CNY', '¥', 'Chinese Yuan Renminbi'),+ (31, 'COP', '$', 'Colombian Peso'),+ (32, 'CRC', '₡', 'Costa Rican Colon'),+ (33, 'CUC', '', 'Cuban Convertible Peso'),+ (34, 'CUP', '₱', 'Cuban Peso'),+ (35, 'CVE', '', 'Cape Verdean Escudo'),+ (36, 'CZK', 'Kč', 'Czech Koruna'),+ (37, 'DJF', '', 'Djiboutian Franc'),+ (38, 'DKK', 'kr', 'Danish Krone'),+ (39, 'DOP', 'RD$', 'Dominican Peso'),+ (40, 'DZD', '', 'Algerian Dinar'),+ (41, 'EGP', '£', 'Egyptian Pound'),+ (42, 'ERN', '', 'Eritrean Nakfa'),+ (43, 'ETB', '', 'Ethiopian Birr'),+ (44, 'EUR', '€', 'Euro'),+ (45, 'FJD', '$', 'Fijian Dollar'),+ (46, 'FKP', '£', 'Falkland Island Pound'),+ (47, 'GBP', '£', 'British Pound'),+ (48, 'GEL', '', 'Georgian Lari'),+ (49, 'GGP', '£', 'Guernsey Pound'),+ (50, 'GHS', '¢', 'Ghanaian Cedi'),+ (51, 'GIP', '£', 'Gibraltar Pound'),+ (52, 'GMD', '', 'Gambian Dalasi'),+ (53, 'GNF', '', 'Guinean Franc'),+ (54, 'GTQ', 'Q', 'Guatemalan Quetzal'),+ (55, 'GYD', '$', 'Guyanese Dollar'),+ (56, 'HKD', '$', 'Hong Kong Dollar'),+ (57, 'HNL', 'L', 'Honduran Lempira'),+ (58, 'HRK', 'kn', 'Croatian Kuna'),+ (59, 'HTG', '', 'Haitian Gourde'),+ (60, 'HUF', 'Ft', 'Hungarian Forint'),+ (61, 'IDR', 'Rp', 'Indonesian Rupiah'),+ (62, 'ILS', '₪', 'Israeli Shekel'),+ (63, 'IMP', '£', 'Isle of Man Pound'),+ (64, 'INR', '₹', 'Indian Rupee'),+ (65, 'IQD', '', 'Iraqi Dinar'),+ (66, 'IRR', '﷼', 'Iranian Rial'),+ (67, 'ISK', 'kr', 'Icelandic Krona'),+ (68, 'JEP', '£', 'Jersey Pound'),+ (69, 'JMD', 'J$', 'Jamaican Dollar'),+ (70, 'JOD', '', 'Jordanian Dinar'),+ (71, 'JPY', '¥', 'Japanese Yen'),+ (72, 'KES', '', 'Kenyan Shilling'),+ (73, 'KGS', 'лв', 'Kyrgyzstani Som'),+ (74, 'KHR', '៛', 'Cambodian Riel'),+ (75, 'KMF', '', 'Comoran Franc'),+ (76, 'KPW', '₩', 'North Korean Won'),+ (77, 'KRW', '₩', 'South Korean Won'),+ (78, 'KWD', '', 'Kuwaiti Dinar'),+ (79, 'KYD', '$', 'Caymanian Dollar'),+ (80, 'KZT', 'лв', 'Kazakhstani Tenge'),+ (81, 'LAK', '₭', 'Lao or Laotian Kip'),+ (82, 'LBP', '£', 'Lebanese Pound'),+ (83, 'LKR', '₨', 'Sri Lankan Rupee'),+ (84, 'LRD', '$', 'Liberian Dollar'),+ (85, 'LSL', '', 'Basotho Loti'),+ (86, 'LTL', '', 'Lithuanian Litas'),+ (87, 'LVL', '', 'Latvian Lat'),+ (88, 'LYD', '', 'Libyan Dinar'),+ (89, 'MAD', '', 'Moroccan Dirham'),+ (90, 'MDL', '', 'Moldovan Leu'),+ (91, 'MGA', '', 'Malagasy Ariary'),+ (92, 'MKD', 'ден', 'Macedonian Denar'),+ (93, 'MMK', '', 'Burmese Kyat'),+ (94, 'MNT', '₮', 'Mongolian Tughrik'),+ (95, 'MOP', '', 'Macau Pataca'),+ (96, 'MRO', '', 'Mauritanian Ouguiya'),+ (97, 'MUR', '₨', 'Mauritian Rupee'),+ (98, 'MVR', '', 'Maldivian Rufiyaa'),+ (99, 'MWK', '', 'Malawian Kwacha'),+ (100, 'MXN', '$', 'Mexican Peso'),+ (101, 'MYR', 'RM', 'Malaysian Ringgit'),+ (102, 'MZN', 'MT', 'Mozambican Metical'),+ (103, 'NAD', '$', 'Namibian Dollar'),+ (104, 'NGN', '₦', 'Nigerian Naira'),+ (105, 'NIO', 'C$', 'Nicaraguan Cordoba'),+ (106, 'NOK', 'kr', 'Norwegian Krone'),+ (107, 'NPR', '₨', 'Nepalese Rupee'),+ (108, 'NZD', '$', 'New Zealand Dollar'),+ (109, 'OMR', '﷼', 'Omani Rial'),+ (110, 'PAB', 'B/.', 'Panamanian Balboa'),+ (111, 'PEN', 'S/.', 'Peruvian Nuevo Sol'),+ (112, 'PGK', '', 'Papua New Guinean Kina'),+ (113, 'PHP', '₱', 'Philippine Peso'),+ (114, 'PKR', '₨', 'Pakistani Rupee'),+ (115, 'PLN', 'zł', 'Polish Zloty'),+ (116, 'PYG', 'Gs', 'Paraguayan Guarani'),+ (117, 'QAR', '﷼', 'Qatari Riyal'),+ (118, 'RON', 'lei', 'Romanian New Leu'),+ (119, 'RSD', 'Дин.', 'Serbian Dinar'),+ (120, 'RUB', '₽', 'Russian Ruble'),+ (121, 'RWF', '', 'Rwandan Franc'),+ (122, 'SAR', '﷼', 'Saudi or Saudi Arabian Riyal'),+ (123, 'SBD', '$', 'Solomon Islander Dollar'),+ (124, 'SCR', '₨', 'Seychellois Rupee'),+ (125, 'SDG', '', 'Sudanese Pound'),+ (126, 'SEK', 'kr', 'Swedish Krona'),+ (127, 'SGD', '$', 'Singapore Dollar'),+ (128, 'SHP', '£', 'Saint Helenian Pound'),+ (129, 'SLL', '', 'Sierra Leonean Leone'),+ (130, 'SOS', 'S', 'Somali Shilling'),+ (131, 'SPL', '', 'Seborgan Luigino'),+ (132, 'SRD', '$', 'Surinamese Dollar'),+ (133, 'STD', '', 'Sao Tomean Dobra'),+ (134, 'SVC', '$', 'Salvadoran Colon'),+ (135, 'SYP', '£', 'Syrian Pound'),+ (136, 'SZL', '', 'Swazi Lilangeni'),+ (137, 'THB', '฿', 'Thai Baht'),+ (138, 'TJS', '', 'Tajikistani Somoni'),+ (139, 'TMT', '', 'Turkmenistani Manat'),+ (140, 'TND', '', 'Tunisian Dinar'),+ (141, 'TOP', '', 'Tongan Pa''anga'),+ (142, 'TRY', '', 'Turkish Lira'),+ (143, 'TTD', 'TT$', 'Trinidadian Dollar'),+ (144, 'TVD', '$', 'Tuvaluan Dollar'),+ (145, 'TWD', 'NT$', 'Taiwan New Dollar'),+ (146, 'TZS', '', 'Tanzanian Shilling'),+ (147, 'UAH', '₴', 'Ukrainian Hryvna'),+ (148, 'UGX', '', 'Ugandan Shilling'),+ (149, 'USD', '$', 'US Dollar'),+ (150, 'UYU', '$U', 'Uruguayan Peso'),+ (151, 'UZS', 'лв', 'Uzbekistani Som'),+ (152, 'VEF', 'Bs', 'Venezuelan Bolivar Fuerte'),+ (153, 'VND', '₫', 'Vietnamese Dong'),+ (154, 'VUV', '', 'NiVanuatu Vatu'),+ (155, 'WST', '', 'Samoan Tala'),+ (156, 'XAF', '', 'Central African CFA Franc BEAC'),+ (157, 'XAG', '', 'Silver Ounce'),+ (158, 'XAU', '', 'Gold Ounce'),+ (159, 'XCD', '$', 'East Caribbean Dollar'),+ (160, 'XDR', '', 'IMF Special Drawing Rights'),+ (161, 'XOF', '', 'CFA Franc'),+ (162, 'XPD', '', 'Palladium Ounce'),+ (163, 'XPF', '', 'CFP Franc'),+ (164, 'XPT', '', 'Platinum Ounce'),+ (165, 'YER', '﷼', 'Yemeni Rial'),+ (166, 'ZAR', 'R', 'South African Rand'),+ (167, 'ZMK', '', 'Zambian Kwacha'),+ (168, 'ZWD', 'Z$', 'Zimbabwean Dollar')";++ $wpdb->query($sql); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ }+ }++ public static function get_pages_array()+ {+ return apply_filters(+ 'bmp_create_pages',+ array(+ 'register' => array(+ 'name' => _x('Register', 'Page slug', 'binary-mlm-plan'),+ 'title' => _x('Register', 'Page title', 'binary-mlm-plan'),+ 'tag' => '[bmp_register]',+ 'content' => '[bmp_register]',+ ),+ 'join-network' => array(+ 'name' => _x('Join Network', 'Page slug', 'binary-mlm-plan'),+ 'title' => _x('Join Network', 'Page title', 'binary-mlm-plan'),+ 'tag' => '[join_network]',+ 'content' => '[join_network]',+++ ),+ 'downlines' => array(+ 'name' => _x('Downlines', 'Page slug', 'binary-mlm-plan'),+ 'title' => _x('Downlines', 'Page title', 'binary-mlm-plan'),+ 'tag' => '[bmp_genealogy]',+ 'content' => '[bmp_genealogy]',+++ ),+ 'bmp-acccount-detail' => array(+ 'name' => _x('Bmp Account Detail', 'Page slug', 'binary-mlm-plan'),+ 'title' => _x('Bmp Account Detail', 'Page title', 'binary-mlm-plan'),+ 'tag' => '[bmp_account_detail]',+ 'content' => '[bmp_account_detail]',+++ ),++ )+ );+ }+++ public static function create_pages()+ {++ $pages = self::get_pages_array();++ foreach ($pages as $key => $page) {++ bmp_create_page(esc_sql($page['name']), 'bmp_' . $key . '_page_id', $page['title'], $page['content'], !empty($page['parent']) ? bmp_get_page_id($page['parent']) : '');+ }+ }+ public function bmp_create_page($page_title = '', $page_content = '')+ {+ global $wpdb;+ $page_data = array(+ 'post_status' => 'publish',+ 'post_type' => 'page',+ 'post_title' => $page_title,+ 'post_content' => $page_content,++ );++ $page_id = wp_insert_post($page_data);+ update_post_meta($page_id, 'bmp_page_title', $page_title);+ return $page_id;+ }+}++BMP_Install::init();
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/class-bmp.php@@ -0,0 +1,166 @@+<?php++/**+ * Bmp setup+ *+ * @package Bmp+ * @since 1.0.0+ */++if (!defined('ABSPATH')) {+ exit;+}++/**+ * Main Bmp Class.+ *+ * @class Bmp+ */+final class Bmp+{++ public $version = '1.0.0';++ protected static $_instance = null;++ public $session = null;+++ public $query = null;++ public $product_factory = null;++ public $countries = null;+++ public $integrations = null;+++ public $cart = null;+++ public $customer = null;++ public $order_factory = null;++ public $structured_data = null;++ public $deprecated_hook_handlers = array();++ public static function instance()+ {+ if (is_null(self::$_instance)) {+ self::$_instance = new self();+ }+ return self::$_instance;+ }++++ public function __construct()+ {+ $this->define_constants();+ $this->includes();+ $this->init_hooks();++ do_action('bmp_loaded');+ }++++ private function init_hooks()+ {++ register_activation_hook(BMP_PLUGIN_FILE, array('BMP_Install', 'install'));+ add_action('init', array($this, 'init'), 0);++ register_deactivation_hook(BMP_PLUGIN_FILE, array('BMP_Install', 'deactivate'));++ register_uninstall_hook(BMP_PLUGIN_FILE, 'uninstall');+ }+++ public function init()+ {+ $this->load_plugin_textdomain();++ if (!session_id()) {+ session_start();+ }+ }+++ private function define_constants()+ {+ $upload_dir = wp_upload_dir(null, false);++ $this->define('BMP_ABSPATH', dirname(BMP_PLUGIN_FILE) . '/');+ $this->define('BMP_PLUGIN_BASENAME', plugin_basename(BMP_PLUGIN_FILE));+ $this->define('BMP_VERSION', $this->version);+ }+++ private function define($name, $value)+ {+ if (!defined($name)) {+ define($name, $value);+ }+ }+++ private function is_request($type)+ {+ switch ($type) {+ case 'admin':+ return is_admin();+ case 'ajax':+ return defined('DOING_AJAX');+ case 'cron':+ return defined('DOING_CRON');+ case 'frontend':+ return (!is_admin() || defined('DOING_AJAX')) && !defined('DOING_CRON') && !defined('REST_REQUEST');+ }+ }+++ public function includes()+ {+++ include_once BMP_ABSPATH . 'includes/bmp-hooks.php';+ include_once BMP_ABSPATH . 'includes/bmp-hook-functions.php';+ include_once BMP_ABSPATH . 'includes/class-bmp-install.php';+ include_once BMP_ABSPATH . 'includes/catalog/class-bmp-template.php';++ // templates files+ include_once BMP_ABSPATH . 'templates/bmp-register.php';+ include_once BMP_ABSPATH . 'templates/bmp-account-detail.php';+ include_once BMP_ABSPATH . 'templates/bmp-downlines.php';+ include_once BMP_ABSPATH . 'templates/bmp-join-network.php';+++ if ($this->is_request('admin')) {+ include_once BMP_ABSPATH . 'includes/admin/class-bmp-admin.php';+ }++ //BMP_Install::create_pages();+ }++ public function load_plugin_textdomain()+ {+ $locale = is_admin() && function_exists('get_user_locale') ? get_user_locale() : get_locale();+ $locale = apply_filters('plugin_locale', $locale, 'binary-mlm-plan');++ }+++ public function plugin_url()+ {+ return untrailingslashit(plugins_url('/', BMP_PLUGIN_FILE));+ }++ public function plugin_path()+ {+ return untrailingslashit(plugin_dir_path(BMP_PLUGIN_FILE));+ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/includes/classs-bmp-uninstaller.php@@ -0,0 +1,37 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}+class bmp_Uninstall+{+ public function uninstall()+ {+ global $wpdb;++ $tables = array(+ "{$wpdb->prefix}bmp_users",+ "{$wpdb->prefix}bmp_leftposition",+ "{$wpdb->prefix}bmp_rightposition",+ "{$wpdb->prefix}bmp_country",+ "{$wpdb->prefix}bmp_currency",+ "{$wpdb->prefix}bmp_payout",+ "{$wpdb->prefix}bmp_referral_commission",+ "{$wpdb->prefix}bmp_epins",+ );+++ foreach ($tables as $table) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange + $wpdb->query("DROP TABLE IF EXISTS {$table}");++ }++ $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '%bmp_%';"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching++ // Delete users & usermeta.++ $wp_roles = new WP_Roles();+ $wp_roles->remove_role("bmp_user");+ session_destroy();+ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/templates/bmp-account-detail.php@@ -0,0 +1,19 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}+class BmpAccountDetials+{+ public function getUserDetails()+ {+ do_action('bmp_user_check_validate');+ if (isset($_GET['payout-id']) && !empty($_GET['payout-id'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $payout_id = sanitize_text_field(wp_unslash($_GET['payout-id'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended + do_action('bmp_user_payout_detail', $payout_id);+ } else {+ do_action('bmp_user_account_detail');+ do_action('bmp_user_payout_list');+ do_action('bmp_user_downlines_list');+ }+ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/templates/bmp-downlines.php@@ -0,0 +1,39 @@+<?php+class BmpGenealogy+{+ public function view_genealogy()+ {+ do_action('bmp_user_check_validate'); ?>+ <div id="full-container " class="container" style="position: relative;top: 25px;">+ <button class="btn btn-dark" onclick="params.funcs.toggleFullScreen()"><i class="fa fa-expand" aria-hidden="true"></i></button>+ <button class="btn btn-dark" onclick="params.funcs.search()"><i class="fa fa-search" aria-hidden="true"></i></button>+ <button class="btn btn-dark" onclick="params.funcs.showMySelf()"><span class='icon'> <i class="fa fa-user" aria-hidden="true"></i></span></button>+ <button class="btn btn-dark" onclick="params.funcs.expandAll()"><i class="fa fa-plus-circle" aria-hidden="true"></i></button>+ <button class="btn btn-dark" onclick="params.funcs.collapseAll()"><i class="fa fa-minus-circle" aria-hidden="true"></i>+ </button>+ <div class="user-search-box">+ <div class="input-box">+ <div class="fs-3 ps-2 text-danger">+ <i onclick="params.funcs.closeSearchBox()" class="fa fa-close" aria-hidden="true"></i>+ </div>+ <div class="input-wrapper">+ <input type="text" class="search-input" placeholder="<?php esc_html_e('Search', 'binary-mlm-plan'); ?>" />+ <div class="input-bottom-placeholder">+ <?php esc_html_e('By Username, Sponsor, userkey, position', 'binary-mlm-plan'); ?>+ </div>+ </div>+ <div>+ </div>+ </div>+ <div class="result-box">+ <div class="result-header"><?php esc_html_e('RESULTS', 'binary-mlm-plan'); ?> </div>+ <div class="result-list">+ <div class="buffer"></div>+ </div>+ </div>+ </div>+ <div id="svgChart" class="container col-md-12"></div>+ </div>+<?php+ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/templates/bmp-join-network.php@@ -0,0 +1,68 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}+class BmpJoinNetwork+{+ public function joinNetwork()+ {+ global $current_user, $wpdb;+ $user_roles = $current_user->roles;++ if (!empty($current_user->ID)) {+ if (!in_array('bmp_user', $user_roles)) {+ $bmp_users = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_users where payment_status=%s", '1')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+?>+ <div class="container">+ <div class="layer">+ <div class="myloader"></div>+ </div>+ <div class="d-block m-auto">+ <h4 class="text-center mt-3"><?php esc_html_e('Join Binary Mlm Plan', 'binary-mlm-plan'); ?></h4>+ <form id="bmp_join_network_form" action="">+ <?php wp_nonce_field('bmp_nonce_action', 'bmp_nonce'); ?>+ <input type="hidden" name="action" value="bmp_join_network">+ <div class="form-group mb-3">+ <label for="joisponsor" class="form-label"><?php esc_html_e('SPONSER', 'binary-mlm-plan'); ?></label>+ <select class="form-control " name="bmp_join_sponser" id="bmp_sponsor_id" required="">+ <option value="" disabled selected><?php esc_html_e('Select Sponser', 'binary-mlm-plan'); ?></option>+ <?php foreach ($bmp_users as $bmp_user) { ?>+ <option value="<?php echo esc_attr($bmp_user->user_id); ?>"><?php echo esc_html($bmp_user->user_name); ?></option>+ <?php } ?>+ </select>+ </div>++ <div class="form-group mb-3">+ <label for="joisponsor" class="form-label"><?php esc_html_e('LEG', 'binary-mlm-plan'); ?></label>+ <select class="form-control " name="bmp_join_leg" id="bmp_position" required="">+ <option value="" disabled selected><?php esc_html_e('Select Leg', 'binary-mlm-plan'); ?></option>+ <option value="left"><?php esc_html_e('Left', 'binary-mlm-plan'); ?></option>+ <option value="right"><?php esc_html_e('Right', 'binary-mlm-plan'); ?></option>+ </select>+ <div class="bmp_position_message"></div>+ </div>++ <div class="form-group mb-3">+ <label for="joiepin" class="form-label"><?php esc_html_e('Epin', 'binary-mlm-plan'); ?></label>+ <input id="bmp_join_epin" name="bmp_join_epin" type="text" class="form-control " placeholder="<?php esc_html_e('Epin', 'binary-mlm-plan'); ?>" value="" required>+ <div class="bmp_epin_join_message"></div>+ </div>++ <div class="row my-3">+ <div class="col-md-12 col-md-offset-5">+ <button type="submit" class="button btn-primary d-block "><?php esc_html_e('Join', 'binary-mlm-plan'); ?></button>+ </div>+ </div>+ <div id="bmp_user_success_message" style="text-align:center;color:green; margin-bottom:5px"></div>+ </form>+ </div>+ </div>+<?php+ } else {+ echo "<h4 style='text-align:center'>You are Already Mlm User </h4>";+ }+ } else {+ echo "<h4 style='text-align:center'> Please Login </h4>";+ }+ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/templates/bmp-register.php@@ -0,0 +1,173 @@+<?php+if (!defined('ABSPATH')) {+ exit;+}++class BmpRegistration+{++ function getRegistrationForm()+ {+ global $wpdb, $current_user;+ $bmp_users = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_users WHERE payment_status=%s", '1')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ if (is_user_logged_in()) {+ $sponsor_id = esc_attr($current_user->ID);+ } else {+ $sponsor_id = '';+ }+ if (isset($_REQUEST['position']) && !empty($_REQUEST['position'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $position = esc_attr(sanitize_text_field(wp_unslash($_REQUEST['position']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $position_diabled = "disabled";+ } else {+ $position = '';+ $position_diabled = "";+ }+ if (isset($_GET['k']) && !empty($_GET['k'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $parent_key = esc_attr(sanitize_text_field(wp_unslash($_GET['k']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ } else {+ $parent_key = '';+ }+ if (!empty($sponsor_id)) {+ $selected = 'selected';+ $disabled = 'disabled';+ } else {+ $selected = '';+ $disabled = '';+ }+++?>+ <div class="container-fluid">+ <div class="layer">+ <div class="myloader"></div>+ </div>+ <div class="col-md-12">+ <h3 class="register-heading"><?php esc_html_e('Apply For Binary MLM Plan', 'binary-mlm-plan'); ?></h3>+ <div class="row">+ <div class="text-center" id="bmp_user_success_message"></div>+ <form id="bmp_register_form" name="bmp_register_form" action="" method="POST">+ <?php wp_nonce_field('bmp_nonce_action', 'bmp_nonce'); ?>+ <input type="hidden" name="action" value="bmp_user_register">+ <input type="hidden" name="parent_key" value="<?php echo esc_html($parent_key); ?>">+ <div class="row">+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <input id="bmp_username" name="bmp_username" type="text" class="form-control" placeholder="<?php esc_html_e('User Name *', 'binary-mlm-plan'); ?>" value="" required>+ <div class="bmp_username_message"></div>+ </div>+ </div>+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <input id="bmp_email" name="bmp_email" type="email" class="form-control" placeholder="<?php esc_html_e('Your Email *', 'binary-mlm-plan'); ?>" value="" required>+ <div class="bmp_email_message"></div>+ </div>+ </div>+ </div>+ <div class="row">+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <input id="bmp_first_name" name="bmp_first_name" type="text" class="form-control" placeholder="<?php esc_html_e('First Name *', 'binary-mlm-plan'); ?>" value="" required>+ <div class="bmp_first_name_message"></div>+ </div>+ </div>+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <input id="bmp_last_name" name="bmp_last_name" type="text" class="form-control" placeholder="<?php esc_html_e('Last Name *', 'binary-mlm-plan'); ?>" value="" required>+ <div class="bmp_last_name_message"></div>+ </div>+ </div>+ </div>+ <div class="row">+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <input id="bmp_password" name="bmp_password" type="password" class="form-control" placeholder="<?php esc_html_e('Password *', 'binary-mlm-plan'); ?>" value="" required>+ <div class="bmp_password_message"></div>+ </div>+ </div>+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <input id="bmp_confirm_password" name="bmp_confirm_password" type="password" class="form-control" placeholder="<?php esc_html_e('Confirm Password *', 'binary-mlm-plan'); ?>" value="" required>+ <div class="bmp_confirm_password_message"></div>+ </div>+ </div>+ </div>+ <div class="row">+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <input id="bmp_phone" name="bmp_phone" type="text" minlength="10" maxlength="10" class="form-control" placeholder="<?php esc_html_e('Your Phone *', 'binary-mlm-plan'); ?>" value="" required>+ <div class="bmp_phone_message"></div>+ </div>+ </div>+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <?php+ if ($disabled) {++ ?>+ <select id="bmp_sponsor_id" name="bmp_sponsor_id" class="form-control" required <?php echo esc_attr($disabled); ?>>+ <option value=""><?php esc_html_e('Please select your Sponsor', 'binary-mlm-plan'); ?></option>+ <?php foreach ($bmp_users as $bmp_user) { ?>+ <option value="<?php echo esc_attr($bmp_user->user_id); ?>" <?php echo ($sponsor_id == $bmp_user->user_id) ? esc_attr($selected) : ''; ?>><?php echo esc_html($bmp_user->user_name); ?></option>+ <?php } ?>++ </select>+ <input type="hidden" name="bmp_sponsor_id" value="<?php echo esc_attr($sponsor_id); ?>">+ <?php } else { ?>+ <select id="bmp_sponsor_id" name="bmp_sponsor_id" class="form-control" required>+ <option value=""><?php esc_html_e('Please select your Sponsor', 'binary-mlm-plan'); ?></option>+ <?php foreach ($bmp_users as $bmp_user) { ?>+ <option value="<?php echo esc_attr($bmp_user->user_id); ?>" <?php echo ($sponsor_id == $bmp_user->user_id) ? esc_attr($selected) : ''; ?>><?php echo esc_html($bmp_user->user_name); ?></option>+ <?php } ?>++ </select>+ <?php } ?>+ <div class="bmp_sponsor_message"></div>+ </div>+ </div>+ </div>+ <div class="row">+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <?php if ($position_diabled) { ?>+ <select name="bmp_position" id="bmp_position" class="form-control" required <?php echo esc_attr($position_diabled); ?>>+ <option value=""><?php esc_html_e('Select Position', 'binary-mlm-plan'); ?></option>+ <option value="left" <?php echo ($position == 'left') ? esc_attr($selected) : ''; ?>><?php esc_html_e('Left', 'binary-mlm-plan'); ?></option>+ <option value="right" <?php echo ($position == 'right') ? esc_attr($selected) : ''; ?>><?php esc_html_e('Right', 'binary-mlm-plan'); ?></option>+ </select>+ <input type="hidden" name="bmp_position" value="<?php echo esc_attr($position); ?>">+ <?php } else {+ ?>+ <select name="bmp_position" id="bmp_position" class="form-control" required>+ <option value=""><?php esc_html_e('Select Position', 'binary-mlm-plan'); ?></option>+ <option value="left" <?php echo ($position == 'left') ? esc_attr($selected) : ''; ?>><?php esc_html_e('Left', 'binary-mlm-plan'); ?></option>+ <option value="right" <?php echo ($position == 'right') ? esc_attr($selected) : ''; ?>><?php esc_html_e('Right', 'binary-mlm-plan'); ?></option>+ </select>+ <?php+ } ?>+ <div class="bmp_position_message"></div>+ </div>+ </div>+ <div class="col-md-6 mb-3">+ <div class="form-group">+ <input id="bmp_epin" name="bmp_epin" type="text" class="form-control" placeholder="<?php esc_html_e('Epin Optional', 'binary-mlm-plan'); ?>" value="">++ <div class="bmp_epin_message"></div>+ </div>+ </div>++ </div>+ <div class="col-md-12 text-center">+ <input type="submit" class="btn button btn-primary" value="Register" />+ </div>+ </form>+ <span>+ <?php esc_html_e('Already have an account? ', 'binary-mlm-plan'); ?>+ <a href="<?php bloginfo('url'); ?>/wp-login.php" class="text-success"><?php esc_html_e('here', 'binary-mlm-plan'); ?></a>+ </span>+ </div>+ </div>+ </div>+<?php++ }+}
--- /dev/null+++ cache/binary-mlm-plan_5.0/5.0/uninstall.php@@ -0,0 +1,12 @@+<?php++//this check makes sure that this file is called manually.+if (!defined("WP_UNINSTALL_PLUGIN")) + exit();++//put plugin uninstall code here++include_once dirname(__FILE__) . '/includes/classs-bmp-uninstaller.php';++$uninstall= new bmp_Uninstall;+$uninstall->uninstall();
--- cache/binary-mlm-plan_4.0/binary-mlm-plan.php 2025-12-04 20:27:51.601236443 +0000+++ cache/binary-mlm-plan_5.0/binary-mlm-plan.php 2025-12-04 20:29:32.815675078 +0000@@ -3,18 +3,21 @@ /** * Plugin Name: Binary MLM Plan * Plugin URI: https://www.mlmtrees.com/product/bmp-pro-wordpress/- * Description: Binary MLM Plan with ePin is a plugn and play plugin which helps to manage binary networks within the WordPress CMS. Binary MLM Plan Software is suitable for all of MLM organizations.- * Version: 4.0+ * Description: Binary MLM Plan with ePin is a plug-and-play plugin which helps to manage binary networks within WordPress. Binary MLM Plan Software is suitable for all MLM organizations.+ * Version: 5.0 * Author: LetsCMS * Author URI: https://letscms.com * Text Domain: binary-mlm-plan * License: GPL-2.0 or later- * Requires at least: 6.8.1- * Requires PHP: 8.0+ * License URI: https://www.gnu.org/licenses/gpl-2.0.html+ * Requires at least: 6.0.2+ * Tested up to: 6.8+ * Requires PHP: 8.0 * * @package BMP */ + if (!defined('ABSPATH')) { exit; // Exit if accessed directly. }
--- cache/binary-mlm-plan_4.0/includes/admin/class-bmp-admin-genealogy.php 2025-12-04 20:27:51.601236443 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/class-bmp-admin-genealogy.php 2025-12-04 20:29:32.815675078 +0000@@ -2,10 +2,7 @@ class Bmp_Admin_Genealogy { public function view_genealogy() - { - - -?> + { ?> <div id="full-container " class="container" style="position: relative;top: 25px;"> <button class="btn btn-dark" onclick="params.funcs.toggleFullScreen()"><i class="fa fa-expand" aria-hidden="true"></i></button> <button class="btn btn-dark" onclick="params.funcs.search()"><i class="fa fa-search" aria-hidden="true"></i></button>
--- cache/binary-mlm-plan_4.0/includes/admin/class-bmp-admin-menus.php 2025-12-04 20:27:51.601236443 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/class-bmp-admin-menus.php 2025-12-04 20:29:32.815675078 +0000@@ -35,8 +35,9 @@ public function settings_menu() {--+ if (!current_user_can('administrator') ) {+ return;+ } $settings_page = add_submenu_page('binary-mlm-plan', __('Binary MLM Plan settings', 'binary-mlm-plan'), __('Settings', 'binary-mlm-plan'), 'manage_bmp', 'bmp-settings', array($this, 'settings_page')); add_action('load-' . $settings_page, array($this, 'settings_page_init')); add_submenu_page('bmp-settings', __('User Reports', 'binary-mlm-plan'), __('User Reports', 'binary-mlm-plan'), 'manage_bmp', 'bmp-user-reports', array($this, 'bmp_user_reports'));@@ -50,7 +51,6 @@ public function bmp_user_reports() {- // BMP_Admin_Assets::bmp_scripts(); $BMP_Admin_users_Reports = new BMP_Admin_users_Reports; $BMP_Admin_users_Reports->get_users_reports();
--- cache/binary-mlm-plan_4.0/includes/admin/settings/class-bmp-settings-general.php 2025-12-04 20:27:51.601236443 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/settings/class-bmp-settings-general.php 2025-12-04 20:29:32.815675078 +0000@@ -167,7 +167,7 @@ public function save() { global $current_section;-+ if (isset($_POST['bmp_nonce']) && !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['bmp_nonce'])), 'bmp_nonce_action')) { wp_die('Security check'); } else {@@ -234,15 +234,16 @@ $user_key = bmp_generateKey(); $wpdb->query($wpdb->prepare( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching- "INSERT INTO {$wpdb->prefix}bmp_users (user_id, user_name, user_key, parent_key, sponsor_key, position, payment_status)- VALUES(%d, %s, %s, %s, %s, %s, %s)",+ "INSERT INTO {$wpdb->prefix}bmp_users (user_id, user_name, user_key, parent_key, sponsor_key, position, payment_status, payment_date)+ VALUES(%d, %s, %s, %s, %s, %s, %s, %s)", $user_id, $data['bmp_first_username'], $user_key, '0', '0', 'left',- '1'+ '1',+ gmdate('Y-m-d H:i:s') )); $wp_session['bmp_save_message'] = __('Binary MLM Plan User created successfully.', 'binary-mlm-plan'); BMP_Admin_Settings::add_message(__('Binary MLM Plan User created successfully.', 'binary-mlm-plan'));@@ -255,15 +256,16 @@ $user_key = bmp_generateKey(); $wpdb->query($wpdb->prepare( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching- "INSERT INTO {$wpdb->prefix}bmp_users (user_id, user_name, user_key, parent_key, sponsor_key, position, payment_status)- VALUES(%d, %s, %s, %d, %d, %s, %d)",+ "INSERT INTO {$wpdb->prefix}bmp_users (user_id, user_name, user_key, parent_key, sponsor_key, position, payment_status, payment_date)+ VALUES(%d, %s, %s, %d, %d, %s, %s, %s)", $user_id, $bmp_user->user_login, $user_key,- 0,- 0,+ '0',+ '0', 'left',- 1+ '1',+ gmdate('Y-m-d H:i:s') )); $wp_session['bmp_save_message'] = __('Binary MLM Plan User created successfully.', 'binary-mlm-plan'); BMP_Admin_Settings::add_message(__('Binary MLM Plan User created successfully.', 'binary-mlm-plan'));@@ -275,7 +277,7 @@ public function bmpUserCount() { global $wpdb;- return $wpdb->get_var($wpdb->prepare("SELECT count(*) FROM {$wpdb->prefix}bmp_users where 1=%d", 1)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ return $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}bmp_users"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching } @@ -331,12 +333,12 @@ foreach ($epins as $epin) { $wpdb->query($wpdb->prepare( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching "INSERT INTO {$wpdb->prefix}bmp_epins (epin_name, epin_no, type, date_generated, user_key, date_used, status, epin_price) - VALUES (%s, %s, %s, %s, %d, %s, %s, %f)",+ VALUES (%s, %s, %s, %s, %s, %s, %s, %f)", $epin_name, $epin, $epin_type, gmdate('Y-m-d'),- 0,+ '0', '0000-00-00', '0', $epin_price@@ -353,7 +355,7 @@ update_option('bmp_manage_payout', $data); $wp_session['bmp_save_message'] = __('Payout Settings Has been save successfully.', 'binary-mlm-plan'); BMP_Admin_Settings::add_message(__('Payout Settings Has been save successfully.', 'binary-mlm-plan'));- wp_safe_redirect(admin_url('admin.php?page=bmp-settings&tab=setting§ion=bonus'));+ wp_safe_redirect(admin_url('admin.php?page=bmp-settings&tab=setting§ion=generate-epin')); } } }
--- cache/binary-mlm-plan_4.0/includes/admin/settings/class-bmp-settings-page.php 2025-12-04 20:27:51.601236443 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/settings/class-bmp-settings-page.php 2025-12-04 20:29:32.815675078 +0000@@ -121,7 +121,7 @@ { global $wpdb; $currency_array = array('' => __('Select Currency', 'binary-mlm-plan'));- $results = $wpdb->get_results($wpdb->prepare("SELECT * from {$wpdb->prefix}bmp_currency where 1=%d", 1)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $results = $wpdb->get_results("SELECT * from {$wpdb->prefix}bmp_currency"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $rows = $wpdb->num_rows; if (!empty($rows)) { foreach ($results as $result) {
--- cache/binary-mlm-plan_4.0/includes/admin/settings/view/view_first_user_settings.php 2025-12-04 20:27:51.601236443 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/settings/view/view_first_user_settings.php 2025-12-04 20:29:32.815675078 +0000@@ -1,6 +1,6 @@ <?php global $wpdb;-$users = $wpdb->get_results($wpdb->prepare("SELECT u.* FROM {$wpdb->prefix}users as u JOIN {$wpdb->prefix}usermeta as um On u.id=um.user_id AND um.meta_key=%s AND um.meta_value NOT LIKE %s", 'wp_capabilities', '%administrator%')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching +$users = $wpdb->get_results($wpdb->prepare("SELECT u.* FROM {$wpdb->prefix}users as u JOIN {$wpdb->prefix}usermeta as um On u.ID=um.user_id WHERE um.meta_key=%s AND um.meta_value NOT LIKE %s", 'wp_capabilities', '%administrator%')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching ?> <div class="card w-100 p-0 mw-100"> <div class="card-header">
--- cache/binary-mlm-plan_4.0/includes/admin/settings/view/view_payout_settings.php 2025-12-04 20:27:51.605236697 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/settings/view/view_payout_settings.php 2025-12-04 20:29:32.815675078 +0000@@ -17,7 +17,7 @@ </div> <div class="col-md-6 "> <div class="form-group mb-3">- <label for="bmp_referral_commission_type" class="form-label"><?php esc_html_e('Direct Referral Commission Type', 'binary-mlm-plan'); ?></label>+ <label for="bmp_referral_commission_type" class="form-label"><?php esc_html_e('Type', 'binary-mlm-plan'); ?></label> <select name="bmp_referral_commission_type" class="form-control" id="bmp_referral_commission_type" type="text" value="1" required> <option value="fixed" <?php echo (isset($setting['bmp_referral_commission_type']) && $setting['bmp_referral_commission_type'] == 'fixed') ? 'selected' : ''; ?>><?php esc_html_e('Fixed', 'binary-mlm-plan'); ?></option> <option value="percentage" <?php echo (isset($setting['bmp_referral_commission_type']) && $setting['bmp_referral_commission_type'] == 'percentage') ? 'selected' : ''; ?>><?php esc_html_e('Percentage', 'binary-mlm-plan'); ?></option>@@ -36,7 +36,7 @@ </div> <div class="col-md-6 "> <div class="form-group mb-3">- <label for="bmp_service_charge_type" class="form-label"><?php esc_html_e('Direct Referral Commission Type', 'binary-mlm-plan'); ?></label>+ <label for="bmp_service_charge_type" class="form-label"><?php esc_html_e('Type', 'binary-mlm-plan'); ?></label> <select name="bmp_service_charge_type" class="form-control" id="bmp_service_charge_type" type="text" value="1" required> <option value="fixed" <?php echo (isset($setting['bmp_service_charge_type']) && $setting['bmp_service_charge_type'] == 'fixed') ? 'selected' : ''; ?>><?php esc_html_e('Fixed', 'binary-mlm-plan'); ?></option> <option value="percentage" <?php echo (isset($setting['bmp_service_charge_type']) && $setting['bmp_service_charge_type'] == 'percentage') ? 'selected' : ''; ?>><?php esc_html_e('Percentage', 'binary-mlm-plan'); ?></option>@@ -55,7 +55,7 @@ </div> <div class="col-md-6 "> <div class="form-group mb-3">- <label for="bmp_service_charge_type" class="form-label"><?php esc_html_e('Direct Referral Commission Type', 'binary-mlm-plan'); ?></label>+ <label for="bmp_service_charge_type" class="form-label"><?php esc_html_e('Type', 'binary-mlm-plan'); ?></label> <select name="bmp_service_charge_type" class="form-control" id="bmp_service_charge_type" type="text" style="" value="1" class="" required> <option value="fixed" <?php echo (isset($setting['bmp_service_charge_type']) && $setting['bmp_service_charge_type'] == 'fixed') ? 'selected' : ''; ?>><?php esc_html_e('Fixed', 'binary-mlm-plan'); ?></option> <option value="percentage" <?php echo (isset($setting['bmp_service_charge_type']) && $setting['bmp_service_charge_type'] == 'percentage') ? 'selected' : ''; ?>><?php esc_html_e('Percentage', 'binary-mlm-plan'); ?></option>
--- cache/binary-mlm-plan_4.0/includes/admin/tables/class-bmp-admin-epins-list-table.php 2025-12-04 20:27:51.605236697 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/tables/class-bmp-admin-epins-list-table.php 2025-12-04 20:29:32.815675078 +0000@@ -85,13 +85,17 @@ $hidden = array(); $sortable = $this->get_sortable_columns(); $this->_column_headers = array($columns, $hidden, $sortable);- if (isset($_GET['orderby']) && isset($_GET['order'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended- $orderby = sanitize_text_field(wp_unslash($_GET['orderby'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended- $order = sanitize_text_field(wp_unslash($_GET['order'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended- } else {- $orderby = 'id';- $order = 'ASC';- }+ $allowed_orderby = ['id', 'epin_no', 'type', 'epin_name', 'user_key', 'date_generated','date_used', 'status', 'epin_price'];+ $allowed_order = ['ASC', 'DESC'];++ // Get and sanitize++ $orderby = isset($_GET['orderby']) ? sanitize_text_field(wp_unslash($_GET['orderby'])) : 'id'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $order = isset($_GET['order']) ? sanitize_text_field(wp_unslash($_GET['order'])) : 'ASC'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended++ // Enforce whitelist+ $orderby = in_array($orderby, $allowed_orderby, true) ? $orderby : 'id';+ $order = in_array(strtoupper($order), $allowed_order, true) ? strtoupper($order) : 'ASC'; $sql = "SELECT * FROM {$wpdb->prefix}bmp_epins ORDER BY $orderby $order"; $results = $wpdb->get_results($sql, ARRAY_A); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
--- cache/binary-mlm-plan_4.0/includes/admin/tables/class-bmp-admin-payout-list-table.php 2025-12-04 20:27:51.605236697 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/tables/class-bmp-admin-payout-list-table.php 2025-12-04 20:29:32.815675078 +0000@@ -80,13 +80,16 @@ $sortable = $this->get_sortable_columns(); $this->_column_headers = array($columns, $hidden, $sortable); - if (isset($_GET['orderby']) && isset($_GET['order'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended- $orderby = sanitize_text_field(wp_unslash($_GET['orderby'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended- $order = sanitize_text_field(wp_unslash($_GET['order'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended- } else {- $orderby = 'id';- $order = 'ASC';- }+ $allowed_orderby = ['id', 'user_id', 'date', 'commission_amount', 'referral_commission_amount', 'total_amount'];+ $allowed_order = ['ASC', 'DESC'];++ // Get and sanitize+ $orderby = isset($_GET['orderby']) ? sanitize_text_field(wp_unslash($_GET['orderby'])) : 'id';// phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $order = isset($_GET['order']) ? sanitize_text_field(wp_unslash($_GET['order'])) : 'ASC';// phpcs:ignore WordPress.Security.NonceVerification.Recommended++ // Enforce whitelist+ $orderby = in_array($orderby, $allowed_orderby, true) ? $orderby : 'id';+ $order = in_array(strtoupper($order), $allowed_order, true) ? strtoupper($order) : 'ASC'; $sql = "SELECT * FROM {$wpdb->prefix}bmp_payout ORDER BY $orderby $order"; $results = $wpdb->get_results($sql, ARRAY_A); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
--- cache/binary-mlm-plan_4.0/includes/admin/tables/class-bmp-admin-users-list-table.php 2025-12-04 20:27:51.605236697 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/tables/class-bmp-admin-users-list-table.php 2025-12-04 20:29:32.815675078 +0000@@ -86,15 +86,18 @@ $hidden = array(); $sortable = $this->get_sortable_columns(); $this->_column_headers = array($columns, $hidden, $sortable);- if (isset($_GET['orderby']) && isset($_GET['order'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended- $orderby = sanitize_text_field(wp_unslash($_GET['orderby'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended- $order = sanitize_text_field(wp_unslash($_GET['order'])); //phpcs:ignore WordPress.Security.NonceVerification.Recommended- } else {- $orderby = 'id';- $order = 'ASC';- }- $sql = "SELECT * FROM {$wpdb->prefix}bmp_users ORDER BY %s %s";- $results = $wpdb->get_results($wpdb->prepare($sql, $orderby, $order), ARRAY_A); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared+ $allowed_orderby = ['id', 'user_id', 'user_name', 'user_key', 'payment_status', 'parent_key', 'sponsor_key', 'position'];+ $allowed_order = ['ASC', 'DESC'];++ // Get and sanitize+ $orderby = isset($_GET['orderby']) ? sanitize_text_field(wp_unslash($_GET['orderby'])) : 'id';// phpcs:ignore WordPress.Security.NonceVerification.Recommended+ $order = isset($_GET['order']) ? sanitize_text_field(wp_unslash($_GET['order'])) : 'ASC';// phpcs:ignore WordPress.Security.NonceVerification.Recommended++ // Enforce whitelist+ $orderby = in_array($orderby, $allowed_orderby, true) ? $orderby : 'id';+ $order = in_array(strtoupper($order), $allowed_order, true) ? strtoupper($order) : 'ASC';+ $sql = "SELECT * FROM {$wpdb->prefix}bmp_users ORDER BY $orderby $order";+ $results = $wpdb->get_results($wpdb->prepare($sql), ARRAY_A); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared $i = 0;
--- cache/binary-mlm-plan_4.0/includes/admin/views/html-admin-settings.php 2025-12-04 20:27:51.605236697 +0000+++ cache/binary-mlm-plan_5.0/includes/admin/views/html-admin-settings.php 2025-12-04 20:29:32.815675078 +0000@@ -19,7 +19,7 @@ } if ($current_tab == 'setting') {- $bmp_users = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM {$wpdb->prefix}bmp_users where 1=%d", 1)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $bmp_users = $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}bmp_users"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $settings = get_option('bmp_manage_general'); if ($bmp_users == 0) {
--- cache/binary-mlm-plan_4.0/includes/bmp-hook-functions.php 2025-12-04 20:27:51.605236697 +0000+++ cache/binary-mlm-plan_5.0/includes/bmp-hook-functions.php 2025-12-04 20:29:32.815675078 +0000@@ -1644,12 +1644,12 @@ 'user_pass' => $password, 'first_name' => $firstname, 'last_name' => $lastname,- 'user_email' => $email+ 'user_email' => $email,+ 'role' => 'bmp_user', ); $user_id = wp_insert_user($user);- $user = new WP_User($user_id);- $user->set_role('bmp_user');+ $user = new WP_User($user_id); add_user_meta($user_id, 'bmp_first_name', $firstname); add_user_meta($user_id, 'bmp_last_name', $lastname); add_user_meta($user_id, 'bmp_username', $username);@@ -2095,10 +2095,10 @@ if (isset($current_user->caps['bmp_user']) && $current_user->caps['bmp_user'] == 1) { $user_id = $current_user->ID;- $root_user = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_users WHERE user_id=%d ORDER BY position DESC LIMIT 1", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $root_user = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_users WHERE user_id=%d ORDER BY position DESC", $user_id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching } else if (isset($current_user->caps['administrator']) && $current_user->caps['administrator'] == 1) { $is_admin = true;- $root_user = $wpdb->get_row("SELECT * from {$wpdb->prefix}bmp_users WHERE parent_key='0' AND sponsor_key='0' LIMIT 1"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $root_user = $wpdb->get_row("SELECT * from {$wpdb->prefix}bmp_users WHERE parent_key='0' AND sponsor_key='0'"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching } if (!empty($root_user)) {@@ -2128,7 +2128,7 @@ function bmp_get_childs_data($user_key, $childs_array = array(), $is_admin = NULL) { global $wpdb;- $user_childs = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_users as u WHERE parent_key=%s ORDER BY position DESC", $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $user_childs = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}bmp_users WHERE parent_key=%s ORDER BY position DESC", $user_key)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching if (!empty($user_childs)) { foreach ($user_childs as $keys => $child) { $childs_array[$keys] = array(@@ -2173,7 +2173,7 @@ function bmp_get_top_user_key() { global $wpdb;- $top_user = $wpdb->get_var($wpdb->prepare("SELECT user_key FROM {$wpdb->prefix}bmp_users WHERE parent_key=%s AND sponsor_key=%s LIMIT 1", '0', '0')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ $top_user = $wpdb->get_var($wpdb->prepare("SELECT user_key FROM {$wpdb->prefix}bmp_users WHERE parent_key=%s AND sponsor_key=%s", '0', '0')); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching return $top_user; }
--- cache/binary-mlm-plan_4.0/includes/class-bmp-install.php 2025-12-04 20:27:51.605236697 +0000+++ cache/binary-mlm-plan_5.0/includes/class-bmp-install.php 2025-12-04 20:29:32.815675078 +0000@@ -167,7 +167,7 @@ type VARCHAR(50) NOT NULL, date_generated date NOT NULL, user_key VARCHAR(155) NOT NULL DEFAULT 0,- date_used date NOT NULL,+ date_used date DEFAULT NULL, status ENUM('0','1') NOT NULL DEFAULT '0', epin_price DOUBLE(15,2) NOT NULL DEFAULT 0.00 ) $collate;";@@ -230,30 +230,37 @@ $wp_roles = new WP_Roles(); } - add_role('bmp_user', 'Binary MLM Plan', array('read' => false,));+ add_role('bmp_user', 'Binary MLM Plan', array('read' => false)); - $capabilities = self::get_core_capabilities();+ /* $capabilities = self::get_core_capabilities(); foreach ($capabilities as $cap_group) { foreach ($cap_group as $cap) { $wp_roles->add_cap('bmp_user', $cap); $wp_roles->add_cap('administrator', $cap); }+ } */++ $role = get_role('administrator');+ if ($role && !$role->has_cap('manage_bmp')) {+ $role->add_cap('manage_bmp'); } } - private static function get_core_capabilities()- {- $capabilities = array();-- $capabilities['core'] = array(- 'manage_bmp',+ /**+ * Define plugin-specific capabilities.+ *+ * In the future, you can expand this if you introduce finer-grained permissions.+ */+ /* private static function get_core_capabilities() {+ return array(+ 'core' => array(+ 'manage_bmp',+ ), );-- return $capabilities;- }+ } */
--- cache/binary-mlm-plan_4.0/includes/class-bmp.php 2025-12-04 20:27:51.605236697 +0000+++ cache/binary-mlm-plan_5.0/includes/class-bmp.php 2025-12-04 20:29:32.815675078 +0000@@ -149,12 +149,8 @@ public function load_plugin_textdomain() { $locale = is_admin() && function_exists('get_user_locale') ? get_user_locale() : get_locale();- $locale = apply_filters('plugin_locale', $locale, 'binary-mlm-plan'); - unload_textdomain('binary-mlm-plan');- load_textdomain('binary-mlm-plan', WP_LANG_DIR . '/bmp/' . $locale . '.mo');- load_plugin_textdomain('binary-mlm-plan', false, plugin_basename(dirname(BMP_PLUGIN_FILE)) . '/i18n/languages'); }
--- cache/binary-mlm-plan_4.0/includes/classs-bmp-uninstaller.php 2025-12-04 20:27:51.605236697 +0000+++ cache/binary-mlm-plan_5.0/includes/classs-bmp-uninstaller.php 2025-12-04 20:29:32.815675078 +0000@@ -20,9 +20,10 @@ ); - foreach ($tables as $table) {- $sql = "DROP TABLE IF EXISTS $table";- $wpdb->query($sql); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching+ foreach ($tables as $table) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange + $wpdb->query("DROP TABLE IF EXISTS {$table}");+ } $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '%bmp_%';"); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
--- cache/hcv4-payment-gateway_1.5.11/Corcrm_Utility.php 2025-12-04 20:33:14.885814412 +0000+++ cache/hcv4-payment-gateway_2.0.0/Corcrm_Utility.php 2025-12-04 20:34:34.590892521 +0000@@ -470,7 +470,7 @@ global $wpdb; $hiecor_prod_id = $post->corcrm_product_id; if(empty($hiecor_prod_id)){- $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = {$post_id}");+ $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = %d", $post_id); $hiecor_prod_id = $wpdb->get_var($query); } if(empty($hiecor_prod_id)){@@ -869,7 +869,7 @@ } if(isset($attr['id'])&& !empty($attr['id'])){ $att_taxo_table = $wpdb->prefix."woocommerce_attribute_taxonomies";- $sql="SELECT `attribute_label` FROM $att_taxo_table WHERE attribute_id = {$attr['id']}";+ $sql = $wpdb->prepare("SELECT `attribute_label` FROM $att_taxo_table WHERE attribute_id = %d", $attr['id']); $wc_attribute_name = $wpdb->get_row($sql); $optionName=$wc_attribute_name->attribute_label; // $optionName = str_replace('pa_', '', $attrKey);@@ -929,21 +929,21 @@ public function getAttrMappingId($productId, $attrID) { global $wpdb; $mappingTable=$wpdb->prefix."hiecor_attr_mapping";- $attrMappingId = $wpdb->get_var("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = $productId and mapping_type='attribute' and foreign_id='" . $attrID . "'");+ $attrMappingId = $wpdb->get_var($wpdb->prepare("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = %d and mapping_type='attribute' and foreign_id = %d", $productId, $attrID)); return $attrMappingId; } public function getHicorAttrId($attrMappingId) { global $wpdb; $mappingTable=$wpdb->prefix."hiecor_attr_mapping";- $hicorAttrId = $wpdb->get_var("SELECT `hiecor_id` FROM $mappingTable WHERE mapping_id = $attrMappingId");+ $hicorAttrId = $wpdb->get_var($wpdb->prepare("SELECT `hiecor_id` FROM $mappingTable WHERE mapping_id = %d", $attrMappingId)); return $hicorAttrId; } public function getAttrValueMappingId($productId, $attrValue) { global $wpdb; $mappingTable=$wpdb->prefix."hiecor_attr_mapping";- $attrValueMappingId = $wpdb->get_var("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = $productId and mapping_type='attribute_value' and wc_option='" . $attrValue . "'");+ $attrValueMappingId = $wpdb->get_var($wpdb->prepare("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = %d and mapping_type='attribute_value' and wc_option = %s", $productId, $attrValue)); return $attrValueMappingId; } @@ -977,7 +977,7 @@ $attr_slug = str_replace('attribute_pa_','', $attribute); $value_slug = $value; $att_table = $wpdb->prefix."woocommerce_attribute_taxonomies";- $sql="SELECT `attribute_label` FROM $att_table WHERE attribute_name = '{$attr_slug}'";+ $sql = $wpdb->prepare("SELECT `attribute_label` FROM $att_table WHERE attribute_name = %s", $attr_slug); $wc_attribute_name = $wpdb->get_row($sql); $varAttrData['attribute_name']=$wc_attribute_name->attribute_label; $termsTable = $wpdb->prefix."terms";@@ -1026,7 +1026,7 @@ $hiecor_var_prod_id = $variationPost->corcrm_product_id; if(empty($hiecor_var_prod_id)){- $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = {$variation->ID}");+ $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = %d", $variation->ID); $hiecor_var_prod_id = $wpdb->get_var($query); } if(empty($hiecor_var_prod_id)){@@ -1504,7 +1504,7 @@ $hiecor_var_prod_id = $variationPost->corcrm_product_id; if(empty($hiecor_var_prod_id)){- $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = {$variation->ID}");+ $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = %d", $variation->ID); $hiecor_var_prod_id = $wpdb->get_var($query); } if(empty($hiecor_var_prod_id)){
--- cache/hcv4-payment-gateway_1.5.11/Payment_Utility.php 2025-12-04 20:33:14.889814666 +0000+++ cache/hcv4-payment-gateway_2.0.0/Payment_Utility.php 2025-12-04 20:34:52.644042902 +0000@@ -11,7 +11,7 @@ $product = $this->getProduct($item['product_id']); $hiecorProdId = $product->post->corcrm_product_id; if(empty($hiecorProdId)){ - $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = {$item['product_id']}"); + $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = %d", $item['product_id']); $hiecorProdId = $wpdb->get_var($query); } if(empty($hiecorProdId)){ @@ -95,7 +95,7 @@ $variationPost = $this->get_post($variation_id); $hiecorVariationId = $variationPost->corcrm_product_id; if(empty($hiecorVariationId)){ - $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = {$variation_id}"); + $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = %d", $variation_id); $hiecorVariationId = $wpdb->get_var($query); } if(empty($hiecorVariationId)){
--- cache/hcv4-payment-gateway_1.5.11/hiecor-iframe-modal.php 2025-12-04 20:33:14.889814666 +0000+++ cache/hcv4-payment-gateway_2.0.0/hiecor-iframe-modal.php 2025-12-04 20:34:52.644042902 +0000@@ -17,7 +17,7 @@ global $product,$wpdb; $tbl_name = $wpdb->prefix . 'posts'; $wc_pro_id = $product->get_id(); - $hiecor_pro_id = $wpdb->get_var("SELECT `corcrm_product_id` FROM $tbl_name WHERE ID = $wc_pro_id"); + $hiecor_pro_id = $wpdb->get_var($wpdb->prepare("SELECT `corcrm_product_id` FROM $tbl_name WHERE ID = %d", $wc_pro_id)); //$is_hiecor_iframe_required = get_post_meta($wc_pro_id ,'hiecor_iframe_required',true); $productInfo = wc_get_product($wc_pro_id);
--- cache/hcv4-payment-gateway_1.5.11/hiecor_attr_mapping.php 2025-12-04 20:33:14.889814666 +0000+++ cache/hcv4-payment-gateway_2.0.0/hiecor_attr_mapping.php 2025-12-04 20:34:52.644042902 +0000@@ -51,7 +51,7 @@ //now remove attr mapping for this products which are not used $wp_prduct_Id=$data['product_id']; //Get All Mappings and compare with newAttributeMapping - $getall=$wpdb->get_results("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = '$wp_prduct_Id' and mapping_type='attribute'"); + $getall=$wpdb->get_results($wpdb->prepare("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = %d and mapping_type='attribute'", $wp_prduct_Id)); $allAttributeMapping=array(); foreach ($getall as $mapping_id){ $allAttributeMapping[]=$mapping_id->mapping_id; @@ -116,13 +116,13 @@ function getAttrMappingId($postId, $attribute_id) { global $wpdb; $mappingTable = $wpdb->prefix . 'hiecor_attr_mapping'; - $attrMappingId = $wpdb->get_var("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = '".trim($postId)."' and mapping_type='attribute' and foreign_id='" . $attribute_id . "'"); + $attrMappingId = $wpdb->get_var($wpdb->prepare("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = %d and mapping_type='attribute' and foreign_id = %d", trim($postId), $attribute_id)); return $attrMappingId; } function getAttrValueMappingId($postId, $attribute_value) { global $wpdb; $mappingTable = $wpdb->prefix . 'hiecor_attr_mapping'; - $attrValueMappingId = $wpdb->get_var("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = '".trim($postId)."' and mapping_type='attribute_value' and wc_attr_option='" . $attribute_value . "'"); + $attrValueMappingId = $wpdb->get_var($wpdb->prepare("SELECT `mapping_id` FROM $mappingTable WHERE wc_product_id = %d and mapping_type='attribute_value' and wc_attr_option = %s", trim($postId), $attribute_value)); return $attrValueMappingId; }
--- cache/hcv4-payment-gateway_1.5.11/hiecor_routes_function.php 2025-12-04 20:33:14.889814666 +0000+++ cache/hcv4-payment-gateway_2.0.0/hiecor_routes_function.php 2025-12-04 20:34:52.644042902 +0000@@ -2,8 +2,8 @@ function map_hiecor_prod_id($data) { global $wpdb; - $corcrm_prod_id = $data['id']; - $wc_id = isset($_POST['woo_product_id']) ? $_POST['woo_product_id'] : 0; + $corcrm_prod_id = intval($data['id']); + $wc_id = isset($_POST['woo_product_id']) ? intval($_POST['woo_product_id']) : 0; if(!empty($wc_id)){ $upd = $wpdb->update($wpdb->prefix . 'posts', array('corcrm_product_id' => $corcrm_prod_id), array('id' => $wc_id), $format = null, $where_format = null); if (!$upd && !empty($wpdb->last_error)) { @@ -26,13 +26,13 @@ if(!empty($attr_data_arr)){ $newAttributeMapping=array(); foreach($attr_data_arr as $key=>$value){ - $hiecor_prod_id = $value['hiecor_prod_id']; - $hiecor_id = $value['hiecor_id']; - $wc_id = $value['wc_id']; - $mapping_type = $value['mapping_type']; - $attr_name = $value['attribute_name']; + $hiecor_prod_id = intval($value['hiecor_prod_id']); + $hiecor_id = intval($value['hiecor_id']); + $wc_id = intval($value['wc_id']); + $mapping_type = sanitize_text_field($value['mapping_type']); + $attr_name = sanitize_text_field($value['attribute_name']); $newAttributeMapping[]=$hiecor_id; - $sql="SELECT `ID` FROM $prodTbl WHERE corcrm_product_id = {$hiecor_prod_id}"; + $sql = $wpdb->prepare("SELECT `ID` FROM $prodTbl WHERE corcrm_product_id = %d", $hiecor_prod_id); $wc_prod_id = $wpdb->get_var($sql); if(!$wc_prod_id){ $log = new WC_Logger(); @@ -43,10 +43,10 @@ 'wc_product_id' => $wc_prod_id, 'foreign_id' => $wc_id, 'hiecor_id' => $hiecor_id, - 'mapping_type' => "$mapping_type", - 'wc_option' => "$attr_name" + 'mapping_type' => $mapping_type, + 'wc_option' => $attr_name ); - $sql="SELECT `mapping_id` FROM $mappingTable WHERE `wc_product_id` = {$wc_prod_id} AND `foreign_id`={$wc_id} AND `hiecor_id`={$hiecor_id} "; + $sql = $wpdb->prepare("SELECT `mapping_id` FROM $mappingTable WHERE `wc_product_id` = %d AND `foreign_id` = %d AND `hiecor_id` = %d", $wc_prod_id, $wc_id, $hiecor_id); $mapping_id = $wpdb->get_var($sql); if(!$mapping_id){ if(!$wpdb->insert($mappingTable, $insertData)){ @@ -57,7 +57,7 @@ } } } - $getall=$wpdb->get_results("SELECT `hiecor_id` FROM $mappingTable WHERE wc_product_id = '$wc_prod_id' and mapping_type='attribute'"); + $getall = $wpdb->get_results($wpdb->prepare("SELECT `hiecor_id` FROM $mappingTable WHERE wc_product_id = %d and mapping_type='attribute'", $wc_prod_id)); $allAttributeMapping=array(); foreach ($getall as $ids){ $allAttributeMapping[]=$ids->hiecor_id; @@ -91,16 +91,15 @@ function delete_mapping($data) { global $wpdb; $mappingTable = $wpdb->prefix . 'hiecor_attr_mapping'; - $wc_prod_id = $data['id']; + $wc_prod_id = intval($data['id']); $mapping_type = isset($_POST['mapping_type']) ? sanitize_text_field($_POST['mapping_type']):"ALL"; - $where = "WHERE 1=1"; - if($mapping_type == "attribute" || $mapping_type == "variation" ){ - $where.=" AND mapping_type={$mapping_type}"; - } - $sql = "DELETE - FROM $mappingTable - {$where} AND `wc_product_id`={$wc_prod_id}"; - $result =$wpdb->query($sql); + + if($mapping_type == "attribute" || $mapping_type == "variation" ){ + $sql = $wpdb->prepare("DELETE FROM $mappingTable WHERE mapping_type = %s AND `wc_product_id` = %d", $mapping_type, $wc_prod_id); + } else { + $sql = $wpdb->prepare("DELETE FROM $mappingTable WHERE `wc_product_id` = %d", $wc_prod_id); + } + $result =$wpdb->query($sql); if ($result) { return array('success'=>true,'message'=>'','error'=>''); }else{
--- cache/hcv4-payment-gateway_1.5.11/woocommerce-corcrm-payment-gateway.php 2025-12-04 20:33:14.897815176 +0000+++ cache/hcv4-payment-gateway_2.0.0/woocommerce-corcrm-payment-gateway.php 2025-12-04 20:34:52.644042902 +0000@@ -4,7 +4,7 @@ Plugin Name: HieCOR Payment Gateway Plugin Plugin URI: http://www.hiecor.com/ Description: This is a plugin will enable automatic inventory sync and accept payments with your HieCOR system. - Version: 1.5.11 + Version: 2.0.0 WC tested up to: 9.4.0 Author: HieCOR @@ -92,12 +92,12 @@ $table_name = $wpdb->prefix . 'posts'; $db_name = $wpdb->dbname; // create the corcrm_product_id colmn in posts table - $sql = "SELECT COLUMN_NAME + $sql = $wpdb->prepare("SELECT COLUMN_NAME FROM information_schema.COLUMNS WHERE - TABLE_SCHEMA = '" . $db_name . "' - AND TABLE_NAME = '" . $table_name . "' - AND COLUMN_NAME = 'corcrm_product_id'"; + TABLE_SCHEMA = %s + AND TABLE_NAME = %s + AND COLUMN_NAME = 'corcrm_product_id'", $db_name, $table_name); if ($wpdb->get_var($sql) != 'corcrm_product_id') { @@ -110,7 +110,7 @@ } $mappingTable = $wpdb->prefix . 'hiecor_attr_mapping'; - if ($wpdb->get_var("SHOW TABLES LIKE '$mappingTable'") != $mappingTable) { + if ($wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $mappingTable)) != $mappingTable) { $mappingTableSql = "CREATE TABLE `$mappingTable` ( `mapping_id` int(6) NOT NULL AUTO_INCREMENT, `wc_product_id` int(11), @@ -167,9 +167,7 @@ ); if(isset($data)){ $mappingTable = $wpdb->prefix . 'hiecor_attr_mapping'; - $sql = "DELETE - FROM $mappingTable WHERE - `wc_product_id`={$post_id}"; + $sql = $wpdb->prepare("DELETE FROM $mappingTable WHERE `wc_product_id` = %d", $post_id); $result =$wpdb->query($sql); if(!$result && $wpdb->last_error!=''){ $log = new WC_Logger(); @@ -257,7 +255,7 @@ $product = wc_get_product($post->ID); // Load the product object using the post ID $corcrm_product_id = (!empty($post->corcrm_product_id)) ? $post->corcrm_product_id : ''; if(empty($corcrm_product_id)){ - $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = {$post->ID}"); + $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = %d", $post->ID); $corcrm_product_id = $wpdb->get_var($query); } if(empty($corcrm_product_id)){ @@ -404,7 +402,7 @@ $hiecor_var_id = !empty($variation->corcrm_product_id) ? $variation->corcrm_product_id:''; if(empty($hiecor_var_id)){ - $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = {$variation->ID}"); + $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = %d", $variation->ID); $hiecor_var_id = $wpdb->get_var($query); } if(empty($hiecor_var_id)){ @@ -640,11 +638,11 @@ if ($object->is_type('variable') && $object->has_child()) { foreach ($response->data['variations'] as $key => $value) { - $prodId = $wpdb->get_var("SELECT `corcrm_product_id` FROM $tbl_name WHERE ID = $value"); + $prodId = $wpdb->get_var($wpdb->prepare("SELECT `corcrm_product_id` FROM $tbl_name WHERE ID = %d", $value)); $response->data['variation_to_corcrm_id'][$value] = $prodId; } } else { - $prodId = $wpdb->get_var("SELECT `corcrm_product_id` FROM $tbl_name WHERE ID=$id"); + $prodId = $wpdb->get_var($wpdb->prepare("SELECT `corcrm_product_id` FROM $tbl_name WHERE ID = %d", $id)); $response->data['corcrm_product_id'] = $prodId; } return $response; @@ -789,7 +787,7 @@ $corcrm_product_id = $product ? $product->get_meta('hiecor_product_id') : ''; if (empty($corcrm_product_id)) { - $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = {$post_id}"); + $query = $wpdb->prepare("SELECT corcrm_product_id FROM {$wpdb->posts} WHERE ID = %d", $post_id); $corcrm_product_id = $wpdb->get_var($query); }
--- cache/easy-form-builder_3.8.15/emsfb.php 2025-12-04 20:29:18.514765089 +0000+++ cache/easy-form-builder_3.8.16/emsfb.php 2025-12-04 20:33:43.107612294 +0000@@ -3,7 +3,7 @@ * Plugin Name: Easy Form Builder * Plugin URI: https://whitestudio.team * Description: Easily create multi-step forms with a unique Confirmation Code feature and notification emails, all without any coding knowledge required, using the easy-to-use drag and drop form wizard of Easy Form Builder. This is the free version and provides an intuitive interface and functionality to create professional forms in minutes. With the unique Confirmation Code feature, you can easily associate each submission with a specific request or user. - * Version: 3.8.15 + * Version: 3.8.16 * Author: WhiteStudio * Author URI: https://whitestudio.team * Text Domain: easy-form-builder @@ -26,7 +26,7 @@ } if (!defined("EMSFB_PLUGIN_VERSION")) { - define("EMSFB_PLUGIN_VERSION", "3.8.15"); + define("EMSFB_PLUGIN_VERSION", "3.8.16"); } /** Constant pointing to the root directory URL of the plugin */
--- cache/easy-form-builder_3.8.15/includes/admin/class-Emsfb-admin.php 2025-12-04 20:29:18.558767889 +0000+++ cache/easy-form-builder_3.8.16/includes/admin/class-Emsfb-admin.php 2025-12-04 20:33:49.248003495 +0000@@ -662,8 +662,7 @@ $id = ( int ) sanitize_text_field($_POST['id']) ; $table_name = $this->db->prefix . "emsfb_form"; - $value = $this->db->get_var("SELECT form_structer FROM `$table_name` WHERE form_id = '$id'"); - + $value = $this->db->get_var("SELECT form_structer FROM `$table_name` WHERE form_id = '$id'"); @@ -925,7 +924,7 @@ } foreach ($m as $key => $value) { - if ($key == "emailSupporter") { + if (in_array($key ,['emailSupporter','femail'])) { $m[$key] = sanitize_text_field($value); $email = $m[$key]; @@ -941,11 +940,8 @@ } - } - else if($key == "emailTemp"){ - - - if( strlen($value)>5 && (strpos($setting ,'shortcode_message')==false || strpos($setting ,'shortcode_title')==false)){ + }else if($key == "emailTemp"){ + if( strlen($value)>5 && (strpos($setting ,'shortcode_message')==false )){ $m = $lang["addSCEmailM"]; $response = ['success' => false, "m" =>$m]; wp_send_json_success($response, $_POST); @@ -967,17 +963,40 @@ die(); } - } + }else if($key == 'smtp'){ + function result_ok() { + return [ + 'status' => 'ok_set_smtp', + 'message' => [ + 'title' => 'configured', + 'description' => 'user configured email settings', + 'id' => 'email_settings_configured' + ] + ]; + } + if(isset($value) && in_array($value,[1,true,'true','1']) ){ - } + $check = get_option('emsfb_email_status',false); + if($check==false || $check==null){ + update_option('emsfb_email_status', result_ok()); + }else if($check['status']!='ok_set_smtp' || $check['status']!='ok'){ + + update_option('emsfb_email_status', result_ok()); + } + + } + + + } + } if(isset($m['efb_version'])==false){ $m['efb_version']=EMSFB_PLUGIN_VERSION; $st_ = json_encode($m,JSON_UNESCAPED_UNICODE); $setting = str_replace('"', '\"', $st_); } - + $email = isset($m['emailSupporter']) ? $m['emailSupporter'] : ''; $this->database_set_emsfb_settings($setting, $email); $m = $lang["messageSent"]; $response = ['success' => true, "m" => $m]; @@ -1018,7 +1037,7 @@ $table_name = $this->db->prefix . "emsfb_msg_"; $id = sanitize_text_field($_POST['value']); - $value = $this->db->get_results("SELECT * FROM `$table_name` WHERE track = '$id'"); + $value = $this->db->get_results($this->db->prepare("SELECT * FROM `$table_name` WHERE track = %s", $id)); if (count($value)>0) { @@ -1135,7 +1154,7 @@ $check = $efbFunction->send_email_state_new([$to , null,$from] ,$sub ,$cont,$pro,'testMailServer',home_url(),$ac); if($check==true){ - $ac->smtp = "true"; + $ac->smtp = true; $ac->emailSupporter = $to; $table_name = $this->db->prefix . "emsfb_setting"; $newAc= json_encode( $ac ,JSON_UNESCAPED_UNICODE ); @@ -1149,7 +1168,15 @@ 'email' => $to, ] ); - + $ok = [ + 'status' => 'ok_set_smtp', + 'message' => [ + 'title' => 'configured', + 'description' => 'user configured email settings', + 'id' => 'email_settings_configured' + ] + ]; + update_option('emsfb_email_status',$ok); set_transient('emsfb_settings_transient', $newAc, 1440); update_option('emsfb_settings', $newAc); } @@ -1234,7 +1261,7 @@ public function file_upload_public(){ - $_POST['id']=sanitize_text_field($_POST['id']); + $_POST['id']=intval($_POST['id']); $_POST['pl']=sanitize_text_field($_POST['pl']); $_POST['nonce_msg']=sanitize_text_field($_POST['nonce_msg']); $vl=null; @@ -1553,63 +1580,67 @@ if($state==1) return $this->efbFunction; } - function admin_notices_efb () { - - if (get_option('emsfb_email_status') === false) { - require_once (EMSFB_PLUGIN_DIRECTORY . 'includes/class-Emsfb-requirement.php'); - $efbRequirement = new CheckRequirementEmsfb(); - $efbRequirement->run_and_save_efb(); + function admin_notices_efb () { + $check = get_option('emsfb_email_status', false); + function result_ok ($ok) { + $r['status'] = $ok; + $r['message']['title'] = 'configured'; + $r['message']['description'] = 'user configured email settings'; + $r['message']['id'] = 'email_settings_configured'; + return $r; } - $settings =false; - - $check = get_option('emsfb_email_status', false); - - - if(!$check || is_array($check)){ + $efbFunction = $this->get_efbFunction(1); + $settings= $efbFunction->get_setting_Emsfb(); + if(is_array($check)){ if($check['status'] === 'ok_set_smtp') { - return; // No issues found or already configured + return; }else if ($check['status'] === 'ok' ) { - $efbFunction = $this->get_efbFunction(1); - $settings= $efbFunction->get_setting_Emsfb(); if (isset($settings->smtp) && !in_array($settings->smtp, ['1', 'true', true,1], true)) { $settings->smtp = true; $email = isset($settings->emailSupporter) ? $settings->emailSupporter : ''; $st_ = json_encode($settings,JSON_UNESCAPED_UNICODE); $setting = str_replace('"', '\"', $st_); $this->database_set_emsfb_settings($setting, $email); - $check['status'] = 'ok_set_smtp'; - $check['message']['title'] = 'configured'; - update_option('emsfb_email_status', $check); } - return; // No issues found or already configured - }else if ( $check['message']['id'] == 'mail_function_failed'){ return; + }else if (($check['status'] !== 'ok' || $check['status'] !== 'ok_set_smtp') && (isset($settings->smtp) && in_array($settings->smtp, ['1', 'true', true,1], true))) { + update_option('emsfb_email_status', result_ok('ok_set_smtp')); + return; } + }else{ + if (isset($settings->smtp) && in_array($settings->smtp, ['1', 'true', true,1], true)) { + update_option('emsfb_email_status', result_ok('ok_set_smtp')); + return; + }else{ + require_once (EMSFB_PLUGIN_DIRECTORY . 'includes/class-Emsfb-requirement.php'); + $efbRequirement = new CheckRequirementEmsfb(); + $efbRequirement->run_and_save_efb(); + $check = get_option('emsfb_email_status', false); + if(is_array($check) && isset($check['status']) && ($check['status'] == 'ok_set_smtp' || $check['status'] == 'ok')) { + if (isset($settings->smtp) && !in_array($settings->smtp, ['1', 'true', true,1], true)) { + $settings->smtp = true; + $email = isset($settings->emailSupporter) ? $settings->emailSupporter : ''; + $st_ = json_encode($settings,JSON_UNESCAPED_UNICODE); + $setting = str_replace('"', '\"', $st_); + $this->database_set_emsfb_settings($setting, $email); + } + return; + } + } } - $email_notifi = sprintf( esc_html__('%s notification', 'easy-form-builder'), esc_html__('Email', 'easy-form-builder') ); - - function result_ok () { - $check['status'] = 'ok'; - $check['message']['title'] = 'configured'; - $check['message']['description'] = 'user configured email settings'; - $check['message']['id'] = 'email_settings_configured'; - return $check; - } - $warning =' '. sprintf( esc_html__('Disabling this feature may affect the proper functionality of Easy Form Builder. If you plan to use the %s feature, please ensure it is enabled.', 'easy-form-builder'), $email_notifi ); - $messages = [ 'mail_function_ok' => [ 'title' => esc_html__('Email system is working properly.', 'easy-form-builder'), @@ -1637,40 +1668,9 @@ ], ]; - $settings = get_option('emsfb_settings', false); - if ($settings!=false){ - - $s = str_replace('\\', '', $settings); - $settings = json_decode($s); - - - if (isset($settings->smtp) && in_array($settings->smtp, ['1', 'true', true,1], true)) { - - /* $check['status'] = 'ok'; - $check['message']['title'] = 'configured'; - $check['message']['description'] = 'user configured email settings'; */ - - update_option('emsfb_email_status', result_ok()); - return; - } - }else{ - $efbFunction = $this->get_efbFunction(1); - $settings= $efbFunction->get_setting_Emsfb(); - if($settings!=false){ - if (isset($settings->smtp) && in_array($settings->smtp, ['1', 'true', true,1], true)) { - - /* $check['status'] = 'ok'; - $check['message']['title'] = 'configured'; - $check['message']['description'] = 'user configured email settings'; */ - - update_option('emsfb_email_status', result_ok()); - return; - } - } - } $logo_url = EMSFB_PLUGIN_URL.'includes/admin/assets/image/logo.png'; $msg_id = isset($check['message']['id']) ? $check['message']['id'] : ''; $help = '<a href="https://whitestudio.team/documents/how-to-fix-email-not-working-issue#'.$msg_id.'" target="_blank" >' . esc_html__('Click here for more details','easy-form-builder') . '</a>'; @@ -1690,18 +1690,25 @@ </div> </div> <script> - if (window.sessionStorage.getItem('efb_hide_notice') === '1') { - var efbNotice = document.getElementById('notice-email-efb'); + var efbNotice = document.getElementById('notice-email-efb'); + if (window.sessionStorage.getItem('efb_hide_notice') === '3') { if (efbNotice) efbNotice.style.display = 'none'; } var efbCloseBtn = document.getElementById('efb-close-notice-btn'); if (efbCloseBtn) { + //look for efb classes on the elements of page + const page = document.querySelector('.sideMenuFEfb'); + if (page) { + efbNotice.style.display = 'none'; + } efbCloseBtn.addEventListener('click', function () { console.log('Notice closed'); var efbNotice = document.getElementById('notice-email-efb'); if (efbNotice) efbNotice.style.display = 'none'; - window.sessionStorage.setItem('efb_hide_notice', '1'); + let count = window.sessionStorage.getItem('efb_hide_notice') ?? 0 + count = parseInt(count) + 1; + window.sessionStorage.setItem('efb_hide_notice', count); }); } </script>
--- cache/easy-form-builder_3.8.15/includes/admin/class-Emsfb-panel.php 2025-12-04 20:29:18.558767889 +0000+++ cache/easy-form-builder_3.8.16/includes/admin/class-Emsfb-panel.php 2025-12-04 20:33:49.248003495 +0000@@ -275,13 +275,13 @@ wp_enqueue_script('efb-main-js', EMSFB_PLUGIN_URL . 'includes/admin/assets/js/new-efb.js',false,EMSFB_PLUGIN_VERSION); - /* new code v4 */ + wp_register_script('jquery-ui-efb', EMSFB_PLUGIN_URL . 'includes/admin/assets/js/jquery-ui-efb.js', array('jquery'), true,EMSFB_PLUGIN_VERSION); wp_enqueue_script('jquery-ui-efb'); wp_register_script('jquery-dd-efb', EMSFB_PLUGIN_URL . 'includes/admin/assets/js/jquery-dd-efb.js', array('jquery'), true,EMSFB_PLUGIN_VERSION); wp_enqueue_script('jquery-dd-efb'); - /*end new code v4 */ + wp_register_script('countries-js', 'https://cdn.jsdelivr.net/gh/hassantafreshi/Json-List-of-countries-states-and-cities-in-the-world@main/js/wp/countries.js', null, null, true); @@ -406,7 +406,7 @@ public function file_upload_api(){ $efbFunction = $this->get_efbFunction(); if(empty($this->efbFunction))$this->efbFunction =$efbFunction; - $_POST['id']=sanitize_text_field($_POST['id']); + $_POST['id']=intval($_POST['id']); $_POST['pl']=sanitize_text_field($_POST['pl']); $_POST['fid']=sanitize_text_field($_POST['fid']); $sid = sanitize_text_field($_POST['sid']); @@ -471,7 +471,7 @@ die('invalid file '.$_FILES['async-upload']['type']); } - }// end function + } public function delete_old_rows_emsfb_stts_() {
--- cache/easy-form-builder_3.8.15/includes/class-Emsfb-install.php 2025-12-04 20:29:18.558767889 +0000+++ cache/easy-form-builder_3.8.16/includes/class-Emsfb-install.php 2025-12-04 20:33:49.248003495 +0000@@ -15,7 +15,7 @@ * Creating plugin tables * */ - + static function install() { global $wpdb; $state="gi"; @@ -28,108 +28,108 @@ $charset_collate = $wpdb->get_charset_collate(); require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); - + $sql = "CREATE TABLE IF NOT EXISTS {$table_name_stng} ( `id` int(1) NOT NULL AUTO_INCREMENT, - `setting` text COLLATE utf8mb4_unicode_ci NOT NULL, + `setting` text COLLATE utf8mb4_unicode_ci NOT NULL, `date` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, `edit_by` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (id) - + ) {$charset_collate};"; dbDelta( $sql ); - + $sql = "CREATE TABLE IF NOT EXISTS {$table_name} ( `form_id` int(11) NOT NULL AUTO_INCREMENT, `form_name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL, `form_structer` MEDIUMTEXT COLLATE utf8mb4_unicode_ci NOT NULL, - `form_email` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL, + `form_email` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL, `form_type` varchar(15) COLLATE utf8mb4_unicode_ci NULL DEFAULT 'form', `form_created_by` varchar(8) COLLATE utf8mb4_unicode_ci NOT NULL, - `form_access_by` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, - `form_create_date` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + `form_access_by` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, + `form_create_date` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, PRIMARY KEY (form_id) ) {$charset_collate};"; dbDelta( $sql ); - + $sql = "CREATE TABLE IF NOT EXISTS {$table_name_msg} ( `msg_id` int(11) NOT NULL AUTO_INCREMENT, `form_id` int(11) COLLATE utf8mb4_unicode_ci NOT NULL, `track` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL, `ip` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, `form_title_x` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL, - `content` MEDIUMTEXT COLLATE utf8mb4_unicode_ci NOT NULL, - `date` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, - `read_date` datetime DEFAULT CURRENT_TIMESTAMP, + `content` MEDIUMTEXT COLLATE utf8mb4_unicode_ci NOT NULL, + `date` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + `read_date` datetime DEFAULT CURRENT_TIMESTAMP, `read_` int(10) COLLATE utf8mb4_unicode_ci NOT NULL, `read_by` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (msg_id) ) {$charset_collate};"; - + dbDelta( $sql ); $sql = "CREATE TABLE IF NOT EXISTS {$table_name_rsp} ( `rsp_id` int(20) NOT NULL AUTO_INCREMENT, `msg_id` int(11) COLLATE utf8mb4_unicode_ci NOT NULL, `ip` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `content` text COLLATE utf8mb4_unicode_ci NOT NULL, - `date` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + `content` text COLLATE utf8mb4_unicode_ci NOT NULL, + `date` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, `read_by` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `read_date` datetime DEFAULT CURRENT_TIMESTAMP, - `read_` int(10) COLLATE utf8mb4_unicode_ci NOT NULL, + `read_date` datetime DEFAULT CURRENT_TIMESTAMP, + `read_` int(10) COLLATE utf8mb4_unicode_ci NOT NULL, `reader_ip` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, - `rsp_by` int(1) COLLATE utf8mb4_unicode_ci NOT NULL, + `rsp_by` int(1) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (rsp_id) ) {$charset_collate};"; - + dbDelta( $sql ); $sql = "CREATE TABLE IF NOT EXISTS {$table_name_status} ( `id` int(11) NOT NULL AUTO_INCREMENT, `sid` varchar(21) COLLATE utf8mb4_unicode_ci NOT NULL, - `fid` int(11) NOT NULL, + `fid` int(11) NOT NULL, `type_` int(8) NOT NULL, - `date` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, + `date` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, `status` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL, `ip` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, `os` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, - `browser` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, - `read_date` datetime DEFAULT CURRENT_TIMESTAMP, - `uid` int(10) NOT NULL, - `tc` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL, - `active` int(1) NOT NULL, + `browser` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, + `read_date` datetime DEFAULT CURRENT_TIMESTAMP, + `uid` int(10) NOT NULL, + `tc` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL, + `active` int(1) NOT NULL, PRIMARY KEY (id) ) {$charset_collate};"; - + dbDelta( $sql ); - - - + + + $user_id = get_current_user_id(); $usr =get_user_by('id',$user_id); $eml=$usr->user_email; if($eml==NULL || $eml=='') { $usr =get_user_by('id',1); - $eml = $usr ? $usr->user_email :''; + $eml = $usr ? $usr->user_email :''; } - - $s = false; + + $s = false; $v = $wpdb->get_var( "SELECT setting FROM $table_name_stng ORDER BY id DESC LIMIT 1" ); $rand = substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'), 0, 10); if($v===NULL && $s){ $setting ='{\"activeCode\":\"\",\"siteKey\":\"\",\"secretKey\":\"\",\"emailSupporter\":\"'.$eml.'\",\"apiKeyMap\":\"\",\"smtp\":\"\",\"bootstrap\":true,\"emailTemp\":\"\",\"email_key\":\"'.$rand.'\"}'; - $s = $wpdb->insert( $table_name_stng, array( 'setting' => $setting, 'edit_by' => get_current_user_id() + $s = $wpdb->insert( $table_name_stng, array( 'setting' => $setting, 'edit_by' => get_current_user_id() , 'date'=>current_time('mysql') , 'email'=>'' )); - - dbDelta( $s ); - + + dbDelta( $s ); + }else if ($v === NULL && !$s) { $setting ='{\"activeCode\":\"\",\"siteKey\":\"\",\"secretKey\":\"\",\"emailSupporter\":\"'.$eml.'\",\"apiKeyMap\":\"\",\"smtp\":\"\",\"bootstrap\":false,\"emailTemp\":\"\",\"email_key\":\"'.$rand.'\"}'; - $s = $wpdb->insert( $table_name_stng, array( 'setting' => $setting, 'edit_by' => get_current_user_id() + $s = $wpdb->insert( $table_name_stng, array( 'setting' => $setting, 'edit_by' => get_current_user_id() , 'date'=>current_time('mysql') , 'email'=>'' )); dbDelta( $s ); @@ -140,5 +140,5 @@ return $state; } - + }\ No newline at end of file
--- cache/easy-form-builder_3.8.15/includes/class-Emsfb-public.php 2025-12-04 20:29:18.558767889 +0000+++ cache/easy-form-builder_3.8.16/includes/class-Emsfb-public.php 2025-12-04 20:33:49.248003495 +0000@@ -152,6 +152,7 @@ $table_name = $this->db->prefix . "emsfb_form"; $this->id = end($id); + $this->id = intval($this->id); $value_form = $this->db->get_results( "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = '$this->id'" ); if($value_form!=null){ $typeOfForm =$value_form[0]->form_type; @@ -165,39 +166,44 @@ <h3 style='color:#202a8d;text-align: center;'>".esc_html__('Form does not exist !!','easy-form-builder')."</h3> <h4 style='color:#ff4b93;text-align: center;'>".esc_html__('Easy Form Builder', 'easy-form-builder')."</h4></div></div>"; } - $this->text_ = ["somethingWentWrongPleaseRefresh","atcfle","cpnnc","tfnapca", "icc","cpnts","cpntl","mcplen","mmxplen","mxcplen","clcdetls","vmgs","required","mmplen","offlineSend","amount","allformat","videoDownloadLink","downloadViedo","removeTheFile","pWRedirect","eJQ500","error400","errorCode","remove","minSelect","search","MMessageNSendEr","formNExist","settingsNfound","formPrivateM","pleaseWaiting","youRecivedNewMessage","WeRecivedUrM","thankFillForm","trackNo","thankRegistering","welcome","thankSubscribing","thankDonePoll","error403","errorSiteKeyM","errorCaptcha","pleaseEnterVaildValue","createAcountDoneM","incorrectUP","sentBy","newPassM","done","surveyComplatedM","error405","errorSettingNFound","errorMRobot","enterVValue","guest","cCodeNFound","errorFilePer","errorSomthingWrong","nAllowedUseHtml","messageSent","offlineMSend","uploadedFile","interval","dayly","weekly","monthly","yearly","nextBillingD","onetime","proVersion","payment","emptyCartM","transctionId","successPayment","cardNumber","cardExpiry","cardCVC","payNow","payAmount","selectOption","copy","or","document","error","somethingWentWrongTryAgain","define","loading","trackingCode","enterThePhone","please","pleaseMakeSureAllFields","enterTheEmail","formNotFound","errorV01","enterValidURL","password8Chars","registered","yourInformationRegistered","preview","selectOpetionDisabled","youNotPermissionUploadFile","pleaseUploadA","fileSizeIsTooLarge","documents","image","media","zip","trackingForm","trackingCodeIsNotValid","checkedBoxIANotRobot","messages","pleaseEnterTheTracking","alert","pleaseFillInRequiredFields","enterThePhones","pleaseWatchTutorial","formIsNotShown","errorVerifyingRecaptcha","orClickHere","enterThePassword","PleaseFillForm","selected","selectedAllOption","field","sentSuccessfully","thanksFillingOutform","sync","enterTheValueThisField","thankYou","login","logout","YouSubscribed","send","subscribe","contactUs","support","register","passwordRecovery","info","areYouSureYouWantDeleteItem","noComment","waitingLoadingRecaptcha","itAppearedStepsEmpty","youUseProElements","fieldAvailableInProversion","thisEmailNotificationReceive","activeTrackingCode","default","defaultValue","name","latitude","longitude","previous","next","invalidEmail","aPIkeyGoogleMapsError","howToAddGoogleMap","deletemarkers","updateUrbrowser","stars","nothingSelected","availableProVersion","finish","select","up","red","Red","sending","enterYourMessage","add","code","star","form","black","pleaseReporProblem","reportProblem","ddate","serverEmailAble","sMTPNotWork","aPIkeyGoogleMapsFeild","download","copyTrackingcode","copiedClipboard","browseFile","dragAndDropA","fileIsNotRight","on","off","lastName","firstName","contactusForm","registerForm","entrTrkngNo","response","reply","by","youCantUseHTMLTagOrBlank","easyFormBuilder","rnfn","fil",'stf','total','fetf','search','jqinl','eln']; + $this->text_ = ["somethingWentWrongPleaseRefresh","atcfle","cpnnc","tfnapca", "icc","cpnts","cpntl","mcplen","mmxplen","mxcplen","clcdetls","vmgs","required","mmplen","offlineSend","amount","allformat","videoDownloadLink","downloadViedo","removeTheFile","pWRedirect","eJQ500","error400","errorCode","remove","minSelect","search","MMessageNSendEr","formNExist","settingsNfound","formPrivateM","pleaseWaiting","youRecivedNewMessage","WeRecivedUrM","thankFillForm","trackNo","thankRegistering","welcome","thankSubscribing","thankDonePoll","error403","errorSiteKeyM","errorCaptcha","pleaseEnterVaildValue","createAcountDoneM","incorrectUP","sentBy","newPassM","done","surveyComplatedM","error405","errorSettingNFound","errorMRobot","enterVValue","guest","cCodeNFound","errorFilePer","errorSomthingWrong","nAllowedUseHtml","messageSent","offlineMSend","uploadedFile","interval","dayly","weekly","monthly","yearly","nextBillingD","onetime","proVersion","payment","emptyCartM","transctionId","successPayment","cardNumber","cardExpiry","cardCVC","payNow","payAmount","selectOption","copy","or","document","error","somethingWentWrongTryAgain","define","loading","trackingCode","enterThePhone","please","pleaseMakeSureAllFields","enterTheEmail","formNotFound","errorV01","enterValidURL","password8Chars","registered","yourInformationRegistered","preview","selectOpetionDisabled","youNotPermissionUploadFile","pleaseUploadA","fileSizeIsTooLarge","documents","image","media","zip","trackingForm","trackingCodeIsNotValid","checkedBoxIANotRobot","messages","pleaseEnterTheTracking","alert","pleaseFillInRequiredFields","enterThePhones","pleaseWatchTutorial","formIsNotShown","errorVerifyingRecaptcha","orClickHere","enterThePassword","PleaseFillForm","selected","selectedAllOption","field","sentSuccessfully","thanksFillingOutform","sync","enterTheValueThisField","thankYou","login","logout","YouSubscribed","send","subscribe","contactUs","support","register","passwordRecovery","info","areYouSureYouWantDeleteItem","noComment","waitingLoadingRecaptcha","itAppearedStepsEmpty","youUseProElements","fieldAvailableInProversion","thisEmailNotificationReceive","activeTrackingCode","default","defaultValue","name","latitude","longitude","previous","next","invalidEmail","aPIkeyGoogleMapsError","howToAddGoogleMap","deletemarkers","updateUrbrowser","stars","nothingSelected","availableProVersion","finish","select","up","red","Red","sending","enterYourMessage","add","code","star","form","black","pleaseReporProblem","reportProblem","ddate","serverEmailAble","sMTPNotWork","aPIkeyGoogleMapsFeild","download","copyTrackingcode","copiedClipboard","browseFile","dragAndDropA","fileIsNotRight","on","off","lastName","firstName","contactusForm","registerForm","entrTrkngNo","response","reply","by","youCantUseHTMLTagOrBlank","easyFormBuilder","rnfn","fil",'stf','total','fetf','search','jqinl','eln','copied']; $page_builder=""; - if((is_admin() || isset($_GET['vc_editable']) ||isset($_GET['vcv-ajax']) )){ + $action_post = isset($_GET['action']) ? $_GET['action'] :''; + if((is_admin() || isset($_GET['vc_editable']) ||isset($_GET['vcv-ajax']) || $action_post=='elementor' || isset($_GET['elementor-preview']) )){ - if(isset($_GET['vc_editable'])) $page_builder='vc_editable'; - else if(isset($_GET['vc_editable'])) $page_builder = 'wpbakery'; - else if (isset($_GET['action']) && $_GET['action']=='elementor'){ + if(isset($_GET['vc_editable'])){ $page_builder='vc_editable';} + else if(isset($_GET['vc_editable'])) {$page_builder = 'wpbakery';} + else if ( ( isset($_GET['action']) && $_GET['action']=='elementor') || isset($_GET['elementor-preview']) ){ $page_builder='elementor'; } + //Click here to edit your Easy Form Builder shortcode. $content=" - - - <div id='body_efb' class='efb row pb-3 efb px-2'> - <div style='width:100%;text-align: center;'> - <img src=".EMSFB_PLUGIN_URL . "includes/admin/assets/image/logo-easy-form-builder.svg' alt='Easy Form Builder' style='height: 80px;'> - </div><h4 style='color:#202a8d;text-align: center;'>".esc_html__('The form will be displayed in publication or preview modes.', 'easy-form-builder')."</h4> - <h3 style='color:#ff4b93;text-align: center;'>".esc_html__('Easy Form Builder', 'easy-form-builder')."</h3> - </div> + <div id='body_efb' class='efb row pb-3 efb px-2'> + <div style='width:100%;text-align: center;'> + <img src=". EMSFB_PLUGIN_URL . 'includes/admin/assets/image/logo-easy-form-builder.svg'." alt='Easy Form Builder' style='height: 80px'> + </div> + <h4 style='color:#202a8d;text-align: center;'> + ".esc_html__('You can only see the form in Preview or Publish mode.', 'easy-form-builder')." + </h4> + <p style='text-align: center; font-size:12px'> + ". esc_html__('Click here to edit your Easy Form Builder shortcode.', 'easy-form-builder') ." + </p> + <h3 style='color:#ff4b93;text-align: center;'> + ".esc_html__('Easy Form Builder', 'easy-form-builder')." + </h3> </div> "; return $content; } - - $this->public_scripts_and_css_head(); @@ -245,7 +251,13 @@ $iconsd = array_merge($icons_[0] , $icons[0]); $icons_ = array_unique($iconsd); - $value = preg_replace('/\\\"email\\\":\\\"(.*?)\\\"/', '\"email\":\"\"', $value); + $value = preg_replace('/\\\"email\\\":\\\"(.*?)\\\"/', '\"email\":\"\"', $value); + + $iconst_html_preload ='<div style="display:none;">'; + foreach($iconsd as $icon){ + $iconst_html_preload .= "<i class='bi $icon'></i>"; + } + $iconst_html_preload .='</div>'; $lang = get_locale(); $lang =strpos($lang,'_')!=false ? explode( '_', $lang )[0]:$lang; @@ -324,7 +336,7 @@ } - }// end if payment + } $ar_core = array_merge($ar_core , array( 'paymentGateway' =>$paymentType, 'paymentKey' => $paymentKey @@ -349,10 +361,12 @@ } require_once(EMSFB_PLUGIN_DIRECTORY."/vendor/arabicdatepicker/arabicdate.php"); $arabicDatePicker = new arabicDatePickerEfb() ; - }// end if custom date + } if(strpos($value , '\"type\":\"mobile\"') || strpos($value , '"type":"mobile"')){ $img = [ - 'utilsJs'=>''.EMSFB_PLUGIN_URL . 'includes/admin/assets/js/utils-efb.js' + 'utilsJs'=>''.EMSFB_PLUGIN_URL . 'includes/admin/assets/js/utils-efb.js', + "logo" => ''.EMSFB_PLUGIN_URL . 'includes/admin/assets/image/logo-easy-form-builder.svg', + "head"=> ''.EMSFB_PLUGIN_URL . 'includes/admin/assets/image/header.png', ]; wp_register_script('intlTelInput-js', EMSFB_PLUGIN_URL . 'includes/admin/assets/js/intlTelInput.min-efb.js', null, null, true); wp_enqueue_script('intlTelInput-js'); @@ -477,6 +491,7 @@ $content=" ".$this->bootstrap_icon_efb($icons_)." + ".$iconst_html_preload." <div id='body_efb' class='efb row pb-3 efb px-2'> <div class='efb text-center my-5'> ".$this->loading_icon_public_efb('',$lanText["pleaseWaiting"] , $lanText["fil"])." @@ -678,7 +693,13 @@ $rePage ="null"; $table_name = $this->db->prefix . "emsfb_form"; - $value_form = $this->db->get_results( "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = '$this->id'" ); + $this->id = intval($this->id); + $value_form = $this->db->get_results( + $this->db->prepare( + "SELECT form_structer, form_type FROM `$table_name` WHERE form_id = %d", + $this->id + ) + ); $fs = isset($value_form) ? str_replace('\\', '', $value_form[0]->form_structer) :''; $not_captcha=$formObj= $trackingCode_state = $send_email_to_user_state = $check = ""; $email_user= array(); @@ -738,21 +759,14 @@ $fs = null; $email_array_state = isset($formObj[0]["email_send_type"]) ? $formObj[0]["email_send_type"] : false; if( !isset($valo['logout']) && !isset($valo['recovery']) ){ - $email_fa = $formObj[0]["email"]; - if(!empty($email_fa)){ - $is_multipleEmail = strpos($email_fa, ',') !== false; - emails_list($email_user , 0 , $email_fa ,$is_multipleEmail); - /* if (strpos($email_fa, ',') !== false){ - $emails = explode(',', $formObj[0]["email"]); - foreach ($emails as $email) { - if(!in_array($email, $email_user[0])) array_push($email_user[0] ,$email); - } - }else{ - array_push($email_user[0] ,$email_fa); - } */ if(isset($setting['smtp']) && (bool)$setting['smtp'] ){ $send_email_to_user_state = true; } + + $email_fa = $formObj[0]["email"]; + if($send_email_to_user_state && !empty($email_fa)){ + $is_multipleEmail = strpos($email_fa, ',') !== false; + emails_list($email_user , 0 , $email_fa ,$is_multipleEmail); } @@ -1382,75 +1396,78 @@ - $captcha_success="null"; - $r= $this->setting ; - $formObj = array_slice($formObj, 0, 1); + $captcha_success="null"; + $r= $this->setting ; + $formObj = array_slice($formObj, 0, 1); - if(gettype($r)=="string"){ + if(gettype($r)=="string"){ - $setting =str_replace('\\', '', $r); - $r=null; + $setting =str_replace('\\', '', $r); + $r=null; - $setting =json_decode($setting); - $this->setting=$setting; - $email_fa = $setting->emailSupporter; + $setting =json_decode($setting); + $this->setting=$setting; + $email_fa = $setting->emailSupporter; - if(!empty($email_fa) ){ - emails_list($email_user , 0 , $email_fa , $email_array_state); + if(isset($setting->smtp) && (bool)$setting->smtp ){ + $send_email_to_user_state = true; + } + if($send_email_to_user_state && !empty($email_fa)){ + emails_list($email_user , 0 , $email_fa , $email_array_state); - if(isset($setting->smtp) && (bool)$setting->smtp ){ - $send_email_to_user_state = true; - } - } - if(isset($setting->femail) && is_email($setting->femail)) $email_user[2] = $setting->femail ; + } + if(isset($setting->femail) && is_email($setting->femail)) $email_user[2] = $setting->femail ; - $secretKey= isset($setting->secretKey) && strlen($setting->secretKey)>5 ? $setting->secretKey : null; - $server_name = str_replace("www.", "", $_SERVER['HTTP_HOST']); - if(isset($setting->activeCode) &&!empty($setting->activeCode) && md5($server_name) ==$setting->activeCode){ - $pro=true; - } - $response=$data_POST['valid']; - $args = array( - 'secret' => $secretKey, - 'response' => $response, - ); - if(gettype($formObj)!="string" && $formObj[0]['type']!='payment' && $formObj[0]['captcha']==true && strlen($response)>5 && $formObj[0]["captcha"]==true){ - if(isset($setting->secretKey) && strlen($setting->secretKey)>5){ - $verify = wp_remote_get( "https://www.google.com/recaptcha/api/siteverify?secret={$secretKey}&response={$response}" ); + $secretKey= isset($setting->secretKey) && strlen($setting->secretKey)>5 ? $setting->secretKey : null; + $server_name = str_replace("www.", "", $_SERVER['HTTP_HOST']); + if(isset($setting->activeCode) &&!empty($setting->activeCode) && md5($server_name) ==$setting->activeCode){ + $pro=true; + } + $response=$data_POST['valid']; + $args = array( + 'secret' => $secretKey, + 'response' => $response, + ); + if(gettype($formObj)!="string" && $formObj[0]['type']!='payment' && $formObj[0]['captcha']==true && strlen($response)>5 && $formObj[0]["captcha"]==true){ + if(isset($setting->secretKey) && strlen($setting->secretKey)>5){ + $verify = wp_remote_get( "https://www.google.com/recaptcha/api/siteverify?secret={$secretKey}&response={$response}" ); - $captcha_success =json_decode($verify['body']); + $captcha_success =json_decode($verify['body']); - }else{ + }else{ - $response = array( 'success' => false , 'm'=>$this->lanText["errorSiteKeyM"]); + $response = array( 'success' => false , 'm'=>$this->lanText["errorSiteKeyM"]); + wp_send_json_success($response,$data_POST); + return; + } + } + } + if ($type=="logout" || $type=="recovery") { + $not_captcha=false; + if($type!="recovery") $send_email_to_user_state=false; + } + if ($not_captcha==true && ( $captcha_success=="null" || $captcha_success->success!=true ) ) { + $response = array( 'success' => false , 'm'=>$this->lanText["errorCaptcha"]); + wp_send_json_success($response,$data_POST); + die(); + }else if ($not_captcha==false || ($not_captcha==true && $captcha_success->success==true)) { + if(empty($data_POST['value']) || empty($data_POST['name']) || empty($data_POST['id']) ){ + $response = array( 'success' => false , "m"=>$this->lanText["pleaseEnterVaildValue"]); wp_send_json_success($response,$data_POST); - return; + die(); + } + $this->name = sanitize_text_field($data_POST['name']); + $this->id = sanitize_text_field($data_POST['id']); + if($send_email_to_user_state){ + array_filter($valobj, function($item) use($formObj ,&$emailuser){ + if(isset($item['id_']) && $item['id_']==$formObj[0]["email_to"]){ + $emailuser = $item["value"]; + } + }); + emails_list($email_user , 1 , $emailuser , $email_array_state); } - } - } - if ($type=="logout" || $type=="recovery") {$not_captcha=false; $send_email_to_user_state=false;} - if ($not_captcha==true && ( $captcha_success=="null" || $captcha_success->success!=true ) ) { - $response = array( 'success' => false , 'm'=>$this->lanText["errorCaptcha"]); - wp_send_json_success($response,$data_POST); - die(); - }else if ($not_captcha==false || ($not_captcha==true && $captcha_success->success==true)) { - if(empty($data_POST['value']) || empty($data_POST['name']) || empty($data_POST['id']) ){ - $response = array( 'success' => false , "m"=>$this->lanText["pleaseEnterVaildValue"]); - wp_send_json_success($response,$data_POST); - die(); - } - $this->name = sanitize_text_field($data_POST['name']); - $this->id = sanitize_text_field($data_POST['id']); - if($send_email_to_user_state==true ){ - array_filter($valobj, function($item) use($formObj ,&$emailuser){ - if(isset($item['id_']) && $item['id_']==$formObj[0]["email_to"]){ - $emailuser = $item["value"]; - return true;} - }); - emails_list($email_user , 1 , $emailuser , $email_array_state); - } $ip = $this->ip=$this->get_ip_address(); switch($type){ @@ -1467,24 +1484,14 @@ $this->efbFunction->sms_ready_for_send_efb($this->id, $phone_numbers,$url,'fform' ,'wpsms' ,$check ); } - if($send_email_to_user_state==true){ + if($send_email_to_user_state){ emails_list($email_user , 0 , $email_fa , $email_array_state); $state_email_user = $trackingCode_state==1 ? 'notiToUserFormFilled_TrackingCode' : 'notiToUserFormFilled'; - $state_of_email = ['newMessage',$state_email_user]; - $msg_content='null'; - if(isset($formObj[0]["email_noti_type"]) && $formObj[0]["email_noti_type"]=='msg'){ - $msg_content =$this->email_get_content($valobj ,$check); - $msg_content = str_replace("\"","'",$msg_content); - - } - $msg_sub = 'null'; - if(isset($formObj[0]["email_sub"]) && $formObj[0]["email_sub"]!=''){ - $msg_sub = $formObj[0]["email_sub"]; - } - - $this->send_email_Emsfb_( $email_user,$check ,$pro,$state_of_email,$url,$msg_content,$msg_sub ); + $status_email = $this->email_status_efb($formObj,$valobj,$check); + $state_of_email = ['newMessage',$state_email_user,$status_email['type']]; + $this->send_email_Emsfb_( $email_user,$check ,$pro,$state_of_email,$url,$status_email['content'], $status_email['subject'] ); } wp_send_json_success($response,$data_POST); break; @@ -1498,7 +1505,13 @@ wp_send_json_success($response,$data_POST); die(); } - $value = $this->db->get_results( "SELECT content,form_id FROM `$table_name_` WHERE track = '$id' AND read_=2" ); + $sql = $this->db->prepare( + "SELECT content, form_id FROM `$table_name_` WHERE track = %s AND read_ = %d", + $id, + 2 + ); + + $value = $this->db->get_results($sql); $trackId= $id; if($value!=null){ $vv=$value[0]->content; @@ -1560,7 +1573,12 @@ } $form_id = $value[0]->form_id; $table_name = $this->db->prefix . "emsfb_form"; - $fs = $this->db->get_results( "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = '$form_id'" ); + $fs = $this->db->get_results( + $this->db->prepare( + "SELECT form_structer, form_type FROM `$table_name` WHERE form_id = %d", + $form_id + ) + ); $fs = isset($fs[0]->form_structer) ? str_replace('\\', '', $fs[0]->form_structer) :''; if($fs==''){ $response = array( 'success' => false ,'m'=>'Error 406'); @@ -1598,23 +1616,12 @@ - if($send_email_to_user_state==true){ + if($send_email_to_user_state){ $state_email_user = $trackingCode_state==1 ? 'notiToUserFormFilled_TrackingCode' : 'notiToUserFormFilled'; - $state_of_email = ['newMessage',$state_email_user]; - $msg_content='null'; - if(isset($formObj[0]["email_noti_type"]) && $formObj[0]["email_noti_type"]=='msg'){ - - $msg_content =$this->email_get_content($fs ,$trackId); - $msg_content = str_replace("\"","'",$msg_content); - - } - - $msg_sub = 'null'; - if(isset($formObj[0]["email_sub"]) && $formObj[0]["email_sub"]!=''){ - $msg_sub = $formObj[0]["email_sub"]; - } - $this->send_email_Emsfb_( $email_user,$trackId ,$pro,$state_of_email,$url,$msg_content,$msg_sub ); + $status_email = $this->email_status_efb($formObj,$valobj,$check); + $state_of_email = ['newMessage',$state_email_user,$status_email['type']]; + $this->send_email_Emsfb_( $email_user,$trackId ,$pro,$state_of_email,$url,$state_of_email['content'],$state_of_email['subject'] ); } if(isset($formObj[0]['smsnoti']) && $formObj[0]['smsnoti']==1 ) $this->efbFunction->sms_ready_for_send_efb($form_id, $phone_numbers,$url,'fform' ,'wpsms' ,$check); $fs=[]; @@ -1700,7 +1707,7 @@ $state_of_email = ['newUser','register']; - if($send_email_to_user_state==true) + if($send_email_to_user_state) { $msg_sub = 'null'; if(isset($formObj[0]["email_sub"]) && $formObj[0]["email_sub"]!=''){ @@ -1828,21 +1835,10 @@ case "subscribe": $check= $this->insert_message_db(0,false); - if($send_email_to_user_state==true){ - - - $state_of_email = ['newMessage','subscribe']; - $msg_content='null'; - if(isset($formObj[0]["email_noti_type"]) && $formObj[0]["email_noti_type"]=='msg'){ - $msg_content =$this->email_get_content($valobj ,$check); - $msg_content = str_replace("\"","'",$msg_content); - - } - $msg_sub = 'null'; - if(isset($formObj[0]["email_sub"]) && $formObj[0]["email_sub"]!=''){ - $msg_sub = $formObj[0]["email_sub"]; - } - $this->send_email_Emsfb_( $email_user,$check ,$pro,$state_of_email,$url,$msg_content,$msg_sub ); + if($send_email_to_user_state){ + $status_email = $this->email_status_efb($formObj,$valobj,$check); + $state_of_email = ['newMessage','subscribe',$status_email['type']]; + $this->send_email_Emsfb_( $email_user,$check ,$pro,$state_of_email,$url,$status_email['content'],$status_email['subject'] ); } $response = array( 'success' => true , 'm' =>$this->lanText["done"]); @@ -1854,21 +1850,12 @@ $check= $this->insert_message_db(0,false); - if($send_email_to_user_state==true){ - + if($send_email_to_user_state){ - $state_of_email = ['newMessage',"survey"]; - $msg_content='null'; - if(isset($formObj[0]["email_noti_type"]) && $formObj[0]["email_noti_type"]=='msg'){ - $msg_content =$this->email_get_content($valobj ,$check); - $msg_content = str_replace("\"","'",$msg_content); + $status_email = $this->email_status_efb($formObj,$valobj,$check); + $state_of_email = ['newMessage',"survey",$status_email['type']]; - } - $msg_sub = 'null'; - if(isset($formObj[0]["email_sub"]) && $formObj[0]["email_sub"]!=''){ - $msg_sub = $formObj[0]["email_sub"]; - } - $this->send_email_Emsfb_( $email_user,$check ,$pro,$state_of_email,$url,$msg_content,$msg_sub ); + $this->send_email_Emsfb_( $email_user,$check ,$pro,$state_of_email,$url,$status_email['content'],$status_email['subject'] ); } if(isset($formObj[0]['smsnoti']) && $formObj[0]['smsnoti']==1 ) $this->efbFunction->sms_ready_for_send_efb($this->id, $phone_numbers,$url,'fform' ,'wpsms' ,$check); $response = array( 'success' => true , 'm' =>$this->lanText["surveyComplatedM"]); @@ -1929,16 +1916,25 @@ $ip = $this->ip; $table_name = $this->db->prefix . "emsfb_msg_"; - $value = $this->db->get_results( "SELECT content,msg_id,track,date FROM `$table_name` WHERE track = '$id'" ); + $value = $this->db->get_results( + $this->db->prepare( + "SELECT content, msg_id, track, date FROM `$table_name` WHERE track = %s", + $id + ) + ); if($value!=null){ $id=$value[0]->msg_id; $id = preg_replace('/[,]+/','',$id); - $this->id =$id; + $this->id =intval($id); + $id = intval($id); $table_name = $this->db->prefix . "emsfb_rsp_"; - $content = $this->db->get_results( "SELECT * FROM `$table_name` WHERE msg_id = '$id'" ); - + $sql = $this->db->prepare( + "SELECT * FROM `$table_name` WHERE msg_id = %d", + $id + ); + $content = $this->db->get_results($sql); foreach($content as $key=>$val){ $r = (int)$val->rsp_by; if ($r>0){ @@ -2000,7 +1996,7 @@ } public function file_upload_public(){ - $_POST['id']=sanitize_text_field($_POST['id']); + $_POST['id']=intval($_POST['id']); $_POST['pl']=sanitize_text_field($_POST['pl']); $_POST['nonce_msg']=sanitize_text_field($_POST['nonce_msg']); $page_id = sanitize_text_field($_POST['page_id']); @@ -2011,7 +2007,12 @@ }else{ $id = $_POST['id']; $table_name = $this->db->prefix . "emsfb_form"; - $vl = $this->db->get_var("SELECT form_structer FROM `$table_name` WHERE form_id = '$id'"); + $vl = $this->db->get_var( + $this->db->prepare( + "SELECT form_structer FROM `$table_name` WHERE form_id = %d", + $id + ) + ); if($vl!=null){ if(strpos($vl , '\"type\":\"dadfile\"') || strpos($vl , '\"type\":\"file\"')){ $vl ='efb'.$id; @@ -2056,9 +2057,9 @@ public function file_upload_api(){ $efbFunction = $this->get_efbFunction(1); - $_POST['id']=sanitize_text_field($_POST['id']); + $_POST['id']=intval($_POST['id']); $_POST['pl']=sanitize_text_field($_POST['pl']); - $fid=sanitize_text_field($_POST['fid']); + $fid=intval($_POST['fid']); $sid = sanitize_text_field($_POST['sid']); $page_id = sanitize_text_field($_POST['page_id']); @@ -2087,7 +2088,10 @@ $id = $_POST['id']; $table_name = $this->db->prefix . "emsfb_form"; - $vl = $this->db->get_var("SELECT form_structer FROM `$table_name` WHERE form_id = '$fid'"); + $vl = $this->db->get_var( $this->db->prepare( + "SELECT form_structer FROM `$table_name` WHERE form_id = %d", + $fid + )); if($vl!=null){ if(gettype($vl)=="string"){ $temp = strpos($vl , '\"type\":\"dadfile\"') || strpos($vl , '\"type\":\"file\"') ? true : false; @@ -2342,9 +2346,13 @@ $table_name = $this->db->prefix . "emsfb_msg_"; - + $id = intval($id); $value=null; - $value = $this->db->get_results( "SELECT * FROM `$table_name` WHERE msg_id = '$id'" ); + $value = $this->db->get_results($this->db->prepare( + "SELECT * FROM `$table_name` WHERE msg_id = %d", + $id + ) + ); if($value==null|| $value[0]->read_==4){ $response = array( 'success' => false , 'm'=>$this->lanText["error405"]); @@ -2398,9 +2406,14 @@ $by = $usr->user_nicename; $email_usr = $usr->user_email; } - $form_id = $value[0]->form_id; + $form_id = intval($value[0]->form_id); $table_name = $this->db->prefix . "emsfb_form"; - $vald = $this->db->get_results( "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = '$form_id'" ); + $vald = $this->db->get_results( + $this->db->prepare( + "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = %d", + $form_id + ) + ); $valb =str_replace('\\', '', $vald[0]->form_structer); $valn= json_decode($valb,true); @@ -2408,19 +2421,45 @@ $valb=null; - $users_email =array();; + $users_email =array(); + + /* + + $emailsId=[]; + foreach($data as $key=>$val){ + error_log('-----> data: ' . json_encode($val)); + if($val['type']=="email" && isset($val['noti']) && in_array($val['noti'] ,[1,'1',true,'true'],true) ){ + $emailsId[]=$val['id_']; + } + } + + */ + $emailsId = []; + foreach($valn as $key=>$val){ + if($val['type']=="email" && isset($val['noti']) && in_array($val['noti'] ,[1,'1',true,'true'],true) ){ + $emailsId[]=$val['id_']; + } + } - if(isset($id)){ + /* if(isset($id)){ foreach ($msg_obj as $key => $value) { if(isset($value['id_']) && $value['id_']==$valn[0]["email_to"]){ array_push($users_email,$value["value"]); - break; } } + } */ + + if(!empty($emailsId)){ + foreach ($msg_obj as $value) { + if(isset($value['id_']) && in_array($value['id_'],$emailsId)){ + array_push($users_email,$value["value"]); + } + } } + $smsnoti = (isset($valn[0]['smsnoti']) && intval($valn[0]['smsnoti'])==1) ? 1 :0; if($smsnoti){ @@ -2720,10 +2759,15 @@ return "<div id='body_efb' class='efb card-public row pb-3 efb px-2' style='color: #9F6000; background-color: #FEEFB3; padding: 5px 10px;'> <div class='efb text-center my-5'><h2 style='text-align: center;'></h2><h3 class='efb warning text-center text-darkb fs-4'>".esc_html__('We have some changes. Please wait a few minutes before you try again.', 'easy-form-builder')."</h3><p class='efb fs-5 text-center my-1 text-pinkEfb' style='text-align: center;'><p></div></div>"; } require_once(EMSFB_PLUGIN_DIRECTORY."/vendor/autoload.php"); - $this->id = sanitize_text_field($data_POST['id']); + $this->id = intval($data_POST['id']); $val_ = sanitize_text_field($data_POST['value']); $table_name = $this->db->prefix . "emsfb_form"; - $value_form = $this->db->get_results( "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = '$this->id'" ); + $value_form = $this->db->get_results( + $this->db->prepare( + "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = %d", + $this->id + ) + ); $fs =str_replace('\\', '', $value_form[0]->form_structer); $fs_ = json_decode($fs,true); $val =str_replace('\\', '', $val_); @@ -2923,11 +2967,17 @@ wp_send_json_success($response, 200); die("secure!"); } - $this->id = sanitize_text_field($data_POST['id']); + + $this->id = intval($data_POST['id']); $val_ = sanitize_text_field($data_POST['value']); $url = sanitize_url($data_POST['url']); $table_name = $this->db->prefix . "emsfb_form"; - $value_form = $this->db->get_results( "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = '$this->id'" ); + $value_form = $this->db->get_results( + $this->db->prepare( + "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = %d", + $this->id + ) + ); $fs =str_replace('\\', '', $value_form[0]->form_structer); $fs_ = json_decode($fs,true); $val =str_replace('\\', '', $val_); @@ -3080,11 +3130,17 @@ wp_send_json_success($response, 200); die("secure!"); } - $this->id = sanitize_text_field($_POST['id']); + + $this->id = intval($_POST['id']); $val_ = sanitize_text_field($_POST['value']); $url = sanitize_url($_POST['url']); $table_name = $this->db->prefix . "emsfb_form"; - $value_form = $this->db->get_results( "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = '$this->id'" ); + $value_form = $this->db->get_results( + $this->db->prepare( + "SELECT form_structer ,form_type FROM `$table_name` WHERE form_id = %d", + $this->id + ) + ); $fs =str_replace('\\', '', $value_form[0]->form_structer); $fs_ = json_decode($fs,true); $val =str_replace('\\', '', $val_); @@ -4073,6 +4129,26 @@ return isset($symbols[$currency]) ? $symbols[$currency] : array('s' => $currency, 'd' => 2); } + + + public function email_status_efb($formObj,$valobj,$check){ + + $msg_content='null'; + $msg_type ='traking_link'; + $msg_sub = 'null'; + + if(isset($formObj[0]["email_noti_type"]) && ( $formObj[0]["email_noti_type"]=='msg' || $formObj[0]["email_noti_type"]=='just_msg' )){ + $msg_content =$this->email_get_content($valobj ,$check); + $msg_content = str_replace("\"","'",$msg_content); + $msg_type = $formObj[0]["email_noti_type"]=='msg' ? 'message_link' : 'just_message'; + + } + if(isset($formObj[0]["email_sub"]) && $formObj[0]["email_sub"]!=''){ + $msg_sub = $formObj[0]["email_sub"]; + } + return ['subject'=>$msg_sub,'content'=>$msg_content,'type'=>$msg_type]; + } + } new _Public();
--- cache/easy-form-builder_3.8.15/includes/class-Emsfb-requirement.php 2025-12-04 20:29:18.562768144 +0000+++ cache/easy-form-builder_3.8.16/includes/class-Emsfb-requirement.php 2025-12-04 20:33:49.260004260 +0000@@ -36,7 +36,6 @@ - if (!function_exists('mail')) { return [ 'status' => 'error',
--- cache/easy-form-builder_3.8.15/includes/functions.php 2025-12-04 20:29:18.562768144 +0000+++ cache/easy-form-builder_3.8.16/includes/functions.php 2025-12-04 20:33:49.260004260 +0000@@ -403,7 +403,7 @@ "formNExist" => $state ? $ac->text->formNExist : esc_html__('Form does not exist !!',$s), "error403" => $state ? $ac->text->error403 : esc_html__('Your security session has expired or is invalid. Please refresh the page. E403',$s), "error400" => $state ? $ac->text->error400 : esc_html__('Your security session has expired or is invalid. Please refresh the page. E400',$s), - "formPrivateM" => $state ? $ac->text->formPrivateM : esc_html__('Private form, please log in.',$s), + "formPrivateM" => $state && isset($ac->text->formPrivateM) ? $ac->text->formPrivateM : esc_html__('This is a private form. Please log in to access it.',$s), "errorSiteKeyM" => $state ? $ac->text->errorSiteKeyM : esc_html__('Please check the site key and secret key on Easy Form Builder panel > Settings > Google Keys to resolve the error.',$s), "errorCaptcha" => $state ? $ac->text->errorCaptcha : esc_html__('There seems to be a problem with the Captcha. Please try again.',$s), "createAcountDoneM" => $state ? $ac->text->createAcountDoneM : esc_html__('Your account has been successfully created! You will receive an email containing your information',$s), @@ -446,7 +446,7 @@ "freefeatureNotiEmail" => $state && isset($ac->text->freefeatureNotiEmail) ? $ac->text->freefeatureNotiEmail : esc_html__('One of the free features of Easy Form Builder is the ability to send a notification email to either the admin or user.',$s), "notFound" => $state && isset($ac->text->notFound) ? $ac->text->notFound : esc_html__('Not Found',$s), "editor" => $state && isset($ac->text->editor) ? $ac->text->editor : esc_html__('Editor',$s), - "addSCEmailM" => $state && isset($ac->text->addSCEmailM) ? $ac->text->addSCEmailM : esc_html__('Please add these shortcodes shortcode_message and shortcode_title to the email template.',$s), + "addSCEmailM" => $state && isset($ac->text->addSCEmailM) ? $ac->text->addSCEmailM : esc_html__('Please add the shortcode_message shortcode to the email template.',$s), "ChrlimitEmail" => $state && isset($ac->text->ChrlimitEmail) ? $ac->text->ChrlimitEmail : esc_html__('Your Email Template cannot exceed 10,000 characters.',$s), "pleaseEnterVaildEtemp" => $state && isset($ac->text->pleaseEnterVaildEtemp) ? $ac->text->pleaseEnterVaildEtemp : esc_html__('Please use HTML tags to create your email template.',$s), "infoEmailTemplates" => $state && isset($ac->text->infoEmailTemplates) ? $ac->text->infoEmailTemplates : esc_html__('To create an email template using HTML2, use the following shortcodes. Please note that the shortcodes marked with an asterisk (*) should be included in the email template.',$s), @@ -510,8 +510,8 @@ "submit" => $state && isset($ac->text->submit) ? $ac->text->submit : esc_html__('Submit',$s), "purchaseOrder" => $state && isset($ac->text->purchaseOrder) ? $ac->text->purchaseOrder : esc_html__('Purchase Order',$s), "paymentNcaptcha" => $state && isset($ac->text->paymentNcaptcha) ? $ac->text->paymentNcaptcha : esc_html__('It is not possible to include reCAPTCHA on payment forms.',$s), - "PleaseMTPNotWork" => $state && isset($ac->text->PleaseMTPNotWork) ? $ac->text->PleaseMTPNotWork : esc_html__('Easy Form Builder could not confirm if your service is able to send emails. Please check your email inbox (or spam folder) to see if you have received an email with the subject line: Email server [Easy Form Builder]. If you have received the email, please select the option < I confirm that this host supports SMTP > and save the changes.',$s), - "hostSupportSmtp" => $state && isset($ac->text->hostSupportSmtp) ? $ac->text->hostSupportSmtp : esc_html__('I confirm that this host supports SMTP',$s), + "PleaseMTPNotWork" => $state && isset($ac->text->PleaseMTPNotWork) ? $ac->text->PleaseMTPNotWork : esc_html__('Easy Form Builder could not confirm if your service is able to send emails. Please check your email inbox (or spam folder) to see if you have received an email with the subject line: Email server [Easy Form Builder]. If you have received the email, please select the option < This site can send emails > and save the changes.',$s), + "hostSupportSmtp" => $state && isset($ac->text->hostSupportSmtp) ? $ac->text->hostSupportSmtp : esc_html__('This site can send emails',$s), "PleaseMTPNotWork2" => $state && isset($ac->text->PleaseMTPNotWork2) ? $ac->text->PleaseMTPNotWork2 : esc_html__('Easy Form Builder could not confirm that your server can send emails. Please check your inbox or spam folder for an email with the subject: "Email server [Easy Form Builder]". If you received it, please enable the "%s" toggle and save your changes.',$s), "hostSupportSmtp2" => $state && isset($ac->text->hostSupportSmtp2) ? $ac->text->hostSupportSmtp2 : esc_html__('I confirm that this WordPress site is able to send emails properly',$s), "interval" => $state && isset($ac->text->interval) ? $ac->text->interval : esc_html__('Interval',$s), @@ -707,8 +707,8 @@ "sms_dnoti" => $state && isset($ac->text->sms_dnoti) ? $ac->text->sms_dnoti : esc_html__('To send informational text messages, such as notifications or new messages, please enter the mobile numbers of the administrators here.',$s), "sms_ndnoti" => $state && isset($ac->text->sms_ndnoti) ? $ac->text->sms_ndnoti : esc_html__(' Note that by entering mobile numbers, all notification messages for all forms and other informational texts will be sent to the provided numbers.',$s), "emlc" => $state && isset($ac->text->emlc) ? $ac->text->emlc : esc_html__('Choose Email notification content',$s), - "emlacl" => $state && isset($ac->text->emlacl) ? $ac->text->emlacl : esc_html__('The email includes the confirmation code and link',$s), - "emlml" => $state && isset($ac->text->emlml) ? $ac->text->emlml : esc_html__('The email includes the filled form and link',$s), + "emlacl" => $state && isset($ac->text->emlacl) ? $ac->text->emlacl : esc_html__('Send email with confirmation code and link',$s), + "emlml" => $state && isset($ac->text->emlml) ? $ac->text->emlml : esc_html__('Send email with submitted form content and link',$s), "msgemlmp" => $state && isset($ac->text->msgemlmp) ? $ac->text->msgemlmp : esc_html__('To view the map and selected points, simply click here to navigate to the received message page',$s), "msgchckvt" => $state && isset($ac->text->msgchckvt) ? $ac->text->msgchckvt : esc_html__('Review the entered values in the XXX tab.this message appeared because an error is detected.',$s), @@ -771,6 +771,9 @@ "alns" => $state && isset($ac->text->alns) ? $ac->text->alns : esc_html__('The %s1 pages are currently unavailable. It looks like another plugin is causing a conflict with %s1 . To fix this issue, %s2 contact %s1 support %s3 for assistance or try disabling your plugins one at a time to identify the one causing the conflict.',$s), "notis" => $state && isset($ac->text->noti) ? $ac->text->noti : esc_html__('%s notification',$s), "settings" => $state && isset($ac->text->settings) ? $ac->text->settings : esc_html__('Settings',$s), + "emlcc" => $state && isset($ac->text->emlcc) ? $ac->text->emlcc : esc_html__('Send email with submitted form content only',$s), + "copied" => $state && isset($ac->text->copied) ? $ac->text->copied : esc_html__('copied!',$s), + "srvnrsp" => $state && isset($ac->text->srvnrsp) ? $ac->text->srvnrsp : esc_html__('The website is not responding; please refresh and try again-saving or submitting is not available until it is restored.',$s), "thank" => $state && isset($ac->text->thank) ? $ac->text->thank : esc_html__('Thank',$s) ]; @@ -798,6 +801,7 @@ public function send_email_state_new($to ,$sub ,$cont,$pro,$state,$link,$st="null"){ add_filter( 'wp_mail_content_type',[$this, 'wpdocs_set_html_mail_content_type' ]); + $email_content_type = isset($state[2]) ? $state[2] : 'traking_link' ; $mailResult = "n"; if(gettype($to) == 'array')ksort($to); $from =get_bloginfo('name')." <no-reply@".$_SERVER['SERVER_NAME'].">"; @@ -818,7 +822,7 @@ ); if(gettype($sub)=='string'){ - $message = $this->email_template_efb($pro,$state,$cont,$link,$st); + $message = $this->email_template_efb($pro,$state,$cont,$link,$email_content_type,$st); if( $state!="reportProblem"){ $to_;$mailResult; if (gettype($to) == 'string') { @@ -863,7 +867,8 @@ }else{ for($i=0 ; $i<2 ; $i++){ if(empty($to[$i])==false && $to[$i]!="null" && $to[$i]!=null && $to[$i]!=[null] && $to[$i]!=[]){ - $message = $this->email_template_efb($pro,$state[$i],$cont[$i],$link[$i],$st); + + $message = $this->email_template_efb($pro,$state[$i],$cont[$i],$link[$i],$email_content_type,$st); if( $state!="reportProblem"){ $to_;$mailResult; $to_ = $to[$i]; @@ -896,8 +901,7 @@ return $mailResult; } - public function email_template_efb($pro, $state, $m,$link ,$st="null"){ - + public function email_template_efb($pro, $state, $m,$link ,$email_content_type,$st="null"){ $l ='https://whitestudio.team'; $wp_lan = get_locale(); if($wp_lan=="fa_IR"){ $l='https://easyformbuilder.ir' ;} @@ -933,7 +937,14 @@ $dts = $lang['msgdml']; - + $track_id = ''; + if(gettype($m)=='string'){ + $track_id =$m; + }else{ + $track_id=$m[0]; + } + $dts = str_replace('%s', $track_id, $dts); + $tracking_section = $email_content_type=='just_message' ? "" : "<div id='sectionTracking'><p style='text-align:center'>".$dts." </p><div style='text-align:center'><a href='".$link."' target='_blank' style='padding:5px;color:white;background:black;' >".$lang['vmgs']."</a></div></div>"; if($state=="testMailServer"){ $dt = $lang['msgnml']; $de = $lang['mlntip']; @@ -970,20 +981,17 @@ }elseif($state=="newMessage"){ + if(gettype($m)=='string'){ $dts = str_replace('%s', $m, $dts); $link = strpos($link,"?")==true ? $link.'&track='.$m : $link.'?track='.$m; $message ="<h2 style='text-align:center'>".$lang["newMessageReceived"]."</h2> - <p style='text-align:center'>". $lang["trackingCode"].": ".$m." </p> - <p style='text-align:center'>".$dts." </p> - <div style='text-align:center'><a href='".$link."' target='_blank' style='padding:5px;color:white;background:black;'>".$lang['vmgs']."</a></div>"; + <p style='text-align:center'>". $lang["trackingCode"].": ".$m." </p>".$tracking_section ; }else{ $dts = str_replace('%s', $m[0], $dts); $link = strpos($link,"?")==true ? $link.'&track='.$m[0] : $link.'?track='.$m[0]; $message =" - <div style='text-align:".$align.";color:#252526;font-size:14px;background: #f9f9f9;padding: 10px;margin: 20px 5px;'>".$m[1]." </div> - <p style='text-align:center'>".$dts." </p> - <div style='text-align:center'><a href='".$link."' target='_blank' style='padding:5px;color:white;background:black;'>".$lang['vmgs']."</a></div>"; + <div style='text-align:".$align.";color:#252526;font-size:14px;background: #f9f9f9;padding: 10px;margin: 20px 5px;'>".$m[1]." </div>".$tracking_section; } }else{ if(gettype($m)=='string'){ @@ -995,10 +1003,7 @@ $dts = str_replace('%s', $m[0], $dts); $message=" <div style='text-align:center'><h2>".$lang["WeRecivedUrM"]."</h2> </div> - <div style='text-align:".$align.";color:#252526;font-size:14px;background: #f9f9f9;padding: 10px;margin: 20px 5px;'>".$m[1]." </div> - <p style='text-align:center'>".$dts." </p> - <div style='text-align:center'><a href='".$link."' target='_blank' style='padding:5px;color:white;background:black;' >".$lang['vmgs']."</a></div> - "; + <div style='text-align:".$align.";color:#252526;font-size:14px;background: #f9f9f9;padding: 10px;margin: 20px 5px;'>".$m[1]." </div>". $tracking_section; } } @@ -1048,7 +1053,7 @@ public function get_setting_Emsfb() { - // 1. Try to get from transient cache (30 seconds) + $transient = get_transient('emsfb_settings_transient'); if ($transient !== false && !empty($transient)) { if (is_string($transient)) { @@ -1060,7 +1065,7 @@ } } - // 2. If not found in transient, get from DB + $table_name = $this->db->prefix . "emsfb_setting"; $value = $this->db->get_var("SELECT setting FROM $table_name ORDER BY id DESC LIMIT 1"); if (!isset($value) || empty($value)) { @@ -1071,7 +1076,6 @@ $rtrn = $rtrn != null ? $rtrn : 'null'; update_option('emsfb_settings', $value); - // 3. Save to transient for next time (30 seconds) if ($rtrn != 'null') { set_transient('emsfb_settings_transient', $value, 1440); } @@ -1106,16 +1110,21 @@ $data =str_replace('\\', '', $data[0]->form_structer); $data = json_decode($data,true); if(($data[0]["sendEmail"]=="true"|| $data[0]["sendEmail"]==true ) && strlen($data[0]["email_to"])>2 ){ + + $emailsId=[]; + foreach($data as $key=>$val){ + if($val['type']=="email" && isset($val['noti']) && in_array($val['noti'] ,[1,'1',true,'true'],true) ){ + $emailsId[]=$val['id_']; + } + } $ac=$this->get_setting_Emsfb(); $smtp =(isset($ac->smtp) && (bool)$ac->smtp ) ? true : false; if($smtp) { foreach($user_res as $key=>$val){ - if(isset($user_res[$key]["id_"]) && $user_res[$key]["id_"]==$data[0]["email_to"]){ + if(isset($user_res[$key]["id_"]) && in_array($user_res[$key]["id_"],$emailsId,true) && isset($val["value"]) && is_email($val["value"]) ){ $email=$val["value"]; $subject ="📮 ".$lang["youRecivedNewMessage"]; $this->send_email_state_new($email ,$subject ,$trackingCode,$pro,"newMessage",$link_w,'null'); - - } } } @@ -1271,7 +1280,7 @@ } } return $valp; - }// end function + } @@ -1323,56 +1332,6 @@ - function validate_url($url) { - global $allowed_domains; - $parsed_url = parse_url($url); - - - if (isset($parsed_url['host']) && in_array($parsed_url['host'], $allowed_domains)) { - return esc_url($url); - } - - - if (strpos($url, 'javascript:') === false && strpos($url, 'data:') === false) { - return esc_url($url); - } - - return ''; - } - - - function sanitize_style_attribute($style) { - global $allowed_properties; - $style_rules = explode(';', $style); - $sanitized_rules = array(); - - foreach ($style_rules as $rule) { - if (strpos($rule, ':') !== false) { - list($property, $value) = explode(':', $rule, 2); - $property = trim($property); - $value = trim($value); - - - if (in_array($property, $allowed_properties)) { - - if (strpos($value, 'url(') !== false) { - preg_match('/url\(["\']?([^"\')]+)["\']?\)/i', $value, $matches); - if (isset($matches[1]) && validate_url($matches[1])) { - $sanitized_rules[] = $property . ': ' . $value; - } - } else { - - $sanitized_rules[] = $property . ': ' . $value; - } - } - } - } - - - return implode('; ', $sanitized_rules); - } - - $allowed_tags = array( 'a' => array_merge($global_attributes, array( 'href' => true, @@ -1442,6 +1401,15 @@ 'width' => true, 'height' => true, )), + 'iframe' => array_merge($global_attributes, array( + 'src' => true, + 'width' => true, + 'height' => true, + 'frameborder' => true, + 'scrolling' => true, + 'allowscriptaccess' => true, + 'allowfullscreen' => true, + )), ); @@ -1451,7 +1419,7 @@ $sanitized_html = preg_replace_callback( '/style=["\']([^"\']+)["\']/i', function ($matches) { - return 'style="' . sanitize_style_attribute($matches[1]) . '"'; + return 'style="' . $this->sanitize_style_attribute_efb($matches[1]) . '"'; }, $sanitized_html ); @@ -1631,7 +1599,7 @@ $t = new $name(); } - }// end function + } public function download_all_addons_efb(){ @@ -2028,4 +1996,56 @@ $this->send_email_state_new('reportProblem' ,'reportProblem' ,$str,0,"reportProblem",'null','null'); return true; } + + public function validate_url_efb($url) { + global $allowed_domains; + $parsed_url = parse_url($url); + + if (isset($parsed_url['host']) && in_array($parsed_url['host'], $allowed_domains)) { + return esc_url($url); + } + + + if (strpos($url, 'javascript:') === false && strpos($url, 'data:') === false) { + return esc_url($url); + } + + return ''; + } + + +public function sanitize_style_attribute_efb($style) { + global $allowed_properties; + $style_rules = explode(';', $style); + $sanitized_rules = array(); + + foreach ($style_rules as $rule) { + if (strpos($rule, ':') !== false) { + list($property, $value) = explode(':', $rule, 2); + $property = trim($property); + $value = trim($value); + + + if (in_array($property, $allowed_properties)) { + + if (strpos($value, 'url(') !== false) { + preg_match('/url\(["\']?([^"\')]+)["\']?\)/i', $value, $matches); + if (isset($matches[1]) && $this->validate_url_efb($matches[1])) { + $sanitized_rules[] = $property . ': ' . $value; + } + } else { + + $sanitized_rules[] = $property . ': ' . $value; + } + } + } + } + + + return implode('; ', $sanitized_rules); + } + } + + +
--- cache/easy-form-builder_3.8.15/vendor/composer/ClassLoader.php 2025-12-04 20:29:18.566768398 +0000+++ cache/easy-form-builder_3.8.16/vendor/composer/ClassLoader.php 2025-12-04 20:33:49.296006553 +0000@@ -17,14 +17,14 @@ * * $loader = new \Composer\Autoload\ClassLoader(); * - * // register classes with namespaces + * * $loader->add('Symfony\Component', __DIR__.'/component'); * $loader->add('Symfony', __DIR__.'/framework'); * - * // activate the autoloader + * * $loader->register(); * - * // to enable searching the include path (eg. for PEAR packages) + * * $loader->setUseIncludePath(true); * * In this example, if you try to use a class in the Symfony\Component @@ -42,10 +42,10 @@ */ class ClassLoader { - /** @var ?string */ + private $vendorDir; - // PSR-4 + /** * @var array[] * @psalm-var array<string, array<string, int>> @@ -62,7 +62,7 @@ */ private $fallbackDirsPsr4 = array(); - // PSR-0 + /** * @var array[] * @psalm-var array<string, array<string, string[]>> @@ -74,7 +74,7 @@ */ private $fallbackDirsPsr0 = array(); - /** @var bool */ + private $useIncludePath = false; /** @@ -83,7 +83,7 @@ */ private $classMap = array(); - /** @var bool */ + private $classMapAuthoritative = false; /** @@ -92,7 +92,7 @@ */ private $missingClasses = array(); - /** @var ?string */ + private $apcuPrefix; /** @@ -233,7 +233,7 @@ public function addPsr4($prefix, $paths, $prepend = false) { if (!$prefix) { - // Register directories for the root namespace. + if ($prepend) { $this->fallbackDirsPsr4 = array_merge( (array) $paths, @@ -246,7 +246,7 @@ ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. + $length = strlen($prefix); if ('\\' !== $prefix[$length - 1]) { throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); @@ -254,13 +254,13 @@ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixDirsPsr4[$prefix] = (array) $paths; } elseif ($prepend) { - // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( (array) $paths, $this->prefixDirsPsr4[$prefix] ); } else { - // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], (array) $paths @@ -442,7 +442,7 @@ */ public function findFile($class) { - // class map lookup + if (isset($this->classMap[$class])) { return $this->classMap[$class]; } @@ -458,7 +458,7 @@ $file = $this->findFileWithExtension($class, '.php'); - // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { $file = $this->findFileWithExtension($class, '.hh'); } @@ -468,7 +468,7 @@ } if (false === $file) { - // Remember that this class does not exist. + $this->missingClasses[$class] = true; } @@ -492,7 +492,7 @@ */ private function findFileWithExtension($class, $ext) { - // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; $first = $class[0]; @@ -512,20 +512,20 @@ } } - // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { return $file; } } - // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); } else { - // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; } @@ -541,14 +541,14 @@ } } - // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { return $file; } } - // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; }
--- cache/easy-form-builder_3.8.15/vendor/composer/InstalledVersions.php 2025-12-04 20:29:18.566768398 +0000+++ cache/easy-form-builder_3.8.16/vendor/composer/InstalledVersions.php 2025-12-04 20:33:49.296006553 +0000@@ -264,8 +264,8 @@ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + + if (substr(__DIR__, -8, 1) !== 'C') { self::$installed = include __DIR__ . '/installed.php'; } else { @@ -337,8 +337,8 @@ } if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + + if (substr(__DIR__, -8, 1) !== 'C') { self::$installed = require __DIR__ . '/installed.php'; } else {
--- cache/easy-form-builder_3.8.15/vendor/composer/autoload_classmap.php 2025-12-04 20:29:18.562768144 +0000+++ cache/easy-form-builder_3.8.16/vendor/composer/autoload_classmap.php 2025-12-04 20:33:49.296006553 +0000@@ -1,6 +1,6 @@ <?php -// autoload_classmap.php @generated by Composer + $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir);
--- cache/easy-form-builder_3.8.15/vendor/composer/autoload_namespaces.php 2025-12-04 20:29:18.562768144 +0000+++ cache/easy-form-builder_3.8.16/vendor/composer/autoload_namespaces.php 2025-12-04 20:33:49.296006553 +0000@@ -1,6 +1,6 @@ <?php -// autoload_namespaces.php @generated by Composer + $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir);
--- cache/easy-form-builder_3.8.15/vendor/composer/autoload_psr4.php 2025-12-04 20:29:18.562768144 +0000+++ cache/easy-form-builder_3.8.16/vendor/composer/autoload_psr4.php 2025-12-04 20:33:49.296006553 +0000@@ -1,6 +1,6 @@ <?php -// autoload_psr4.php @generated by Composer + $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir);
--- cache/easy-form-builder_3.8.15/vendor/composer/autoload_real.php 2025-12-04 20:29:18.562768144 +0000+++ cache/easy-form-builder_3.8.16/vendor/composer/autoload_real.php 2025-12-04 20:33:49.296006553 +0000@@ -1,6 +1,6 @@ <?php -// autoload_real.php @generated by Composer + class ComposerAutoloaderInit701e905f5ccf3d2d7b07acac81e0c5e1 {
--- cache/easy-form-builder_3.8.15/vendor/composer/autoload_static.php 2025-12-04 20:29:18.566768398 +0000+++ cache/easy-form-builder_3.8.16/vendor/composer/autoload_static.php 2025-12-04 20:33:49.296006553 +0000@@ -1,20 +1,20 @@ <?php -// autoload_static.php @generated by Composer + namespace Composer\Autoload; class ComposerStaticInit701e905f5ccf3d2d7b07acac81e0c5e1 { public static $prefixLengthsPsr4 = array ( - 'S' => + 'S' => array ( 'Stripe\\' => 7, ), ); public static $prefixDirsPsr4 = array ( - 'Stripe\\' => + 'Stripe\\' => array ( 0 => __DIR__ . '/..' . '/stripe/stripe-php/lib', ),
--- cache/easy-form-builder_3.8.15/vendor/composer/platform_check.php 2025-12-04 20:29:18.566768398 +0000+++ cache/easy-form-builder_3.8.16/vendor/composer/platform_check.php 2025-12-04 20:33:49.296006553 +0000@@ -1,6 +1,6 @@ <?php -// platform_check.php @generated by Composer + $issues = array();
--- cache/events-manager_6.6.4.4/classes/em-events.php 2025-12-04 20:28:28.775600747 +0000+++ cache/events-manager_6.6.5/classes/em-events.php 2025-12-04 20:28:43.500537419 +0000@@ -325,7 +325,7 @@ $output .= self::get_pagination_links($args, $events_count); } }elseif( $args['no_results_msg'] !== false ){ - $output = !empty($args['no_results_msg']) ? $args['no_results_msg'] : get_option('dbem_no_events_message'); + $output = !empty($args['no_results_msg']) ? esc_html($args['no_results_msg']) : get_option('dbem_no_events_message'); } //TODO check if reference is ok when restoring object, due to changes in php5 v 4 @@ -475,7 +475,7 @@ echo self::get_pagination_links($args, $events_count, 'search_events', $default_args); } }elseif( $args['no_results_msg'] !== false ){ - echo !empty($args['no_results_msg']) ? $args['no_results_msg'] : get_option('dbem_no_events_message'); + echo !empty($args['no_results_msg']) ? esc_html($args['no_results_msg']) : get_option('dbem_no_events_message'); } return apply_filters('em_events_output_grouped', ob_get_clean(), $EM_Events, $args, $events_count); }
--- cache/events-manager_6.6.4.4/classes/em-locations.php 2025-12-04 20:28:28.779601001 +0000+++ cache/events-manager_6.6.5/classes/em-locations.php 2025-12-04 20:28:43.504537674 +0000@@ -259,7 +259,7 @@ $output .= self::get_pagination_links($args, $locations_count); } }elseif( $args['no_results_msg'] !== false ){ - $output = !empty($args['no_results_msg']) ? $args['no_results_msg'] : get_option('dbem_no_locations_message'); + $output = !empty($args['no_results_msg']) ? esc_html($args['no_results_msg']) : get_option('dbem_no_locations_message'); } //FIXME check if reference is ok when restoring object, due to changes in php5 v 4 $EM_Location_old= $EM_Location;
--- cache/events-manager_6.6.4.4/classes/em-object.php 2025-12-04 20:28:28.779601001 +0000+++ cache/events-manager_6.6.5/classes/em-object.php 2025-12-04 20:28:43.504537674 +0000@@ -1000,8 +1000,6 @@ $x_by[] = $accepted_fields[$field]; }elseif( in_array($field,$accepted_fields) ){ $x_by[] = $field; - }elseif( array_key_exists( $key, $accepted_fields) ){ - $x_by[] = $field; }else{ unset($x_by[$key]); }
--- cache/events-manager_6.6.4.4/events-manager.php 2025-12-04 20:28:28.791601764 +0000+++ cache/events-manager_6.6.5/events-manager.php 2025-12-04 20:28:43.516538437 +0000@@ -1,7 +1,7 @@ <?php /* Plugin Name: Events Manager -Version: 6.6.4.4 +Version: 6.6.5 Plugin URI: https://wp-events-plugin.com Description: Event registration and booking management for WordPress. Recurring events, locations, webinars, google maps, rss, ical, booking registration and more! Author: Pixelite @@ -29,7 +29,7 @@ */ // Setting constants -define('EM_VERSION', '6.6.4.4'); //self expanatory, although version currently may not correspond directly with published version number. until 6.0 we're stuck updating 5.999.x +define('EM_VERSION', '6.6.5'); //self expanatory, although version currently may not correspond directly with published version number. until 6.0 we're stuck updating 5.999.x define('EM_PRO_MIN_VERSION', '3.4'); //self expanatory define('EM_PRO_MIN_VERSION_CRITICAL', '3.0'); //self expanatory define('EM_DIR', dirname( __FILE__ )); //an absolute path to this directory
--- cache/vibes_2.2.0/includes/features/class-analytics.php 2025-12-04 20:33:14.977820272 +0000+++ cache/vibes_2.2.1/includes/features/class-analytics.php 2025-12-04 20:39:11.532545972 +0000@@ -336,7 +336,7 @@ } $this->authent = $authent; $this->available_countries = Schema::get_distinct_countries( $this->source, $this->filter, ! $this->is_today );- if ( 'all' !== strtolower( $country ) && ! in_array( strtoupper( $country ), $this->available_countries, true ) ) {+ if ( 'all' !== strtolower( $country ?? '' ) && ! in_array( strtoupper( $country ?? '' ), $this->available_countries, true ) ) { $country = 'all'; } if ( 'all' !== strtolower( $country ) ) {
--- cache/vibes_2.2.0/includes/features/class-analyticsfactory.php 2025-12-04 20:33:14.977820272 +0000+++ cache/vibes_2.2.1/includes/features/class-analyticsfactory.php 2025-12-04 20:39:11.532545972 +0000@@ -82,11 +82,11 @@ if ( ! ( $type = filter_input( INPUT_GET, 'type' ) ) ) { $type = filter_input( INPUT_POST, 'type' ); }- if ( false !== strpos( $type, '.' ) ) {+ if ( false !== strpos( $type ?? '', '.' ) ) { $source = substr( $type, 0, strpos( $type, '.' ) ); $type = str_replace( $source . '.', '', $type ); }- if ( 0 < strpos( $type, '_' ) ) {+ if ( 0 < strpos( $type ?? '', '_' ) ) { $type = substr( $type, strpos( $type, '_' ) + 1 ); } if ( ! isset( $type ) || ! in_array( (string) $type, self::$allowed_types, true ) ) {
--- cache/vibes_2.2.0/includes/features/class-capture.php 2025-12-04 20:33:14.977820272 +0000+++ cache/vibes_2.2.1/includes/features/class-capture.php 2025-12-04 20:39:11.532545972 +0000@@ -229,8 +229,11 @@ * @since 1.0.0 */ public static function preprocess( $content ) {- if ( ( array_key_exists( 'type', $content ) && in_array( $content['type'], self::$types, true ) && array_key_exists( 'resource', $content ) && array_key_exists( 'authenticated', $content ) && array_key_exists( 'metrics', $content ) && is_array( $content['metrics'] ) ) ) {- self::single_preprocess( $content );+ if ( array_key_exists( 'type', $content ) && in_array( $content['type'], self::$types, true ) && array_key_exists( 'resource', $content ) && array_key_exists( 'authenticated', $content ) && array_key_exists( 'metrics', $content ) && is_array( $content['metrics'] ) ) {+ $process = self::single_preprocess( $content );+ if ( true !== $process ) {+ return $process;+ } \DecaLog\Engine::eventsLogger( VIBES_SLUG )->debug( 'Signal received and correctly pre-processed.', [ 'code' => 202 ] ); return new \WP_REST_Response( null, 202 ); }@@ -256,6 +259,10 @@ * @since 1.0.0 */ private static function single_preprocess( $content ) {+ if ( ! filter_var( str_starts_with( 'http', $content['resource'] ) ? $content['resource'] : 'https://example.com' . $content['resource'], FILTER_VALIDATE_URL ) ) {+ \DecaLog\Engine::eventsLogger( VIBES_SLUG )->error( 'Unprocessable resource in POST request.', [ 'code' => 422 ] );+ return new \WP_REST_Response( null, 422 );+ } $record = self::init_record( $content['resource'], $content['authenticated'], $content['type'], $content['initiator'] ?? '' ); foreach ( $content['metrics'] as $metric ) { if ( ! ( is_array( $metric ) && array_key_exists( 'name', $metric ) ) ) {
--- cache/vibes_2.2.0/includes/plugin/class-updater.php 2025-12-04 20:33:23.290349807 +0000+++ cache/vibes_2.2.1/includes/plugin/class-updater.php 2025-12-04 20:39:14.296722229 +0000@@ -209,7 +209,9 @@ return $res; } $md = new Markdown();- $res = new \stdClass();+ if ( ! is_object( $res ) ) {+ $res = new \stdClass();+ } $res->name = $this->name; $res->homepage = 'https://perfops.one/' . $this->slug; $res->slug = $this->slug;@@ -224,13 +226,22 @@ $res->version = $infos->version; $res->download_link = $infos->download_url; $res->trunk = $infos->download_url;- $res->sections = [- 'changelog' => $md->get_inline( $infos->changelog, [] ) . '<br/><br/><p><a target="_blank" href="' . $res->homepage . '-changelog">CHANGELOG »</a></p>',- ];- $res->banners = [- "low" => str_replace( 'github.com', 'raw.githubusercontent.com', $this->product ) . '/refs/heads/master/.wordpress-org/banner-772x250.jpg',- "high" => str_replace( 'github.com', 'raw.githubusercontent.com', $this->product ) . '/refs/heads/master/.wordpress-org/banner-1544x500.jpg'- ];+ if ( isset( $res->sections['changelog'] ) ) {+ $res->sections['changelog'] = $md->get_inline( $infos->changelog, [] ) . '<br/><br/><p><a target="_blank" href="' . $res->homepage . '-changelog">CHANGELOG »</a></p>';+ } else {+ $res->sections = [+ 'changelog' => $md->get_inline( $infos->changelog, [] ) . '<br/><br/><p><a target="_blank" href="' . $res->homepage . '-changelog">CHANGELOG »</a></p>',+ ];+ }+ if ( isset( $res->banners['low'] ) && isset( $res->banners['high'] )) {+ $res->banners['low'] = str_replace( 'github.com', 'raw.githubusercontent.com', $this->product ) . '/refs/heads/master/.wordpress-org/banner-772x250.jpg';+ $res->banners['high'] = str_replace( 'github.com', 'raw.githubusercontent.com', $this->product ) . '/refs/heads/master/.wordpress-org/banner-1544x500.jpg';+ } else {+ $res->banners = [+ 'low' => str_replace( 'github.com', 'raw.githubusercontent.com', $this->product ) . '/refs/heads/master/.wordpress-org/banner-772x250.jpg',+ 'high' => str_replace( 'github.com', 'raw.githubusercontent.com', $this->product ) . '/refs/heads/master/.wordpress-org/banner-1544x500.jpg'+ ];+ } return $res; }
--- cache/vibes_2.2.0/init.php 2025-12-04 20:33:23.318351591 +0000+++ cache/vibes_2.2.1/init.php 2025-12-04 20:39:18.160968634 +0000@@ -12,7 +12,7 @@ define( 'VIBES_PRODUCT_SHORTNAME', 'Vibes' ); define( 'VIBES_PRODUCT_ABBREVIATION', 'vibes' ); define( 'VIBES_SLUG', 'vibes' );-define( 'VIBES_VERSION', '2.2.0' );+define( 'VIBES_VERSION', '2.2.1' ); define( 'VIBES_API_VERSION', '1' ); define( 'VIBES_CODENAME', '"-"' );
--- cache/vibes_2.2.0/vibes.php 2025-12-04 20:33:23.342353121 +0000+++ cache/vibes_2.2.1/vibes.php 2025-12-04 20:39:18.204971440 +0000@@ -10,7 +10,7 @@ * Plugin Name: Vibes * Plugin URI: https://perfops.one/vibes * Description: Truthful user experience and browsing performances monitoring.- * Version: 2.2.0+ * Version: 2.2.1 * Requires at least: 6.2 * Requires PHP: 8.1 * Author: Pierre Lannoy / PerfOps One