siteguard-login-history-table.php
3 years ago
siteguard-menu-admin-filter.php
3 years ago
siteguard-menu-author-query.php
3 years ago
siteguard-menu-captcha.php
3 years ago
siteguard-menu-dashboard.php
3 years ago
siteguard-menu-fail-once.php
3 years ago
siteguard-menu-init.php
3 years ago
siteguard-menu-login-alert.php
3 years ago
siteguard-menu-login-history.php
3 years ago
siteguard-menu-login-lock.php
3 years ago
siteguard-menu-protect-xmlrpc.php
3 years ago
siteguard-menu-rename-login.php
3 years ago
siteguard-menu-same-error.php
3 years ago
siteguard-menu-updates-notify.php
3 years ago
siteguard-menu-waf-tuning-support.php
3 years ago
siteguard-waf-exclude-rule-table.php
3 years ago
siteguard-menu-dashboard.php
103 lines
| 1 | <?php |
| 2 | |
| 3 | class SiteGuard_Menu_Dashboard extends SiteGuard_Base { |
| 4 | function __construct() { |
| 5 | $this->render_page(); |
| 6 | } |
| 7 | function render_page() { |
| 8 | global $siteguard_config, $siteguard_login_history; |
| 9 | $img_path = SITEGUARD_URL_PATH . 'images/'; |
| 10 | $admin_filter_enable = $siteguard_config->get( 'admin_filter_enable' ); |
| 11 | $renamelogin_enable = $siteguard_config->get( 'renamelogin_enable' ); |
| 12 | $captcha_enable = $siteguard_config->get( 'captcha_enable' ); |
| 13 | $same_error_enable = $siteguard_config->get( 'same_login_error' ); |
| 14 | $loginlock_enable = $siteguard_config->get( 'loginlock_enable' ); |
| 15 | $loginalert_enable = $siteguard_config->get( 'loginalert_enable' ); |
| 16 | $fail_once_enable = $siteguard_config->get( 'loginlock_fail_once' ); |
| 17 | $disable_xmlrpc_enable = $siteguard_config->get( 'disable_xmlrpc_enable' ); |
| 18 | $disable_pingback_enable = $siteguard_config->get( 'disable_pingback_enable' ); |
| 19 | $block_author_query_enable = $siteguard_config->get( 'block_author_query_enable' ); |
| 20 | $updates_notify_enable = $siteguard_config->get( 'updates_notify_enable' ); |
| 21 | $waf_exclude_rule_enable = $siteguard_config->get( 'waf_exclude_rule_enable' ); |
| 22 | echo '<div class="wrap">'; |
| 23 | echo '<img src="' . $img_path . 'sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />'; |
| 24 | echo '<h2>' . esc_html__( 'Dashboard', 'siteguard' ) . "</h2>\n"; |
| 25 | echo '<div class="siteguard-description">' |
| 26 | . esc_html__( 'You can find docs, FAQ and more detailed information about SiteGuard WP Plugin on ', 'siteguard' ) |
| 27 | . '<a href="' . esc_url( __( 'https://www.jp-secure.com/siteguard_wp_plugin_en/', 'siteguard' ) ) . '" target="_blank">' . esc_html__( 'SiteGuard WP Plugin Page', 'siteguard' ) . '</a>' . esc_html__( '.', 'siteguard' ) . '</div>'; |
| 28 | echo '<h3>' . esc_html__( 'Setting status', 'siteguard' ) . "</h3>\n"; |
| 29 | $error = siteguard_check_multisite(); |
| 30 | if ( is_wp_error( $error ) ) { |
| 31 | echo '<p class="description">'; |
| 32 | echo esc_html( $error->get_error_message() ); |
| 33 | echo '</p>'; |
| 34 | } |
| 35 | ?> |
| 36 | <table class="siteguard-form-table"> |
| 37 | <tr> |
| 38 | <th scope="row"> |
| 39 | <img src=<?php echo '"' . $img_path . ( '1' == $admin_filter_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 40 | <a href="?page=siteguard_admin_filter"><?php esc_html_e( 'Admin Page IP Filter', 'siteguard' ); ?></a></th> |
| 41 | <td><?php esc_html_e( 'The management directory (/wp-admin/) is protected against the connection source which does not login.', 'siteguard' ); ?></td> |
| 42 | </tr><tr> |
| 43 | <th scope="row"> |
| 44 | <img src=<?php echo '"' . $img_path . ( '1' == $renamelogin_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 45 | <a href="?page=siteguard_rename_login"><?php esc_html_e( 'Rename Login', 'siteguard' ); ?></a></th> |
| 46 | <td><?php esc_html_e( 'The login page name is changed.', 'siteguard' ); ?></td> |
| 47 | </tr><tr> |
| 48 | <th scope="row"> |
| 49 | <img src=<?php echo '"' . $img_path . ( '1' == $captcha_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 50 | <a href="?page=siteguard_captcha"><?php esc_html_e( 'CAPTCHA', 'siteguard' ); ?></a></th> |
| 51 | <td><?php esc_html_e( 'CAPTCHA is added to the login page or comment post.', 'siteguard' ); ?></td> |
| 52 | </tr><tr> |
| 53 | <th scope="row"> |
| 54 | <img src=<?php echo '"' . $img_path . ( '1' == $same_error_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 55 | <a href="?page=siteguard_same_error"><?php esc_html_e( 'Same Login Error Message', 'siteguard' ); ?></a></th> |
| 56 | <td><?php esc_html_e( 'Instead of the detailed error message at the login error, the single message is returned.', 'siteguard' ); ?></td> |
| 57 | </tr><tr> |
| 58 | <th scope="row"> |
| 59 | <img src=<?php echo '"' . $img_path . ( '1' == $loginlock_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 60 | <a href="?page=siteguard_login_lock"><?php esc_html_e( 'Login Lock', 'siteguard' ); ?></a></th> |
| 61 | <td><?php esc_html_e( 'The connection source which repeats login failure is being locked within a certain period.', 'siteguard' ); ?></td> |
| 62 | </tr><tr> |
| 63 | <th scope="row"> |
| 64 | <img src=<?php echo '"' . $img_path . ( '1' == $loginalert_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 65 | <a href="?page=siteguard_login_alert"><?php esc_html_e( 'Login Alert', 'siteguard' ); ?></a></th> |
| 66 | <td><?php esc_html_e( 'E-mail notifies that there was login.', 'siteguard' ); ?></td> |
| 67 | </tr><tr> |
| 68 | <th scope="row"> |
| 69 | <img src=<?php echo '"' . $img_path . ( '1' == $fail_once_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 70 | <a href="?page=siteguard_fail_once"><?php esc_html_e( 'Fail once', 'siteguard' ); ?></a></th> |
| 71 | <td><?php esc_html_e( 'The first login must fail even if the input is correct.', 'siteguard' ); ?></td> |
| 72 | </tr><tr> |
| 73 | <th scope="row"> |
| 74 | <img src=<?php echo '"' . $img_path . ( '1' == $disable_pingback_enable || '1' == $disable_xmlrpc_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 75 | <a href="?page=siteguard_protect_xmlrpc"><?php esc_html_e( 'Protect XMLRPC', 'siteguard' ); ?></a></th> |
| 76 | <td><?php esc_html_e( 'The abuse of XMLRPC is prevented.', 'siteguard' ); ?></td> |
| 77 | </tr><tr> |
| 78 | <th scope="row"> |
| 79 | <img src=<?php echo '"' . $img_path . ( '1' == $block_author_query_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 80 | <a href="?page=siteguard_author_query"><?php esc_html_e( 'Block Author Query', 'siteguard' ); ?></a></th> |
| 81 | <td><?php esc_html_e( 'Block author query.', 'siteguard' ); ?></td> |
| 82 | </tr><tr> |
| 83 | <th scope="row"> |
| 84 | <img src=<?php echo '"' . $img_path . ( '1' == $updates_notify_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 85 | <a href="?page=siteguard_updates_notify"><?php esc_html_e( 'Updates Notify', 'siteguard' ); ?></a></th> |
| 86 | <td><?php esc_html_e( 'If WordPress core, plugins, and themes updates are needed , sends email to notify administrators.', 'siteguard' ); ?></td> |
| 87 | </tr><tr> |
| 88 | <th scope="row"> |
| 89 | <img src=<?php echo '"' . $img_path . ( '1' == $waf_exclude_rule_enable ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ); ?>> |
| 90 | <a href="?page=siteguard_waf_tuning_support"><?php esc_html_e( 'WAF Tuning Support', 'siteguard' ); ?></a></th> |
| 91 | <td><?php esc_html_e( 'The exclude rule for WAF (SiteGuard Lite) is created.', 'siteguard' ); ?></td> |
| 92 | </tr><tr> |
| 93 | <th scope="row"> |
| 94 | <a href="?page=siteguard_login_history"><?php echo esc_html__( 'Login history', 'siteguard' ); ?></a> |
| 95 | <td><?php esc_html_e( 'Login history can be referenced.', 'siteguard' ); ?></td> |
| 96 | </tr> |
| 97 | </table> |
| 98 | <hr /> |
| 99 | </div> |
| 100 | <?php |
| 101 | } |
| 102 | } |
| 103 |