/** * Logs security related events to the database * * Logs security related events for bad logins or 404s to the database * * **/ function fdx_logevent() { $settings = Total_Security::fdx_get_settings(); global $wpdb; // define( 'DONOTCACHEPAGE', true ); // WP Super Cache and W3 Total Cache recognise this //ignor boots if ($settings['p4_check_2'] && !empty($_SERVER['HTTP_USER_AGENT']) && preg_match('/(bot|spider)/', $_SERVER['HTTP_USER_AGENT'])) { return; } //ignor whithow http refer if ($settings['p4_check_3'] && empty($_SERVER['HTTP_REFERER'])) { return; } $host = esc_sql($this->fdxgetIp()); $url = esc_sql($_SERVER['REQUEST_URI']); $referrer = esc_sql($this->getRefe()); //log to database $wpdb->insert($wpdb->base_prefix . 'total_security_log', array('timestamp' => current_time('timestamp'), 'host' => $host, 'url' => $url, 'referrer' => $referrer)); }
<?php $settings = Total_Security::fdx_get_settings(); $p6_url1 = add_query_arg(array('popup' => 'pp_page', 'target' => 'debug_log'), menu_page_url($this->hook, false)); /* wrap *********************************************************************************/ echo '<div class="wrap">'; echo '<h2>' . $this->pluginname . ' : ' . __('Settings', $this->hook) . '</h2>'; ?> <h2 class="nav-tab-wrapper"> <a class="nav-tab" href="<?php echo admin_url('admin.php?page=' . $this->hook); ?> "><?php _e('Dashboard', $this->hook); ?> </a> <a class="nav-tab" href="<?php echo admin_url('admin.php?page=' . $this->hook . '-' . $this->_p2); ?> "><?php _e('Vulnerability', $this->hook); ?> </a> <a class="nav-tab" href="<?php echo admin_url('admin.php?page=' . $this->hook . '-' . $this->_p3); ?> "><?php _e('File System', $this->hook); ?> </a>
function secure_hidden_login() { $settings = Total_Security::fdx_get_settings(); $msgTIT = __('Check if', $this->hook) . ' <em>"' . __('Secure Hidden Login', $this->hook) . '"</em> ' . __('is enabled', $this->hook); // Define the function if (!$settings['p6_check_1']) { $return['status'] = '<span class="pb_label pb_label-warning">!</span>'; $return['msg'] = '<tr class="alternate"><td><span class="fdx-actions">' . $msgTIT . '</span></td><td><a href="' . admin_url('admin.php?page=' . $this->hook . '-' . $this->_p6) . '" title="' . __('Fix', $this->hook) . '"><strong>' . __('Disabled', $this->hook) . '</strong></a></td>'; update_option('fdx_p2_yel6', '1'); } else { $return['status'] = '<span class="pb_label pb_label-success">✓</span>'; $return['msg'] = '<tr><td><span class="fdx-actions">' . $msgTIT . '</span></td><td>' . __('Enabled', $this->hook) . '</td>'; update_option('fdx_p2_yel6', '0'); } return $return; }