PluginProbe ʕ •ᴥ•ʔ
reCaptcha by BestWebSoft / 1.74
reCaptcha by BestWebSoft v1.74
1.79 1.80 1.82 1.83 1.84 1.85 1.86 1.87 trunk 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.50 1.51 1.52 1.53 1.54 1.55 1.56 1.57 1.58 1.59 1.60 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 1.70 1.71 1.72 1.73 1.74 1.75 1.78
google-captcha / bws_menu / bws_menu.php
google-captcha / bws_menu Last commit date
css 2 years ago fonts 2 years ago icons 2 years ago images 2 years ago js 2 years ago languages 2 years ago bws_functions.php 2 years ago bws_include.php 2 years ago bws_menu.php 2 years ago class-bws-settings.php 2 years ago deactivation-form.php 2 years ago deprecated.php 2 years ago product_list.php 2 years ago
bws_menu.php
919 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit;
3
4 /**
5 * Function for displaying BestWebSoft menu
6 * Version: 2.4.3
7 */
8
9 if ( ! function_exists( 'bws_admin_enqueue_scripts' ) ) {
10 require_once dirname( __FILE__ ) . '/bws_functions.php';
11 }
12
13 if ( ! function_exists( 'bws_add_menu_render' ) ) {
14 function bws_add_menu_render() {
15 global $wpdb, $wp_version, $bstwbsftwppdtplgns_options;
16 $error = $message = '';
17
18 /**
19 * @deprecated 1.9.8 (15.12.2016)
20 */
21 $is_main_page = isset( $_GET['page'] ) && in_array( $_GET['page'], array( 'bws_panel', 'bws_themes', 'bws_system_status' ) );
22 $page = sanitize_text_field( wp_unslash( $_GET['page'] ) );
23 $tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '';
24
25 if ( $is_main_page ) {
26 $current_page = 'admin.php?page=' . $page;
27 } else {
28 $current_page = isset( $_GET['tab'] ) ? 'admin.php?page=' . $page . '&tab=' . $tab : 'admin.php?page=' . $page;
29 }
30
31 if ( 'bws_panel' === $page || ( ! $is_main_page && '' === $tab ) ) {
32
33 if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
34 require_once ABSPATH . 'wp-admin/includes/plugin.php';
35 }
36
37 /* Get $bws_plugins */
38 require dirname( __FILE__ ) . '/product_list.php';
39
40 $all_plugins = get_plugins();
41 $active_plugins = get_option( 'active_plugins' );
42 $sitewide_active_plugins = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'active_sitewide_plugins' ) : array();
43 $update_availible_all = get_site_transient( 'update_plugins' );
44
45 $plugin_category = isset( $_GET['category'] ) ? sanitize_text_field( wp_unslash( $_GET['category'] ) ) : 'all';
46
47 if ( ( isset( $_GET['sub'] ) && 'installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) ) || ! isset( $_GET['sub'] ) ) {
48 $bws_plugins_update_availible = $bws_plugins_expired = array();
49 foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
50
51 foreach ( $value_plugin['category'] as $category_key ) {
52 $bws_plugins_category[ $category_key ]['count'] = isset( $bws_plugins_category[ $category_key ]['count'] ) ? $bws_plugins_category[ $category_key ]['count'] + 1 : 1;
53 }
54
55 $is_installed = array_key_exists( $key_plugin, $all_plugins );
56 $is_pro_installed = false;
57 if ( isset( $value_plugin['pro_version'] ) ) {
58 $is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins );
59 }
60 /* Check update_availible */
61 if ( ! empty( $update_availible_all ) && ! empty( $update_availible_all->response ) ) {
62 if ( $is_pro_installed && array_key_exists( $value_plugin['pro_version'], $update_availible_all->response ) ) {
63 unset( $bws_plugins[ $key_plugin ] );
64 $value_plugin['update_availible'] = $value_plugin['pro_version'];
65 $bws_plugins_update_availible[ $key_plugin ] = $value_plugin;
66 } elseif ( $is_installed && array_key_exists( $key_plugin, $update_availible_all->response ) ) {
67 unset( $bws_plugins[ $key_plugin ] );
68 $value_plugin['update_availible'] = $key_plugin;
69 $bws_plugins_update_availible[ $key_plugin ] = $value_plugin;
70 }
71 }
72 /* Check expired */
73 if ( $is_pro_installed && isset( $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ] ) &&
74 strtotime( $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ] ) < strtotime( gmdate( 'm/d/Y' ) ) ) {
75 unset( $bws_plugins[ $key_plugin ] );
76 $value_plugin['expired'] = $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ];
77 $bws_plugins_expired[ $key_plugin ] = $value_plugin;
78 }
79 }
80 $bws_plugins = $bws_plugins_update_availible + $bws_plugins_expired + $bws_plugins;
81 } else {
82 foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
83 foreach ( $value_plugin['category'] as $category_key ) {
84 $bws_plugins_category[ $category_key ]['count'] = isset( $bws_plugins_category[ $category_key ]['count'] ) ? $bws_plugins_category[ $category_key ]['count'] + 1 : 1;
85 }
86 }
87 }
88
89 /*** Membership */
90 $bws_license_plugin = 'bws_get_list_for_membership';
91 $bws_license_key = isset( $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) ? $bstwbsftwppdtplgns_options[ $bws_license_plugin ] : '';
92 $update_membership_list = true;
93
94 if ( isset( $_POST['bws_license_key'] ) ) {
95 $bws_license_key = sanitize_text_field( wp_unslash( $_POST['bws_license_key'] ) );
96 }
97
98 if ( isset( $_SESSION['bws_membership_time_check'] ) && isset( $_SESSION['bws_membership_list'] ) && $_SESSION['bws_membership_time_check'] < strtotime( '+12 hours' ) ) {
99 $update_membership_list = false;
100 $plugins_array = $_SESSION['bws_membership_list'];
101 foreach( $plugins_array as $plugins_key => $plugins_value ) {
102 if ( is_array( $plugins_value ) ) {
103 $plugins_array[ $plugins_key ] = array_map( 'sanitize_text_field', array_map( 'wp_unslash', $plugins_value ) );
104 } elseif ( is_object( $plugins_value ) ) {
105 foreach( $plugins_value as $plugins_key2 => $plugins_value2 ){
106 $plugins_value->$plugins_key2 = sanitize_text_field( wp_unslash( $plugins_value2 ) );
107 }
108 $plugins_array[ $plugins_key ] = $plugins_value;
109 } else {
110 $plugins_array[ $plugins_key ] = sanitize_text_field( wp_unslash( $plugins_value ) );
111 }
112 }
113 }
114
115 if ( ( $update_membership_list && ! empty( $bws_license_key ) ) || ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ) ) ) {
116
117 if ( '' !== $bws_license_key ) {
118 if ( 18 !== strlen( $bws_license_key ) ) {
119 $error = __( 'Wrong license key', 'bestwebsoft' );
120 } else {
121
122 if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
123 $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1;
124 } else {
125 $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = 1;
126 $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] = time();
127 }
128
129 /* get Pro list */
130 $to_send = array();
131 $to_send['plugins'][ $bws_license_plugin ] = array();
132 $to_send['plugins'][ $bws_license_plugin ]['bws_license_key'] = $bws_license_key;
133 $options = array(
134 'timeout' => ( ( defined( 'DOING_CRON' ) && DOING_CRON ) ? 30 : 3 ),
135 'body' => array( 'plugins' => serialize( $to_send ) ),
136 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ),
137 );
138 $raw_response = wp_remote_post( 'https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/pro-license-check/1.0/', $options );
139
140 if ( is_wp_error( $raw_response ) || 200 !== wp_remote_retrieve_response_code( $raw_response ) ) {
141 $error = __( 'Something went wrong. Please try again later. If the error appears again, please contact us', 'bestwebsoft' ) . ' <a href="https://support.bestwebsoft.com">BestWebSoft</a>. ' . __( 'We are sorry for inconvenience.', 'bestwebsoft' );
142 } else {
143 $response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) );
144
145 if ( is_array( $response ) && ! empty( $response ) ) {
146 foreach ( $response as $key => $value ) {
147 if ( 'wrong_license_key' === $value->package ) {
148 $error = __( 'Wrong license key.', 'bestwebsoft' );
149 } elseif ( 'wrong_domain' === $value->package ) {
150 $error = __( 'This license key is bound to another site. Change it via personal Client Area.', 'bestwebsoft' ) . '<a target="_blank" href="https://bestwebsoft.com/client-area">' . __( 'Log in', 'bestwebsoft' ) . '</a>';
151 } elseif ( 'you_are_banned' === $value->package ) {
152 $error = __( 'Unfortunately, you have exceeded the number of available tries per day.', 'bestwebsoft' );
153 } elseif ( 'time_out' === $value->package ) {
154 $error = sprintf( __( 'Unfortunately, Your license has expired. To continue getting top-priority support and plugin updates, you should extend it in your %s', 'bestwebsoft' ), ' <a href="https://bestwebsoft.com/client-area">Client Area</a>' );
155 } elseif ( 'duplicate_domen_for_trial' === $value->package ) {
156 $error = __( 'Unfortunately, the Pro licence was already installed to this domain. The Pro Trial license can be installed only once.', 'bestwebsoft' );
157 } elseif ( is_array( $value->package ) && ! empty( $value->package ) ) {
158 $plugins_array = $_SESSION['bws_membership_list'] = $value->package;
159 $_SESSION['bws_membership_time_check'] = strtotime( 'now' );
160
161 if ( isset( $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) && $bws_license_key === $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) {
162 $message = __( 'The license key is valid.', 'bestwebsoft' );
163 if ( isset( $value->time_out ) && '' !== $value->time_out ) {
164 $message .= ' ' . __( 'Your license will expire on', 'bestwebsoft' ) . ' ' . $value->time_out . '.';
165 }
166 } else {
167 $message = __( 'Congratulations! Pro Membership license is activated successfully.', 'bestwebsoft' );
168 }
169
170 $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
171 }
172 }
173 } else {
174 $error = __( 'Something went wrong. Try again later or upload the plugin manually. We are sorry for inconvenience.', 'bestwebsoft' );
175 }
176 }
177
178 if ( is_multisite() ) {
179 update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
180 } else {
181 update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
182 }
183 }
184 } else {
185 $error = __( 'Please enter your license key.', 'bestwebsoft' );
186 }
187 }
188 } elseif ( 'bws_system_status' === $page || 'system-status' === $tab ) {
189
190 $all_plugins = get_plugins();
191 $active_plugins = get_option( 'active_plugins' );
192 $mysql_info = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" );
193 if ( is_array( $mysql_info ) ) {
194 $sql_mode = $mysql_info[0]->Value;
195 }
196 if ( empty( $sql_mode ) ) {
197 $sql_mode = __( 'Not set', 'bestwebsoft' );
198 }
199
200 $allow_url_fopen = ( ini_get( 'allow_url_fopen' ) ) ? __( 'On', 'bestwebsoft' ) : __( 'Off', 'bestwebsoft' );
201 $upload_max_filesize = ( ini_get( 'upload_max_filesize' ) ) ? ini_get( 'upload_max_filesize' ) : __( 'N/A', 'bestwebsoft' );
202 $post_max_size = ( ini_get( 'post_max_size' ) ) ? ini_get( 'post_max_size' ) : __( 'N/A', 'bestwebsoft' );
203 $max_execution_time = ( ini_get( 'max_execution_time' ) ) ? ini_get( 'max_execution_time' ) : __( 'N/A', 'bestwebsoft' );
204 $memory_limit = ( ini_get( 'memory_limit' ) ) ? ini_get( 'memory_limit' ) : __( 'N/A', 'bestwebsoft' );
205 $wp_memory_limit = ( defined( 'WP_MEMORY_LIMIT' ) ) ? WP_MEMORY_LIMIT : __( 'N/A', 'bestwebsoft' );
206 $memory_usage = ( function_exists( 'memory_get_usage' ) ) ? round( memory_get_usage() / 1024 / 1024, 2 ) . ' ' . __( 'Mb', 'bestwebsoft' ) : __( 'N/A', 'bestwebsoft' );
207 $exif_read_data = ( is_callable( 'exif_read_data' ) ) ? __( 'Yes', 'bestwebsoft' ) . ' ( V' . substr( phpversion( 'exif' ), 0, 4 ) . ')' : __( 'No', 'bestwebsoft' );
208 $iptcparse = ( is_callable( 'iptcparse' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' );
209 $xml_parser_create = ( is_callable( 'xml_parser_create' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' );
210 $theme = wp_get_theme();
211
212 if ( function_exists( 'is_multisite' ) ) {
213 $multisite = is_multisite() ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' );
214 } else {
215 $multisite = __( 'N/A', 'bestwebsoft' );
216 }
217
218 $system_info = array(
219 'wp_environment' => array(
220 'name' => __( 'WordPress Environment', 'bestwebsoft' ),
221 'data' => array(
222 __( 'Home URL', 'bestwebsoft' ) => home_url(),
223 __( 'Website URL', 'bestwebsoft' ) => get_option( 'siteurl' ),
224 __( 'WP Version', 'bestwebsoft' ) => $wp_version,
225 __( 'WP Multisite', 'bestwebsoft' ) => $multisite,
226 __( 'WP Memory Limit', 'bestwebsoft' ) => $wp_memory_limit,
227 __( 'Active Theme', 'bestwebsoft' ) => $theme['Name'] . ' ' . $theme['Version'] . ' (' . sprintf( __( 'by %s', 'bestwebsoft' ), $theme['Author'] ) . ')',
228 ),
229 ),
230 'server_environment' => array(
231 'name' => __( 'Server Environment', 'bestwebsoft' ),
232 'data' => array(
233 __( 'Operating System', 'bestwebsoft' ) => PHP_OS,
234 __( 'Server', 'bestwebsoft' ) => isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '',
235 __( 'PHP Version', 'bestwebsoft' ) => PHP_VERSION,
236 __( 'PHP Allow URL fopen', 'bestwebsoft' ) => $allow_url_fopen,
237 __( 'PHP Memory Limit', 'bestwebsoft' ) => $memory_limit,
238 __( 'Memory Usage', 'bestwebsoft' ) => $memory_usage,
239 __( 'PHP Max Upload Size', 'bestwebsoft' ) => $upload_max_filesize,
240 __( 'PHP Max Post Size', 'bestwebsoft' ) => $post_max_size,
241 __( 'PHP Max Script Execute Time', 'bestwebsoft' ) => $max_execution_time,
242 __( 'PHP Exif support', 'bestwebsoft' ) => $exif_read_data,
243 __( 'PHP IPTC support', 'bestwebsoft' ) => $iptcparse,
244 __( 'PHP XML support', 'bestwebsoft' ) => $xml_parser_create,
245 '$_SERVER[HTTP_HOST]' => isset( $_SERVER['HTTP_HOST'] ) ? sanitize_email( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '',
246 '$_SERVER[SERVER_NAME]' => isset( $_SERVER['SERVER_NAME'] ) ? sanitize_email( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : '',
247 ),
248 ),
249 'db' => array(
250 'name' => __( 'Database', 'bestwebsoft' ),
251 'data' => array(
252 __( 'WP DB version', 'bestwebsoft' ) => get_option( 'db_version' ),
253 __( 'MySQL version', 'bestwebsoft' ) => $wpdb->get_var( 'SELECT VERSION() AS version' ),
254 __( 'SQL Mode', 'bestwebsoft' ) => $sql_mode,
255 ),
256 ),
257 'active_plugins' => array(
258 'name' => __( 'Active Plugins', 'bestwebsoft' ),
259 'data' => array(),
260 'count' => 0,
261 ),
262 'inactive_plugins' => array(
263 'name' => __( 'Inactive Plugins', 'bestwebsoft' ),
264 'data' => array(),
265 'count' => 0,
266 ),
267 );
268
269 foreach ( $all_plugins as $path => $plugin ) {
270 $name = str_replace( 'by BestWebSoft', '', $plugin['Name'] );
271 if ( is_plugin_active( $path ) ) {
272 $system_info['active_plugins']['data'][ $name ] = sprintf( __( 'by %s', 'bestwebsoft' ), $plugin['Author'] ) . ' - ' . $plugin['Version'];
273 $system_info['active_plugins']['count'] = $system_info['active_plugins']['count'] + 1;
274 } else {
275 $system_info['inactive_plugins']['data'][ $name ] = sprintf( __( 'by %s', 'bestwebsoft' ), $plugin['Author'] ) . ' - ' . $plugin['Version'];
276 $system_info['inactive_plugins']['count'] = $system_info['inactive_plugins']['count'] + 1;
277 }
278 }
279
280 if ( ( isset( $_REQUEST['bwsmn_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit' ) ) || ( isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit_custom_email' ) ) ) {
281 if ( isset( $_REQUEST['bwsmn_form_email'] ) ) {
282 $email = sanitize_email( wp_unslash( $_REQUEST['bwsmn_form_email'] ) );
283 if ( '' === $email ) {
284 $error = __( 'Please enter a valid email address.', 'bestwebsoft' );
285 } else {
286 $message = sprintf( __( 'Email with system info is sent to %s.', 'bestwebsoft' ), $email );
287 }
288 } else {
289 $email = 'plugin_system_status@bestwebsoft.com';
290 $message = __( 'Thank you for contacting us.', 'bestwebsoft' );
291 }
292
293 if ( '' === $error ) {
294 $headers = 'MIME-Version: 1.0' . "\n";
295 $headers .= 'Content-type: text/html; charset=utf-8' . "\n";
296 $headers .= 'From: ' . get_option( 'admin_email' );
297 $message_text = '<html><head><title>System Info From ' . home_url() . '</title></head><body>';
298 foreach ( $system_info as $info ) {
299 if ( ! empty( $info['data'] ) ) {
300 $message_text .= '<h4>' . $info['name'];
301 if ( isset( $info['count'] ) ) {
302 $message_text .= ' (' . $info['count'] . ')';
303 }
304 $message_text .= '</h4><table>';
305 foreach ( $info['data'] as $key => $value ) {
306 $message_text .= '<tr><td>' . $key . '</td><td>' . $value . '</td></tr>';
307 }
308 $message_text .= '</table>';
309 }
310 }
311 $message_text .= '</body></html>';
312 $result = wp_mail( $email, 'System Info From ' . esc_url( home_url() ), wp_kses( $message_text ), $headers );
313 if ( true !== $result ) {
314 $error = __( 'Sorry, email message could not be delivered.', 'bestwebsoft' );
315 }
316 }
317 }
318 } ?>
319 <div class="bws-wrap">
320 <div class="bws-header">
321 <div class="bws-title">
322 <a href="<?php echo ( $is_main_page ) ? esc_url( self_admin_url( 'admin.php?page=bws_panel' ) ) : esc_url( self_admin_url( 'admin.php?page=' . $page ) ); ?>">
323 <span class="bws-logo bwsicons bwsicons-bws-logo"></span>
324 BestWebSoft
325 <span>panel</span>
326 </a>
327 </div>
328 <div class="bws-menu-item-icon">&#8226;&#8226;&#8226;</div>
329 <div class="bws-nav-tab-wrapper">
330 <?php if ( $is_main_page ) { ?>
331 <a class="bws-nav-tab
332 <?php
333 if ( 'bws_panel' === $page ) {
334 echo esc_attr( ' bws-nav-tab-active' );
335 }
336 ?>
337 " href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_panel' ) ); ?>">
338 <?php
339 esc_html_e( 'Plugins', 'bestwebsoft' );
340 ?>
341 </a>
342 <!-- pls -->
343 <a class="bws-nav-tab
344 <?php
345 if ( 'bws_themes' === $page ) {
346 echo esc_attr( ' bws-nav-tab-active' );
347 }
348 ?>
349 " href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_themes' ) ); ?>"><?php esc_html_e( 'Themes', 'bestwebsoft' ); ?></a>
350 <a class="bws-nav-tab
351 <?php
352 if ( 'bws_system_status' === $page ) {
353 echo esc_attr( ' bws-nav-tab-active' );
354 }
355 ?>
356 " href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_system_status' ) ); ?>">
357 <?php
358 esc_html_e( 'System status', 'bestwebsoft' );
359 ?>
360 </a>
361 <?php } else { ?>
362 <a class="bws-nav-tab
363 <?php
364 if ( ! isset( $_GET['tab'] ) ) {
365 echo esc_attr( ' bws-nav-tab-active' );
366 }
367 ?>
368 " href="<?php echo esc_url( self_admin_url( 'admin.php?page=' . $page ) ); ?>">
369 <?php
370 esc_html_e( 'Plugins', 'bestwebsoft' );
371 ?>
372 </a>
373 <a class="bws-nav-tab
374 <?php
375 if ( 'themes' === $tab ) {
376 echo esc_attr( ' bws-nav-tab-active' );
377 }
378 ?>
379 " href="<?php echo esc_url( self_admin_url( 'admin.php?page=' . $page . '&tab=themes' ) ); ?>">
380 <?php
381 esc_html_e( 'Themes', 'bestwebsoft' );
382 ?>
383 </a>
384 <a class="bws-nav-tab
385 <?php
386 if ( 'system-status' === $tab ) {
387 echo esc_attr( ' bws-nav-tab-active' );
388 }
389 ?>
390 " href="<?php echo esc_url( self_admin_url( 'admin.php?page=' . $page . '&tab=system-status' ) ); ?>">
391 <?php
392 esc_html_e( 'System status', 'bestwebsoft' );
393 ?>
394 </a>
395 <?php } ?>
396 </div>
397 <!-- pls -->
398 <div class="bws-help-links-wrapper">
399 <a href="https://support.bestwebsoft.com" target="_blank"><?php esc_html_e( 'Support', 'bestwebsoft' ); ?></a>
400 <a href="https://bestwebsoft.com/client-area" target="_blank" title="<?php esc_html_e( 'Manage purchased licenses & subscriptions', 'bestwebsoft' ); ?>">Client Area</a>
401 </div>
402 <!-- end pls -->
403 <div class="clear"></div>
404 </div>
405 <?php if ( ( 'bws_panel' === $page || ( ! isset( $_GET['tab'] ) && ! $is_main_page ) ) && ! isset( $_POST['bws_plugin_action_submit'] ) ) { ?>
406 <div class="bws-membership-wrap">
407 <div class="bws-membership-backround"></div>
408 <div class="bws-membership">
409 <div class="bws-membership-title"><?php printf( esc_html__( 'Get Access to %s+ Premium Plugins', 'bestwebsoft' ), '30' ); ?></div>
410 <form class="bws-membership-form" method="post" action="">
411 <span class="bws-membership-link"><a target="_blank" href="https://bestwebsoft.com/membership/"><?php esc_html_e( 'Subscribe to Pro Membership', 'bestwebsoft' ); ?></a> <?php esc_html_e( 'or', 'bestwebsoft' ); ?></span>
412 <?php
413 if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) &&
414 '5' < $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] &&
415 $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) {
416 ?>
417 <div class="bws_form_input_wrap">
418 <input disabled="disabled" type="text" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" />
419 <div class="bws_error"><?php esc_html_e( 'Unfortunately, you have exceeded the number of available tries per day.', 'bestwebsoft' ); ?></div>
420 </div>
421 <input disabled="disabled" type="submit" class="bws-button" value="<?php esc_html_e( 'Check license key', 'bestwebsoft' ); ?>" />
422 <?php } else { ?>
423 <div class="bws_form_input_wrap">
424 <input
425 <?php
426 if ( '' !== $error ) {
427 echo 'class="bws_input_error"';}
428 ?>
429 type="text" placeholder="<?php esc_html_e( 'Enter your license key', 'bestwebsoft' ); ?>" maxlength="100" name="bws_license_key" value="<?php echo esc_attr( $bws_license_key ); ?>" />
430 <div class="bws_error"
431 <?php
432 if ( '' === $error ) {
433 echo 'style="display:none"';}
434 ?>
435 ><?php echo esc_html( $error ); ?></div>
436 </div>
437 <input type="hidden" name="bws_license_plugin" value="<?php echo esc_attr( $bws_license_plugin ); ?>" />
438 <input type="hidden" name="bws_license_submit" value="submit" />
439 <?php if ( empty( $plugins_array ) ) { ?>
440 <input type="submit" class="bws-button" value="<?php esc_html_e( 'Activate', 'bestwebsoft' ); ?>" />
441 <?php } else { ?>
442 <input type="submit" class="bws-button" value="<?php esc_html_e( 'Check license key', 'bestwebsoft' ); ?>" />
443 <?php } ?>
444 <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_license_nonce_name' ); ?>
445 <?php } ?>
446 </form>
447 <div class="clear"></div>
448 </div>
449 </div>
450 <?php } ?>
451 <!-- end pls -->
452 <div class="bws-wrap-content wrap">
453 <?php if ( 'bws_panel' === $page || ( ! isset( $_GET['tab'] ) && ! $is_main_page ) ) { ?>
454 <div class="updated notice is-dismissible inline"
455 <?php
456 if ( '' === $message || '' !== $error ) {
457 echo 'style="display:none"';}
458 ?>
459 ><p><?php echo esc_html( $message ); ?></p></div>
460 <h1>
461 <?php esc_html_e( 'Plugins', 'bestwebsoft' ); ?>
462 <a href="<?php echo esc_url( self_admin_url( 'plugin-install.php?tab=upload' ) ); ?>" class="upload page-title-action add-new-h2"><?php esc_html_e( 'Upload Plugin', 'bestwebsoft' ); ?></a>
463 </h1>
464 <?php
465 if ( isset( $_GET['error'] ) ) {
466 if ( isset( $_GET['charsout'] ) ) {
467 $errmsg = sprintf( __( 'The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice &#8220;headers already sent&#8221; messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.' ), intval( $_GET['charsout'] ) );
468 } else {
469 $errmsg = __( 'Plugin could not be activated because it triggered a <strong>fatal error</strong>.' );
470 }
471 ?>
472 <div id="message" class="error is-dismissible"><p><?php echo wp_kses( $errmsg ); ?></p></div>
473 <?php } elseif ( isset( $_GET['activate'] ) ) { ?>
474 <div id="message" class="updated notice is-dismissible"><p><?php esc_html_e( 'Plugin <strong>activated</strong>.' ); ?></p></div>
475 <?php
476 }
477
478 if ( isset( $_POST['bws_plugin_action_submit'] ) && isset( $_POST['bws_install_plugin'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'bws_license_install_nonce_name' ) ) {
479
480 $bws_license_plugin = sanitize_text_field( wp_unslash( $_POST['bws_install_plugin'] ) );
481
482 $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;
483 if ( is_multisite() ) {
484 update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
485 } else {
486 update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options );
487 }
488
489 $url = $plugins_array[ $bws_license_plugin ]['link'] . '&download_from=5';
490 ?>
491 <h2><?php esc_html_e( 'Download Pro Plugin', 'bestwebsoft' ); ?></h2>
492 <p>
493 <strong><?php esc_html_e( 'Your Pro plugin is ready', 'bestwebsoft' ); ?></strong>
494 <br>
495 <?php esc_html_e( 'Your plugin has been zipped, and now is ready to download.', 'bestwebsoft' ); ?>
496 </p>
497 <p>
498 <a class="button button-secondary" target="_parent" href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'Download Now', 'bestwebsoft' ); ?></a>
499 </p>
500 <br>
501 <p>
502 <strong><?php esc_html_e( 'Need help installing the plugin?', 'bestwebsoft' ); ?></strong>
503 <br>
504 <a target="_blank" href="https://bestwebsoft.com/documentation/how-to-install-a-wordpress-product/how-to-install-a-wordpress-plugin/"><?php esc_html_e( 'How to install WordPress plugin from your admin Dashboard (ZIP archive)', 'bestwebsoft' ); ?></a>
505 </p>
506 <p>
507 <strong><?php esc_html_e( 'Get Started', 'bestwebsoft' ); ?></strong>
508 <br>
509 <a target="_blank" href="https://bestwebsoft.com/documentation/"><?php esc_html_e( 'Documentation', 'bestwebsoft' ); ?></a>
510 <br>
511 <a target="_blank" href="https://www.youtube.com/user/bestwebsoft"><?php esc_html_e( 'Video Instructions', 'bestwebsoft' ); ?></a>
512 <br>
513 <a target="_blank" href="https://support.bestwebsoft.com"><?php esc_html_e( 'Knowledge Base', 'bestwebsoft' ); ?></a>
514 </p>
515 <p>
516 <strong><?php esc_html_e( 'Licenses & Domains', 'bestwebsoft' ); ?></strong>
517 <br>
518 <?php
519 printf(
520 'Manage your license(-s) and change domain names using the %s at BestWebSoft.',
521 '<a target="_blank" href="https://bestwebsoft.com/client-area">' . esc_html__( 'Client Area', 'bestwebsoft' ) . '</a>'
522 );
523 ?>
524 </p>
525 <p><a href="<?php echo esc_url( self_admin_url( $current_page ) ); ?>" target="_parent"><?php esc_html_e( 'Return to BestWebSoft Panel', 'bestwebsoft' ); ?></a></p>
526 <?php
527 } else {
528 $category_href = $current_page;
529 if ( 'all' !== $plugin_category ) {
530 $category_href .= '&category=' . $plugin_category;
531 }
532 ?>
533 <ul class="subsubsub">
534 <li>
535 <a
536 <?php
537 if ( ! isset( $_GET['sub'] ) ) {
538 echo 'class="current" ';}
539 ?>
540 href="<?php echo esc_url( self_admin_url( $category_href ) ); ?>"><?php esc_html_e( 'All', 'bestwebsoft' ); ?></a>
541 </li> |
542 <li>
543 <a
544 <?php
545 if ( isset( $_GET['sub'] ) && 'installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) ) {
546 echo 'class="current" ';}
547 ?>
548 href="<?php echo esc_url( self_admin_url( $category_href . '&sub=installed' ) ); ?>"><?php esc_html_e( 'Installed', 'bestwebsoft' ); ?></a>
549 </li> |
550 <li>
551 <a
552 <?php
553 if ( isset( $_GET['sub'] ) && 'not_installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) ) {
554 echo 'class="current" ';}
555 ?>
556 href="<?php echo esc_url( self_admin_url( $category_href . '&sub=not_installed' ) ); ?>"><?php esc_html_e( 'Not Installed', 'bestwebsoft' ); ?></a>
557 </li>
558 </ul>
559 <div class="clear"></div>
560 <div class="bws-filter-top">
561 <h2>
562 <span class="bws-toggle-indicator"></span>
563 <?php esc_html_e( 'Filter results', 'bestwebsoft' ); ?>
564 </h2>
565 <div class="bws-filter-top-inside">
566 <div class="bws-filter-title"><?php esc_html_e( 'Category', 'bestwebsoft' ); ?></div>
567 <ul class="bws-category">
568 <li>
569 <?php $sub_in_url = ( isset( $_GET['sub'] ) && in_array( sanitize_text_field( wp_unslash( $_GET['sub'] ) ), array( 'installed', 'not_installed' ) ) ) ? '&sub=' . sanitize_text_field( wp_unslash( $_GET['sub'] ) ) : ''; ?>
570 <a
571 <?php
572 if ( 'all' === $plugin_category ) {
573 echo ' class="bws-active"';}
574 ?>
575 href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url ) ); ?>"><?php esc_html_e( 'All', 'bestwebsoft' ); ?>
576 <span>(<?php echo count( $bws_plugins ); ?>)</span>
577 </a>
578 </li>
579 <?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?>
580 <li>
581 <a
582 <?php
583 if ( $category_key === $plugin_category ) {
584 echo ' class="bws-active"';}
585 ?>
586 href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url . '&category=' . $category_key ) ); ?>"><?php echo esc_html( $category_value['name'] ); ?>
587 <span>(<?php echo intval( $category_value['count'] ); ?>)</span>
588 </a>
589 </li>
590 <?php } ?>
591 </ul>
592 </div>
593 </div>
594 <div class="bws-products">
595 <?php
596 $nothing_found = true;
597 foreach ( $bws_plugins as $key_plugin => $value_plugin ) {
598
599 if ( 'all' !== $plugin_category && isset( $bws_plugins_category[ $plugin_category ] ) && ! in_array( $plugin_category, $value_plugin['category'] ) ) {
600 continue;
601 }
602
603 $key_plugin_explode = explode( '/', $key_plugin );
604 if ( in_array( $key_plugin_explode[0], array( 'car-rental', 'contact-form-multi', 'custom-admin-page', 'adsense-plugin', 'zendesk-help-center', 'bws-adsense' ) ) ) {
605 $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.png';
606 } else {
607 $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-256x256.gif';
608 }
609
610 $is_pro_isset = isset( $value_plugin['pro_version'] );
611 $is_installed = array_key_exists( $key_plugin, $all_plugins );
612 $is_active = in_array( $key_plugin, $active_plugins ) || isset( $sitewide_active_plugins[ $key_plugin ] );
613
614 $is_pro_installed = $is_pro_active = false;
615 if ( $is_pro_isset ) {
616 $is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins );
617 $is_pro_active = in_array( $value_plugin['pro_version'], $active_plugins ) || isset( $sitewide_active_plugins[ $value_plugin['pro_version'] ] );
618 }
619
620 if ( ( isset( $_GET['sub'] ) && 'installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) && ! $is_pro_installed && ! $is_installed ) ||
621 ( isset( $_GET['sub'] ) && 'not_installed' === sanitize_text_field( wp_unslash( $_GET['sub'] ) ) && ( $is_pro_installed || $is_installed ) ) ) {
622 continue;
623 }
624
625 if ( is_multisite() ) {
626 $link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"';
627 } else {
628 $link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . esc_url( $value_plugin['install_url'] ) . '" target="_blank"' : 'href="' . esc_url( self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $key_plugin_explode[0] . '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal"';
629 }
630
631 $nothing_found = false;
632 ?>
633 <div class="bws_product_box
634 <?php
635 if ( $is_active || $is_pro_active ) {
636 echo esc_attr( ' bws_product_active' );}
637 ?>
638 ">
639 <div class="bws_product_image">
640 <a <?php echo wp_kses_data( $link_attr ); ?>><img src="<?php echo esc_url( $icon ); ?>"/></a>
641 </div>
642 <div class="bws_product_content">
643 <div class="bws_product_title"><a <?php echo wp_kses_data( $link_attr ); ?>><?php echo esc_html( $value_plugin['name'] ); ?></a></div>
644 <div class="bws-version">
645 <?php
646 if ( $is_pro_installed ) {
647 echo '<span';
648 if ( ! empty( $value_plugin['expired'] ) || ! empty( $value_plugin['update_availible'] ) ) {
649 echo ' class="bws-update-available"';
650 }
651 echo '>v ' . esc_attr( $all_plugins[ $value_plugin['pro_version'] ]['Version'] ) . '</span>';
652 } elseif ( $is_installed ) {
653 echo '<span';
654 if ( ! empty( $value_plugin['expired'] ) || ! empty( $value_plugin['update_availible'] ) ) {
655 echo ' class="bws-update-available"';
656 }
657 echo '>v ' . esc_attr( $all_plugins[ $key_plugin ]['Version'] ) . '</span>';
658 } else {
659 echo '<span>' . esc_html__( 'Not installed', 'bestwebsoft' ) . '</span>';
660 }
661
662 if ( ! empty( $value_plugin['expired'] ) ) {
663 echo ' - <a class="bws-update-now" href="https://support.bestwebsoft.com/hc/en-us/articles/202356359" target="_blank">' . esc_html__( 'Renew to get updates', 'bestwebsoft' ) . '</a>';
664 } elseif ( ! empty( $value_plugin['update_availible'] ) ) {
665 $r = $update_availible_all->response[ $value_plugin['update_availible'] ];
666 echo ' - <a class="bws-update-now" href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . $value_plugin['update_availible'] ), 'upgrade-plugin_' . $value_plugin['update_availible'] ) ) . '" class="update-link" aria-label="' . sprintf( esc_html__( 'Update to v %s', 'bestwebsoft' ), esc_attr( $r->new_version ) ) . '">' . sprintf( esc_html__( 'Update to v %s', 'bestwebsoft' ), esc_html( $r->new_version ) ) . '</a>';
667 }
668 ?>
669 </div>
670 <div class="bws_product_description">
671 <?php echo ( strlen( $value_plugin['description'] ) > 100 ) ? esc_html( mb_substr( $value_plugin['description'], 0, 100 ) ) . '...' : esc_html( $value_plugin['description'] ); ?>
672 </div>
673 <div class="bws_product_links">
674 <?php
675 if ( $is_active || $is_pro_active ) {
676 if ( $is_pro_isset ) {
677 if ( ! $is_pro_installed ) {
678 if ( ! empty( $plugins_array ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) {
679 ?>
680 <form method="post" action="">
681 <input type="submit" class="button button-secondary" value="<?php esc_html_e( 'Get Pro', 'bestwebsoft' ); ?>" />
682 <input type="hidden" name="bws_plugin_action_submit" value="submit" />
683 <input type="hidden" name="bws_install_plugin" value="<?php echo esc_attr( $value_plugin['pro_version'] ); ?>" />
684 <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_license_install_nonce_name' ); ?>
685 </form>
686 <?php } else { ?>
687 <a class="button button-secondary bws_upgrade_button" href="<?php echo esc_url( $bws_plugins[ $key_plugin ]['purchase'] ); ?>" target="_blank"><?php esc_html_e( 'Upgrade to Pro', 'bestwebsoft' ); ?></a>
688 <?php
689 }
690 }
691 } else {
692 ?>
693 <a class="bws_donate" href="https://bestwebsoft.com/donate/" target="_blank"><?php esc_html_e( 'Donate', 'bestwebsoft' ); ?></a> <span>|</span>
694 <?php
695 }
696
697 if ( $is_pro_active ) {
698 ?>
699 <a class="bws_settings" href="<?php echo esc_url( self_admin_url( $bws_plugins[ $key_plugin ]['pro_settings'] ) ); ?>"><?php esc_html_e( 'Settings', 'bestwebsoft' ); ?></a>
700 <?php } else { ?>
701 <a class="bws_settings" href="<?php echo esc_url( self_admin_url( $bws_plugins[ $key_plugin ]['settings'] ) ); ?>"><?php esc_html_e( 'Settings', 'bestwebsoft' ); ?></a>
702 <?php
703 }
704 } else {
705 if ( $is_pro_installed ) {
706 ?>
707 <a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $value_plugin['pro_version'] ), 'bws_activate_plugin' . $value_plugin['pro_version'] ) ); ?>" title="<?php esc_html_e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php esc_html_e( 'Activate', 'bestwebsoft' ); ?></a>
708 <?php } elseif ( ! empty( $plugins_array ) && isset( $value_plugin['pro_version'] ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) { ?>
709 <form method="post" action="">
710 <input type="submit" class="button button-secondary" value="<?php esc_html_e( 'Get Pro', 'bestwebsoft' ); ?>" />
711 <input type="hidden" name="bws_plugin_action_submit" value="submit" />
712 <input type="hidden" name="bws_install_plugin" value="<?php echo esc_url( $value_plugin['pro_version'] ); ?>" />
713 <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bws_license_install_nonce_name' ); ?>
714 </form>
715 <?php } elseif ( $is_installed ) { ?>
716 <a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $key_plugin ), 'bws_activate_plugin' . $key_plugin ) ); ?>" title="<?php esc_html_e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php esc_html_e( 'Activate', 'bestwebsoft' ); ?></a>
717 <?php
718 } else {
719 $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' );
720 ?>
721 <a class="button button-secondary" href="<?php echo esc_url( $install_url ); ?>" title="<?php esc_html_e( 'Install this plugin', 'bestwebsoft' ); ?>" target="_blank"><?php esc_html_e( 'Install Now', 'bestwebsoft' ); ?></a>
722 <?php
723 }
724 }
725 ?>
726 </div>
727 </div>
728 <div class="clear"></div>
729 </div>
730 <?php
731 }
732 if ( $nothing_found ) {
733 ?>
734 <p class="description"><?php esc_html_e( 'Nothing found. Try another criteria.', 'bestwebsoft' ); ?></p>
735 <?php } ?>
736 </div>
737 <div id="bws-filter-wrapper">
738 <div class="bws-filter">
739 <div class="bws-filter-title"><?php esc_html_e( 'Category', 'bestwebsoft' ); ?></div>
740 <ul class="bws-category">
741 <li>
742 <?php $sub_in_url = ( isset( $_GET['sub'] ) && in_array( sanitize_text_field( wp_unslash( $_GET['sub'] ) ), array( 'installed', 'not_installed' ) ) ) ? '&sub=' . sanitize_text_field( wp_unslash( $_GET['sub'] ) ) : ''; ?>
743 <a
744 <?php
745 if ( 'all' === $plugin_category ) {
746 echo ' class="bws-active"';}
747 ?>
748 href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url ) ); ?>"><?php esc_html_e( 'All', 'bestwebsoft' ); ?>
749 <span>(<?php echo count( $bws_plugins ); ?>)</span>
750 </a>
751 </li>
752 <?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?>
753 <li>
754 <a
755 <?php
756 if ( $category_key === $plugin_category ) {
757 echo ' class="bws-active"';}
758 ?>
759 href="<?php echo esc_url( self_admin_url( $current_page . $sub_in_url . '&category=' . $category_key ) ); ?>"><?php echo esc_html( $category_value['name'] ); ?>
760 <span>(<?php echo intval( $category_value['count'] ); ?>)</span>
761 </a>
762 </li>
763 <?php } ?>
764 </ul>
765 </div>
766 </div><!-- #bws-filter-wrapper -->
767 <div class="clear"></div>
768 <?php
769 }
770 } elseif ( 'bws_themes' === $page || 'themes' === $tab ) {
771 require dirname( __FILE__ ) . '/product_list.php';
772 ?>
773 <h1><?php esc_html_e( 'Themes', 'bestwebsoft' ); ?></h1>
774 <div id="availablethemes" class="bws-availablethemes">
775 <div class="theme-browser content-filterable rendered">
776 <div class="themes wp-clearfix">
777 <?php
778 foreach ( $themes as $key => $theme ) {
779 $installed_theme = wp_get_theme( $theme->slug );
780 ?>
781 <div class="theme" tabindex="0">
782 <div class="theme-screenshot">
783 <img src="<?php echo esc_url( bws_menu_url( 'icons/themes/' ) . $theme->slug . '.png' ); ?>" alt="" />
784 </div>
785 <div class="theme-author"><?php printf( esc_html__( 'By %s', 'bestwebsoft' ), 'BestWebSoft' ); ?></div>
786 <h3 class="theme-name"><?php echo esc_html( $theme->name ); ?></h3>
787 <div class="theme-actions">
788 <a class="button button-secondary preview install-theme-preview" href="<?php echo esc_url( $theme->href ); ?>" target="_blank"><?php esc_html_e( 'Learn More', 'bestwebsoft' ); ?></a>
789 </div>
790 <?php
791 if ( $installed_theme->exists() ) {
792 if ( $wp_version < '4.6' ) {
793 ?>
794 <div class="theme-installed"><?php esc_html_e( 'Already Installed', 'bestwebsoft' ); ?></div>
795 <?php } else { ?>
796 <div class="notice notice-success notice-alt inline"><p><?php esc_html_e( 'Installed', 'bestwebsoft' ); ?></p></div>
797 <?php
798 }
799 }
800 ?>
801 </div>
802 <?php } ?>
803 <br class="clear" />
804 </div>
805 </div>
806 <p><a class="bws_browse_link" href="https://bestwebsoft.com/products/wordpress/themes/" target="_blank"><?php esc_html_e( 'Browse More WordPress Themes', 'bestwebsoft' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></a></p>
807 </div>
808 <?php } elseif ( 'bws_system_status' === $page || 'system-status' === $tab ) { ?>
809 <h1><?php esc_html_e( 'System status', 'bestwebsoft' ); ?></h1>
810 <div class="updated fade notice is-dismissible inline"
811 <?php
812 if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || '' !== $error ) {
813 echo 'style="display:none"';}
814 ?>
815 ><p><strong><?php echo esc_html( $message ); ?></strong></p></div>
816 <div class="error"
817 <?php
818 if ( '' === $error ) {
819 echo 'style="display:none"';}
820 ?>
821 ><p><strong><?php echo esc_html( $error ); ?></strong></p></div>
822 <form method="post" action="">
823 <p>
824 <input type="hidden" name="bwsmn_form_submit" value="submit" />
825 <input type="submit" class="button-primary" value="<?php esc_html_e( 'Send to support', 'bestwebsoft' ); ?>" />
826 <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit' ); ?>
827 </p>
828 </form>
829 <form method="post" action="">
830 <p>
831 <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" />
832 <input type="submit" class="button" value="<?php esc_html_e( 'Send to custom email &#187;', 'bestwebsoft' ); ?>" />
833 <input type="text" maxlength="250" value="" name="bwsmn_form_email" />
834 <?php wp_nonce_field( plugin_basename( __FILE__ ), 'bwsmn_nonce_submit_custom_email' ); ?>
835 </p>
836 </form>
837 <?php foreach ( $system_info as $info ) { ?>
838 <table class="widefat bws-system-info" cellspacing="0">
839 <thead>
840 <tr>
841 <th colspan="2">
842 <strong>
843 <?php
844 echo esc_html( $info['name'] );
845 if ( isset( $info['count'] ) ) {
846 echo ' (' . intval( $info['count'] ) . ')';
847 }
848 ?>
849 </strong>
850 </th>
851 </tr>
852 </thead>
853 <tbody>
854 <?php foreach ( $info['data'] as $key => $value ) { ?>
855 <tr>
856 <td scope="row"><?php echo esc_attr( $key ); ?></td>
857 <td scope="row"><?php echo esc_html( $value ); ?></td>
858 </tr>
859 <?php } ?>
860 </tbody>
861 </table>
862 <?php
863 }
864 }
865 ?>
866 </div>
867 </div>
868 <?php
869 }
870 }
871
872 if ( ! function_exists( 'bws_get_banner_array' ) ) {
873 function bws_get_banner_array() {
874 global $bstwbsftwppdtplgns_banner_array;
875 $bstwbsftwppdtplgns_banner_array = array(
876 array( 'gglstpvrfctn_hide_banner_on_plugin_page', 'bws-google-2-step-verification/bws-google-2-step-verification.php', '1.0.0' ),
877 array( 'sclbttns_hide_banner_on_plugin_page', 'social-buttons-pack/social-buttons-pack.php', '1.1.0' ),
878 array( 'tmsht_hide_banner_on_plugin_page', 'timesheet/timesheet.php', '0.1.3' ),
879 array( 'pgntn_hide_banner_on_plugin_page', 'pagination/pagination.php', '1.0.6' ),
880 array( 'crrntl_hide_banner_on_plugin_page', 'car-rental/car-rental.php', '1.0.0' ),
881 array( 'lnkdn_hide_banner_on_plugin_page', 'bws-linkedin/bws-linkedin.php', '1.0.1' ),
882 array( 'pntrst_hide_banner_on_plugin_page', 'bws-pinterest/bws-pinterest.php', '1.0.1' ),
883 array( 'zndskhc_hide_banner_on_plugin_page', 'zendesk-help-center/zendesk-help-center.php', '1.0.0' ),
884 array( 'gglcptch_hide_banner_on_plugin_page', 'google-captcha/google-captcha.php', '1.18' ),
885 array( 'mltlngg_hide_banner_on_plugin_page', 'multilanguage/multilanguage.php', '1.1.1' ),
886 array( 'adsns_hide_banner_on_plugin_page', 'bws-adsense/bws-adsense.php', '1.36' ),
887 array( 'vstrsnln_hide_banner_on_plugin_page', 'visitors-online/visitors-online.php', '0.2' ),
888 array( 'cstmsrch_hide_banner_on_plugin_page', 'custom-search-plugin/custom-search-plugin.php', '1.28' ),
889 array( 'prtfl_hide_banner_on_plugin_page', 'portfolio/portfolio.php', '2.33' ),
890 array( 'rlt_hide_banner_on_plugin_page', 'realty/realty.php', '1.0.0' ),
891 array( 'prmbr_hide_banner_on_plugin_page', 'promobar/promobar.php', '1.0.0' ),
892 array( 'gglnltcs_hide_banner_on_plugin_page', 'bws-google-analytics/bws-google-analytics.php', '1.6.2' ),
893 array( 'htccss_hide_banner_on_plugin_page', 'htaccess/htaccess.php', '1.6.3' ),
894 array( 'sbscrbr_hide_banner_on_plugin_page', 'subscriber/subscriber.php', '1.1.8' ),
895 array( 'lmtttmpts_hide_banner_on_plugin_page', 'limit-attempts/limit-attempts.php', '1.0.2' ),
896 array( 'sndr_hide_banner_on_plugin_page', 'sender/sender.php', '0.5' ),
897 array( 'srrl_hide_banner_on_plugin_page', 'user-role/user-role.php', '1.4' ),
898 array( 'pdtr_hide_banner_on_plugin_page', 'updater/updater.php', '1.12' ),
899 array( 'cntctfrmtdb_hide_banner_on_plugin_page', 'contact-form-to-db/contact_form_to_db.php', '1.2' ),
900 array( 'cntctfrmmlt_hide_banner_on_plugin_page', 'contact-form-multi/contact-form-multi.php', '1.0.7' ),
901 array( 'gglmps_hide_banner_on_plugin_page', 'bws-google-maps/bws-google-maps.php', '1.2' ),
902 array( 'fcbkbttn_hide_banner_on_plugin_page', 'facebook-button-plugin/facebook-button-plugin.php', '2.29' ),
903 array( 'twttr_hide_banner_on_plugin_page', 'twitter-plugin/twitter.php', '2.34' ),
904 array( 'pdfprnt_hide_banner_on_plugin_page', 'pdf-print/pdf-print.php', '1.7.1' ),
905 array( 'gglstmp_hide_banner_on_plugin_page', 'google-sitemap-plugin/google-sitemap-plugin.php', '2.8.4' ),
906 array( 'cntctfrmpr_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-pro/contact_form_pro.php', '1.14' ),
907 array( 'cntctfrm_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.47' ),
908 array( 'cptch_hide_banner_on_plugin_page', 'captcha-bws/captcha-bws.php', '3.8.4' ),
909 array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' ),
910 array( 'cntctfrm_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.62' ),
911 array( 'bwscrrntl_hide_banner_on_plugin_page', 'bws-car-rental/bws-car-rental.php', '0.0.1' ),
912 array( 'rtng_hide_banner_on_plugin_page', 'rating-bws/rating-bws.php', '1.0.0' ),
913 array( 'prflxtrflds_hide_banner_on_plugin_page', 'profile-extra-fields/profile-extra-fields.php', '1.1.3' ),
914 array( 'psttcsv_hide_banner_on_plugin_page', 'post-to-csv/post-to-csv.php', '1.3.4' ),
915 array( 'cstmdmnpg_hide_banner_on_plugin_page', 'custom-admin-page/custom-admin-page.php', '1.0.0' ),
916 );
917 }
918 }
919