siteguard-login-history-table.php
11 years ago
siteguard-menu-admin-filter.php
11 years ago
siteguard-menu-captcha.php
11 years ago
siteguard-menu-dashboard.php
11 years ago
siteguard-menu-disable-pingback.php
11 years ago
siteguard-menu-fail-once.php
11 years ago
siteguard-menu-init.php
11 years ago
siteguard-menu-login-lock.php
11 years ago
siteguard-menu-rename-login.php
11 years ago
siteguard-menu-same-error.php
11 years ago
siteguard-menu-waf-tuning-support.php
11 years ago
siteguard-waf-exclude-rule-table.php
11 years ago
siteguard-menu-dashboard.php
86 lines
| 1 | <?php |
| 2 | |
| 3 | require_once( 'siteguard-login-history-table.php' ); |
| 4 | |
| 5 | class SiteGuard_Menu_Dashboard extends SiteGuard_Base { |
| 6 | var $wp_list_table; |
| 7 | function __construct( ) { |
| 8 | $this->wp_list_table = new SiteGuard_LoginHistory_Table( ); |
| 9 | $this->wp_list_table->prepare_items( ); |
| 10 | $this->render_page( ); |
| 11 | } |
| 12 | function render_page( ) { |
| 13 | global $config, $login_history; |
| 14 | $img_path = SITEGUARD_URL_PATH . 'images/'; |
| 15 | $admin_filter_enable = $config->get( 'admin_filter_enable' ); |
| 16 | $renamelogin_enable = $config->get( 'renamelogin_enable' ); |
| 17 | $captcha_enable = $config->get( 'captcha_enable' ); |
| 18 | $same_error_enable = $config->get( 'same_login_error' ); |
| 19 | $loginlock_enable = $config->get( 'loginlock_enable' ); |
| 20 | $fail_once_enable = $config->get( 'loginlock_fail_once' ); |
| 21 | $disable_pingback_enable = $config->get( 'disable_pingback_enable' ); |
| 22 | $waf_exclude_rule_enable = $config->get( 'waf_exclude_rule_enable' ); |
| 23 | echo '<div class="wrap">'; |
| 24 | echo '<img src="' . $img_path . 'sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />'; |
| 25 | echo '<h2>' . esc_html__( 'Dashboard', 'siteguard' ) . "</h2>\n"; |
| 26 | echo '<div class="siteguard-description">' |
| 27 | . esc_html__( 'You can find docs, FAQ and more detailed information about SiteGuard WP Plugin on ', 'siteguard' ) |
| 28 | . '<a href="' . esc_html__('http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index_en.html', 'siteguard' ) . '" target="_blank">' . esc_html__('SiteGuard WP Plugin Page', 'siteguard') . '</a>' . esc_html__( '.', 'siteguard' ) . '</div>'; |
| 29 | echo '<h3>' . esc_html__( 'Setting status', 'siteguard' ) . "</h3>\n"; |
| 30 | ?> |
| 31 | <table class="siteguard-form-table"> |
| 32 | <tr> |
| 33 | <th scpoe="row"> |
| 34 | <img src=<?php echo '"' . $img_path . ( $admin_filter_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>> |
| 35 | <a href="?page=siteguard_admin_filter"><?php esc_html_e( 'Admin Page IP Filter', 'siteguard' ) ?></a></th> |
| 36 | <td><?php esc_html_e( 'The management directory (/wp-admin/) is protected against the connection source which does not login.', 'siteguard' ) ?></td> |
| 37 | </tr><tr> |
| 38 | <th scpoe="row"> |
| 39 | <img src=<?php echo '"' . $img_path . ( $renamelogin_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>> |
| 40 | <a href="?page=siteguard_rename_login"><?php esc_html_e( 'Rename Login', 'siteguard' ) ?></a></th> |
| 41 | <td><?php esc_html_e( 'The login page name is changed.', 'siteguard' ) ?></td> |
| 42 | </tr><tr> |
| 43 | <th scpoe="row"> |
| 44 | <img src=<?php echo '"' . $img_path . ( $captcha_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>> |
| 45 | <a href="?page=siteguard_captcha"><?php esc_html_e( 'CAPTCHA', 'siteguard' ) ?></a></th> |
| 46 | <td><?php esc_html_e( 'CAPTCHA is added to the login page or comment post.', 'siteguard' ) ?></td> |
| 47 | </tr><tr> |
| 48 | <th scpoe="row"> |
| 49 | <img src=<?php echo '"' . $img_path . ( $same_error_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>> |
| 50 | <a href="?page=siteguard_same_error"><?php esc_html_e( 'Same Login Error Message', 'siteguard' ) ?></a></th> |
| 51 | <td><?php esc_html_e( 'Instead of the detailed error message at the login error, the single message is returned.', 'siteguard' ) ?></td> |
| 52 | </tr><tr> |
| 53 | <th scope="row"> |
| 54 | <img src=<?php echo '"' . $img_path . ( $loginlock_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>> |
| 55 | <a href="?page=siteguard_login_lock"><?php esc_html_e( 'Login Lock', 'siteguard' ) ?></a></th> |
| 56 | <td><?php esc_html_e( 'The connection source which repeats login failure is being locked within a certain period.', 'siteguard' ) ?></td> |
| 57 | </tr><tr> |
| 58 | <th scope="row"> |
| 59 | <img src=<?php echo '"' . $img_path . ( $fail_once_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>> |
| 60 | <a href="?page=siteguard_fail_once"><?php esc_html_e( 'Fail once', 'siteguard' ) ?></a></th> |
| 61 | <td><?php esc_html_e( 'The first login must fail even if the input is correct.', 'siteguard' ) ?></td> |
| 62 | </tr><tr> |
| 63 | <th scpoe="row"> |
| 64 | <img src=<?php echo '"' . $img_path . ( $disable_pingback_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>> |
| 65 | <a href="?page=siteguard_disable_pingback"><?php esc_html_e( 'Disable Pingback', 'siteguard' ) ?></a></th> |
| 66 | <td><?php esc_html_e( 'The abuse of pingback is prevented.', 'siteguard' ) ?></td> |
| 67 | </tr><tr> |
| 68 | <th scpoe="row"> |
| 69 | <img src=<?php echo '"' . $img_path . ( $waf_exclude_rule_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>> |
| 70 | <a href="?page=siteguard_waf_tuning_support"><?php esc_html_e( 'WAF Tuning Support', 'siteguard' ) ?></a></th> |
| 71 | <td><?php esc_html_e( 'The exclude rule for WAF (SiteGuard Lite) is created.', 'siteguard' ) ?></td> |
| 72 | </tr> |
| 73 | </table> |
| 74 | <hr /> |
| 75 | <form name="form1" method="post" action=""> |
| 76 | <?php echo '<h3>' . esc_html__( 'Login history', 'siteguard' ) . "</h3>\n"; ?> |
| 77 | <?php $this->wp_list_table->display( ) ?> |
| 78 | <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ) ?>"> |
| 79 | </form> |
| 80 | </div> |
| 81 | <?php |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | ?> |
| 86 |