diff -r 000000000000 -r d970ebf37754 wp/wp-content/plugins/portfolio/bws_menu/bws_menu.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wp/wp-content/plugins/portfolio/bws_menu/bws_menu.php Wed Nov 06 03:21:17 2013 +0000 @@ -0,0 +1,347 @@ +get_var( "SELECT VERSION() AS version" ); + $mysql_info = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" ); + if ( is_array( $mysql_info) ) + $sql_mode = $mysql_info[0]->Value; + if ( empty( $sql_mode ) ) + $sql_mode = __( 'Not set', 'bestwebsoft' ); + if ( ini_get( 'safe_mode' ) ) + $safe_mode = __( 'On', 'bestwebsoft' ); + else + $safe_mode = __( 'Off', 'bestwebsoft' ); + if ( ini_get( 'allow_url_fopen' ) ) + $allow_url_fopen = __( 'On', 'bestwebsoft' ); + else + $allow_url_fopen = __( 'Off', 'bestwebsoft' ); + if ( ini_get( 'upload_max_filesize' ) ) + $upload_max_filesize = ini_get( 'upload_max_filesize' ); + else + $upload_max_filesize = __( 'N/A', 'bestwebsoft' ); + if ( ini_get('post_max_size') ) + $post_max_size = ini_get('post_max_size'); + else + $post_max_size = __( 'N/A', 'bestwebsoft' ); + if ( ini_get( 'max_execution_time' ) ) + $max_execution_time = ini_get( 'max_execution_time' ); + else + $max_execution_time = __( 'N/A', 'bestwebsoft' ); + if ( ini_get( 'memory_limit' ) ) + $memory_limit = ini_get( 'memory_limit' ); + else + $memory_limit = __( 'N/A', 'bestwebsoft' ); + if ( function_exists( 'memory_get_usage' ) ) + $memory_usage = round( memory_get_usage() / 1024 / 1024, 2 ) . __(' Mb', 'bestwebsoft' ); + else + $memory_usage = __( 'N/A', 'bestwebsoft' ); + if ( is_callable( 'exif_read_data' ) ) + $exif_read_data = __('Yes', 'bestwebsoft' ) . " ( V" . substr( phpversion( 'exif' ), 0,4 ) . ")" ; + else + $exif_read_data = __('No', 'bestwebsoft' ); + if ( is_callable( 'iptcparse' ) ) + $iptcparse = __( 'Yes', 'bestwebsoft' ); + else + $iptcparse = __( 'No', 'bestwebsoft' ); + if ( is_callable( 'xml_parser_create' ) ) + $xml_parser_create = __( 'Yes', 'bestwebsoft' ); + else + $xml_parser_create = __( 'No', 'bestwebsoft' ); + + if ( function_exists( 'wp_get_theme' ) ) + $theme = wp_get_theme(); + else + $theme = get_theme( get_current_theme() ); + + if ( function_exists( 'is_multisite' ) ) { + if ( is_multisite() ) { + $multisite = __( 'Yes', 'bestwebsoft' ); + } else { + $multisite = __( 'No', 'bestwebsoft' ); + } + } else + $multisite = __( 'N/A', 'bestwebsoft' ); + + $site_url = get_option('siteurl'); + $home_url = get_option('home'); + $db_version = get_option('db_version'); + $system_info = array( + 'system_info' => '', + 'active_plugins' => '', + 'inactive_plugins' => '' + ); + $system_info['system_info'] = array( + __( 'Operating System', 'bestwebsoft' ) => PHP_OS, + __( 'Server', 'bestwebsoft' ) => $_SERVER["SERVER_SOFTWARE"], + __( 'Memory usage', 'bestwebsoft' ) => $memory_usage, + __( 'MYSQL Version', 'bestwebsoft' ) => $sql_version, + __( 'SQL Mode', 'bestwebsoft' ) => $sql_mode, + __( 'PHP Version', 'bestwebsoft' ) => PHP_VERSION, + __( 'PHP Safe Mode', 'bestwebsoft' ) => $safe_mode, + __( 'PHP Allow URL fopen', 'bestwebsoft' ) => $allow_url_fopen, + __( 'PHP Memory Limit', 'bestwebsoft' ) => $memory_limit, + __( 'PHP Max Upload Size', 'bestwebsoft' ) => $upload_max_filesize, + __( 'PHP Max Post Size', 'bestwebsoft' ) => $post_max_size, + __( 'PHP Max Script Execute Time', 'bestwebsoft' ) => $max_execution_time, + __( 'PHP Exif support', 'bestwebsoft' ) => $exif_read_data, + __( 'PHP IPTC support', 'bestwebsoft' ) => $iptcparse, + __( 'PHP XML support', 'bestwebsoft' ) => $xml_parser_create, + __( 'Site URL', 'bestwebsoft' ) => $site_url, + __( 'Home URL', 'bestwebsoft' ) => $home_url, + __( 'WordPress Version', 'bestwebsoft' ) => $wp_version, + __( 'WordPress DB Version', 'bestwebsoft' ) => $db_version, + __( 'Multisite', 'bestwebsoft' ) => $multisite, + __( 'Active Theme', 'bestwebsoft' ) => $theme['Name'] . ' ' . $theme['Version'] + ); + foreach ( $all_plugins as $path => $plugin ) { + if ( is_plugin_active( $path ) ) { + $system_info['active_plugins'][ $plugin['Name'] ] = $plugin['Version']; + } else { + $system_info['inactive_plugins'][ $plugin['Name'] ] = $plugin['Version']; + } + } + + 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' ) ) ) { + if ( isset( $_REQUEST['bwsmn_form_email'] ) ) { + $bwsmn_form_email = trim( $_REQUEST['bwsmn_form_email'] ); + if( $bwsmn_form_email == "" || !preg_match( "/^((?:[a-z0-9']+(?:[a-z0-9\-_\.']+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})[, ]*)+$/i", $bwsmn_form_email ) ) { + $error = __( "Please enter a valid email address.", 'bestwebsoft' ); + } else { + $email = $bwsmn_form_email; + $bwsmn_form_email = ''; + $message = __( 'Email with system info is sent to ', 'bestwebsoft' ) . $email; + } + } else { + $email = 'plugin_system_status@bestwebsoft.com'; + $message = __( 'Thank you for contacting us.', 'bestwebsoft' ); + } + + if ( $error == '' ) { + $headers = 'MIME-Version: 1.0' . "\n"; + $headers .= 'Content-type: text/html; charset=utf-8' . "\n"; + $headers .= 'From: ' . get_option( 'admin_email' ); + $message_text = 'System Info From ' . $home_url . ' +

Environment

+ '; + foreach ( $system_info['system_info'] as $key => $value ) { + $message_text .= ''; + } + $message_text .= '
'. $key .''. $value .'
+

Active Plugins

+ '; + foreach ( $system_info['active_plugins'] as $key => $value ) { + $message_text .= ''; + } + $message_text .= '
'. $key .''. $value .'
+

Inactive Plugins

+ '; + foreach ( $system_info['inactive_plugins'] as $key => $value ) { + $message_text .= ''; + } + $message_text .= '
'. $key .''. $value .'
'; + $result = wp_mail( $email, 'System Info From ' . $home_url, $message_text, $headers ); + if ( $result != true ) + $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' ); + } + } + ?>
+
+

+
>

+
>

+

+ +
+

+ +

" target="_blank"> ">

+ +
+ + +
+

+ +

" target="_blank">

+ +
+ + +
+

+ +

" target="_blank"> " target="_blank">

+ +
+ +
+

+ +
+

+ +

" target="_blank"> ">

+ +
+ + +
+

+ +

" target="_blank">

+ +
+ + +
+

+ +

" target="_blank"> " target="_blank"> " title="" target="_blank">

+ +
+ +
+ http://support.bestwebsoft.com +
+
+
+
+
+

+ +

+
+ + + + $value ) { ?> + + + + + + +
+ + + + $value ) { ?> + + + + + + +
+ + + + $value ) { ?> + + + + + + +
+
+
+

+ + + +

+
+
+

+ + + + +

+
+
+
+
+
+ \ No newline at end of file