/wp-content/plugins/better-wp-security/inc/admin/content.php
https://bitbucket.org/adatux_/uakami · PHP · 1139 lines · 920 code · 126 blank · 93 comment · 169 complexity · eeeb2421c75a634ab5174dff85174a64 MD5 · raw file
- <?php
- if ( ! class_exists( 'bwps_admin_content' ) ) {
- class bwps_admin_content extends bwps_admin_common {
-
- function __construct() {
- global $bwpsoptions, $bwpstabs;
- if ( $bwpsoptions['st_writefiles'] == 0 ) {
- $bwpstabs = array(
- 'better-wp-security' => 'Dashboard',
- 'better-wp-security-adminuser' => 'User',
- 'better-wp-security-awaymode' => 'Away',
- 'better-wp-security-banusers' => 'Ban',
- 'better-wp-security-databasebackup' => 'Backup',
- 'better-wp-security-hidebackend' => 'Hide',
- 'better-wp-security-intrusiondetection' => 'Detect',
- 'better-wp-security-loginlimits' => 'Login',
- 'better-wp-security-ssl' => 'SSL',
- 'better-wp-security-systemtweaks' => 'Tweaks',
- 'better-wp-security-logs' => 'Logs'
- );
- } else {
- $bwpstabs = array(
- 'better-wp-security' => 'Dashboard',
- 'better-wp-security-adminuser' => 'User',
- 'better-wp-security-awaymode' => 'Away',
- 'better-wp-security-banusers' => 'Ban',
- 'better-wp-security-contentdirectory' => 'Dir',
- 'better-wp-security-databasebackup' => 'Backup',
- 'better-wp-security-databaseprefix' => 'Prefix',
- 'better-wp-security-hidebackend' => 'Hide',
- 'better-wp-security-intrusiondetection' => 'Detect',
- 'better-wp-security-loginlimits' => 'Login',
- 'better-wp-security-ssl' => 'SSL',
- 'better-wp-security-systemtweaks' => 'Tweaks',
- 'better-wp-security-logs' => 'Logs'
- );
- }
-
- if ( is_multisite() ) {
- add_action( 'network_admin_menu', array( &$this, 'register_settings_page' ) );
- } else {
- add_action( 'admin_menu', array( &$this, 'register_settings_page' ) );
- }
- //add settings
- add_action( 'admin_init', array( &$this, 'register_settings' ) );
-
- }
-
- /**
- * Registers all WordPress admin menu items
- *
- **/
- function register_settings_page() {
-
- global $bwpsoptions, $bwpstabs;
-
- add_menu_page(
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Dashboard', $this->hook ),
- __( 'Security', $this->hook ),
- $this->accesslvl,
- $this->hook,
- array( &$this, 'admin_dashboard' ),
- BWPS_PU . 'images/shield-small.png'
- );
-
- if ( $bwpsoptions['initial_backup'] == 1 && $bwpsoptions['initial_filewrite'] == 1 ) { //they've backed up their database or ignored the warning
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Change Admin User', $this->hook ),
- __( 'Admin User', $this->hook ),
- $this->accesslvl,
- $this->hook . '-adminuser',
- array( &$this, 'admin_adminuser' )
- );
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Away Mode', $this->hook ),
- __( 'Away Mode', $this->hook ),
- $this->accesslvl,
- $this->hook . '-awaymode',
- array( &$this, 'admin_awaymode' )
- );
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Ban Users', $this->hook ),
- __( 'Ban Users', $this->hook ),
- $this->accesslvl,
- $this->hook . '-banusers',
- array( &$this, 'admin_banusers' )
- );
-
- if ( $bwpsoptions['st_writefiles'] == 1 ) {
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Change Content Directory', $this->hook ),
- __( 'Content Directory', $this->hook ),
- $this->accesslvl,
- $this->hook . '-contentdirectory',
- array( &$this, 'admin_contentdirectory' )
- );
-
- }
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Backup WordPress Database', $this->hook ),
- __( 'Database Backup', $this->hook ),
- $this->accesslvl,
- $this->hook . '-databasebackup',
- array( &$this, 'admin_databasebackup' )
- );
-
- if ( $bwpsoptions['st_writefiles'] == 1 ) {
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Change Database Prefix', $this->hook ),
- __( 'Database Prefix', $this->hook ),
- $this->accesslvl,
- $this->hook . '-databaseprefix',
- array( &$this, 'admin_databaseprefix' )
- );
-
- }
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Hide Backend', $this->hook ),
- __( 'Hide Backend', $this->hook ),
- $this->accesslvl,
- $this->hook . '-hidebackend',
- array( &$this, 'admin_hidebackend' )
- );
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Intrusion Detection', $this->hook ),
- __( 'Intrusion Detection', $this->hook ),
- $this->accesslvl,
- $this->hook . '-intrusiondetection',
- array( &$this, 'admin_intrusiondetection' )
- );
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Limit Login Attempts', $this->hook ),
- __( 'Login Limits', $this->hook ),
- $this->accesslvl,
- $this->hook . '-loginlimits',
- array( &$this, 'admin_loginlimits' )
- );
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'Secure Communications With SSL', $this->hook ),
- __( 'SSL', $this->hook ),
- $this->accesslvl,
- $this->hook . '-ssl',
- array( &$this, 'admin_ssl' )
- );
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'WordPress System Tweaks', $this->hook ),
- __( 'System Tweaks', $this->hook ),
- $this->accesslvl,
- $this->hook . '-systemtweaks',
- array( &$this, 'admin_systemtweaks' )
- );
-
- add_submenu_page(
- $this->hook,
- __( $this->pluginname, $this->hook ) . ' - ' . __( 'View Logs', $this->hook ),
- __( 'View Logs', $this->hook ),
- $this->accesslvl,
- $this->hook . '-logs',
- array( &$this, 'admin_logs' )
- );
-
- //Make the dashboard the first submenu item and the item to appear when clicking the parent.
- global $submenu;
- if ( isset( $submenu[$this->hook] ) ) {
-
- $submenu[$this->hook][0][0] = __( 'Dashboard', $this->hook );
-
- }
-
- }
-
- }
-
- /**
- * Registers content blocks for dashboard page
- *
- **/
- function admin_dashboard() {
-
- global $bwpsoptions, $bwpstabs;
-
- if ( $bwpsoptions['oneclickchosen'] == 1 && $bwpsoptions['initial_backup'] == 1 && $bwpsoptions['initial_filewrite'] == 1 ) { //they've backed up their database or ignored the warning
-
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'System Status', $this->hook ),
- array(
- array( __( 'System Status', $this->hook ), 'dashboard_content_4' ), //Better WP Security System Status
- array( __( 'System Information', $this->hook ), 'dashboard_content_7' ), //Generic System Information
- array( __( 'Rewrite Rules', $this->hook ), 'dashboard_content_5' ), //Better WP Security Rewrite Rules
- array( __( 'Wp-config.php Code', $this->hook ), 'dashboard_content_6' ) //Better WP Security Rewrite Rules
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
-
- } elseif ( $bwpsoptions['oneclickchosen'] == 0 && $bwpsoptions['initial_backup'] == 1 && $bwpsoptions['initial_filewrite'] == 1 ) { //they've backed up their database or ignored the warning
-
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'System Status', $this->hook ),
- array(
- array( __( 'One-Click Protection', $this->hook ), 'dashboard_content_3' ) //One-click protection
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
-
- } elseif ( $bwpsoptions['oneclickchosen'] == 0 && $bwpsoptions['initial_backup'] == 1 && $bwpsoptions['initial_filewrite'] == 0 ) {
-
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'System Status', $this->hook ),
- array(
- array( __( 'Important', $this->hook ), 'dashboard_content_2' ), //Ask the user if they want BWPS to automatically write to system files
- ),
- BWPS_PU . 'images/shield-large.png',
- array()
- );
-
- } else { //if they haven't backed up their database or ignored the warning
-
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'System Status', $this->hook ),
- array(
- array( __( 'Welcome!', $this->hook ), 'dashboard_content_1' ), //Try to force the user to back up their site before doing anything else
- ),
- BWPS_PU . 'images/shield-large.png',
- array()
- );
-
- }
-
- }
-
- /**
- * Registers content blocks for change admin user page
- *
- **/
- function admin_adminuser() {
- global $bwpstabs;
- if ( ! is_multisite() ) {
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Change Admin User', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'adminuser_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Change The Admin User Name', $this->hook ), 'adminuser_content_2' ), //adminuser options
- array( __( 'Change The Admin User ID', $this->hook ), 'adminuser_content_3' ) //adminuser options
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- } else {
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Change Admin User', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'adminuser_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Change The Admin User Name', $this->hook ), 'adminuser_content_2' )
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs,
- $this->hook . '-adminuser'
- );
- }
- }
-
- /**
- * Registers content blocks for away mode page
- *
- **/
- function admin_awaymode() {
- global $bwpstabs;
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Administor Away Mode', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'awaymode_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Away Mode Options', $this->hook ), 'awaymode_content_2' ), //awaymode options
- array( __( 'Away Mode Rules', $this->hook ), 'awaymode_content_3' )
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- }
-
- /**
- * Registers content blocks for ban hosts page
- *
- **/
- function admin_banusers() {
- global $bwpstabs;
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Ban Users', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'banusers_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'User and Bot Blacklist', $this->hook ), 'banusers_content_2' ), //banusers options
- array( __( 'Banned Users Configuration', $this->hook ), 'banusers_content_3' ) //banusers options
- ),
- BWPS_PU . 'images/shield-large.png'
- ,
- $bwpstabs
- );
- }
-
- /**
- * Registers content blocks for content directory page
- *
- **/
- function admin_contentdirectory() {
- global $bwpstabs;
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Change wp-content Directory', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'contentdirectory_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Change The wp-content Directory', $this->hook ), 'contentdirectory_content_2' ) //contentdirectory options
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- }
-
- /**
- * Registers content blocks for database backup page
- *
- **/
- function admin_databasebackup() {
- global $bwpstabs;
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Backup WordPress Database', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'databasebackup_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Backup Your WordPress Database', $this->hook ), 'databasebackup_content_2' ), //backup switch
- array( __( 'Schedule Automated Backups', $this->hook ), 'databasebackup_content_3' ), //scheduled backup options
- array( __( 'Backup Information', $this->hook ), 'databasebackup_content_4' ) //where to find downloads
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- }
-
- /**
- * Registers content blocks for database prefix page
- *
- **/
- function admin_databaseprefix() {
- global $bwpstabs;
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Change Database Prefix', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'databaseprefix_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Change The Database Prefix', $this->hook ), 'databaseprefix_content_2' ) //databaseprefix options
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- }
-
- /**
- * Registers content blocks for hide backend page
- *
- **/
- function admin_hidebackend() {
- global $bwpstabs;
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Hide WordPress Backend', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'hidebackend_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Hide Backend Options', $this->hook ), 'hidebackend_content_2' ), //hidebackend options
- array( __( 'Secret Key', $this->hook ), 'hidebackend_content_3' ) //hidebackend secret key information
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- }
-
- /**
- * Registers content blocks for intrusion detection page
- *
- **/
- function admin_intrusiondetection() {
-
- global $bwpsoptions, $bwpstabs;
-
- if ( $bwpsoptions['id_fileenabled'] == 1 && defined( 'BWPS_FILECHECK' ) && BWPS_FILECHECK === true ) {
-
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Intrusion Detection', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'intrusiondetection_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Check For File Changes', $this->hook ), 'intrusiondetection_content_2' ), //Manually check for file changes
- array( __( 'Intrusion Detection', $this->hook ), 'intrusiondetection_content_3' ) //intrusiondetection options
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
-
- } else {
-
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Intrusion Detection', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'intrusiondetection_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Intrusion Detection', $this->hook ), 'intrusiondetection_content_3' ) //intrusiondetection options
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
-
- }
-
- }
-
- /**
- * Registers content blocks for login limits page
- *
- **/
- function admin_loginlimits() {
- global $bwpstabs;
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Limit Login Attempts', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'loginlimits_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Limit Login Attempts', $this->hook ), 'loginlimits_content_2' ) //loginlimit options
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- }
-
- /**
- * Registers content blocks for SSL page
- *
- **/
- function admin_ssl() {
- global $bwpstabs;
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'SSL', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'ssl_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'SSL Options', $this->hook ), 'ssl_content_2' ) //ssl options
-
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- }
-
- /**
- * Registers content blocks for system tweaks page
- *
- **/
- function admin_systemtweaks() {
-
- global $bwpstabs;
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Various Security Tweaks', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'systemtweaks_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'System Tweaks', $this->hook ), 'systemtweaks_content_2' ) //systemtweaks htaccess (or other rewrite) options
-
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- }
-
- /**
- * Registers content blocks for view logs page
- *
- **/
- function admin_logs() {
- global $bwpstabs;
-
- $this->admin_page(
- $this->pluginname . ' - ' . __( 'Better WP Security Logs', $this->hook ),
- array(
- array( __( 'Before You Begin', $this->hook ), 'logs_content_1' ), //information to prevent the user from getting in trouble
- array( __( 'Clean Database', $this->hook ), 'logs_content_2' ), //Clean Database
- array( __( 'Current Lockouts', $this->hook ), 'logs_content_3' ), //Current Lockouts log
- array( __( '404 Errors', $this->hook ), 'logs_content_4' ), //404 Errors
- array( __( 'Bad Login Attempts', $this->hook ), 'logs_content_7' ), //404 Errors
- array( __( 'All Lockouts', $this->hook ), 'logs_content_5' ), //All Lockouts
- array( __( 'Changed Files', $this->hook ), 'logs_content_6' ) //Changed Files
-
- ),
- BWPS_PU . 'images/shield-large.png',
- $bwpstabs
- );
- }
-
- /**
- * Dashboard intro prior to first backup
- *
- **/
- function dashboard_content_1() {
- ?>
- <p><?php _e( 'Welcome to Better WP Security!', $this->hook ); ?></p>
- <p><?php echo __( 'Before we begin it is extremely important that you make a backup of your database. This will make sure you can get your site back to the way it is right now should something go wrong. Click the button below to make a backup which will be emailed to the website administrator at ', $this->hook ) . '<strong>' . get_option( 'admin_email' ) . '</strong>'; ?></p>
- <form method="post" action="">
- <?php wp_nonce_field( 'BWPS_admin_save','wp_nonce' ); ?>
- <input type="hidden" name="bwps_page" value="dashboard_1" />
- <p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'Create Database Backup', $this->hook ); ?>" /></p>
- </form>
- <form method="post" action="">
- <?php wp_nonce_field( 'BWPS_admin_save','wp_nonce' ); ?>
- <input type="hidden" name="bwps_page" value="dashboard_2" />
- <p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'No, thanks. I already have a backup', $this->hook ); ?>" /></p>
- </form>
- <?php
- }
-
- /**
- * Ask the user if they want the plugin to automatically write to system files
- *
- **/
- function dashboard_content_2() {
- ?>
- <p><?php _e( 'Just one more question:', $this->hook ); ?></p>
- <p><?php _e( 'Better WP Security can automatically write to WordPress core files for you (wp-config.php and .htaccess). This saves time and prevents you from having to edit code yourself. While this is safe to do in nearly all systems it can, on some server configurations, cause problems. For this reason, before continuing, you have the option to allow this plugin to write to wp-config.php and .htaccess or not.', $this->hook ); ?></p>
- <p><?php _e( 'Note, that this option can be changed later in the "System Tweaks" menu of this plugin. In addition, disabling file writes here will prevent this plugin from activation features such as changing the wp-content directory and changing the database prefix.', $this->hook ); ?></p>
- <p><?php _e( 'Finally, please remember that in nearly all cases there is no issue with allowing this plugin to edit your files. However if you know your have a unique server setup or simply would rather edit these files yourself I would recommend selecting "Do not allow this plugin to change WordPress core files."', $this->hook ); ?></p>
- <form method="post" action="">
- <?php wp_nonce_field( 'BWPS_admin_save','wp_nonce' ); ?>
- <input type="hidden" name="bwps_page" value="dashboard_3" />
- <p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'Allow this plugin to change WordPress core files', $this->hook ); ?>" /></p>
- </form>
- <form method="post" action="">
- <?php wp_nonce_field( 'BWPS_admin_save','wp_nonce' ); ?>
- <input type="hidden" name="bwps_page" value="dashboard_4" />
- <p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'Do not allow this plugin to change WordPress core files.', $this->hook ); ?>" /></p>
- </form>
- <?php
- }
-
- /**
- * One-click mode
- *
- * Information and form to turn on basic security with 1-click
- *
- **/
- function dashboard_content_3() {
- ?>
- <form method="post" action="">
- <?php wp_nonce_field( 'BWPS_admin_save','wp_nonce' ); ?>
- <input type="hidden" name="bwps_page" value="dashboard_5" />
- <input type="hidden" name="oneclick" value="1" />
- <p><?php _e( 'The button below will turn on all the basic features of Better WP Security which will help automatically protect your site from potential attacks. Please note that it will NOT automatically activate any features which may interfere with other plugins, themes, or content on your site. As such, not all the items in the status will turn green by using the "Secure My Site From Basic Attacks" button. The idea is to activate basic features in one-click so you don\'t have to worry about it.', $this->hook ); ?></p>
- <p><?php _e( 'Please note this will not make any changes to any files on your site including .htaccess and wp-config.php.', $this->hook ); ?></p>
- <p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'Secure My Site From Basic Attacks', $this->hook ); ?>" /></p>
- </form>
- <form method="post" action = "">
- <?php wp_nonce_field( 'BWPS_admin_save','wp_nonce' ); ?>
- <input type="hidden" name="bwps_page" value="dashboard_5" />
- <input type="hidden" name="oneclick" value="0" />
- <p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'No thanks, I prefer to do configure everything myself.', $this->hook ); ?>" /></p>
- </form>
- <?php
- }
-
- /**
- * Better WP Security System Status
- *
- **/
- function dashboard_content_4() {
- global $wpdb, $bwpsoptions, $bwpsmemlimit;
- ?>
- <ol>
- <li class="securecheck">
- <?php
- $isOn = $bwpsoptions['st_enablepassword'];
- $role = $bwpsoptions['st_passrole'];
- ?>
- <?php if ( $isOn == 1 && $role == 'subscriber' ) { ?>
- <span style="color: green;"><?php _e( 'You are enforcing strong passwords for all users.', $this-> hook ); ?></span>
- <?php } elseif ( $isOn == 1 ) { ?>
- <span style="color: orange;"><?php _e( 'You are enforcing strong passwords, but not for all users.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_passrole"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } else { ?>
- <span style="color: red;"><?php _e( 'You are not enforcing strong passwords.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_enablepassword"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php $hcount = intval( $bwpsoptions['st_manifest'] ) + intval( $bwpsoptions['st_generator'] ) + intval( $bwpsoptions['st_edituri'] ); ?>
- <?php if ( $hcount == 3 ) { ?>
- <span style="color: green;"><?php _e( 'Your WordPress header is revealing as little information as possible.', $this-> hook ); ?></span>
- <?php } elseif ( $hcount > 0 ) { ?>
- <span style="color: blue;"><?php _e( 'Your WordPress header is still revealing some information to users.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_generator"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } else { ?>
- <span style="color: red;"><?php _e( 'Your WordPress header is showing too much information to users.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_generator"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php $hcount = intval( $bwpsoptions['st_themenot'] ) + intval( $bwpsoptions['st_pluginnot'] ) + intval( $bwpsoptions['st_corenot'] ); ?>
- <?php if ( $hcount == 3 ) { ?>
- <span style="color: green;"><?php _e( 'Non-administrators cannot see available updates.', $this-> hook ); ?></span>
- <?php } elseif ( $hcount > 0 ) { ?>
- <span style="color: orange;"><?php _e( 'Non-administrators can see some updates.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_themenot"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } else { ?>
- <span style="color: red;"><?php _e( 'Non-administrators can see all updates.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_themenot"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $this->user_exists( 'admin' ) ) { ?>
- <span style="color: red;"><?php _e( 'The <em>admin</em> user still exists.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-adminuser"><?php _e( 'Click here to rename admin.', $this-> hook ); ?></a></span>
- <?php } else { ?>
- <span style="color: green;"><?php _e( 'The <em>admin</em> user has been removed.', $this-> hook ); ?></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $this->user_exists( '1' ) ) { ?>
- <span style="color: red;"><?php _e( 'A user with id 1 still exists.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-adminuser"><?php _e( 'Click here to change user 1\'s ID.', $this-> hook ); ?></a></span>
- <?php } else { ?>
- <span style="color: green;"><?php _e( 'The user with id 1 has been removed.', $this-> hook ); ?></span>
- <?php } ?>
- </li>
- <?php if ( $bwpsoptions['st_writefiles'] == 1 ) { ?>
- <li class="securecheck">
- <?php if ( $wpdb->base_prefix == 'wp_' ) { ?>
- <span style="color: red;"><?php _e( 'Your table prefix should not be ', $this->hook ); ?><em>wp_</em>. <a href="admin.php?page=better-wp-security-databaseprefix"><?php _e( 'Click here to rename it.', $this->hook ); ?></a></span>
- <?php } else { ?>
- <span style="color: green;"><?php echo __( 'Your table prefix is', $this->hook ) . ' ' . $wpdb->base_prefix; ?></span>
- <?php } ?>
- </li>
- <?php } ?>
- <li class="securecheck">
- <?php if ( $bwpsoptions['backup_enabled'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'You have scheduled regular backups of your WordPress database.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'You are not scheduling regular backups of your WordPress database.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-databasebackup"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['am_enabled'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'Your WordPress admin area is not available when you will not be needing it.', $this->hook ); ?>. </span>
- <?php } else { ?>
- <span style="color: orange;"><?php _e( 'Your WordPress admin area is available 24/7. Do you really update 24 hours a day?', $this->hook ); ?> <a href="admin.php?page=better-wp-security-awaymode"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['bu_blacklist'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'You are blocking known bad hosts and agents with HackRepair.com\'s blacklist.', $this->hook ); ?>. </span>
- <?php } else { ?>
- <span style="color: orange;"><?php _e( 'You are not blocking known bad hosts and agents with HackRepair.com\'s blacklist?', $this->hook ); ?> <a href="admin.php?page=better-wp-security-banusers"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['ll_enabled'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'Your login area is protected from brute force attacks.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: red;"><?php _e( 'Your login area is not protected from brute force attacks.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-loginlimits"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['hb_enabled'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'Your WordPress admin area is hidden.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'Your WordPress admin area is not hidden.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-hidebackend"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php $hcount = intval( $bwpsoptions['st_ht_files'] ) + intval( $bwpsoptions['st_ht_browsing'] ) + intval( $bwpsoptions['st_ht_request'] ) + intval( $bwpsoptions['st_ht_query'] ); ?>
- <?php if ( $hcount == 4 ) { ?>
- <span style="color: green;"><?php _e( 'Your .htaccess file is fully secured.', $this-> hook ); ?></span>
- <?php } elseif ( $hcount > 0 ) { ?>
- <span style="color: blue;"><?php _e( 'Your .htaccess file is partially secured.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_ht_files"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'Your .htaccess file is NOT secured.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_ht_files"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['id_enabled'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'Your installation is actively blocking attackers trying to scan your site for vulnerabilities.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: red;"><?php _e( 'Your installation is not actively blocking attackers trying to scan your site for vulnerabilities.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-intrusiondetection"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['id_fileenabled'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'Your installation is actively looking for changed files.', $this->hook ); ?></span>
- <?php } else { ?>
- <?php
- if ( $bwpsmemlimit >= 128 ) {
- $idfilecolor = 'red';
- } else {
- $idfilecolor = 'blue';
- }
- ?>
- <span style="color: <?php echo $idfilecolor; ?>;"><?php _e( 'Your installation is not actively looking for changed files.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-intrusiondetection#id_fileenabled"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['st_longurl'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'Your installation does not accept long URLs.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'Your installation accepts long (over 255 character) URLS. This can lead to vulnerabilities.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_longurl"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['st_fileedit'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'You are not allowing users to edit theme and plugin files from the WordPress backend.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'You are allowing users to edit theme and plugin files from the WordPress backend.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_fileedit"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['st_writefiles'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'Better WP Security is allowed to write to wp-config.php and .htaccess.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'Better WP Security is not allowed to write to wp-config.php and .htaccess.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_writefiles"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['st_fileperm'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'wp-config.php and .htacess are not writeable.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'wp-config.php and .htacess are writeable.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_fileperm"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <li class="securecheck">
- <?php if ( $bwpsoptions['st_randomversion'] == 1 ) { ?>
- <span style="color: green;"><?php _e( 'Version information is obscured to all non admin users.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'Users may still be able to get version information from various plugins and themes.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-systemtweaks#st_randomversion"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <?php if ( $bwpsoptions['st_writefiles'] == 1 ) { ?>
- <li class="securecheck">
- <?php if ( ! strstr( WP_CONTENT_DIR, 'wp-content' ) || ! strstr( WP_CONTENT_URL, 'wp-content' ) ) { ?>
- <span style="color: green;"><?php _e( 'You have renamed the wp-content directory of your site.', $this->hook ); ?></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'You should rename the wp-content directory of your site.', $this->hook ); ?> <a href="admin.php?page=better-wp-security-contentdirectory"><?php _e( 'Click here to do so.', $this->hook ); ?></a></span>
- <?php } ?>
- </li>
- <?php } ?>
- <li class="securecheck">
- <?php if ( FORCE_SSL_LOGIN === true && FORCE_SSL_ADMIN === true ) { ?>
- <span style="color: green;"><?php _e( 'You are requiring a secure connection for logins and the admin area.', $this-> hook ); ?></span>
- <?php } elseif ( FORCE_SSL_LOGIN === true || FORCE_SSL_ADMIN === true ) { ?>
- <span style="color: blue;"><?php _e( 'You are requiring a secure connection for logins or the admin area but not both.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-ssl#ssl_frontend"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } else { ?>
- <span style="color: blue;"><?php _e( 'You are not requiring a secure connection for logins or for the admin area.', $this-> hook ); ?> <a href="admin.php?page=better-wp-security-ssl#ssl_frontend"><?php _e( 'Click here to fix.', $this-> hook ); ?></a></span>
- <?php } ?>
- </li>
- <?php if ( $bwpsoptions['st_writefiles'] == 0 ) { ?>
- <li class="securecheck">
- <span style="color: orange;"><?php _e( 'Notice: Some items are hidden as you are not allowing this plugin to write to core files.', $this->hook ); ?></span> <a href="admin.php?page=better-wp-security-systemtweaks#st_writefiles"><?php _e( 'Click here to fix.', $this->hook ); ?></a></span>
- </li>
- <?php } ?>
- </ol>
- <hr />
- <ul>
- <li><span style="color: green;"><?php _e( 'Items in green are fully secured. Good Job!', $this->hook ); ?></span></li>
- <li><span style="color: orange;"><?php _e( 'Items in orange are partially secured. Turn on more options to fully secure these areas.', $this->hook ); ?></span></li>
- <li><span style="color: red;"><?php _e( 'Items in red are not secured. You should secure these items immediately', $this->hook ); ?></span></li>
- <li><span style="color: blue;"><?php _e( 'Items in blue are not fully secured but may conflict with other themes, plugins, or the other operation of your site. Secure them if you can but if you cannot do not worry about them.', $this->hook ); ?></span></li>
- </ul>
- <?php
- }
-
- /**
- * Rewrite rules
- *
- * Rewrite rules generated by better wp security
- *
- **/
- function dashboard_content_5() {
-
- $rules = $this->getrules();
-
- if ( $rules == '') {
- ?>
- <p><?php _e( 'No rules have been generated. Turn on more features to see rewrite rules.', $this->hook ); ?></p>
- <?php
- } else {
- ?>
- <style type="text/css">
- code {
- overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
- overflow-y: hidden;
- background-color: transparent;
- white-space: pre-wrap; /* css-3 */
- white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- /* width: 99%; */
- word-wrap: break-word; /* Internet Explorer 5.5+ */
- }
- </style>
- <?php echo highlight_string( $rules, true ); ?>
- <?php
- }
-
- }
-
- /**
- * wp-content.php Rules
- *
- * wp-content.php generated by better wp security
- *
- **/
- function dashboard_content_6() {
-
- $rules = $this->getwpcontent();
-
- if ( $rules == '') {
- ?>
- <p><?php _e( 'No rules have been generated. Turn on more features to see wp-content rules.', $this->hook ); ?></p>
- <?php
- } else {
- ?>
- <textarea style="width: 100%; height: 300px;"><?php echo $rules; ?></textarea>
-
- <?php
- }
-
- }
-
-
- /**
- * General System Information
- *
- **/
- function dashboard_content_7() {
- global $wpdb, $bwpsoptions, $bwpsdata;
- ?>
- <ul>
- <li>
- <h4><?php _e( 'User Information', $this->hook ); ?></h4>
- <ul>
- <li><?php _e( 'Public IP Address', $this->hook ); ?>: <strong><a target="_blank" title="<?php _e( 'Get more information on this address', $this->hook ); ?>" href="http://whois.domaintools.com/<?php echo $_SERVER['REMOTE_ADDR']; ?>"><?php echo $_SERVER['REMOTE_ADDR']; ?></a></strong></li>
- <li><?php _e( 'User Agent', $this->hook ); ?>: <strong><?php echo filter_var( $_SERVER['HTTP_USER_AGENT'], FILTER_SANITIZE_STRING ); ?></strong></li>
- </ul>
- </li>
-
- <li>
- <h4><?php _e( 'File System Information', $this->hook ); ?></h4>
- <ul>
- <li><?php _e( 'Website Root Folder', $this->hook ); ?>: <strong><?php echo get_site_url(); ?></strong></li>
- <li><?php _e( 'Document Root Path', $this->hook ); ?>: <strong><?php echo filter_var( $_SERVER['DOCUMENT_ROOT'], FILTER_SANITIZE_STRING ); ?></strong></li>
- <?php
- $htaccess = ABSPATH . '.htaccess';
-
- if ( $f = @fopen( $htaccess, 'a' ) ) {
-
- @fclose( $f );
- $copen = '<font color="red">';
- $cclose = '</font>';
- $htaw = __( 'Yes', $this->hook );
-
- } else {
-
- $copen = '';
- $cclose = '';
- $htaw = __( 'No.', $this->hook );
-
- }
-
- if ( $bwpsoptions['st_fileperm'] == 1 ) {
- @chmod( $htaccess, 0444 ); //make sure the config file is no longer writable
- }
- ?>
- <li><?php _e( '.htaccess File is Writable', $this->hook ); ?>: <strong><?php echo $copen . $htaw . $cclose; ?></strong></li>
- <?php
- $conffile = $this->getConfig();
-
- if ( $f = @fopen( $conffile, 'a' ) ) {
-
- @fclose( $f );
- $copen = '<font color="red">';
- $cclose = '</font>';
- $wconf = __( 'Yes', $this->hook );
-
- } else {
-
- $copen = '';
- $cclose = '';
- $wconf = __( 'No.', $this->hook );
-
- }
-
- if ( $bwpsoptions['st_fileperm'] == 1 ) {
- @chmod( $conffile, 0444 ); //make sure the config file is no longer writable
- }
- ?>
- <li><?php _e( 'wp-config.php File is Writable', $this->hook ); ?>: <strong><?php echo $copen . $wconf . $cclose; ?></strong></li>
- </ul>
- </li>
-
- <li>
- <h4><?php _e( 'Database Information', $this->hook ); ?></h4>
- <ul>
- <li><?php _e( 'MySQL Database Version', $this->hook ); ?>: <?php $sqlversion = $wpdb->get_var( "SELECT VERSION() AS version" ); ?><strong><?php echo $sqlversion; ?></strong></li>
- <li><?php _e( 'MySQL Client Version', $this->hook ); ?>: <strong><?php echo mysql_get_client_info(); ?></strong></li>
- <li><?php _e( 'Database Host', $this->hook ); ?>: <strong><?php echo DB_HOST; ?></strong></li>
- <li><?php _e( 'Database Name', $this->hook ); ?>: <strong><?php echo DB_NAME; ?></strong></li>
- <li><?php _e( 'Database User', $this->hook ); ?>: <strong><?php echo DB_USER; ?></strong></li>
- <?php $mysqlinfo = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" );
- if ( is_array( $mysqlinfo ) ) $sql_mode = $mysqlinfo[0]->Value;
- if ( empty( $sql_mode ) ) $sql_mode = __( 'Not Set', $this->hook );
- else $sql_mode = __( 'Off', $this->hook );
- ?>
- <li><?php _e( 'SQL Mode', $this->hook ); ?>: <strong><?php echo $sql_mode; ?></strong></li>
- </ul>
- </li>
-
- <li>
- <h4><?php _e( 'Server Information', $this->hook ); ?></h4>
- <ul>
- <li><?php _e( 'Server / Website IP Address', $this->hook ); ?>: <strong><a target="_blank" title="<?php _e( 'Get more information on this address', $this->hook ); ?>" href="http://whois.domaintools.com/<?php echo $_SERVER['SERVER_ADDR']; ?>"><?php echo $_SERVER['SERVER_ADDR']; ?></a></strong></li>
- <li><?php _e( 'Server Type', $this->hook ); ?>: <strong><?php echo filter_var( filter_var( $_SERVER['SERVER_SOFTWARE'], FILTER_SANITIZE_STRING ), FILTER_SANITIZE_STRING ); ?></strong></li>
- <li><?php _e( 'Operating System', $this->hook ); ?>: <strong><?php echo PHP_OS; ?></strong></li>
- <li><?php _e( 'Browser Compression Supported', $this->hook ); ?>: <strong><?php echo filter_var( $_SERVER['HTTP_ACCEPT_ENCODING'], FILTER_SANITIZE_STRING ); ?></strong></li>
- </ul>
- </li>
-
- <li>
- <h4><?php _e( 'PHP Information', $this->hook ); ?></h4>
- <ul>
- <li><?php _e( 'PHP Version', $this->hook ); ?>: <strong><?php echo PHP_VERSION; ?></strong></li>
- <li><?php _e( 'PHP Memory Usage', $this->hook ); ?>: <strong><?php echo round(memory_get_usage() / 1024 / 1024, 2) . __( ' MB', $this->hook ); ?></strong> </li>
- <?php
- if ( ini_get( 'memory_limit' ) ) {
- $memory_limit = filter_var( ini_get( 'memory_limit' ), FILTER_SANITIZE_STRING );
- } else {
- $memory_limit = __( 'N/A', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Memory Limit', $this->hook ); ?>: <strong><?php echo $memory_limit; ?></strong></li>
- <?php
- if ( ini_get( 'upload_max_filesize' ) ) {
- $upload_max = filter_var( ini_get( 'upload_max_filesize' ), FILTER_SANITIZE_STRING );
- } else {
- $upload_max = __( 'N/A', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Max Upload Size', $this->hook ); ?>: <strong><?php echo $upload_max; ?></strong></li>
- <?php
- if ( ini_get( 'post_max_size' ) ) {
- $post_max = filter_var( ini_get( 'post_max_size' ), FILTER_SANITIZE_STRING );
- } else {
- $post_max = __( 'N/A', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Max Post Size', $this->hook ); ?>: <strong><?php echo $post_max; ?></strong></li>
- <?php
- if ( ini_get( 'safe_mode' ) ) {
- $safe_mode = __( 'On', $this->hook );
- } else {
- $safe_mode = __( 'Off', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Safe Mode', $this->hook ); ?>: <strong><?php echo $safe_mode; ?></strong></li>
- <?php
- if ( ini_get( 'allow_url_fopen' ) ) {
- $allow_url_fopen = __( 'On', $this->hook );
- } else {
- $allow_url_fopen = __( 'Off', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Allow URL fopen', $this->hook ); ?>: <strong><?php echo $allow_url_fopen; ?></strong></li>
- <?php
- if ( ini_get( 'allow_url_include' ) ) {
- $allow_url_include = __( 'On', $this->hook );
- } else {
- $allow_url_include = __( 'Off', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Allow URL Include' ); ?>: <strong><?php echo $allow_url_include; ?></strong></li>
- <?php
- if ( ini_get( 'display_errors' ) ) {
- $display_errors = __( 'On', $this->hook );
- } else {
- $display_errors = __( 'Off', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Display Errors', $this->hook ); ?>: <strong><?php echo $display_errors; ?></strong></li>
- <?php
- if ( ini_get( 'display_startup_errors' ) ) {
- $display_startup_errors = __( 'On', $this->hook );
- } else {
- $display_startup_errors = __( 'Off', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Display Startup Errors', $this->hook ); ?>: <strong><?php echo $display_startup_errors; ?></strong></li>
- <?php
- if ( ini_get( 'expose_php' ) ) {
- $expose_php = __( 'On', $this->hook );
- } else {
- $expose_php = __( 'Off', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Expose PHP', $this->hook ); ?>: <strong><?php echo $expose_php; ?></strong></li>
- <?php
- if ( ini_get( 'register_globals' ) ) {
- $register_globals = __( 'On', $this->hook );
- } else {
- $register_globals = __( 'Off', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Register Globals', $this->hook ); ?>: <strong><?php echo $register_globals; ?></strong></li>
- <?php
- if ( ini_get( 'max_execution_time' ) ) {
- $max_execute = ini_get( 'max_execution_time' );
- } else {
- $max_execute = __( 'N/A', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Max Script Execution Time' ); ?>: <strong><?php echo $max_execute; ?> <?php _e( 'Seconds' ); ?></strong></li>
- <?php
- if ( ini_get( 'magic_quotes_gpc' ) ) {
- $magic_quotes_gpc = __( 'On', $this->hook );
- } else {
- $magic_quotes_gpc = __( 'Off', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Magic Quotes GPC', $this->hook ); ?>: <strong><?php echo $magic_quotes_gpc; ?></strong></li>
- <?php
- if ( ini_get( 'open_basedir' ) ) {
- $open_basedir = __( 'On', $this->hook );
- } else {
- $open_basedir = __( 'Off', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP open_basedir', $this->hook ); ?>: <strong><?php echo $open_basedir; ?></strong></li>
- <?php
- if ( is_callable( 'xml_parser_create' ) ) {
- $xml = __( 'Yes', $this->hook );
- } else {
- $xml = __( 'No', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP XML Support', $this->hook ); ?>: <strong><?php echo $xml; ?></strong></li>
- <?php
- if ( is_callable( 'iptcparse' ) ) {
- $iptc = __( 'Yes', $this->hook );
- } else {
- $iptc = __( 'No', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP IPTC Support', $this->hook ); ?>: <strong><?php echo $iptc; ?></strong></li>
- <?php
- if ( is_callable( 'exif_read_data' ) ) {
- $exif = __( 'Yes', $this->hook ). " ( V" . substr(phpversion( 'exif' ),0,4) . ")" ;
- } else {
- $exif = __( 'No', $this->hook );
- }
- ?>
- <li><?php _e( 'PHP Exif Support', $this->hook ); ?>: <strong><?php echo $exif; ?></strong></li>
- </ul>
- </li>
-
- <li>
- <h4><?php _e( 'WordPress Configuration', $this->hook ); ?></h4>
- <ul>
- <?php
- if ( is_multisite() ) {
- $multSite = __( 'Multisite is enabled', $this->hook );
- } else {
- $multSite = __( 'Multisite is NOT enabled', $this->hook );
- }
- ?>
- <li><?php _e( ' Multisite', $this->hook );?>: <strong><?php echo $multSite; ?></strong></li>
- <?php
- if ( get_option( 'permalink_structure' ) != '' ) {
- $copen = '';
- $cclose = '';
- $permalink_structure = __( 'Enabled', $this->hook );
- } else {
- $copen = '<font color="red">';
- $cclose = '</font>';
- $permalink_structure = __( 'WARNING! Permalinks are NOT Enabled. Permalinks MUST be enabled for Better WP Security to function correctly', $this->hook );
- }
- ?>
- <li><?php _e( 'WP Permalink Structure', $this->hook ); ?>: <strong> <?php echo $copen . $permalink_structure . $cclose; ?></strong></li>
- <li><?php _e( 'Wp-config Location', $this->hook );?>: <strong><?php echo $this->getConfig(); ?></strong></li>
- </ul>
- </li>
- <li>
- <h4><?php _e( 'Better WP Security variables', $this->hook ); ?></h4>
- <ul>
- <?php
- if ( $bwpsoptions['hb_key'] == '' ) {
- $hbkey = __( 'Not Yet Available. Enable Hide Backend mode to generate key.', $this->hook );
- } else {
- $hbkey = $bwpsoptions['hb_key'];
- }
- ?>
- <li><?php _e( 'Hide Backend Key', $this->hook );?>: <strong><?php echo $hbkey; ?></strong></li>
- <li><?php _e( 'Better WP Build Version', $this->hook );?>: <strong><?php echo $bwpsdata['version']; ?></strong><br />
- <em><?php _e( 'Note: this is NOT the same as the version number on the plugins page and is instead used for support.', $this->hook ); ?></em></li>
- </ul>
- </l