diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-content/plugins/portfolio/bws_menu/bws_menu.php --- a/wp/wp-content/plugins/portfolio/bws_menu/bws_menu.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-content/plugins/portfolio/bws_menu/bws_menu.php Tue Dec 15 13:49:49 2020 +0100 @@ -1,7 +1,7 @@ ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ), 'body' => array( 'plugins' => serialize( $to_send ) ), 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) ); - $raw_response = wp_remote_post( 'http://bestwebsoft.com/wp-content/plugins/paid-products/plugins/update-check/1.0/', $options ); + $raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/pro-license-check/1.0/', $options ); if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) ) { $error = __( "Something went wrong. Please try again later. If the error appears again, please contact us", 'bestwebsoft' ) . ' BestWebSoft. ' . __( "We are sorry for inconvenience.", 'bestwebsoft' ); } else { $response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) ); + if ( is_array( $response ) && !empty( $response ) ) { foreach ( $response as $key => $value ) { if ( "wrong_license_key" == $value->package ) { @@ -179,7 +180,7 @@ $max_execution_time = ( ini_get( 'max_execution_time' ) ) ? ini_get( 'max_execution_time' ) : __( 'N/A', 'bestwebsoft' ); $memory_limit = ( ini_get( 'memory_limit' ) ) ? ini_get( 'memory_limit' ) : __( 'N/A', 'bestwebsoft' ); $wp_memory_limit = ( defined( 'WP_MEMORY_LIMIT' ) ) ? WP_MEMORY_LIMIT : __( 'N/A', 'bestwebsoft' ); - $memory_usage = ( function_exists( 'memory_get_usage' ) ) ? round( memory_get_usage() / 1024 / 1024, 2 ) . __( ' Mb', 'bestwebsoft' ) : __( 'N/A', 'bestwebsoft' ); + $memory_usage = ( function_exists( 'memory_get_usage' ) ) ? round( memory_get_usage() / 1024 / 1024, 2 ) . ' ' . __( 'Mb', 'bestwebsoft' ) : __( 'N/A', 'bestwebsoft' ); $exif_read_data = ( is_callable( 'exif_read_data' ) ) ? __( 'Yes', 'bestwebsoft' ) . " ( V" . substr( phpversion( 'exif' ), 0,4 ) . ")" : __( 'No', 'bestwebsoft' ); $iptcparse = ( is_callable( 'iptcparse' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' ); $xml_parser_create = ( is_callable( 'xml_parser_create' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' ); @@ -372,77 +373,45 @@ $bws_license_plugin = sanitize_text_field( $_POST['bws_install_plugin'] ); - echo '

' . __( 'Installing Plugin', 'bestwebsoft' ) . ': ' . $plugins_array[ $bws_license_plugin ]['name'] . '

'; - $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key; - - $url = $plugins_array[ $bws_license_plugin ]['link'] . '&download_from=5'; - - echo '

' . __( "Downloading install package from", 'bestwebsoft' ) . ' ' . $url . '

'; - - $uploadDir = wp_upload_dir(); - $zip_name = explode( '/', $bws_license_plugin ); - - if ( !function_exists( 'curl_init' ) ) { - $received_content = file_get_contents( $url ); - } else { - $ch = curl_init(); - curl_setopt( $ch, CURLOPT_URL, $url ); - curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); - curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); - $received_content = curl_exec( $ch ); - curl_close( $ch ); - } - - if ( ! $received_content ) { - $error = __( "Failed to download the zip archive. Please, upload the plugin manually", 'bestwebsoft' ); - } else { - if ( is_writable( $uploadDir["path"] ) ) { - $file_put_contents = $uploadDir["path"] . "/" . $zip_name[0] . ".zip"; - - if ( file_put_contents( $file_put_contents, $received_content ) ) { - @chmod( $file_put_contents, octdec( 755 ) ); - - echo '

' . __( 'Unpacking the package', 'bestwebsoft' ) . '...

'; + if ( is_multisite() ) + update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); + else + update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); - if ( class_exists( 'ZipArchive' ) ) { - $zip = new ZipArchive(); - if ( $zip->open( $file_put_contents ) === TRUE ) { - echo '

' . __( 'Installing the plugin', 'bestwebsoft' ) . '...

'; - $zip->extractTo( WP_PLUGIN_DIR ); - $zip->close(); - } else { - $error = __( "Failed to open the zip archive. Please, upload the plugin manually", 'bestwebsoft' ); - } - } elseif ( class_exists( 'Phar' ) ) { - $phar = new PharData( $file_put_contents ); - echo '

' . __( 'Installing the plugin', 'bestwebsoft' ) . '...

'; - $phar->extractTo( WP_PLUGIN_DIR ); - } else { - $error = __( "Your server does not support either ZipArchive or Phar. Please, upload the plugin manually", 'bestwebsoft' ); - } - if ( empty( $error ) ) - echo '

' . sprintf( __( 'The plugin %s is successfully installed.', 'bestwebsoft' ), '' . $plugins_array[ $bws_license_plugin ]['name'] . '' ) . '

'; - - @unlink( $file_put_contents ); - } else { - $error = __( "Failed to download the zip archive. Please, upload the plugin manually", 'bestwebsoft' ); - } - } else { - $error = __( "UploadDir is not writable. Please, upload the plugin manually", 'bestwebsoft' ); - } - } - - if ( file_exists( WP_PLUGIN_DIR . '/' . $zip_name[0] ) ) { - echo '

' . __( 'Activate Plugin', 'bestwebsoft' ) . ' | ' . __( 'Return to BestWebSoft Panel', 'bestwebsoft' ) . '

'; - } else { - if ( empty( $error ) ) - $error = __( "Failed to download the zip archive. Please, upload the plugin manually", 'bestwebsoft' ); - - echo '

' . $error . '

'; - echo '

' . __( 'Return to BestWebSoft Panel', 'bestwebsoft' ) . '

'; - } - } else { + $url = $plugins_array[ $bws_license_plugin ]['link'] . '&download_from=5'; ?> +

+

+ +
+ +

+

+ +

+
+

+ +
+ +

+

+ +
+ +
+ +
+ +

+

+ +
+ ' . __( 'Client Area', 'bestwebsoft' ) . '' ); ?> +

+

+ @@ -491,7 +460,7 @@ $key_plugin_explode = explode( '/', $key_plugin ); - $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-128x128.png'; + $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.png'; $is_pro_isset = isset( $value_plugin['pro_version'] ); $is_installed = array_key_exists( $key_plugin, $all_plugins ); $is_active = in_array( $key_plugin, $active_plugins ) || isset( $sitewide_active_plugins[ $key_plugin ] ); @@ -547,7 +516,7 @@ if ( ! $is_pro_installed ) { if ( ! empty( $plugins_array ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) { ?>
- + @@ -570,7 +539,7 @@ - + @@ -578,7 +547,7 @@ + $install_url = isset( $value_plugin['install_url'] ) ? $value_plugin['install_url'] : network_admin_url( 'plugin-install.php?tab=search&type=term&s=' . str_replace( array( ' ', '-' ), '+', str_replace( '&', '', $value_plugin['name'] ) ) . '+BestWebSoft&plugin-search-input=Search+Plugins' ); ?> @@ -725,7 +694,6 @@ array( 'fcbkbttn_hide_banner_on_plugin_page', 'facebook-button-plugin/facebook-button-plugin.php', '2.29' ), array( 'twttr_hide_banner_on_plugin_page', 'twitter-plugin/twitter.php', '2.34' ), array( 'pdfprnt_hide_banner_on_plugin_page', 'pdf-print/pdf-print.php', '1.7.1' ), - array( 'gglplsn_hide_banner_on_plugin_page', 'google-one/google-plus-one.php', '1.1.4' ), array( 'gglstmp_hide_banner_on_plugin_page', 'google-sitemap-plugin/google-sitemap-plugin.php', '2.8.4' ), array( 'cntctfrmpr_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-pro/contact_form_pro.php', '1.14' ), array( 'cntctfrm_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.47' ), @@ -739,4 +707,4 @@ array( 'cstmdmnpg_hide_banner_on_plugin_page', 'custom-admin-page/custom-admin-page.php', '1.0.0' ) ); } -} \ No newline at end of file +}