function render_tab3() { global $wpdb; include_once 'wp-security-list-locked-ip.php'; //For rendering the AIOWPSecurity_List_Table in tab1 $locked_ip_list = new AIOWPSecurity_List_Locked_IP(); //For rendering the AIOWPSecurity_List_Table in tab1 if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'delete_blocked_ip') { //Delete link was clicked for a row in list table $locked_ip_list->delete_lockdown_records(strip_tags($_REQUEST['lockdown_id'])); } if ($_REQUEST['action'] == 'unlock_ip') { //Unlock link was clicked for a row in list table $locked_ip_list->unlock_ip_range(strip_tags($_REQUEST['lockdown_id'])); } } ?> <div class="postbox"> <h3><label for="title"><?php _e('Currently Locked Out IP Addresses and Ranges', 'aiowpsecurity'); ?> </label></h3> <div class="inside"> <?php //Fetch, prepare, sort, and filter our data... $locked_ip_list->prepare_items(); //echo "put table of locked entries here"; ?> <form id="tables-filter" method="get" onSubmit="return confirm('Are you sure you want to perform this bulk operation on the selected entries?');"> <!-- For plugins, we also need to ensure that the form posts back to our current page --> <input type="hidden" name="page" value="<?php echo $_REQUEST['page']; ?> " /> <?php if (isset($_REQUEST["tab"])) { echo '<input type="hidden" name="tab" value="' . $_REQUEST["tab"] . '" />'; } ?> <!-- Now we can render the completed list table --> <?php $locked_ip_list->display(); ?> </form> </div></div> <?php }
function render_tab3() { global $wpdb; include_once 'wp-security-list-locked-ip.php'; //For rendering the AIOWPSecurity_List_Table in tab1 $locked_ip_list = new AIOWPSecurity_List_Locked_IP(); //For rendering the AIOWPSecurity_List_Table in tab1 if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'delete_blocked_ip') { //Delete link was clicked for a row in list table $locked_ip_list->delete_lockdown_records(strip_tags($_REQUEST['lockdown_id'])); } if ($_REQUEST['action'] == 'unlock_ip') { //Unlock link was clicked for a row in list table $locked_ip_list->unlock_ip_range(strip_tags($_REQUEST['lockdown_id'])); } } ?> <div class="aio_blue_box"> <?php $login_lockdown_feature_url = '<a href="admin.php?page=' . AIOWPSEC_USER_LOGIN_MENU_SLUG . '&tab=tab1" target="_blank">Login Lockdown</a>'; echo '<p>' . __('This tab displays the list of all IP addresses which are currently temporarily locked out due to the Login Lockdown feature:', 'all-in-one-wp-security-and-firewall') . '</p>' . '<p>' . $login_lockdown_feature_url . '</p>'; ?> </div> <div class="postbox"> <h3 class="hndle"><label for="title"><?php _e('Currently Locked Out IP Addresses and Ranges', 'all-in-one-wp-security-and-firewall'); ?> </label> </h3> <div class="inside"> <?php //Fetch, prepare, sort, and filter our data... $locked_ip_list->prepare_items(); //echo "put table of locked entries here"; ?> <form id="tables-filter" method="get" onSubmit="return confirm('Are you sure you want to perform this bulk operation on the selected entries?');"> <!-- For plugins, we also need to ensure that the form posts back to our current page --> <input type="hidden" name="page" value="<?php echo esc_attr($_REQUEST['page']); ?> "/> <?php if (isset($_REQUEST["tab"])) { echo '<input type="hidden" name="tab" value="' . $_REQUEST["tab"] . '" />'; } ?> <!-- Now we can render the completed list table --> <?php $locked_ip_list->display(); ?> </form> </div> </div> <?php }