/bws_menu/bws_menu.php

  1. <?php 
  2. /** 
  3. * Function for displaying BestWebSoft menu 
  4. * Version: 1.9.2 
  5. */ 
  6.  
  7. if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) ) 
  8. require_once( dirname( __FILE__ ) . '/bws_functions.php' ); 
  9.  
  10. if ( ! function_exists( 'bws_add_menu_render' ) ) { 
  11. function bws_add_menu_render() { 
  12. global $wpdb, $wp_version, $bws_plugin_info, $bstwbsftwppdtplgns_options; 
  13. $error = $message = $bwsmn_form_email = '';  
  14.  
  15. if ( 'bws_panel' == $_GET['page'] ) { 
  16.  
  17. if ( ! function_exists( 'is_plugin_active_for_network' ) ) 
  18. require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 
  19.  
  20. /** get $bws_plugins */ 
  21. require_once( dirname( __FILE__ ) . '/product_list.php' );  
  22.  
  23. $all_plugins = get_plugins(); 
  24. $active_plugins = get_option( 'active_plugins' );  
  25. $sitewide_active_plugins = ( function_exists( 'is_multisite' ) && is_multisite() ) ? get_site_option( 'active_sitewide_plugins' ) : array(); 
  26. $update_availible_all = get_site_transient( 'update_plugins' ); 
  27.  
  28. $plugin_category = isset( $_GET['category'] ) ? $_GET['category'] : 'all'; 
  29.  
  30. if ( ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) || ! isset( $_GET['sub'] ) ) { 
  31. $bws_plugins_update_availible = $bws_plugins_expired = array(); 
  32. foreach ( $bws_plugins as $key_plugin => $value_plugin ) {  
  33.  
  34. foreach ( $value_plugin['category'] as $category_key ) { 
  35. $bws_plugins_category[ $category_key ]['count'] = isset( $bws_plugins_category[ $category_key ]['count'] ) ? $bws_plugins_category[ $category_key ]['count'] + 1 : 1; 
  36.  
  37. $is_installed = array_key_exists( $key_plugin, $all_plugins ); 
  38. $is_pro_installed = false; 
  39. if ( isset( $value_plugin['pro_version'] ) ) {  
  40. $is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins ); 
  41. /** check update_availible */ 
  42. if ( $is_pro_installed && array_key_exists( $value_plugin['pro_version'], $update_availible_all->response ) ) {  
  43. unset( $bws_plugins[ $key_plugin ] ); 
  44. $value_plugin['update_availible'] = $value_plugin['pro_version']; 
  45. $bws_plugins_update_availible[ $key_plugin ] = $value_plugin;  
  46. } else if ( $is_installed && array_key_exists( $key_plugin, $update_availible_all->response ) ) { 
  47. unset( $bws_plugins[ $key_plugin ] ); 
  48. $value_plugin['update_availible'] = $key_plugin; 
  49. $bws_plugins_update_availible[ $key_plugin ] = $value_plugin; 
  50. /** check expired */ 
  51. if ( $is_pro_installed && isset( $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ] ) && 
  52. strtotime( $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ] ) < strtotime( date( "m/d/Y" ) ) ) { 
  53. unset( $bws_plugins[ $key_plugin ] ); 
  54. $value_plugin['expired'] = $bstwbsftwppdtplgns_options['time_out'][ $value_plugin['pro_version'] ]; 
  55. $bws_plugins_expired[ $key_plugin ] = $value_plugin; 
  56. $bws_plugins = $bws_plugins_update_availible + $bws_plugins_expired + $bws_plugins; 
  57. } else { 
  58. foreach ( $bws_plugins as $key_plugin => $value_plugin ) {  
  59. foreach ( $value_plugin['category'] as $category_key ) { 
  60. $bws_plugins_category[ $category_key ]['count'] = isset( $bws_plugins_category[ $category_key ]['count'] ) ? $bws_plugins_category[ $category_key ]['count'] + 1 : 1; 
  61.  
  62. /*** membership ***/  
  63. $bws_license_plugin = 'bws_get_list_for_membership'; 
  64. $bws_license_key = isset( $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) ? $bstwbsftwppdtplgns_options[ $bws_license_plugin ] : ''; 
  65. $update_membership_list = true; 
  66.  
  67. if ( isset( $_POST['bws_license_key'] ) ) 
  68. $bws_license_key = stripslashes( esc_html( trim( $_POST['bws_license_key'] ) ) );  
  69.  
  70. if ( isset( $_SESSION['bws_membership_time_check'] ) && isset( $_SESSION['bws_membership_list'] ) && $_SESSION['bws_membership_time_check'] < strtotime( '+12 hours' ) ) { 
  71. $update_membership_list = false; 
  72. $plugins_array = $_SESSION['bws_membership_list']; 
  73.  
  74. if ( ( $update_membership_list && ! empty( $bws_license_key ) ) || ( isset( $_POST['bws_license_submit'] ) && check_admin_referer( plugin_basename(__FILE__), 'bws_license_nonce_name' ) ) ) { 
  75.  
  76. if ( '' != $bws_license_key ) {  
  77. if ( strlen( $bws_license_key ) != 18 ) { 
  78. $error = __( 'Wrong license key', 'bestwebsoft' ); 
  79. } else { 
  80.  
  81. if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - (24 * 60 * 60) ) ) { 
  82. $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1; 
  83. } else { 
  84. $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = 1; 
  85. $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] = time(); 
  86.  
  87. /** get Pro list */ 
  88. $to_send = array(); 
  89. $to_send["plugins"][ $bws_license_plugin ] = array(); 
  90. $to_send["plugins"][ $bws_license_plugin ]["bws_license_key"] = $bws_license_key; 
  91. $options = array( 
  92. 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ),  
  93. 'body' => array( 'plugins' => serialize( $to_send ) ),  
  94. 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) ); 
  95. $raw_response = wp_remote_post( 'http://bestwebsoft.com/wp-content/plugins/paid-products/plugins/update-check/1.0/', $options ); 
  96.  
  97. if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) ) { 
  98. $error = __( "Something went wrong. Please try again later. If the error appears again, please contact us", 'bestwebsoft' ) . ' <a href="http://support.bestwebsoft.com">BestWebSoft</a>. ' . __( "We are sorry for inconvenience.", 'bestwebsoft' ); 
  99. } else { 
  100. $response = maybe_unserialize( wp_remote_retrieve_body( $raw_response ) ); 
  101. if ( is_array( $response ) && !empty( $response ) ) { 
  102. foreach ( $response as $key => $value ) { 
  103. if ( "wrong_license_key" == $value->package ) { 
  104. $error = __( "Wrong license key", 'bestwebsoft' );  
  105. } elseif ( "wrong_domain" == $value->package ) { 
  106. $error = __( 'This license key is bind to another website. Change it via personal Client Area.', 'bestwebsoft' ) . '<a target="_blank" href="http://bestwebsoft.com/wp-admin/admin.php?page=client-area">' . __( 'Log in', 'bestwebsoft' ) . '</a>'; 
  107. } elseif ( "you_are_banned" == $value->package ) { 
  108. $error = __( "Unfortunately, you have exceeded the number of available tries per day.", 'bestwebsoft' ); 
  109. } elseif ( "time_out" == $value->package ) { 
  110. $error = __( "Unfortunately, Your license has expired. To continue getting top-priority support and plugin updates you should extend it in your", 'bestwebsoft' ) . ' <a target="_blank" href="http://bestwebsoft.com/wp-admin/admin.php?page=client-area">Client Area</a>'; 
  111. } elseif ( "duplicate_domen_for_trial" == $value->package ) { 
  112. $error = __( "Unfortunately, the Pro licence was already installed to this domain. The Pro Trial license can be installed only once.", 'bestwebsoft' ); 
  113. } elseif ( is_array( $value->package ) && ! empty( $value->package ) ) { 
  114. $plugins_array = $_SESSION['bws_membership_list'] = $value->package; 
  115. $_SESSION['bws_membership_time_check'] = strtotime( 'now' ); 
  116.  
  117. if ( $bws_license_key == $bstwbsftwppdtplgns_options[ $bws_license_plugin ] ) { 
  118. $message = __( 'The license key is valid.', 'bestwebsoft' ); 
  119. if ( isset( $value->time_out ) && $value->time_out != '' ) 
  120. $message .= ' ' . __( 'Your license will expire on', 'bestwebsoft' ) . ' ' . $value->time_out . '.'; 
  121. } else { 
  122. $message = __( 'Congratulations! Pro Membership license is successfully activated.', 'bestwebsoft' ); 
  123. }  
  124.  
  125. $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key;  
  126. } else { 
  127. $error = __( "Something went wrong. Try again later or upload the plugin manually. We are sorry for inconvenience.", 'bestwebsoft' );  
  128.  
  129. if ( is_multisite() ) 
  130. update_site_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); 
  131. else 
  132. update_option( 'bstwbsftwppdtplgns_options', $bstwbsftwppdtplgns_options ); 
  133. } else { 
  134. $error = __( "Please enter your license key.", 'bestwebsoft' ); 
  135. }  
  136.  
  137. if ( 'bws_system_status' == $_GET['page'] ) { 
  138. $all_plugins = get_plugins(); 
  139. $active_plugins = get_option( 'active_plugins' ); 
  140. $mysql_info = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" ); 
  141. if ( is_array( $mysql_info ) ) 
  142. $sql_mode = $mysql_info[0]->Value; 
  143. if ( empty( $sql_mode ) ) 
  144. $sql_mode = __( 'Not set', 'bestwebsoft' ); 
  145.  
  146. $safe_mode = ( ini_get( 'safe_mode' ) ) ? __( 'On', 'bestwebsoft' ) : __( 'Off', 'bestwebsoft' ); 
  147. $allow_url_fopen = ( ini_get( 'allow_url_fopen' ) ) ? __( 'On', 'bestwebsoft' ) : __( 'Off', 'bestwebsoft' ); 
  148. $upload_max_filesize = ( ini_get( 'upload_max_filesize' ) )? ini_get( 'upload_max_filesize' ) : __( 'N/A', 'bestwebsoft' ); 
  149. $post_max_size = ( ini_get( 'post_max_size' ) ) ? ini_get( 'post_max_size' ) : __( 'N/A', 'bestwebsoft' ); 
  150. $max_execution_time = ( ini_get( 'max_execution_time' ) ) ? ini_get( 'max_execution_time' ) : __( 'N/A', 'bestwebsoft' ); 
  151. $memory_limit = ( ini_get( 'memory_limit' ) ) ? ini_get( 'memory_limit' ) : __( 'N/A', 'bestwebsoft' ); 
  152. $memory_usage = ( function_exists( 'memory_get_usage' ) ) ? round( memory_get_usage() / 1024 / 1024, 2 ) . __( ' Mb', 'bestwebsoft' ) : __( 'N/A', 'bestwebsoft' ); 
  153. $exif_read_data = ( is_callable( 'exif_read_data' ) ) ? __( 'Yes', 'bestwebsoft' ) . " ( V" . substr( phpversion( 'exif' ), 0, 4 ) . ")" : __( 'No', 'bestwebsoft' ); 
  154. $iptcparse = ( is_callable( 'iptcparse' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' ); 
  155. $xml_parser_create = ( is_callable( 'xml_parser_create' ) ) ? __( 'Yes', 'bestwebsoft' ) : __( 'No', 'bestwebsoft' ); 
  156. $theme = ( function_exists( 'wp_get_theme' ) ) ? wp_get_theme() : get_theme( get_current_theme() ); 
  157.  
  158. if ( function_exists( 'is_multisite' ) ) { 
  159. if ( is_multisite() ) 
  160. $multisite = __( 'Yes', 'bestwebsoft' ); 
  161. else 
  162. $multisite = __( 'No', 'bestwebsoft' ); 
  163. } else { 
  164. $multisite = __( 'N/A', 'bestwebsoft' ); 
  165.  
  166. $system_info = array( 
  167. 'system_info' => '',  
  168. 'active_plugins' => '',  
  169. 'inactive_plugins' => '' 
  170. ); 
  171. $system_info['system_info'] = array( 
  172. __( 'Operating System', 'bestwebsoft' ) => PHP_OS,  
  173. __( 'Server', 'bestwebsoft' ) => $_SERVER["SERVER_SOFTWARE"],  
  174. __( 'Memory usage', 'bestwebsoft' ) => $memory_usage,  
  175. __( 'MYSQL Version', 'bestwebsoft' ) => $wpdb->get_var( "SELECT VERSION() AS version" ),  
  176. __( 'SQL Mode', 'bestwebsoft' ) => $sql_mode,  
  177. __( 'PHP Version', 'bestwebsoft' ) => PHP_VERSION,  
  178. __( 'PHP Safe Mode', 'bestwebsoft' ) => $safe_mode,  
  179. __( 'PHP Allow URL fopen', 'bestwebsoft' ) => $allow_url_fopen,  
  180. __( 'PHP Memory Limit', 'bestwebsoft' ) => $memory_limit,  
  181. __( 'PHP Max Upload Size', 'bestwebsoft' ) => $upload_max_filesize,  
  182. __( 'PHP Max Post Size', 'bestwebsoft' ) => $post_max_size,  
  183. __( 'PHP Max Script Execute Time', 'bestwebsoft' ) => $max_execution_time,  
  184. __( 'PHP Exif support', 'bestwebsoft' ) => $exif_read_data,  
  185. __( 'PHP IPTC support', 'bestwebsoft' ) => $iptcparse,  
  186. __( 'PHP XML support', 'bestwebsoft' ) => $xml_parser_create,  
  187. __( 'Site URL', 'bestwebsoft' ) => get_option( 'siteurl' ),  
  188. __( 'Home URL', 'bestwebsoft' ) => home_url(),  
  189. '$_SERVER[HTTP_HOST]' => $_SERVER['HTTP_HOST'],  
  190. '$_SERVER[SERVER_NAME]' => $_SERVER['SERVER_NAME'],  
  191. __( 'WordPress Version', 'bestwebsoft' ) => $wp_version,  
  192. __( 'WordPress DB Version', 'bestwebsoft' ) => get_option( 'db_version' ),  
  193. __( 'Multisite', 'bestwebsoft' ) => $multisite,  
  194. __( 'Active Theme', 'bestwebsoft' ) => $theme['Name'] . ' ' . $theme['Version'] 
  195. ); 
  196. foreach ( $all_plugins as $path => $plugin ) { 
  197. if ( is_plugin_active( $path ) ) 
  198. $system_info['active_plugins'][ $plugin['Name'] ] = $plugin['Version']; 
  199. else 
  200. $system_info['inactive_plugins'][ $plugin['Name'] ] = $plugin['Version']; 
  201.  
  202.  
  203. 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' ) ) ) { 
  204. if ( isset( $_REQUEST['bwsmn_form_email'] ) ) { 
  205. $bwsmn_form_email = esc_html( trim( $_REQUEST['bwsmn_form_email'] ) ); 
  206. if ( $bwsmn_form_email == "" || ! is_email( $bwsmn_form_email ) ) { 
  207. $error = __( "Please enter a valid email address.", 'bestwebsoft' ); 
  208. } else { 
  209. $email = $bwsmn_form_email; 
  210. $bwsmn_form_email = ''; 
  211. $message = __( 'Email with system info is sent to ', 'bestwebsoft' ) . $email; 
  212. } else { 
  213. $email = 'plugin_system_status@bestwebsoft.com'; 
  214. $message = __( 'Thank you for contacting us.', 'bestwebsoft' ); 
  215.  
  216. if ( $error == '' ) { 
  217. $headers = 'MIME-Version: 1.0' . "\n"; 
  218. $headers .= 'Content-type: text/html; charset=utf-8' . "\n"; 
  219. $headers .= 'From: ' . get_option( 'admin_email' ); 
  220. $message_text = '<html><head><title>System Info From ' . home_url() . '</title></head><body> 
  221. <h4>Environment</h4> 
  222. <table>'; 
  223. foreach ( $system_info['system_info'] as $key => $value ) { 
  224. $message_text .= '<tr><td>'. $key .'</td><td>'. $value .'</td></tr>'; 
  225. $message_text .= '</table>'; 
  226. if ( ! empty( $system_info['active_plugins'] ) ) { 
  227. $message_text .= '<h4>Active Plugins</h4> 
  228. <table>'; 
  229. foreach ( $system_info['active_plugins'] as $key => $value ) { 
  230. $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>'; 
  231. $message_text .= '</table>'; 
  232. if ( ! empty( $system_info['inactive_plugins'] ) ) { 
  233. $message_text .= '<h4>Inactive Plugins</h4> 
  234. <table>'; 
  235. foreach ( $system_info['inactive_plugins'] as $key => $value ) { 
  236. $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>'; 
  237. $message_text .= '</table>'; 
  238. $message_text .= '</body></html>'; 
  239. $result = wp_mail( $email, 'System Info From ' . home_url(), $message_text, $headers ); 
  240. if ( $result != true ) 
  241. $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' ); 
  242. } ?> 
  243. <div class="bws-wrap"> 
  244. <div class="bws-header">  
  245. <div class="bws-title"> 
  246. <a href="<?php echo self_admin_url( 'admin.php?page=bws_panel' ); ?>"> 
  247. <img class="bws-logo" src="<?php echo plugins_url( 'images/bestwebsoft-logo-white.svg', __FILE__ ); ?>" /> 
  248. BestWebSoft 
  249. <span>panel</span> 
  250. </a> 
  251. </div> 
  252. <div class="bws-menu-item-icon">•••</div> 
  253. <div class="bws-nav-tab-wrapper"> 
  254. <a class="bws-nav-tab<?php if ( 'bws_panel' == $_GET['page'] ) echo ' bws-nav-tab-active'; ?>" href="admin.php?page=bws_panel"><?php _e( 'Plugins', 'bestwebsoft' ); ?></a> 
  255. <a class="bws-nav-tab<?php if ( 'bws_themes' == $_GET['page'] ) echo ' bws-nav-tab-active'; ?>" href="<?php echo self_admin_url( 'admin.php?page=bws_themes' ); ?>"><?php _e( 'Themes', 'bestwebsoft' ); ?></a> 
  256. </div> 
  257. <div class="bws-help-links-wrapper"> 
  258. <a <?php if ( 'bws_system_status' == $_GET['page'] ) echo ' class="bws-nav-tab-active"'; ?> href="<?php echo self_admin_url( 'admin.php?page=bws_system_status' ); ?>"><?php _e( 'System status', 'bestwebsoft' ); ?></a> 
  259. <a href="<?php echo esc_url( 'http://support.bestwebsoft.com/home' ); ?>" target="_blank"><?php _e( 'Support', 'bestwebsoft' ); ?></a>  
  260. <a href="<?php echo esc_url( 'http://bestwebsoft.com/wp-admin/admin.php?page=client-area' ); ?>" target="_blank" title="<?php _e( 'Manage purchased licenses & subscriptions', 'bestwebsoft' ); ?>"><?php _e( 'Client Area', 'bestwebsoft' ); ?></a>  
  261. </div>  
  262. <div class="clear"></div> 
  263. </div> 
  264. <?php if ( 'bws_panel' == $_GET['page'] && ! isset( $_POST['bws_plugin_action_submit'] ) ) { ?> 
  265. <div class="bws-membership-wrap"> 
  266. <div class="bws-membership-backround"></div> 
  267. <div class="bws-membership">  
  268. <div class="bws-membership-title"><?php printf( __( 'Get Access to %s+ Premium Plugins', 'bestwebsoft' ), '30' ); ?></div>  
  269. <form class="bws-membership-form" method="post" action=""> 
  270. <span class="bws-membership-link"><a target="_blank" href="http://bestwebsoft.com/membership/"><?php _e( 'Subscribe to Pro Membership', 'bestwebsoft' ); ?></a> <?php _e( 'or', 'bestwebsoft' ); ?></span>  
  271. <?php if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && 
  272. '5' < $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] && 
  273. $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) ) { ?> 
  274. <div class="bws_form_input_wrap"> 
  275. <input disabled="disabled" type="text" name="bws_license_key" value="<?php echo $bws_license_key; ?>" /> 
  276. <div class="bws_error"><?php _e( "Unfortunately, you have exceeded the number of available tries per day.", 'bestwebsoft' ); ?></div> 
  277. </div> 
  278. <input disabled="disabled" type="submit" class="bws-button" value="<?php _e( 'Check license key', 'bestwebsoft' ); ?>" />  
  279. <?php } else { ?> 
  280. <div class="bws_form_input_wrap">  
  281. <input <?php if ( "" != $error ) echo "class=\"bws_input_error\""; ?> type="text" placeholder="<?php _e( 'Enter your license key', 'bestwebsoft' ); ?>" maxlength="100" name="bws_license_key" value="<?php echo $bws_license_key; ?>" /> 
  282. <div class="bws_error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><?php echo $error; ?></div> 
  283. </div> 
  284. <input type="hidden" name="bws_license_plugin" value="<?php echo $bws_license_plugin; ?>" /> 
  285. <input type="hidden" name="bws_license_submit" value="submit" /> 
  286. <?php if ( empty( $plugins_array ) ) { ?> 
  287. <input type="submit" class="bws-button" value="<?php _e( 'Activate', 'bestwebsoft' ); ?>" /> 
  288. <?php } else { ?> 
  289. <input type="submit" class="bws-button" value="<?php _e( 'Check license key', 'bestwebsoft' ); ?>" /> 
  290. <?php } ?>  
  291. <?php wp_nonce_field( plugin_basename(__FILE__), 'bws_license_nonce_name' ); ?>  
  292. <?php } ?>  
  293. </form> 
  294. <div class="clear"></div>  
  295. </div> 
  296. </div>  
  297. <?php } ?> 
  298. <div class="bws-wrap-content wrap">  
  299. <?php if ( 'bws_panel' == $_GET['page'] ) { ?> 
  300. <div class="updated notice is-dismissible inline" <?php if ( '' == $message || '' != $error ) echo "style=\"display:none\""; ?>><p><?php echo $message; ?></p></div> 
  301. <h1> 
  302. <?php _e( 'Plugins', 'bestwebsoft' ); ?> 
  303. <a href="<?php echo self_admin_url( 'plugin-install.php?tab=upload' ); ?>" class="upload page-title-action add-new-h2"><?php _e( 'Upload Plugin', 'bestwebsoft' ); ?></a> 
  304. </h1> 
  305. <?php if ( isset( $_GET['error'] ) ) { 
  306. if ( isset( $_GET['charsout'] ) ) 
  307. $errmsg = sprintf(__( 'The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.' ), $_GET['charsout'] ); 
  308. else 
  309. $errmsg = __( 'Plugin could not be activated because it triggered a <strong>fatal error</strong>.' ); ?> 
  310. <div id="message" class="error is-dismissible"><p><?php echo $errmsg; ?></p></div> 
  311. <?php } elseif ( isset( $_GET['activate'] ) ) { ?> 
  312. <div id="message" class="updated notice is-dismissible"><p><?php _e( 'Plugin <strong>activated</strong>.' ) ?></p></div> 
  313. <?php } 
  314.  
  315. if ( isset( $_POST['bws_plugin_action_submit'] ) && isset( $_POST['bws_install_plugin'] ) && check_admin_referer( plugin_basename(__FILE__), 'bws_license_install_nonce_name' ) ) { 
  316.  
  317. $bws_license_plugin = esc_html( $_POST['bws_install_plugin'] ); 
  318.  
  319. echo '<h2>' . __( 'Installing Plugin', 'bestwebsoft' ) . ': ' . $plugins_array[ $bws_license_plugin ]['name'] . '</h2>'; 
  320.  
  321. $bstwbsftwppdtplgns_options[ $bws_license_plugin ] = $bws_license_key; 
  322.  
  323. $url = $plugins_array[ $bws_license_plugin ]['link'] . '&download_from=5'; 
  324.  
  325. echo '<p>' . __( "Downloading install package from", 'bestwebsoft' ) . ' ' . $url . '</p>';  
  326.  
  327. $uploadDir = wp_upload_dir(); 
  328. $zip_name = explode( '/', $bws_license_plugin ); 
  329.  
  330. if ( !function_exists( 'curl_init' ) ) {  
  331. $received_content = file_get_contents( $url ); 
  332. } else { 
  333. $ch = curl_init(); 
  334. curl_setopt( $ch, CURLOPT_URL, $url ); 
  335. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); 
  336. curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true ); 
  337. $received_content = curl_exec( $ch ); 
  338. curl_close( $ch ); 
  339. }  
  340.  
  341. if ( ! $received_content ) { 
  342. $error = __( "Failed to download the zip archive. Please, upload the plugin manually", 'bestwebsoft' ); 
  343. } else { 
  344. if ( is_writable( $uploadDir["path"] ) ) { 
  345. $file_put_contents = $uploadDir["path"] . "/" . $zip_name[0] . ".zip"; 
  346.  
  347. if ( file_put_contents( $file_put_contents, $received_content ) ) { 
  348. @chmod( $file_put_contents, octdec( 755 ) ); 
  349.  
  350. echo '<p>' . __( 'Unpacking the package', 'bestwebsoft' ) . '...</p>'; 
  351.  
  352. if ( class_exists( 'ZipArchive' ) ) { 
  353. $zip = new ZipArchive(); 
  354. if ( $zip->open( $file_put_contents ) === TRUE ) { 
  355. echo '<p>' . __( 'Installing the plugin', 'bestwebsoft' ) . '...</p>'; 
  356. $zip->extractTo( WP_PLUGIN_DIR ); 
  357. $zip->close(); 
  358. } else { 
  359. $error = __( "Failed to open the zip archive. Please, upload the plugin manually", 'bestwebsoft' ); 
  360. } elseif ( class_exists( 'Phar' ) ) { 
  361. $phar = new PharData( $file_put_contents ); 
  362. echo '<p>' . __( 'Installing the plugin', 'bestwebsoft' ) . '...</p>'; 
  363. $phar->extractTo( WP_PLUGIN_DIR ); 
  364. } else { 
  365. $error = __( "Your server does not support either ZipArchive or Phar. Please, upload the plugin manually", 'bestwebsoft' ); 
  366. if ( empty( $error ) ) 
  367. echo '<p>' . __( 'Successfully installed the plugin', 'bestwebsoft' ) . ' <strong>' . $plugins_array[ $bws_license_plugin ]['name'] . '</strong></p>'; 
  368.  
  369. @unlink( $file_put_contents ); 
  370. } else { 
  371. $error = __( "Failed to download the zip archive. Please, upload the plugin manually", 'bestwebsoft' ); 
  372. } else { 
  373. $error = __( "UploadDir is not writable. Please, upload the plugin manually", 'bestwebsoft' ); 
  374.  
  375. if ( file_exists( WP_PLUGIN_DIR . '/' . $zip_name[0] ) ) { 
  376. echo '<p><a href="' . wp_nonce_url( 'admin.php?page=bws_panel&bws_activate_plugin=' . $bws_license_plugin, 'bws_activate_plugin' . $bws_license_plugin ) . '" target="_parent">' . __( 'Activate Plugin', 'bestwebsoft' ) . '</a> | <a href="' . self_admin_url( 'admin.php?page=bws_panel' ) . '" target="_parent">' . __( 'Return to BestWebSoft Panel', 'bestwebsoft' ) . '</a></p>'; 
  377. } else { 
  378. if ( empty( $error ) ) 
  379. $error = __( "Failed to download the zip archive. Please, upload the plugin manually", 'bestwebsoft' ); 
  380.  
  381. echo '<p class="error">' . $error . '</p>'; 
  382. echo '<p><a href="' . self_admin_url( 'admin.php?page=bws_panel' ) . '" target="_parent">' . __( 'Return to BestWebSoft Panel', 'bestwebsoft' ) . '</a></p>'; 
  383. } else { ?>  
  384. <ul class="subsubsub"> 
  385. <li><a <?php if ( !isset( $_GET['sub'] ) ) echo 'class="current" '; ?>href="admin.php?page=bws_panel<?php if ( 'all' != $plugin_category ) echo '&category=' . $plugin_category; ?>"><?php _e( 'All', 'bestwebsoft' ); ?></a></li> | 
  386. <li><a <?php if ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_panel&sub=installed<?php if ( 'all' != $plugin_category ) echo '&category=' . $plugin_category; ?>"><?php _e( 'Installed', 'bestwebsoft' ); ?></a></li> | 
  387. <li><a <?php if ( isset( $_GET['sub'] ) && 'not_installed' == $_GET['sub'] ) echo 'class="current" '; ?>href="admin.php?page=bws_panel&sub=not_installed<?php if ( 'all' != $plugin_category ) echo '&category=' . $plugin_category; ?>"><?php _e( 'Not Installed', 'bestwebsoft' ); ?></a></li> 
  388. </ul> 
  389. <div class="clear"></div> 
  390. <div class="bws-filter-top">  
  391. <h2> 
  392. <span class="bws-toggle-indicator"></span> 
  393. <?php _e( 'Filter results', 'bestwebsoft' ); ?> 
  394. </h2> 
  395. <div class="bws-filter-top-inside"> 
  396. <div class="bws-filter-title"><?php _e( 'Category', 'bestwebsoft' ); ?></div> 
  397. <ul class="bws-category"> 
  398. <li> 
  399. <?php $sub_in_url = ( isset( $_GET['sub'] ) && in_array( $_GET['sub'], array( 'installed', 'not_installed' ) ) ) ? '&sub=' . $_GET['sub'] : ''; ?> 
  400. <a <?php if ( 'all' == $plugin_category ) echo ' class="bws-active"'; ?> href="<?php echo self_admin_url( 'admin.php?page=bws_panel' . $sub_in_url ); ?>"><?php _e( 'All', 'bestwebsoft' ); ?> 
  401. <span>(<?php echo count( $bws_plugins ); ?>)</span> 
  402. </a>  
  403. </li> 
  404. <?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?> 
  405. <li> 
  406. <a <?php if ( $category_key == $plugin_category ) echo ' class="bws-active"'; ?> href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_panel' . $sub_in_url . '&category=' . $category_key ) ); ?>"><?php echo $category_value['name']; ?> 
  407. <span>(<?php echo $category_value['count']; ?>)</span> 
  408. </a>  
  409. </li> 
  410. <?php } ?> 
  411. </ul> 
  412. </div> 
  413. </div> 
  414. <div class="bws-products"> 
  415. <?php $nothing_found = true; 
  416. foreach ( $bws_plugins as $key_plugin => $value_plugin ) {  
  417.  
  418. if ( 'all' != $plugin_category && isset( $bws_plugins_category[ $plugin_category ] ) && ! in_array( $plugin_category, $value_plugin['category'] ) )  
  419. continue; 
  420.  
  421. $key_plugin_explode = explode( '/', $key_plugin ); 
  422.  
  423. $icon = isset( $value_plugin['icon'] ) ? $value_plugin['icon'] : '//ps.w.org/' . $key_plugin_explode[0] . '/assets/icon-128x128.png';  
  424. $is_pro_isset = isset( $value_plugin['pro_version'] ); 
  425. $is_installed = array_key_exists( $key_plugin, $all_plugins ); 
  426. $is_active = in_array( $key_plugin, $active_plugins ) || isset( $sitewide_active_plugins[ $key_plugin ] ); 
  427.  
  428. $is_pro_installed = $is_pro_active = false; 
  429. if ( $is_pro_isset ) { 
  430. $is_pro_installed = array_key_exists( $value_plugin['pro_version'], $all_plugins ); 
  431. $is_pro_active = in_array( $value_plugin['pro_version'], $active_plugins ) || isset( $sitewide_active_plugins[ $value_plugin['pro_version'] ] ); 
  432.  
  433. if ( ( isset( $_GET['sub'] ) && 'installed' == $_GET['sub'] && ! $is_pro_installed && ! $is_installed ) || 
  434. ( isset( $_GET['sub'] ) && 'not_installed' == $_GET['sub'] && ( $is_pro_installed || $is_installed ) ) ) 
  435. continue;  
  436.  
  437. $link_attr = isset( $value_plugin['install_url'] ) ? 'href="' . $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"'; 
  438.  
  439. $nothing_found = false; ?> 
  440. <div class="bws_product_box<?php if ( $is_active || $is_pro_active ) echo ' bws_product_active'; ?>"> 
  441. <div class="bws_product_image"> 
  442. <a <?php echo $link_attr; ?>><img src="<?php echo $icon; ?>"/></a> 
  443. </div> 
  444. <div class="bws_product_content"> 
  445. <div class="bws_product_title"><a <?php echo $link_attr; ?>><?php echo $value_plugin['name']; ?></a></div> 
  446. <div class="bws-version"> 
  447. <?php  
  448. if ( $is_pro_installed ) { 
  449. echo '<span'; 
  450. if ( ! empty( $value_plugin['expired'] ) || ! empty( $value_plugin['update_availible'] ) ) 
  451. echo ' class="bws-update-available"'; 
  452. echo '>v ' . $all_plugins[ $value_plugin['pro_version'] ]['Version'] . '</span>'; 
  453. } elseif ( $is_installed ) { 
  454. echo '<span'; 
  455. if ( ! empty( $value_plugin['expired'] ) || ! empty( $value_plugin['update_availible'] ) ) 
  456. echo ' class="bws-update-available"'; 
  457. echo '>v ' . $all_plugins[ $key_plugin ]['Version'] . '</span>';  
  458. } else { 
  459. echo '<span>' . __( 'Not installed', 'bestwebsoft' ) . '</span>';  
  460.  
  461. if ( ! empty( $value_plugin['expired'] ) ) { 
  462. echo ' - <a class="bws-update-now" href="http://support.bestwebsoft.com/hc/en-us/articles/202356359" target="_blank">' . __( 'Renew to get updates', 'bestwebsoft' ) . '</a>'; 
  463. } elseif ( ! empty( $value_plugin['update_availible'] ) ) { 
  464. $r = $update_availible_all->response[ $value_plugin['update_availible'] ]; 
  465. echo ' - <a class="bws-update-now" href="' . 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( __( 'Update to v %s', 'bestwebsoft' ), $r->new_version ) . '">' . sprintf( __( 'Update to v %s', 'bestwebsoft' ), $r->new_version ) . '</a>'; 
  466. } ?> 
  467. </div> 
  468. <div class="bws_product_description"> 
  469. <?php echo ( strlen( $value_plugin['description'] ) > 100 ) ? substr( $value_plugin['description'], 0, 100 ) . '...' : $value_plugin['description']; ?>  
  470. </div> 
  471. <div class="bws_product_links"> 
  472. <?php if ( $is_active || $is_pro_active ) { 
  473. if ( $is_pro_isset ) { 
  474. if ( ! $is_pro_installed ) { 
  475. if ( ! empty( $plugins_array ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) { ?> 
  476. <form method="post" action=""> 
  477. <input type="submit" class="button button-secondary" value="<?php _e( 'Install Now', 'bestwebsoft' ); ?>" /> 
  478. <input type="hidden" name="bws_plugin_action_submit" value="submit" /> 
  479. <input type="hidden" name="bws_install_plugin" value="<?php echo $value_plugin['pro_version']; ?>" /> 
  480. <?php wp_nonce_field( plugin_basename(__FILE__), 'bws_license_install_nonce_name' ); ?> 
  481. </form> 
  482. <?php } else { ?> 
  483. <a class="button button-secondary bws_upgrade_button" href="<?php echo $bws_plugins[ $key_plugin ]['purchase']; ?>" target="_blank"><?php _e( 'Upgrade to Pro', 'bestwebsoft' ); ?></a> 
  484. <?php } 
  485. } else { ?> 
  486. <a class="bws_donate" href="http://bestwebsoft.com/donate/" target="_blank"><?php _e( 'Donate', 'bestwebsoft' ); ?></a> <span>|</span> 
  487. <?php } 
  488.  
  489. if ( $is_pro_active ) { ?> 
  490. <a class="bws_settings" href="<?php echo $bws_plugins[ $key_plugin ]["pro_settings"]; ?>"><?php _e( 'Settings', 'bestwebsoft' ); ?></a> 
  491. <?php } else { ?> 
  492. <a class="bws_settings" href="<?php echo $bws_plugins[ $key_plugin ]["settings"]; ?>"><?php _e( 'Settings', 'bestwebsoft' ); ?></a> 
  493. <?php } 
  494. } else {  
  495. if ( $is_pro_installed ) { ?> 
  496. <a class="button button-secondary" href="<?php echo wp_nonce_url( 'admin.php?page=bws_panel&bws_activate_plugin=' . $value_plugin['pro_version'], 'bws_activate_plugin' . $value_plugin['pro_version'] ); ?>" title="<?php _e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php _e( 'Activate', 'bestwebsoft' ); ?></a> 
  497. <?php } elseif ( ! empty( $plugins_array ) && isset( $value_plugin['pro_version'] ) && array_key_exists( $value_plugin['pro_version'], $plugins_array ) ) { ?> 
  498. <form method="post" action=""> 
  499. <input type="submit" class="button button-secondary" value="<?php _e( 'Install Now', 'bestwebsoft' ); ?>" /> 
  500. <input type="hidden" name="bws_plugin_action_submit" value="submit" /> 
  501. <input type="hidden" name="bws_install_plugin" value="<?php echo $value_plugin['pro_version']; ?>" /> 
  502. <?php wp_nonce_field( plugin_basename(__FILE__), 'bws_license_install_nonce_name' ); ?> 
  503. </form> 
  504. <?php } elseif ( $is_installed ) { ?> 
  505. <a class="button button-secondary" href="<?php echo wp_nonce_url( 'admin.php?page=bws_panel&bws_activate_plugin=' . $key_plugin, 'bws_activate_plugin' . $key_plugin ); ?>" title="<?php _e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php _e( 'Activate', 'bestwebsoft' ); ?></a> 
  506. <?php } else {  
  507. $install_url = isset( $value_plugin['install_url'] ) ? $value_plugin['install_url'] : esc_url( self_admin_url( 'plugin-install.php?tab=search&type=term&s=' . str_replace( ' ', '+', $value_plugin['name'] ) . '+BestWebSoft&plugin-search-input=Search+Plugins' ) ); ?> 
  508. <a class="button button-secondary" href="<?php echo $install_url; ?>" title="<?php _e( 'Install this plugin', 'bestwebsoft' ); ?>" target="_blank"><?php _e( 'Install Now', 'bestwebsoft' ); ?></a> 
  509. <?php } 
  510. } ?> 
  511. </div> 
  512. </div> 
  513. <div class="clear"></div> 
  514. </div>  
  515. <?php } 
  516. if ( $nothing_found ) { ?> 
  517. <p class="description"><?php _e( 'Nothing found. Try another criteria.', 'bestwebsoft' ); ?></p> 
  518. <?php } ?> 
  519. </div> 
  520. <div id="bws-filter-wrapper"> 
  521. <div class="bws-filter"> 
  522. <div class="bws-filter-title"><?php _e( 'Category', 'bestwebsoft' ); ?></div> 
  523. <ul class="bws-category"> 
  524. <li> 
  525. <?php $sub_in_url = ( isset( $_GET['sub'] ) && in_array( $_GET['sub'], array( 'installed', 'not_installed' ) ) ) ? '&sub=' . $_GET['sub'] : ''; ?> 
  526. <a <?php if ( 'all' == $plugin_category ) echo ' class="bws-active"'; ?> href="<?php echo self_admin_url( 'admin.php?page=bws_panel' . $sub_in_url ); ?>"><?php _e( 'All', 'bestwebsoft' ); ?> 
  527. <span>(<?php echo count( $bws_plugins ); ?>)</span> 
  528. </a>  
  529. </li> 
  530. <?php foreach ( $bws_plugins_category as $category_key => $category_value ) { ?> 
  531. <li> 
  532. <a <?php if ( $category_key == $plugin_category ) echo ' class="bws-active"'; ?> href="<?php echo esc_url( self_admin_url( 'admin.php?page=bws_panel' . $sub_in_url . '&category=' . $category_key ) ); ?>"><?php echo $category_value['name']; ?> 
  533. <span>(<?php echo $category_value['count']; ?>)</span> 
  534. </a>  
  535. </li> 
  536. <?php } ?> 
  537. </ul> 
  538. </div> 
  539. </div><!-- #bws-filter-wrapper -->  
  540. <div class="clear"></div> 
  541. <?php } 
  542. } elseif ( 'bws_themes' == $_GET['page'] ) {  
  543. require_once( dirname( __FILE__ ) . '/product_list.php' ); ?> 
  544. <h1><?php _e( 'Themes', 'bestwebsoft' ); ?></h1> 
  545. <div id="availablethemes" class="bws-availablethemes"> 
  546. <?php if ( $wp_version < '3.9' ) { 
  547. foreach ( $themes as $theme ) { ?> 
  548. <div class="available-theme installable-theme"><?php 
  549. $installed_theme = wp_get_theme( $theme->slug ); ?> 
  550. <a class="screenshot" href="<?php echo esc_url( $theme->href ); ?>"> 
  551. <img src="<?php echo plugins_url( "icons/themes/" , __FILE__ ) . $theme->slug . '.png'; ?>" width='150' /> 
  552. </a> 
  553. <h3><?php echo $theme->name; ?></h3> 
  554. <div class="theme-author"><?php printf( __( 'By %s', 'bestwebsoft' ), 'BestWebSoft' ); ?></div> 
  555. <div class="action-links"> 
  556. <ul> 
  557. <?php if ( $installed_theme->exists() ) { ?> 
  558. <li><span class="install-now" title="'<?php esc_attr__( 'This theme is already installed and is up to date' ); ?>"><?php echo _x( 'Installed', 'theme', 'bestwebsoft' ); ?></span></li> 
  559. <?php } ?> 
  560. <li><a class="theme-detail" href="<?php echo esc_url( $theme->href ); ?>" target="_blank"><?php _e( 'Learn More', 'bestwebsoft' ); ?></a></li> 
  561. </ul> 
  562. </div> 
  563. </div> 
  564. <?php } 
  565. } else { ?> 
  566. <div class="theme-browser content-filterable rendered"> 
  567. <div class="themes wp-clearfix"> 
  568. <?php foreach ( $themes as $key => $theme ) { 
  569. $installed_theme = wp_get_theme( $theme->slug ); ?> 
  570. <div class="theme" tabindex="0"> 
  571. <div class="theme-screenshot"> 
  572. <img src="<?php echo plugins_url( "icons/themes/" , __FILE__ ) . $theme->slug . '.png'; ?>" alt="" /> 
  573. </div> 
  574. <div class="theme-author"><?php printf( __( 'By %s', 'bestwebsoft' ), 'BestWebSoft' ); ?></div> 
  575. <h3 class="theme-name"><?php echo $theme->name; ?></h3> 
  576. <div class="theme-actions"> 
  577. <a class="button button-secondary preview install-theme-preview" href="<?php echo $theme->href; ?>" target="_blank"><?php esc_html_e( 'Learn More', 'bestwebsoft' ); ?></a> 
  578. </div> 
  579. <?php if ( $installed_theme->exists() ) {  
  580. if ( $wp_version < '4.6' ) { ?> 
  581. <div class="theme-installed"><?php _e( 'Already Installed', 'bestwebsoft' ); ?></div> 
  582. <?php } else { ?> 
  583. <div class="notice notice-success notice-alt inline"><p><?php _e( 'Installed', 'bestwebsoft' ); ?></p></div> 
  584. <?php } 
  585. } ?> 
  586. </div> 
  587. <?php } ?> 
  588. <br class="clear" /> 
  589. </div> 
  590. </div> 
  591. <?php } ?> 
  592. <p><a class="bws_browse_link" href="http://bestweblayout.com/categories/themes/" target="_blank"><?php _e( 'Browse Free WordPress Themes', 'bestwebsoft' ); ?> <span class="dashicons dashicons-arrow-right-alt2"></span></a></p> 
  593. </div> 
  594. <?php } elseif ( 'bws_system_status' == $_GET['page'] ) { ?>  
  595. <h1><?php _e( 'System status', 'bestwebsoft' ); ?></h1> 
  596. <div class="updated fade notice is-dismissible inline" <?php if ( ! ( isset( $_REQUEST['bwsmn_form_submit'] ) || isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div> 
  597. <div class="error" <?php if ( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div> 
  598. <form method="post" action=""> 
  599. <p> 
  600. <input type="hidden" name="bwsmn_form_submit" value="submit" /> 
  601. <input type="submit" class="button-primary" value="<?php _e( 'Send to support', 'bestwebsoft' ) ?>" /> 
  602. <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ); ?> 
  603. </p> 
  604. </form> 
  605. <form method="post" action=""> 
  606. <p> 
  607. <input type="hidden" name="bwsmn_form_submit_custom_email" value="submit" /> 
  608. <input type="submit" class="button" value="<?php _e( 'Send to custom email »', 'bestwebsoft' ) ?>" /> 
  609. <input type="text" maxlength="250" value="<?php echo $bwsmn_form_email; ?>" name="bwsmn_form_email" /> 
  610. <?php wp_nonce_field( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ); ?> 
  611. </p> 
  612. </form> 
  613. <div class="inside"> 
  614. <table class="bws_system_info"> 
  615. <thead><tr><th><?php _e( 'Environment', 'bestwebsoft' ); ?></th><td></td></tr></thead> 
  616. <tbody> 
  617. <?php foreach ( $system_info['system_info'] as $key => $value ) { ?> 
  618. <tr> 
  619. <td scope="row"><?php echo $key; ?></td> 
  620. <td scope="row"><?php echo $value; ?></td> 
  621. </tr> 
  622. <?php } ?> 
  623. </tbody> 
  624. </table> 
  625. <table class="bws_system_info"> 
  626. <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead> 
  627. <tbody> 
  628. <?php if ( ! empty( $system_info['active_plugins'] ) ) { 
  629. foreach ( $system_info['active_plugins'] as $key => $value ) { ?> 
  630. <tr> 
  631. <td scope="row"><?php echo $key; ?></td> 
  632. <td scope="row"><?php echo $value; ?></td> 
  633. </tr> 
  634. <?php } 
  635. } ?> 
  636. </tbody> 
  637. </table> 
  638. <table class="bws_system_info"> 
  639. <thead><tr><th><?php _e( 'Inactive Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead> 
  640. <tbody> 
  641. <?php if ( ! empty( $system_info['inactive_plugins'] ) ) { 
  642. foreach ( $system_info['inactive_plugins'] as $key => $value ) { ?> 
  643. <tr> 
  644. <td scope="row"><?php echo $key; ?></td> 
  645. <td scope="row"><?php echo $value; ?></td> 
  646. </tr> 
  647. <?php } 
  648. } ?> 
  649. </tbody> 
  650. </table> 
  651. <div class="clear"></div>  
  652. </div> 
  653. <?php } ?> 
  654. </div> 
  655. </div> 
  656. <?php } 
  657.  
  658. if ( ! function_exists( 'bws_get_banner_array' ) ) { 
  659. function bws_get_banner_array() { 
  660. global $bstwbsftwppdtplgns_banner_array; 
  661. $bstwbsftwppdtplgns_banner_array = array(  
  662. array( 'crrntl_hide_banner_on_plugin_page', 'car-rental/car-rental.php', '1.0.0' ),  
  663. array( 'lnkdn_hide_banner_on_plugin_page', 'bws-linkedin/bws-linkedin.php', '1.0.1' ),  
  664. array( 'pntrst_hide_banner_on_plugin_page', 'bws-pinterest/bws-pinterest.php', '1.0.1' ),  
  665. array( 'zndskhc_hide_banner_on_plugin_page', 'zendesk-help-center/zendesk-help-center.php', '1.0.0' ),  
  666. array( 'gglcptch_hide_banner_on_plugin_page', 'google-captcha/google-captcha.php', '1.18' ),  
  667. array( 'mltlngg_hide_banner_on_plugin_page', 'multilanguage/multilanguage.php', '1.1.1' ),  
  668. array( 'adsns_hide_banner_on_plugin_page', 'adsense-plugin/adsense-plugin.php', '1.36' ),  
  669. array( 'vstrsnln_hide_banner_on_plugin_page', 'visitors-online/visitors-online.php', '0.2' ),  
  670. array( 'cstmsrch_hide_banner_on_plugin_page', 'custom-search-plugin/custom-search-plugin.php', '1.28' ),  
  671. array( 'prtfl_hide_banner_on_plugin_page', 'portfolio/portfolio.php', '2.33' ),  
  672. array( 'rlt_hide_banner_on_plugin_page', 'realty/realty.php', '1.0.0' ),  
  673. array( 'prmbr_hide_banner_on_plugin_page', 'promobar/promobar.php', '1.0.0' ),  
  674. array( 'gglnltcs_hide_banner_on_plugin_page', 'bws-google-analytics/bws-google-analytics.php', '1.6.2' ),  
  675. array( 'htccss_hide_banner_on_plugin_page', 'htaccess/htaccess.php', '1.6.3' ),  
  676. array( 'sbscrbr_hide_banner_on_plugin_page', 'subscriber/subscriber.php', '1.1.8' ),  
  677. array( 'lmtttmpts_hide_banner_on_plugin_page', 'limit-attempts/limit-attempts.php', '1.0.2' ),  
  678. array( 'sndr_hide_banner_on_plugin_page', 'sender/sender.php', '0.5' ),  
  679. array( 'srrl_hide_banner_on_plugin_page', 'user-role/user-role.php', '1.4' ),  
  680. array( 'pdtr_hide_banner_on_plugin_page', 'updater/updater.php', '1.12' ),  
  681. array( 'cntctfrmtdb_hide_banner_on_plugin_page', 'contact-form-to-db/contact_form_to_db.php', '1.2' ),  
  682. array( 'cntctfrmmlt_hide_banner_on_plugin_page', 'contact-form-multi/contact-form-multi.php', '1.0.7' ),  
  683. array( 'gglmps_hide_banner_on_plugin_page', 'bws-google-maps/bws-google-maps.php', '1.2' ),  
  684. array( 'fcbkbttn_hide_banner_on_plugin_page', 'facebook-button-plugin/facebook-button-plugin.php', '2.29' ),  
  685. array( 'twttr_hide_banner_on_plugin_page', 'twitter-plugin/twitter.php', '2.34' ),  
  686. array( 'pdfprnt_hide_banner_on_plugin_page', 'pdf-print/pdf-print.php', '1.7.1' ),  
  687. array( 'gglplsn_hide_banner_on_plugin_page', 'google-one/google-plus-one.php', '1.1.4' ),  
  688. array( 'gglstmp_hide_banner_on_plugin_page', 'google-sitemap-plugin/google-sitemap-plugin.php', '2.8.4' ),  
  689. array( 'cntctfrmpr_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-pro/contact_form_pro.php', '1.14' ),  
  690. array( 'cntctfrm_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.47' ),  
  691. array( 'cptch_hide_banner_on_plugin_page', 'captcha/captcha.php', '3.8.4' ),  
  692. array( 'gllr_hide_banner_on_plugin_page', 'gallery-plugin/gallery-plugin.php', '3.9.1' ),  
  693. array( 'cntctfrm_for_ctfrmtdb_hide_banner_on_plugin_page', 'contact-form-plugin/contact_form.php', '3.62' ) 
  694. ); 
.