当前位置: 首页>>代码示例>>PHP>>正文


PHP AIOWPSecurity_Utility::get_locked_ips方法代码示例

本文整理汇总了PHP中AIOWPSecurity_Utility::get_locked_ips方法的典型用法代码示例。如果您正苦于以下问题:PHP AIOWPSecurity_Utility::get_locked_ips方法的具体用法?PHP AIOWPSecurity_Utility::get_locked_ips怎么用?PHP AIOWPSecurity_Utility::get_locked_ips使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AIOWPSecurity_Utility的用法示例。


在下文中一共展示了AIOWPSecurity_Utility::get_locked_ips方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render_tab1


//.........这里部分代码省略.........
            if ($aio_wp_security->configs->get_value('aiowps_fcds_change_detected')) {
                echo '<div class="aio_red_box aio_padding_10">File change detected!</div>';
                echo '<p>Please review the changes from the <a href="admin.php?page=' . AIOWPSEC_FILESCAN_MENU_SLUG . '">scanner menu</a></p>';
            } else {
                echo '<div class="aio_green_box aio_padding_10">No recent file changes detected.</div>';
            }
            echo '</div></div>';
            echo '</div>';
            //<!-- aiowps_dashboard_box -->
        }
        //End if statement for automated scan box
        ?>
        
        <div class="aiowps_dashboard_box_small">
        <div class="postbox">
        <h3><label for="title"><?php 
        _e('Logged In Users', 'aiowpsecurity');
        ?>
</label></h3>
        <div class="inside">        
        <?php 
        $users_online_link = '<a href="admin.php?page=' . AIOWPSEC_USER_LOGIN_MENU_SLUG . '&tab=tab5">Logged In Users</a>';
        if (AIOWPSecurity_Utility::is_multisite_install()) {
            $logged_in_users = get_site_transient('users_online');
            $num_users = count($logged_in_users);
            if ($num_users > 1) {
                echo '<div class="aio_red_box"><p>' . __('Number of users currently logged in site-wide is:', 'aiowpsecurity') . ' <strong>' . $num_users . '</strong></p>';
                $info_msg = '<p>' . sprintf(__('Go to the %s menu to see more details', 'aiowpsecurity'), $users_online_link) . '</p>';
                echo $info_msg . '</div>';
            } else {
                echo '<div class="aio_green_box"><p>' . __('There are no other site-wide users currently logged in.', 'aiowpsecurity') . '</p></div>';
            }
        } else {
            $logged_in_users = get_transient('users_online');
            if ($logged_in_users === false || $logged_in_users == NULL) {
                $num_users = 0;
            } else {
                $num_users = count($logged_in_users);
            }
            if ($num_users > 1) {
                echo '<div class="aio_red_box"><p>' . __('Number of users currently logged into your site (including you) is:', 'aiowpsecurity') . ' <strong>' . $num_users . '</strong></p>';
                $info_msg = '<p>' . sprintf(__('Go to the %s menu to see more details', 'aiowpsecurity'), $users_online_link) . '</p>';
                echo $info_msg . '</div>';
            } else {
                echo '<div class="aio_green_box"><p>' . __('There are no other users currently logged in.', 'aiowpsecurity') . '</p></div>';
            }
        }
        ?>
        </div></div>
        </div><!-- aiowps_dashboard_box -->

        <div class="aiowps_dashboard_box_small">
        <div class="postbox">
        <h3><label for="title"><?php 
        _e('Locked IP Addresses', 'aiowpsecurity');
        ?>
</label></h3>
        <div class="inside">        
        <?php 
        $locked_ips_link = '<a href="admin.php?page=' . AIOWPSEC_MAIN_MENU_SLUG . '&tab=tab3">Locked IP Addresses</a>';
        $locked_ips = AIOWPSecurity_Utility::get_locked_ips();
        if ($locked_ips === FALSE) {
            echo '<div class="aio_green_box"><p>' . __('There are no IP addresses currently locked out.', 'aiowpsecurity') . '</p></div>';
        } else {
            $num_ips = count($locked_ips);
            echo '<div class="aio_red_box"><p>' . __('Number of temporarily locked out IP addresses: ', 'aiowpsecurity') . ' <strong>' . $num_ips . '</strong></p>';
            $info_msg = '<p>' . sprintf(__('Go to the %s menu to see more details', 'aiowpsecurity'), $locked_ips_link) . '</p>';
            echo $info_msg . '</div>';
        }
        ?>
        </div></div>
        </div><!-- aiowps_dashboard_box -->        

        <div class="aio_clear_float"></div>
        
        </div>
<!-- Masonry stuff -->
<?php 
        //wp_enqueue_script('masonry');
        echo '<script type="text/javascript" src="' . AIO_WP_SECURITY_URL . '/js/masonry.pkgd.min.js?ver=' . AIO_WP_SECURITY_VERSION . '"></script>';
        ?>
<style>
.aiowps_dashboard_box_small { 
    width: 350px;
}
</style>
<script type="text/javascript">
window.onload = function(){
var container = document.querySelector('#aiowps_dashboard_widget_content');
var msnry = new Masonry( container, {
  // options
  columnWidth: 100,
  itemSelector: '.aiowps_dashboard_box_small'
});
}
</script>
<!-- End Masonry stuff -->
        
        <?php 
    }
开发者ID:pankajsinghjarial,项目名称:SYLC,代码行数:101,代码来源:wp-security-dashboard-menu.php


注:本文中的AIOWPSecurity_Utility::get_locked_ips方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。