'render_tab1', ); function __construct() { $this->render_menu_page(); } function set_menu_tabs() { $this->menu_tabs = array( 'tab1' => __('WhoIS Lookup', 'all-in-one-wp-security-and-firewall'), ); } function get_current_tab() { $tab_keys = array_keys($this->menu_tabs); $tab = isset( $_GET['tab'] ) ? sanitize_text_field($_GET['tab']) : $tab_keys[0]; return $tab; } /* * Renders our tabs of this menu as nav items */ function render_menu_tabs() { $current_tab = $this->get_current_tab(); echo ''; } /* * The menu rendering goes here */ function render_menu_page() { echo '
'; echo '

'.__('WHOIS Lookup','all-in-one-wp-security-and-firewall').'

';//Interface title $this->set_menu_tabs(); $tab = $this->get_current_tab(); $this->render_menu_tabs(); ?>
menu_tabs); call_user_func(array(&$this, $this->menu_tabs_handler[$tab])); ?>

'.__('This feature allows you to look up more detailed information about an IP address or domain name by querying the WHOIS API.', 'all-in-one-wp-security-and-firewall').'

'; ?>

:
debug_logger->log_debug("Nonce check failed on WHOIS lookup!",4); die("Nonce check failed on WHOIS lookup!"); } require_once(AIO_WP_SECURITY_LIB_PATH.'/whois/whois.main.php'); require_once(AIO_WP_SECURITY_LIB_PATH.'/whois/whois.utils.php'); $input_val = trim($_POST['aiowps_whois_lookup_field']); $input_val = preg_replace('#^https?://#', '', $input_val); if (filter_var($input_val, FILTER_VALIDATE_IP) || filter_var(gethostbyname($input_val), FILTER_VALIDATE_IP)) { //$info_msg_string = '

'.sprintf( __('WHOIS lookup successfully completed. Please see the results below:', 'all-in-one-wp-security-and-firewall')).'

'; //echo ($info_msg_string); $this->show_msg_updated(__('WHOIS lookup successfully completed. Please see the results below:', 'all-in-one-wp-security-and-firewall')); $whois = new Whois(); $result = $whois->Lookup($input_val); if (!empty($result['rawdata'])) { $utils = new utils; $winfo = $utils->showHTML($result); echo $winfo; } } else { $this->show_msg_error(__('You have entered an incorrectly formatted IP address or domain name. Please try again.','all-in-one-wp-security-and-firewall')); } } } } //end class