bws_add_menu_render

The Google Sitemap by BestWebSoft bws add menu render function.

Description

bws_add_menu_render(); 

Usage

  1. if ( !function_exists( 'bws_add_menu_render' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-sitemap-by-bestwebsoft/bws_menu/bws_menu.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bws_add_menu_render(); 
  7.  

Defined (1)

The function is defined in the following location(s).

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