Anti-spam - Version 7.3.1

Version Description

Download this release

Release Info

Developer alexkovalevv
Plugin Icon 128x128 Anti-spam
Version 7.3.1
Comparing to
See all releases

Code changes from version 7.3.0 to 7.3.1

Files changed (80) hide show
  1. admin/ajax/index.php +1 -1
  2. admin/ajax/install-addons.php +119 -119
  3. admin/ajax/logs.php +24 -24
  4. admin/ajax/notice.php +18 -18
  5. admin/assets/css/2fa.css +253 -253
  6. admin/assets/css/about-premium.css +69 -69
  7. admin/assets/css/about-premium.css.map +1 -0
  8. admin/assets/css/about-premium.less +89 -89
  9. admin/assets/css/backup.css +134 -134
  10. admin/assets/css/components.css +139 -139
  11. admin/assets/css/components.css.map +1 -0
  12. admin/assets/css/components.less +152 -152
  13. admin/assets/css/dashboard-dashboard.css +307 -307
  14. admin/assets/css/firewall/firewall-attacks-log.css +67 -67
  15. admin/assets/css/firewall/firewall-attacks-log.css.map +1 -0
  16. admin/assets/css/firewall/firewall-attacks-log.less +85 -85
  17. admin/assets/css/firewall/firewall-dashboard.css +82 -82
  18. admin/assets/css/firewall/firewall-dashboard.css.map +1 -0
  19. admin/assets/css/firewall/firewall-dashboard.less +91 -91
  20. admin/assets/css/firewall/firewall-ips-blocking.css +97 -97
  21. admin/assets/css/firewall/firewall-ips-blocking.css.map +1 -0
  22. admin/assets/css/firewall/firewall-ips-blocking.less +121 -121
  23. admin/assets/css/firewall/firewall-settings.css +204 -204
  24. admin/assets/css/firewall/firewall-settings.css.map +1 -0
  25. admin/assets/css/firewall/firewall-settings.less +211 -211
  26. admin/assets/css/install-addons.css +43 -43
  27. admin/assets/css/libs/jquery.datetimepicker.min.css +1 -1
  28. admin/assets/css/libs/sweetalert2.css +1105 -1105
  29. admin/assets/css/quick-dashboard.css +327 -327
  30. admin/assets/css/setup/page-setup.css +164 -164
  31. admin/assets/css/setup/page-setup.css.map +1 -0
  32. admin/assets/css/setup/page-setup.less +197 -197
  33. admin/assets/css/sweetalert-custom.css +152 -152
  34. admin/assets/css/sweetalert-custom.css.map +1 -0
  35. admin/assets/css/sweetalert-custom.less +170 -170
  36. admin/assets/css/titan-security.css +263 -263
  37. admin/assets/js/dashboard.js +237 -237
  38. admin/assets/js/firewall/firewall-block-ip.js +126 -126
  39. admin/assets/js/firewall/firewall-dashboard.js +288 -288
  40. admin/assets/js/firewall/firewall-settings.js +20 -20
  41. admin/assets/js/import.js +225 -225
  42. admin/assets/js/install-addons.js +361 -361
  43. admin/assets/js/libs/circular-progress.js +139 -139
  44. admin/assets/js/libs/popover.min.js +1 -1
  45. admin/assets/js/libs/sweetalert3.min.js +2 -2
  46. admin/assets/js/settings.js +31 -31
  47. admin/assets/js/titan-security.js +21 -29
  48. admin/assets/js/trial-popup.js +50 -50
  49. admin/boot.php +198 -198
  50. admin/class-activation.php +71 -71
  51. admin/class-page-titan-basic.php +124 -124
  52. admin/includes/classes/class.delete-plugins-button.php +47 -47
  53. admin/includes/classes/class.install-plugins-button.php +353 -353
  54. admin/pages/class-page-backup.php +82 -82
  55. admin/pages/class-page-two-factor.php +102 -102
  56. admin/pages/class-pages-antispam.php +271 -271
  57. admin/pages/class-pages-check.php +381 -381
  58. admin/pages/class-pages-components-license.php +192 -192
  59. admin/pages/class-pages-components.php +238 -238
  60. admin/pages/class-pages-dashboard.php +407 -407
  61. admin/pages/class-pages-license.php +395 -395
  62. admin/pages/class-pages-logs.php +137 -137
  63. admin/pages/class-pages-plugin-settings.php +587 -521
  64. admin/pages/class-pages-scanner.php +110 -110
  65. admin/pages/class-pages-sitechecker.php +125 -125
  66. admin/pages/class-pages-tweaks.php +291 -291
  67. admin/pages/firewall/class-pages-bruteforce.php +299 -299
  68. admin/pages/firewall/class-pages-firewall-attacks-log.php +135 -135
  69. admin/pages/firewall/class-pages-firewall-blocking.php +153 -153
  70. admin/pages/firewall/class-pages-firewall-login-attempts.php +161 -161
  71. admin/pages/firewall/class-pages-firewall-settings.php +746 -746
  72. admin/pages/firewall/class-pages-firewall.php +104 -104
  73. admin/pages/setup/class-pages-setup.php +72 -72
  74. admin/pages/setup/steps/class-step-congratulation.php +192 -192
  75. admin/pages/setup/steps/class-step-default.php +38 -38
  76. admin/pages/setup/steps/class-step-plugins.php +49 -49
  77. admin/pages/setup/steps/class-step-security-audit.php +93 -93
  78. admin/pages/setup/steps/class-step-setting-antispam.php +50 -50
  79. admin/pages/setup/steps/class-step-setting-scan-malware.php +112 -112
  80. admin/pages/setup/steps/class-step-setting-tweaks.php +35 -137
admin/ajax/index.php CHANGED
@@ -1,2 +1,2 @@
1
- <?php
2
  // Silence is golden.
1
+ <?php
2
  // Silence is golden.
admin/ajax/install-addons.php CHANGED
@@ -1,120 +1,120 @@
1
- <?php
2
- /**
3
- * Ajax plugin configuration
4
- *
5
- * @author Webcraftic <wordpress.webraftic@gmail.com>
6
- * @copyright (c) 2017 Webraftic Ltd
7
- * @version 1.0
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( ! defined( 'ABSPATH' ) ) {
12
- exit;
13
- }
14
-
15
- /**
16
- * This action allows you to process Ajax requests to activate external components Clearfy
17
- */
18
- function wtitan_update_component() {
19
- check_ajax_referer( 'updates' );
20
-
21
- $slug = WBCR\Titan\Plugin::app()->request->post( 'plugin', null, true );
22
- $action = WBCR\Titan\Plugin::app()->request->post( 'plugin_action', null, true );
23
- $storage = WBCR\Titan\Plugin::app()->request->post( 'storage', null, true );
24
-
25
- if ( ! WBCR\Titan\Plugin::app()->currentUserCan() ) {
26
- wp_die( __( 'You don\'t have enough capability to edit this information.', 'clearfy' ), __( 'Something went wrong.' ), 403 );
27
- }
28
-
29
- if ( empty( $slug ) || empty( $action ) ) {
30
- wp_send_json_error( [ 'error_message' => __( 'Required attributes are not passed or empty.', 'clearfy' ) ] );
31
- }
32
- $success = false;
33
- $send_data = [];
34
-
35
- if ( $storage == 'internal' ) {
36
- if ( $action == 'activate' ) {
37
- if ( WBCR\Titan\Plugin::app()->activateComponent( $slug ) ) {
38
- $success = true;
39
- }
40
- } else if ( $action == 'deactivate' ) {
41
-
42
- if ( WBCR\Titan\Plugin::app()->deactivateComponent( $slug ) ) {
43
- $success = true;
44
- }
45
- } else {
46
- wp_send_json_error( [ 'error_message' => __( 'You are trying to perform an invalid action.', 'clearfy' ) ] );
47
- }
48
- } else if ( $storage == 'wordpress' ) {
49
- if ( ! empty( $slug ) ) {
50
- $network_wide = WBCR\Titan\Plugin::app()->isNetworkActive();
51
-
52
- if ( $action == 'activate' ) {
53
- $result = activate_plugin( $slug, '', $network_wide );
54
-
55
- if ( is_wp_error( $result ) ) {
56
- wp_send_json_error( [ 'error_message' => $result->get_error_message() ] );
57
- }
58
- } else if ( $action == 'deactivate' ) {
59
- deactivate_plugins( $slug, false, $network_wide );
60
- }
61
-
62
- $success = true;
63
- }
64
- }
65
-
66
- if ( $action == 'install' || $action == 'deactivate' ) {
67
- try {
68
- // Delete button
69
- $delete_button = WBCR\Titan\Plugin::app()->getDeleteComponentsButton( $storage, $slug );
70
- $send_data['delete_button'] = $delete_button->getButton();
71
- } catch ( Exception $e ) {
72
- wp_send_json_error( [ 'error_message' => $e->getMessage() ] );
73
- }
74
- }
75
-
76
- // Если требуется обновить постоянные ссылки, даем сигнал, что пользователю, нужно показать
77
- // всплывающее уведомление.
78
- // todo: сделать более красивое решение с передачей текстовых сообщений
79
- /*if ( $action == 'deactivate' ) {
80
- $is_need_rewrite_rules = WBCR\Titan\Plugin::app()->getPopulateOption( 'need_rewrite_rules' );
81
- if ( $is_need_rewrite_rules ) {
82
- $send_data['need_rewrite_rules'] = sprintf( '<span class="wbcr-clr-need-rewrite-rules-message">' . __( 'When you deactivate some components, permanent links may work incorrectly. If this happens, please, <a href="%s">update the permalinks</a>, so you could complete the deactivation.', 'clearfy' ), admin_url( 'options-permalink.php' ) . '</span>' );
83
- }
84
- }*/
85
-
86
- if ( $success ) {
87
- do_action( 'wtitan_update_component', $slug, $action, $storage );
88
-
89
- wp_send_json_success( $send_data );
90
- }
91
-
92
- wp_send_json_error( [ 'error_message' => __( 'An unknown error occurred during the activation of the component.', 'clearfy' ) ] );
93
- }
94
-
95
- add_action( 'wp_ajax_wtitan-update-component', 'wtitan_update_component' );
96
-
97
- /**
98
- * Ajax event that calls the wbcr/clearfy/activated_component action,
99
- * to get the component to work. Usually this is a call to the installation functions,
100
- * but in some cases, overwriting permanent references or compatibility checks.
101
- */
102
- function wtitan_prepare_component() {
103
- check_ajax_referer( 'updates' );
104
-
105
- $component_name = WBCR\Titan\Plugin::app()->request->post( 'plugin', null, true );
106
-
107
- if ( ! WBCR\Titan\Plugin::app()->currentUserCan() ) {
108
- wp_send_json_error( [ 'error_message' => __( 'You don\'t have enough capability to edit this information.', 'clearfy' ) ], 403 );
109
- }
110
-
111
- if ( empty( $component_name ) ) {
112
- wp_send_json_error( [ 'error_message' => __( 'Required attribute [component_name] is empty.', 'clearfy' ) ] );
113
- }
114
-
115
- do_action( 'wbcr/clearfy/activated_component', $component_name );
116
-
117
- wp_send_json_success();
118
- }
119
-
120
  add_action( 'wp_ajax_wtitan-prepare-component', 'wtitan_prepare_component' );
1
+ <?php
2
+ /**
3
+ * Ajax plugin configuration
4
+ *
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
+ /**
16
+ * This action allows you to process Ajax requests to activate external components Clearfy
17
+ */
18
+ function wtitan_update_component() {
19
+ check_ajax_referer( 'updates' );
20
+
21
+ $slug = WBCR\Titan\Plugin::app()->request->post( 'plugin', null, true );
22
+ $action = WBCR\Titan\Plugin::app()->request->post( 'plugin_action', null, true );
23
+ $storage = WBCR\Titan\Plugin::app()->request->post( 'storage', null, true );
24
+
25
+ if ( ! WBCR\Titan\Plugin::app()->currentUserCan() ) {
26
+ wp_die( __( 'You don\'t have enough capability to edit this information.', 'clearfy' ), __( 'Something went wrong.' ), 403 );
27
+ }
28
+
29
+ if ( empty( $slug ) || empty( $action ) ) {
30
+ wp_send_json_error( [ 'error_message' => __( 'Required attributes are not passed or empty.', 'clearfy' ) ] );
31
+ }
32
+ $success = false;
33
+ $send_data = [];
34
+
35
+ if ( $storage == 'internal' ) {
36
+ if ( $action == 'activate' ) {
37
+ if ( WBCR\Titan\Plugin::app()->activateComponent( $slug ) ) {
38
+ $success = true;
39
+ }
40
+ } else if ( $action == 'deactivate' ) {
41
+
42
+ if ( WBCR\Titan\Plugin::app()->deactivateComponent( $slug ) ) {
43
+ $success = true;
44
+ }
45
+ } else {
46
+ wp_send_json_error( [ 'error_message' => __( 'You are trying to perform an invalid action.', 'clearfy' ) ] );
47
+ }
48
+ } else if ( $storage == 'wordpress' ) {
49
+ if ( ! empty( $slug ) ) {
50
+ $network_wide = WBCR\Titan\Plugin::app()->isNetworkActive();
51
+
52
+ if ( $action == 'activate' ) {
53
+ $result = activate_plugin( $slug, '', $network_wide );
54
+
55
+ if ( is_wp_error( $result ) ) {
56
+ wp_send_json_error( [ 'error_message' => $result->get_error_message() ] );
57
+ }
58
+ } else if ( $action == 'deactivate' ) {
59
+ deactivate_plugins( $slug, false, $network_wide );
60
+ }
61
+
62
+ $success = true;
63
+ }
64
+ }
65
+
66
+ if ( $action == 'install' || $action == 'deactivate' ) {
67
+ try {
68
+ // Delete button
69
+ $delete_button = WBCR\Titan\Plugin::app()->getDeleteComponentsButton( $storage, $slug );
70
+ $send_data['delete_button'] = $delete_button->getButton();
71
+ } catch ( Exception $e ) {
72
+ wp_send_json_error( [ 'error_message' => $e->getMessage() ] );
73
+ }
74
+ }
75
+
76
+ // Если требуется обновить постоянные ссылки, даем сигнал, что пользователю, нужно показать
77
+ // всплывающее уведомление.
78
+ // todo: сделать более красивое решение с передачей текстовых сообщений
79
+ /*if ( $action == 'deactivate' ) {
80
+ $is_need_rewrite_rules = WBCR\Titan\Plugin::app()->getPopulateOption( 'need_rewrite_rules' );
81
+ if ( $is_need_rewrite_rules ) {
82
+ $send_data['need_rewrite_rules'] = sprintf( '<span class="wbcr-clr-need-rewrite-rules-message">' . __( 'When you deactivate some components, permanent links may work incorrectly. If this happens, please, <a href="%s">update the permalinks</a>, so you could complete the deactivation.', 'clearfy' ), admin_url( 'options-permalink.php' ) . '</span>' );
83
+ }
84
+ }*/
85
+
86
+ if ( $success ) {
87
+ do_action( 'wtitan_update_component', $slug, $action, $storage );
88
+
89
+ wp_send_json_success( $send_data );
90
+ }
91
+
92
+ wp_send_json_error( [ 'error_message' => __( 'An unknown error occurred during the activation of the component.', 'clearfy' ) ] );
93
+ }
94
+
95
+ add_action( 'wp_ajax_wtitan-update-component', 'wtitan_update_component' );
96
+
97
+ /**
98
+ * Ajax event that calls the wbcr/clearfy/activated_component action,
99
+ * to get the component to work. Usually this is a call to the installation functions,
100
+ * but in some cases, overwriting permanent references or compatibility checks.
101
+ */
102
+ function wtitan_prepare_component() {
103
+ check_ajax_referer( 'updates' );
104
+
105
+ $component_name = WBCR\Titan\Plugin::app()->request->post( 'plugin', null, true );
106
+
107
+ if ( ! WBCR\Titan\Plugin::app()->currentUserCan() ) {
108
+ wp_send_json_error( [ 'error_message' => __( 'You don\'t have enough capability to edit this information.', 'clearfy' ) ], 403 );
109
+ }
110
+
111
+ if ( empty( $component_name ) ) {
112
+ wp_send_json_error( [ 'error_message' => __( 'Required attribute [component_name] is empty.', 'clearfy' ) ] );
113
+ }
114
+
115
+ do_action( 'wbcr/clearfy/activated_component', $component_name );
116
+
117
+ wp_send_json_success();
118
+ }
119
+
120
  add_action( 'wp_ajax_wtitan-prepare-component', 'wtitan_prepare_component' );
admin/ajax/logs.php CHANGED
@@ -1,25 +1,25 @@
1
- <?php
2
-
3
- /**
4
- * Used to clean-up logs.
5
- */
6
- add_action( 'wp_ajax_wtitan-logger-logs-cleanup', function ()
7
- {
8
- check_admin_referer( 'wlogger_clean_logs', 'nonce' );
9
-
10
- if ( ! current_user_can( 'manage_options' ) ) {
11
- wp_die( - 1 );
12
- }
13
-
14
- if ( ! \WBCR\Titan\Logger\Writter::clean_up() ) {
15
- wp_send_json_error( [
16
- 'message' => esc_html__( 'Failed to clean-up logs. Please try again later.', 'robin-image-optimizer' ),
17
- 'type' => 'danger',
18
- ] );
19
- }
20
-
21
- wp_send_json( [
22
- 'message' => esc_html__( 'Logs clean-up successfully', 'robin-image-optimizer' ),
23
- 'type' => 'success',
24
- ] );
25
  } );
1
+ <?php
2
+
3
+ /**
4
+ * Used to clean-up logs.
5
+ */
6
+ add_action( 'wp_ajax_wtitan-logger-logs-cleanup', function ()
7
+ {
8
+ check_admin_referer( 'wlogger_clean_logs', 'nonce' );
9
+
10
+ if ( ! current_user_can( 'manage_options' ) ) {
11
+ wp_die( - 1 );
12
+ }
13
+
14
+ if ( ! \WBCR\Titan\Logger\Writter::clean_up() ) {
15
+ wp_send_json_error( [
16
+ 'message' => esc_html__( 'Failed to clean-up logs. Please try again later.', 'robin-image-optimizer' ),
17
+ 'type' => 'danger',
18
+ ] );
19
+ }
20
+
21
+ wp_send_json( [
22
+ 'message' => esc_html__( 'Logs clean-up successfully', 'robin-image-optimizer' ),
23
+ 'type' => 'success',
24
+ ] );
25
  } );
admin/ajax/notice.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
-
3
- /**
4
- * Used to hide notice.
5
- */
6
- add_action( 'wp_ajax_wtitan_hide_trial_notice', function ()
7
- {
8
- check_ajax_referer( 'wtitan_hide_trial_notice' );
9
-
10
- if ( ! current_user_can( 'manage_options' ) ) {
11
- wp_die( - 1 );
12
- }
13
-
14
- WBCR\Titan\Plugin::app()->updateOption( 'trial_notice_dismissed', true );
15
-
16
- wp_send_json_success( [
17
- 'message' => esc_html__( 'Logs clean-up successfully', 'titan-security' ),
18
- ] );
19
  } );
1
+ <?php
2
+
3
+ /**
4
+ * Used to hide notice.
5
+ */
6
+ add_action( 'wp_ajax_wtitan_hide_trial_notice', function ()
7
+ {
8
+ check_ajax_referer( 'wtitan_hide_trial_notice' );
9
+
10
+ if ( ! current_user_can( 'manage_options' ) ) {
11
+ wp_die( - 1 );
12
+ }
13
+
14
+ WBCR\Titan\Plugin::app()->updateOption( 'trial_notice_dismissed', true );
15
+
16
+ wp_send_json_success( [
17
+ 'message' => esc_html__( 'Logs clean-up successfully', 'titan-security' ),
18
+ ] );
19
  } );
admin/assets/css/2fa.css CHANGED
@@ -1,253 +1,253 @@
1
- .wtfa-content ._2fa-method {
2
- padding: 5px 5px 5px 20px;
3
- width: 100%;
4
- }
5
-
6
- /*.wt-row {*/
7
- /* width: 100%;*/
8
- /* display: inline-block;*/
9
- /* margin: 0 15px;*/
10
- /* padding-right: 30px;*/
11
- /*}*/
12
-
13
- .wt-block-gutter {
14
- min-height: auto !important;
15
- }
16
-
17
- .wt-dashboard-block > .row {
18
- padding-bottom: 10px !important;
19
- }
20
-
21
- .tfa-restore-codes .col-md-10 {
22
- text-align: left;
23
- }
24
-
25
- .tfa-restore-codes .col-md-10 button {
26
- display: inline-block;
27
- }
28
-
29
- .button.remove-2fa, .button.remove-2fa:hover {
30
- border-color: #ea001f;
31
- color: #ea001f;
32
- }
33
-
34
- .button.remove-2fa:focus {
35
- border-color: #bf001a;
36
- color: #ea001f;
37
- outline-color: transparent;
38
- }
39
-
40
- .tfa-ip-whitelist {
41
- /*padding-bottom: 10px;*/
42
- }
43
-
44
- .wt-block-gutter.important-block {
45
- border-color: #7e25d9;
46
- }
47
-
48
- .store-link {
49
- width: 125px;
50
- height: 55px;
51
- display: inline-block;
52
- }
53
-
54
- .store-link.wt-get-it-on-google-play {
55
- background-size: 130px;
56
- background-repeat: no-repeat;
57
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoYAAAD6CAYAAAA89YbqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAANhJJREFUeNrsnQucFNWZt98xKHIxghKUL7iA65U1goFdXDUq+/lLolkjBCNqgkh0veTLt15Wk5glQRY3qysqaBTvgCYSkygaN2ZVbprV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tZm3/bziL0HU/6r9NHVg+fLlGcvhD3/4Q+cCAIAYltLO7NXHen37X+ytbT3jHftO69p1aUIKY/svLdZmVS3b7aMuB9ig6//BBl52lr1z85P28bw/swPLWAqPPvrodrdrTtqSJUtsxowZnxI9/c+oUaPslltusSOOOMIOPfRQ5/ZDDjnELrrookBiqOe/9957A2+nd97d448/7kQoUzF69Gg7+eSTE9dfffXVDufshTGXr9Db1JEU7tq1y15++WWbMmXKp0RPc/wuvfRS+973vudIncRQKMr44osv2nnnnZeRHOr/r776avvlL3+ZsVQCACCGBeTIS75nqyt6OiLY0DDW+X3QwUsTUmie382xmK1q3mJdD+1ix8+60lre22zv/r9Z1rimhh1ZRjz55JNOpNDLxo0b7fzzz++wk1fCgZIGdPnRj35kN998sxMxlIhIOILiTd7IhHQJGhJcr4Tpcdm+TilskyRccufS0NBgtbW1TvJJR0kduv2nP/2pPfDAA3bPPffYmDFjHKkXGlpesGCBs81+SSlbtmxxphK4gjp79mwbMmQIHyoAiBTmGIZp2V84zZpi+69IDneNtT17hn9KCmP6sf96k7XY282bbOPgrjbi9Yl2wvRxzD8sExT1O+OMMxJDwpKKVatW2Re+8IXAkR8Jxg033OBIoWQS8tt+EjEN67vtt3TpUmeuYJBMX4mfMs8V+a2vr0/cLtHUCYMfra2t7eRxwIABzokCAABiWCLUHdg9IYXu7931Y21v0/CUUuj9XRdrtMV71lvLhcfb31dOsYE3n8sOLXEeffTRdkkDGt4dMWJERuVLhCKHSGHh20+RQslipu13//33O9HDpqamxG2nn366b2khDSErYunOQdWUgptuuimrRBQAAMSwAPQceno7KXR/N+4ca82Sww6k0Blq3v/YjW077K0Da6z7TWfZl1bcbod9+W/YsSVIcs09SeG4ceMylgoonvZTjcBs20+JI4o4uihqeNddd/n+n6LFSlDy/h/JRwCAGJYIdW2flsKEHNbF5bBxWFopTMw/rGizNa0f29uH7bC/fupKG7bgB3bI3w1iB5cQKn7sLWlSXV0dajIGlF77KdrnjRqOHDnS/zslLqLf/e532wmp5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lJ+8803v+2db+jKIXMOAQAAIB9o6HjixImfksLFixefWKrvqSIWi5Vsg4wbN27syJEj53Tr1q3Ce3tlZaU98cQTtnXrVo5aAAAACBVFCeMO8qmRSo1mKnD15JNPPo0YFlAOTz311J8fdthhXZLve+2115zLihUrOIoBAAAgJ5RgouLV3nWQXdxIYamsiVy2YijGjh07YMiQIcsHDRrUK9X9tbW1jhxWVVU5F6FoIhFFAAAASEaRwB49eiT+VoRQMugdMvaiRJMNGzaMKnUpLBsxdLn66qsfHTFixHeSh5YBAAAAwkZDx0uWLLm5FLOPO4UYCkUP+/XrN/vYY489PdXwMgAAAECuQvjOO+/MVgm9cntvZSeGXq644or/6Nu37zf79+8/AEkEAACAbNEcwk2bNq2sqam5vZSTSzq1GHpRJLFbt26ju3btelL89zEc4gAAAJCO+vr6P7a2ttY0NjbOLYf5g4ghAAAAAATmAHYBAAAAACCGAAAAAIAYAgAAAABiCAAAAACIIQAAAAAghgAAAACAGAIAAAAAYggAAAAAiCEAAAAAIIYAAAAAgBgCAAAAAGIIAAAAAIghAAAAACCGAAAAAIAYAgAAAABiCAAAAACIIQAAAAAghgAAAACAGAIAAAAAYggAAAAAiCEAAAAAIIYAAAAAgBgCAAAAAGIIAAAAAIghAAAAACCGAAAAAIAYAgAAAABiCAAAAACIIQAAAAAghgAAAACAGAIAAAAAYggAAAAAiCEAAAAAIIYAAAAAgBgCAAAAAGIIAAAAAIghAAAAACCGAAAAAIAYAgAAAABiCAAAAABlwv8KMADLbPZ1PyQJdgAAAABJRU5ErkJggg==);
58
- }
59
-
60
- .store-link.wt-download-on-appstore {
61
- background-size: 103px;
62
- background-position-y: 8px;
63
- background-repeat: no-repeat;
64
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfIAAACnCAMAAADdey4SAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAB+UExURUdwTLG0tbK0tbGztrS0tLGztrGzta+vr7K0trKztbOzt6+3t7KytbKztQAAAP///7K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25DLl8d7Y7vlZNzNJKcu9Jc58H84cP8jGr3ydJ40IYrmj0ZO38IxCI7Sh2CVdjTMPuuk/JutnepVgAPTHustmrIil0XSb4N9UpDqysBgu5XbLlLNxHlq0TF9k1lIp9bF+A8ZW1uehpmoeSzZR0qz+eOR/wVppxwCwzVSUqPXekZbAXLrBMgBOSAH5IAckANyQA7IATkgB+SA/A8ivwByW3S5IS8BuS0qGXIfkNuF3EcLjK87kCW6YrxgyDGYwhZhhnwDyO1CvkEr+vUHbGGHfijsFdo+v2MOMnHLt2gGjjnIyC1HyMH4BMawQyeMHYp8Scl/gzVs0DdFvaTI1/T7Gcxhg84U9ZoiZ/E3cNNscdF8Rrxy06CbW9LJVxVy14Nubksn99wKeRWAK8Eic1dZhd5quexp/gU2mbe+2JP81skReqU/4U+wypz1ievIW6M3+uMJmM+Z+OnmkzdyHWA+f+KO20OOXjxgPnfi3gvitGbMYQ4335kb9tYIiZiDrzZT70xAnI7t7HkOcbjZ6VxhdV6QQO4brqFDXm02+q6B4zcXifXq1xecLl9QG/X0+nm/nGqe/iuSyt14uNW1LC/voCfUpSyvHUdv46IpuSsfg2YkfzUNvJ67Lx2w1DzkLNdIU+52s1wsPLDZs8pbLJabrbh//wNFzlig0hcQyQAAAABJRU5ErkJggg==);
65
- }
66
-
67
- @media all and (max-width: 1440px) {
68
- .store-link {
69
- padding-top: 15px;
70
- }
71
-
72
- .store-link.wt-get-it-on-google-play {
73
- width: 111px;
74
- background-size: 110px;
75
- }
76
-
77
- .store-link.wt-download-on-appstore {
78
- background-size: 85px;
79
- width: 90px;
80
- background-position-y: 7px;
81
- }
82
- }
83
-
84
- .wt-block-gutter .col-md-4 {
85
- min-height: 140px;
86
- }
87
-
88
- .wt-block-gutter .col-md-4 .title > .step {
89
- display: block;
90
- color: gray;
91
- font-size: 12px;
92
- font-weight: bold;
93
- }
94
-
95
- .wt-block-gutter .col-md-4 .title > .title {
96
- font-size: 15px;
97
- font-weight: bold;
98
- }
99
-
100
- .wt-block-gutter .col-md-4 .content {
101
- padding-top: 10px;
102
- font-size: 15px;
103
- padding-right: 40px;
104
- }
105
-
106
- .store-links {
107
- display: block;
108
- text-align: center;
109
- }
110
-
111
- .wt-block-gutter.manual-block .col-md-4:not(:last-child):after {
112
- content: "";
113
- position: absolute;
114
- width: 32px;
115
- height: 32px;
116
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADvElEQVRYhaWXaYhOURjHf+6Qse+yL4NsJV+QD2PJWva1KbIVkiW+KPtSxDdZEmVJyJZsKbJOkhJlyZIlwyDr2I0IPdP/6Lje9773jn+9vWe55zzPec7/WU6ZhdwhJmoD3fVrCzQGqmnpB6AQSjY7D5wDXsbZNo4CrYBpwCigUUxlnwEHgY3ArdIqkA3MBeYA1b3xb8A9nfgd8EvzjaRstvftR2AdsBL4nEpI2TTCc4CtMrfDZWAXcBIoAL6E1lQAmgC9gTFAV6AKMB/oCUwE7saxQAfgMNBM/QfAUmAP8COduUIIgNHAEqCNpp4Cw3SQPwhCC5uHhFs7F9iZQLjhpxTuBuzTWEPgkKdQCXwF7O62e8K3ACOB5wkEh/EKyAPWa7wBsAOolEqBudLYcASYmubU1USqTUCLGEoYSWd6lugELHaTjgPG3isizSOgs7RPhUXAco0/BAZlcjXBPOUS0Br4Khk3nQVmSLhhYYRwQzmvbd5yDGgfQwFz2Xlqm8fMtoYpUEuMNVwF9mbYaA1wxus315W1i6GEkfqi2uYRDUyBHkA9De6Iwfa3IqevhFniqEJ0FMw7tmm+JtDLKWAoBk7EOIWhSEqcDSlxPIYSp4BPavcIvAX3RcC4KJIZT3vfNxMnoq7DJS1D20BZzU0UJ1DA8B4YrlM55IgTbdKssSt+onZ9U6CqOkUJhTt8kCWOeWMtPMangkvV2eFQXFp8V5b0kRWx1y/XCHQCQik3CSoCB4AR3prHwKqIPerqvzhQlkL5vHxC4ZUVYgeGhA+2KJdmTZbHuxemwG11WgJNEwg37uwHBnhjhQrN1yLWNVQ4NtwKVMOh8NgngXCLmP29scdS5nqGtb084ucHCiYu9o/LQB6UDfeFhBfI7JmEG8br31z4VCDhBzTYWX4dBUsi/UInH5LB7A4DvDLP8kKhc8O1Xo23AqgRsYlfRxaIgHGEV/E845uSGlndSjIxr1Wl5Co75ohgqXBN1ZNVxlNi1gKGzUBftder+vqrKK2oDNfF+2iWHzT+A6tVcSGe5Lr440fCLyLIM/XNNLv1Iiotqiv9OuHGt7Fe8PunKra6fagXnPL0zBpRCgUGycMmqP9SBL/hf5QqF1zW4+KS+u3lJfnAZFVA5VKsK6tANklXaRmxo+auKsZcCC+KepoZaxfoKip54x9lqScyqXGkjsJray/IoOLTqudlqgn/QZzHqb2UpivlmqA4eCMLbFC1nRZJnuf2qLAw6p7n9RW+DVbI2APGLGOh3aokV3SkB/Ab3qvWxvP9kTkAAAAASUVORK5CYII=);
117
- right: 15px;
118
- top: calc(50% - 16px);
119
- }
120
-
121
- .wt-block-gutter.manual-block .title, .wt-block-gutter.manual-block .content, .qr-answer-block {
122
- text-align: left;
123
- }
124
-
125
- @media all and (max-width: 768px) {
126
- .wt-block-gutter .col-md-4 .content {
127
- padding-bottom: 20px;
128
- }
129
-
130
- .wt-block-gutter.manual-block .col-md-4:not(:last-child):after {
131
- top: auto;
132
- right: calc(50% - 16px);
133
- bottom: 0;
134
- transform: rotate(90deg);
135
- }
136
- }
137
-
138
- .wt-register-2fa .wtfa-qr-code {
139
- padding: 5px;
140
- border: 1px solid #d6d6d6;
141
- /*border-radius: 10px;*/
142
- height: 220px;
143
- width: 220px;
144
- }
145
-
146
- @media all and (max-width: 1800px) {
147
- .wt-register-2fa {
148
- height: 210px;
149
- }
150
-
151
- .wt-register-2fa .wtfa-qr-code {
152
- width: 180px;
153
- height: 180px;
154
- }
155
- }
156
-
157
- @media all and (max-width: 1570px) {
158
- .wt-register-2fa {
159
- height: 152px;
160
- }
161
-
162
- .wt-register-2fa .wtfa-qr-code {
163
- width: 120px;
164
- height: 120px;
165
- }
166
-
167
- .action-description {
168
- padding-top: 0 !important;
169
- }
170
- }
171
-
172
- .action-description {
173
- padding-top: 50px;
174
- }
175
-
176
- .action-description > h4 {
177
- font-weight: bold;
178
- }
179
-
180
- .action-description > .text > p {
181
- font-size: 15px;
182
- line-height: 0.6;
183
- }
184
-
185
- .action-description > .text > span {
186
- font-size: 12px;
187
- }
188
-
189
- .action-description > .buttons {
190
- padding-top: 25px;
191
- }
192
-
193
- .button {
194
- border: none;
195
- padding: 5px 25px;
196
- border-radius: 6px;
197
- }
198
-
199
- .button.primary:hover {
200
- background-color: #6a04d3;
201
- color: #fff;
202
- }
203
-
204
- .button.primary {
205
- background: #6a04d3;
206
- color: #fff;
207
- }
208
-
209
- #qr-refresh {
210
- background: transparent;
211
- border: none;
212
- padding: 5px 20px;
213
- }
214
-
215
- #qr-refresh .dashicons {
216
- transform: rotate(65deg);
217
- }
218
-
219
- #ip_whitelisted {
220
- width: 100%;
221
- height: 150px;
222
- }
223
-
224
- #save_ip_whitelist {
225
-
226
- }
227
-
228
- input[type="text"] {
229
- box-shadow: 0 0 0 transparent;
230
- border-radius: 4px;
231
- border: 1px solid #7e8993;
232
- background-color: #fff;
233
- color: #32373c;
234
- padding: 0 8px;
235
- min-height: 30px;
236
- }
237
-
238
- button.register_2fa_app {
239
- box-shadow: none;
240
- border-width: 1px;
241
- border-radius: 3px;
242
- padding: 0px 10px;
243
- min-height: 30px;
244
- }
245
-
246
- /*@media all and (max-width: 1800px) {*/
247
- /* .qr-block {*/
248
- /* width: */
249
- /* }*/
250
- /* .qr-answer-block {*/
251
- /* */
252
- /* }*/
253
- /*}*/
1
+ .wtfa-content ._2fa-method {
2
+ padding: 5px 5px 5px 20px;
3
+ width: 100%;
4
+ }
5
+
6
+ /*.wt-row {*/
7
+ /* width: 100%;*/
8
+ /* display: inline-block;*/
9
+ /* margin: 0 15px;*/
10
+ /* padding-right: 30px;*/
11
+ /*}*/
12
+
13
+ .wt-block-gutter {
14
+ min-height: auto !important;
15
+ }
16
+
17
+ .wt-dashboard-block > .row {
18
+ padding-bottom: 10px !important;
19
+ }
20
+
21
+ .tfa-restore-codes .col-md-10 {
22
+ text-align: left;
23
+ }
24
+
25
+ .tfa-restore-codes .col-md-10 button {
26
+ display: inline-block;
27
+ }
28
+
29
+ .button.remove-2fa, .button.remove-2fa:hover {
30
+ border-color: #ea001f;
31
+ color: #ea001f;
32
+ }
33
+
34
+ .button.remove-2fa:focus {
35
+ border-color: #bf001a;
36
+ color: #ea001f;
37
+ outline-color: transparent;
38
+ }
39
+
40
+ .tfa-ip-whitelist {
41
+ /*padding-bottom: 10px;*/
42
+ }
43
+
44
+ .wt-block-gutter.important-block {
45
+ border-color: #7e25d9;
46
+ }
47
+
48
+ .store-link {
49
+ width: 125px;
50
+ height: 55px;
51
+ display: inline-block;
52
+ }
53
+
54
+ .store-link.wt-get-it-on-google-play {
55
+ background-size: 130px;
56
+ background-repeat: no-repeat;
57
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoYAAAD6CAYAAAA89YbqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAANhJJREFUeNrsnQucFNWZt98xKHIxghKUL7iA65U1goFdXDUq+/lLolkjBCNqgkh0veTLt15Wk5glQRY3qysqaBTvgCYSkygaN2ZVbprVSGAELyGCIAwgw8AIA8MwA3Pp7X9BtTVtT1d1d1Xf5nl+v56Zvkx3dZ3qPk+957zvqYjFYgYAAAAAcAC7AAAAAAAQQwAAAABADAEAAAAAMQQAAAAAxBAAAAAAEEMAAAAAQAwBAAAAADEEAAAAAMQQAAAAABBDAAAAAEAMAQAAAAAxBAAAAADEEAAAAAAQQwAAAABADAEAAAAAMQQAAAAAxBAAAAAAEEMAAAAAQAwBAAAAADEEAAAAAMQQAAAAABBDAAAAAEAMAQAAAAAxBAAAAADEEAAAAAAQQwAAAABADAEAAAAAMQQAAAAAxBAAAAAAEEMAAAAA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AAAAAAQQwAAAABADAEAAAAAMQQAAACAgHRhFwDkn6FDh9qECRPsnHPOsd69e1tjY2Pivm7dutm7775rc+bMseeee87q6uoCPefll19uAwcOzGp7Fi1a5FzE2Wef7Vxyxfuc2Wz/rbfemvi7UNvUEdqW8ePH22mnnWaf+9znbPv27Tm3X6p9oP+dNm1a1v8/a9YsW7duHR84AAhOLBYr+st111236Kmnnoq5l8GDB8e06cV86THoiNiJE8fETn/+B7HTf/uD2BfuHBc76vKzYwf27lH0284luktcKGIrV66MbdmyJeZHXBZjNTU1senTp8d69erl+9xr1qyJZcsTTzyReB79HQZxscto33i3f+fOne3uK9Q2JV9GjRoVq62tdS5B2m/Tpk2x22+/PVD7pWrDbdu2OcdMNvtQr53J/3LhwiXci1zF6y7xk8nrS8G5GEqOgBOnXmNnvDLR7Fsn26bjDrJNxx5kjecfbX0nftXOev3f7PifjLEDD+vBjupExMXAZs6cac8++6wdd9xxTpTJj4MPPtj69u1rV155pX344YdOlLGz0NLSUnTtp0ij2vDwww93LkHar1+/fjqxdSKI2bSfosnxDsV5/UzxRqEBAILCUHLI9L/mVuv21b+zpY0LLFaxPyqr3/FLbXODfeYzB9j/ufyL9qVLT7O1D82ztff8np3WCaSwsrLSjjzySOvevXu7+3bs2GG7d+9OdOQahuzSpYv16NEj8Vj91mXevHmOJGp4EvLbfhK7/v37f+q+jz/+2Gk/tZm3/bziL0HU/6r9NHVg+fLlGcvhD3/4Q+cCAIAYltLO7NXHen37X+ytbT3jHftO69p1aUIKY/svLdZmVS3b7aMuB9ig6//BBl52lr1z85P28bw/swPLWAqPPvrodrdrTtqSJUtsxowZnxI9/c+oUaPslltusSOOOMIOPfRQ5/ZDDjnELrrookBiqOe/9957A2+nd97d448/7kQoUzF69Gg7+eSTE9dfffXVDufshTGXr9Db1JEU7tq1y15++WWbMmXKp0RPc/wuvfRS+973vudIncRQKMr44osv2nnnnZeRHOr/r776avvlL3+ZsVQCACCGBeTIS75nqyt6OiLY0DDW+X3QwUsTU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MgAAAECuQvjOO+/MVgm9cntvZSeGXq644or/6Nu37zf79+8/AEkEAACAbNEcwk2bNq2sqam5vZSTSzq1GHpRJLFbt26ju3btelL89zEc4gAAAJCO+vr6P7a2ttY0NjbOLYf5g4ghAAAAAATmAHYBAAAAACCGAAAAAIAYAgAAAABiCAAAAACIIQAAAAAghgAAAACAGAIAAAAAYggAAAAAiCEAAAAAIIYAAAAAgBgCAAAAAGIIAAAAAIghAAAAACCGAAAAAIAYAgAAAABiCAAAAACIIQAAAAAghgAAAACAGAIAAAAAYggAAAAAiCEAAAAAIIYAAAAAgBgCAAAAAGIIAAAAAIghAAAAACCGAAAAAIAYAgAAAABiCAAAAACIIQAAAAAghgAAAACAGAIAAAAAYggAAAAAiCEAAAAAIIYAAAAAgBgCAAAAAGIIAAAAAIghAAAAACCGAAAAAIAYAgAAAABiCAAAAABlwv8KMADLbPZ1PyQJdgAAAABJRU5ErkJggg==);
58
+ }
59
+
60
+ .store-link.wt-download-on-appstore {
61
+ background-size: 103px;
62
+ background-position-y: 8px;
63
+ background-repeat: no-repeat;
64
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfIAAACnCAMAAADdey4SAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAB+UExURUdwTLG0tbK0tbGztrS0tLGztrGzta+vr7K0trKztbOzt6+3t7KytbKztQAAAP///7K0tkJCQ1hXWZ2bnCQlJ9/d3T49PwMHCrGvsHh2eMfFxoqIiRUYGmhmaEtKTDExM3Jxc5+goQkLDllYWmVkZjg3OSMjJBcYGoCAgY+OkE0n8YoAAAAOdFJOUwC/j3Awz4AQ799AIFCfaHcKDgAAEXBJREFUeNrsnedinLgWgGMnduJkd0jUhSjOxin3/V/wDk0FFQRiMk36s94ZEHA+na4h7965xsfPz48PD5++5nGl49PDw+P7zx/fRY4Pj09ZZrcxnh4/LPP++P4lS+qWxsv7sK5/fNaM+Z/X17dveVzheHt9/aMZ+ecA9H9GDf/+9vP3IY8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zVs0DdFvaTI1/T7Gcxhg84U9ZoiZ/E3cNNscdF8Rrxy06CbW9LJVxVy14Nubksn99wKeRWAK8Eic1dZhd5quexp/gU2mbe+2JP81skReqU/4U+wypz1ievIW6M3+uMJmM+Z+OnmkzdyHWA+f+KO20OOXjxgPnfi3gvitGbMYQ4335kb9tYIiZiDrzZT70xAnI7t7HkOcbjZ6VxhdV6QQO4brqFDXm02+q6B4zcXifXq1xecLl9QG/X0+nm/nGqe/iuSyt14uNW1LC/voCfUpSyvHUdv46IpuSsfg2YkfzUNvJ67Lx2w1DzkLNdIU+52s1wsPLDZs8pbLJabrbh//wNFzlig0hcQyQAAAABJRU5ErkJggg==);
65
+ }
66
+
67
+ @media all and (max-width: 1440px) {
68
+ .store-link {
69
+ padding-top: 15px;
70
+ }
71
+
72
+ .store-link.wt-get-it-on-google-play {
73
+ width: 111px;
74
+ background-size: 110px;
75
+ }
76
+
77
+ .store-link.wt-download-on-appstore {
78
+ background-size: 85px;
79
+ width: 90px;
80
+ background-position-y: 7px;
81
+ }
82
+ }
83
+
84
+ .wt-block-gutter .col-md-4 {
85
+ min-height: 140px;
86
+ }
87
+
88
+ .wt-block-gutter .col-md-4 .title > .step {
89
+ display: block;
90
+ color: gray;
91
+ font-size: 12px;
92
+ font-weight: bold;
93
+ }
94
+
95
+ .wt-block-gutter .col-md-4 .title > .title {
96
+ font-size: 15px;
97
+ font-weight: bold;
98
+ }
99
+
100
+ .wt-block-gutter .col-md-4 .content {
101
+ padding-top: 10px;
102
+ font-size: 15px;
103
+ padding-right: 40px;
104
+ }
105
+
106
+ .store-links {
107
+ display: block;
108
+ text-align: center;
109
+ }
110
+
111
+ .wt-block-gutter.manual-block .col-md-4:not(:last-child):after {
112
+ content: "";
113
+ position: absolute;
114
+ width: 32px;
115
+ height: 32px;
116
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADvElEQVRYhaWXaYhOURjHf+6Qse+yL4NsJV+QD2P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f5QqF1zW4+KS+u3lJfnAZFVA5VKsK6tANklXaRmxo+auKsZcCC+KepoZaxfoKip54x9lqScyqXGkjsJray/IoOLTqudlqgn/QZzHqb2UpivlmqA4eCMLbFC1nRZJnuf2qLAw6p7n9RW+DVbI2APGLGOh3aokV3SkB/Ab3qvWxvP9kTkAAAAASUVORK5CYII=);
117
+ right: 15px;
118
+ top: calc(50% - 16px);
119
+ }
120
+
121
+ .wt-block-gutter.manual-block .title, .wt-block-gutter.manual-block .content, .qr-answer-block {
122
+ text-align: left;
123
+ }
124
+
125
+ @media all and (max-width: 768px) {
126
+ .wt-block-gutter .col-md-4 .content {
127
+ padding-bottom: 20px;
128
+ }
129
+
130
+ .wt-block-gutter.manual-block .col-md-4:not(:last-child):after {
131
+ top: auto;
132
+ right: calc(50% - 16px);
133
+ bottom: 0;
134
+ transform: rotate(90deg);
135
+ }
136
+ }
137
+
138
+ .wt-register-2fa .wtfa-qr-code {
139
+ padding: 5px;
140
+ border: 1px solid #d6d6d6;
141
+ /*border-radius: 10px;*/
142
+ height: 220px;
143
+ width: 220px;
144
+ }
145
+
146
+ @media all and (max-width: 1800px) {
147
+ .wt-register-2fa {
148
+ height: 210px;
149
+ }
150
+
151
+ .wt-register-2fa .wtfa-qr-code {
152
+ width: 180px;
153
+ height: 180px;
154
+ }
155
+ }
156
+
157
+ @media all and (max-width: 1570px) {
158
+ .wt-register-2fa {
159
+ height: 152px;
160
+ }
161
+
162
+ .wt-register-2fa .wtfa-qr-code {
163
+ width: 120px;
164
+ height: 120px;
165
+ }
166
+
167
+ .action-description {
168
+ padding-top: 0 !important;
169
+ }
170
+ }
171
+
172
+ .action-description {
173
+ padding-top: 50px;
174
+ }
175
+
176
+ .action-description > h4 {
177
+ font-weight: bold;
178
+ }
179
+
180
+ .action-description > .text > p {
181
+ font-size: 15px;
182
+ line-height: 0.6;
183
+ }
184
+
185
+ .action-description > .text > span {
186
+ font-size: 12px;
187
+ }
188
+
189
+ .action-description > .buttons {
190
+ padding-top: 25px;
191
+ }
192
+
193
+ .button {
194
+ border: none;
195
+ padding: 5px 25px;
196
+ border-radius: 6px;
197
+ }
198
+
199
+ .button.primary:hover {
200
+ background-color: #6a04d3;
201
+ color: #fff;
202
+ }
203
+
204
+ .button.primary {
205
+ background: #6a04d3;
206
+ color: #fff;
207
+ }
208
+
209
+ #qr-refresh {
210
+ background: transparent;
211
+ border: none;
212
+ padding: 5px 20px;
213
+ }
214
+
215
+ #qr-refresh .dashicons {
216
+ transform: rotate(65deg);
217
+ }
218
+
219
+ #ip_whitelisted {
220
+ width: 100%;
221
+ height: 150px;
222
+ }
223
+
224
+ #save_ip_whitelist {
225
+
226
+ }
227
+
228
+ input[type="text"] {
229
+ box-shadow: 0 0 0 transparent;
230
+ border-radius: 4px;
231
+ border: 1px solid #7e8993;
232
+ background-color: #fff;
233
+ color: #32373c;
234
+ padding: 0 8px;
235
+ min-height: 30px;
236
+ }
237
+
238
+ button.register_2fa_app {
239
+ box-shadow: none;
240
+ border-width: 1px;
241
+ border-radius: 3px;
242
+ padding: 0px 10px;
243
+ min-height: 30px;
244
+ }
245
+
246
+ /*@media all and (max-width: 1800px) {*/
247
+ /* .qr-block {*/
248
+ /* width: */
249
+ /* }*/
250
+ /* .qr-answer-block {*/
251
+ /* */
252
+ /* }*/
253
+ /*}*/
admin/assets/css/about-premium.css CHANGED
@@ -1,70 +1,70 @@
1
- #WBCR .wantispam-about-premium h1 {
2
- font-size: 35px;
3
- }
4
- #WBCR .wantispam-about-premium__title {
5
- text-align: left;
6
- margin-bottom: 20px;
7
- }
8
- #WBCR .wantispam-about-premium__title--h2 {
9
- margin-top: 60px;
10
- }
11
- #WBCR .wantispam-about-premium__headline-title {
12
- font-size: 15px;
13
- background: #fff;
14
- padding: 20px;
15
- text-align: left;
16
- }
17
- #WBCR .wantispam-about-premium__columns {
18
- margin: 40px 0;
19
- }
20
- #WBCR .wantispam-about-premium__column {
21
- text-align: center;
22
- background: #fff;
23
- margin-left: 5px;
24
- padding: 20px 0;
25
- }
26
- #WBCR .wantispam-about-premium__column .dashicons {
27
- color: #ffc107;
28
- font-size: 106px;
29
- width: 106px;
30
- height: 106px;
31
- }
32
- #WBCR .wantispam-about-premium__column p {
33
- font-size: 13px;
34
- color: #909090;
35
- padding: 6px;
36
- }
37
- #WBCR .wantispam-about-premium__activate-trial {
38
- text-align: center;
39
- padding: 30px;
40
- background: #fff;
41
- border: 1px dashed #d0a295;
42
- margin-top: 60px;
43
- }
44
- #WBCR .wantispam-about-premium__activate-trial p {
45
- font-size: 13px;
46
- color: #909090;
47
- margin-top: 20px;
48
- }
49
- #WBCR .wantispam-about-premium__activate-trial-button {
50
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.7);
51
- color: #ffffff;
52
- border: 1px solid #fe5421;
53
- background: #fe5421;
54
- text-transform: uppercase;
55
- }
56
- #WBCR .wantispam-about-premium ul {
57
- padding-left: 60px;
58
- list-style: square;
59
- }
60
- #WBCR .wantispam-about-premium ul li {
61
- font-size: 17px;
62
- margin-bottom: 10px;
63
- }
64
- #WBCR .wantispam-about-premium ul li p {
65
- font-size: 13px;
66
- color: #909090;
67
- background: #fff;
68
- padding: 6px;
69
- }
70
  /*# sourceMappingURL=about-premium.css.map */
1
+ #WBCR .wantispam-about-premium h1 {
2
+ font-size: 35px;
3
+ }
4
+ #WBCR .wantispam-about-premium__title {
5
+ text-align: left;
6
+ margin-bottom: 20px;
7
+ }
8
+ #WBCR .wantispam-about-premium__title--h2 {
9
+ margin-top: 60px;
10
+ }
11
+ #WBCR .wantispam-about-premium__headline-title {
12
+ font-size: 15px;
13
+ background: #fff;
14
+ padding: 20px;
15
+ text-align: left;
16
+ }
17
+ #WBCR .wantispam-about-premium__columns {
18
+ margin: 40px 0;
19
+ }
20
+ #WBCR .wantispam-about-premium__column {
21
+ text-align: center;
22
+ background: #fff;
23
+ margin-left: 5px;
24
+ padding: 20px 0;
25
+ }
26
+ #WBCR .wantispam-about-premium__column .dashicons {
27
+ color: #ffc107;
28
+ font-size: 106px;
29
+ width: 106px;
30
+ height: 106px;
31
+ }
32
+ #WBCR .wantispam-about-premium__column p {
33
+ font-size: 13px;
34
+ color: #909090;
35
+ padding: 6px;
36
+ }
37
+ #WBCR .wantispam-about-premium__activate-trial {
38
+ text-align: center;
39
+ padding: 30px;
40
+ background: #fff;
41
+ border: 1px dashed #d0a295;
42
+ margin-top: 60px;
43
+ }
44
+ #WBCR .wantispam-about-premium__activate-trial p {
45
+ font-size: 13px;
46
+ color: #909090;
47
+ margin-top: 20px;
48
+ }
49
+ #WBCR .wantispam-about-premium__activate-trial-button {
50
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.7);
51
+ color: #ffffff;
52
+ border: 1px solid #fe5421;
53
+ background: #fe5421;
54
+ text-transform: uppercase;
55
+ }
56
+ #WBCR .wantispam-about-premium ul {
57
+ padding-left: 60px;
58
+ list-style: square;
59
+ }
60
+ #WBCR .wantispam-about-premium ul li {
61
+ font-size: 17px;
62
+ margin-bottom: 10px;
63
+ }
64
+ #WBCR .wantispam-about-premium ul li p {
65
+ font-size: 13px;
66
+ color: #909090;
67
+ background: #fff;
68
+ padding: 6px;
69
+ }
70
  /*# sourceMappingURL=about-premium.css.map */
admin/assets/css/about-premium.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["about-premium.less"],"names":[],"mappings":"AAAA,KACE,yBACE;EACE,eAAA;;AAGF,KALF,yBAKG;EACC,gBAAA;EACA,mBAAA;;AAEA,KATJ,yBAKG,OAIE;EACC,gBAAA;;AAIJ,KAdF,yBAcG;EACC,eAAA;EACA,gBAAA;EACA,aAAA;EACA,gBAAA;;AAGF,KArBF,yBAqBG;EACC,cAAA;;AAGF,KAzBF,yBAyBG;EACC,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,eAAA;;AAJF,KAzBF,yBAyBG,QAMC;EACE,cAAA;EACA,gBAAA;EACA,YAAA;EACA,aAAA;;AAVJ,KAzBF,yBAyBG,QAaC;EACE,eAAA;EACA,cAAA;EACA,YAAA;;AAKJ,KA9CF,yBA8CG;EACC,kBAAA;EACA,aAAA;EACA,gBAAA;EACA,0BAAA;EACA,gBAAA;;AALF,KA9CF,yBA8CG,gBAOC;EACE,eAAA;EACA,cAAA;EACA,gBAAA;;AAGF,KA3DJ,yBA8CG,gBAaE;EACC,0FAAA;EACA,cAAA;EACA,yBAAA;EACA,mBAAA;EACA,yBAAA;;AAjER,KACE,yBAqEE;EACE,kBAAA;EACA,kBAAA;;AAxEN,KACE,yBAqEE,GAIE;EACE,eAAA;EACA,mBAAA;;AA5ER,KACE,yBAqEE,GAIE,GAIE;EACE,eAAA;EACA,cAAA;EACA,gBAAA;EACA,YAAA","file":"about-premium.css"}
admin/assets/css/about-premium.less CHANGED
@@ -1,89 +1,89 @@
1
- #WBCR {
2
- .wantispam-about-premium {
3
- h1 {
4
- font-size: 35px;
5
- }
6
-
7
- &__title {
8
- text-align: left;
9
- margin-bottom: 20px;
10
-
11
- &--h2 {
12
- margin-top: 60px;
13
- }
14
- }
15
-
16
- &__headline-title {
17
- font-size: 15px;
18
- background: #fff;
19
- padding: 20px;
20
- text-align: left;
21
- }
22
-
23
- &__columns {
24
- margin: 40px 0;
25
- }
26
-
27
- &__column {
28
- text-align: center;
29
- background: #fff;
30
- margin-left: 5px;
31
- padding: 20px 0;
32
-
33
- .dashicons {
34
- color: #ffc107;
35
- font-size: 106px;
36
- width: 106px;
37
- height: 106px;
38
- }
39
-
40
- p {
41
- font-size: 13px;
42
- color: #909090;
43
- padding: 6px;
44
- }
45
- }
46
-
47
-
48
- &__activate-trial {
49
- text-align: center;
50
- padding: 30px;
51
- background: #fff;
52
- border: 1px dashed #d0a295;
53
- margin-top: 60px;
54
-
55
- p {
56
- font-size: 13px;
57
- color: #909090;
58
- margin-top: 20px;
59
- }
60
-
61
- &-button {
62
- -webkit-box-shadow: 0 1px 1px rgba(000, 000, 000, .1), inset 0 1px 1px rgba(255, 255, 255, .7);
63
- color: #ffffff;
64
- border: 1px solid #fe5421;
65
- background: #fe5421;
66
- text-transform: uppercase;
67
- }
68
- }
69
-
70
-
71
- ul {
72
- padding-left: 60px;
73
- list-style: square;
74
-
75
- li {
76
- font-size: 17px;
77
- margin-bottom: 10px;
78
-
79
- p {
80
- font-size: 13px;
81
- color: #909090;
82
- background: #fff;
83
- padding: 6px;
84
- }
85
- }
86
- }
87
- }
88
- }
89
-
1
+ #WBCR {
2
+ .wantispam-about-premium {
3
+ h1 {
4
+ font-size: 35px;
5
+ }
6
+
7
+ &__title {
8
+ text-align: left;
9
+ margin-bottom: 20px;
10
+
11
+ &--h2 {
12
+ margin-top: 60px;
13
+ }
14
+ }
15
+
16
+ &__headline-title {
17
+ font-size: 15px;
18
+ background: #fff;
19
+ padding: 20px;
20
+ text-align: left;
21
+ }
22
+
23
+ &__columns {
24
+ margin: 40px 0;
25
+ }
26
+
27
+ &__column {
28
+ text-align: center;
29
+ background: #fff;
30
+ margin-left: 5px;
31
+ padding: 20px 0;
32
+
33
+ .dashicons {
34
+ color: #ffc107;
35
+ font-size: 106px;
36
+ width: 106px;
37
+ height: 106px;
38
+ }
39
+
40
+ p {
41
+ font-size: 13px;
42
+ color: #909090;
43
+ padding: 6px;
44
+ }
45
+ }
46
+
47
+
48
+ &__activate-trial {
49
+ text-align: center;
50
+ padding: 30px;
51
+ background: #fff;
52
+ border: 1px dashed #d0a295;
53
+ margin-top: 60px;
54
+
55
+ p {
56
+ font-size: 13px;
57
+ color: #909090;
58
+ margin-top: 20px;
59
+ }
60
+
61
+ &-button {
62
+ -webkit-box-shadow: 0 1px 1px rgba(000, 000, 000, .1), inset 0 1px 1px rgba(255, 255, 255, .7);
63
+ color: #ffffff;
64
+ border: 1px solid #fe5421;
65
+ background: #fe5421;
66
+ text-transform: uppercase;
67
+ }
68
+ }
69
+
70
+
71
+ ul {
72
+ padding-left: 60px;
73
+ list-style: square;
74
+
75
+ li {
76
+ font-size: 17px;
77
+ margin-bottom: 10px;
78
+
79
+ p {
80
+ font-size: 13px;
81
+ color: #909090;
82
+ background: #fff;
83
+ padding: 6px;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+
admin/assets/css/backup.css CHANGED
@@ -1,135 +1,135 @@
1
- .store {
2
- cursor: pointer;
3
- }
4
-
5
- .wt-row {
6
- padding: 15px 0 15px;
7
- /*padding: 15px 0 0 15px;*/
8
- }
9
-
10
- .col-md-12 {
11
- padding-top: 15px;
12
- }
13
-
14
- .table thead {
15
- background-color: #fff;
16
- border-bottom: 2px solid #ccd0d4;
17
- }
18
-
19
- .table tbody tr {
20
- background-color: #f9f9f9;
21
- }
22
-
23
- #store-data {
24
- padding-bottom: 15px;
25
- }
26
-
27
- #store-data .store-item {
28
- padding-bottom: 15px;
29
- padding-left: 15px;
30
- }
31
-
32
- .button {
33
- border: 1px solid #d3d3d3;
34
- border-radius: 5px;
35
- padding: 0 18px;
36
- }
37
-
38
- .button.primary {
39
- background-color: #fff;
40
- color: #000;
41
- border-color: #d3d3d3;
42
- }
43
-
44
- .button.primary:hover {
45
- background-color: #6a04d3;
46
- color: #fff;
47
- }
48
-
49
- .button.delete, .button.delete:hover {
50
- background-color: #cd057b;
51
- color: #fff;
52
- }
53
-
54
- .button.primary.backup, .button.primary.backup:hover {
55
- background-color: #6a04d3;
56
- color: #fff;
57
- }
58
-
59
- .button.primary:disabled, .button.primary[disabled], .button.primary:hover {
60
- background-color: #b687e5 !important;
61
- text-shadow: none !important;
62
- color: #fff !important;
63
- }
64
-
65
- ul.schedule-buttons li {
66
- display: inline;
67
- margin-left: -5px;
68
- }
69
-
70
- ul.schedule-buttons li:not(:first-child) .button, ul.schedule-buttons li:not(:last-child) .button {
71
- border-radius: 0;
72
- }
73
-
74
- ul.schedule-buttons li:last-child .button {
75
- border-radius: 0 5px 5px 0;
76
- }
77
- ul.schedule-buttons li:first-child .button {
78
- border-radius: 5px 0 0 5px;
79
- }
80
-
81
- .old-archives {
82
- margin-left: 15px;
83
- }
84
-
85
- .old-archives input[type="checkbox"] {
86
- margin-right: 5px;
87
- margin-top: -4px;
88
- }
89
-
90
- .badge.storage {
91
- background-color: #6929d3;
92
- border-radius: 0;
93
- padding: 9px;
94
- }
95
-
96
- .badge.in-progress {
97
- background-color: #6929d3;
98
- border-radius: 0;
99
- padding: 5px;
100
- }
101
-
102
- .backup-progress-block {}
103
-
104
- .backup-progress-block > div:first-child {
105
- text-align: center;
106
- font-weight: bold;
107
- padding-top: 6px;
108
- }
109
-
110
- .backup-progress-block .backup-progress {
111
- position: relative;
112
- height: 32px;
113
- width: 100%;
114
- border-radius: 5px;
115
- border: 1px solid #6929d3;
116
- }
117
-
118
- .backup-progress-block .backup-progress > div {
119
- position: absolute;
120
- left: 0;
121
- top: 0;
122
- height: 100%;
123
- background-color: #6929d3;
124
- }
125
-
126
- .backup-pro-span {
127
- background: #f6065b;
128
- border-radius: 4px;
129
- color: #fff;
130
- font-size: 10px;
131
- line-height: 1;
132
- font-style: normal;
133
- padding: 4px 6px;
134
- margin-left: 4px;
135
  }
1
+ .store {
2
+ cursor: pointer;
3
+ }
4
+
5
+ .wt-row {
6
+ padding: 15px 0 15px;
7
+ /*padding: 15px 0 0 15px;*/
8
+ }
9
+
10
+ .col-md-12 {
11
+ padding-top: 15px;
12
+ }
13
+
14
+ .table thead {
15
+ background-color: #fff;
16
+ border-bottom: 2px solid #ccd0d4;
17
+ }
18
+
19
+ .table tbody tr {
20
+ background-color: #f9f9f9;
21
+ }
22
+
23
+ #store-data {
24
+ padding-bottom: 15px;
25
+ }
26
+
27
+ #store-data .store-item {
28
+ padding-bottom: 15px;
29
+ padding-left: 15px;
30
+ }
31
+
32
+ .button {
33
+ border: 1px solid #d3d3d3;
34
+ border-radius: 5px;
35
+ padding: 0 18px;
36
+ }
37
+
38
+ .button.primary {
39
+ background-color: #fff;
40
+ color: #000;
41
+ border-color: #d3d3d3;
42
+ }
43
+
44
+ .button.primary:hover {
45
+ background-color: #6a04d3;
46
+ color: #fff;
47
+ }
48
+
49
+ .button.delete, .button.delete:hover {
50
+ background-color: #cd057b;
51
+ color: #fff;
52
+ }
53
+
54
+ .button.primary.backup, .button.primary.backup:hover {
55
+ background-color: #6a04d3;
56
+ color: #fff;
57
+ }
58
+
59
+ .button.primary:disabled, .button.primary[disabled], .button.primary:hover {
60
+ background-color: #b687e5 !important;
61
+ text-shadow: none !important;
62
+ color: #fff !important;
63
+ }
64
+
65
+ ul.schedule-buttons li {
66
+ display: inline;
67
+ margin-left: -5px;
68
+ }
69
+
70
+ ul.schedule-buttons li:not(:first-child) .button, ul.schedule-buttons li:not(:last-child) .button {
71
+ border-radius: 0;
72
+ }
73
+
74
+ ul.schedule-buttons li:last-child .button {
75
+ border-radius: 0 5px 5px 0;
76
+ }
77
+ ul.schedule-buttons li:first-child .button {
78
+ border-radius: 5px 0 0 5px;
79
+ }
80
+
81
+ .old-archives {
82
+ margin-left: 15px;
83
+ }
84
+
85
+ .old-archives input[type="checkbox"] {
86
+ margin-right: 5px;
87
+ margin-top: -4px;
88
+ }
89
+
90
+ .badge.storage {
91
+ background-color: #6929d3;
92
+ border-radius: 0;
93
+ padding: 9px;
94
+ }
95
+
96
+ .badge.in-progress {
97
+ background-color: #6929d3;
98
+ border-radius: 0;
99
+ padding: 5px;
100
+ }
101
+
102
+ .backup-progress-block {}
103
+
104
+ .backup-progress-block > div:first-child {
105
+ text-align: center;
106
+ font-weight: bold;
107
+ padding-top: 6px;
108
+ }
109
+
110
+ .backup-progress-block .backup-progress {
111
+ position: relative;
112
+ height: 32px;
113
+ width: 100%;
114
+ border-radius: 5px;
115
+ border: 1px solid #6929d3;
116
+ }
117
+
118
+ .backup-progress-block .backup-progress > div {
119
+ position: absolute;
120
+ left: 0;
121
+ top: 0;
122
+ height: 100%;
123
+ background-color: #6929d3;
124
+ }
125
+
126
+ .backup-pro-span {
127
+ background: #f6065b;
128
+ border-radius: 4px;
129
+ color: #fff;
130
+ font-size: 10px;
131
+ line-height: 1;
132
+ font-style: normal;
133
+ padding: 4px 6px;
134
+ margin-left: 4px;
135
  }
admin/assets/css/components.css CHANGED
@@ -1,140 +1,140 @@
1
- /**
2
- * Page components
3
- * @author Alex Kovalev <alex.kovalevv@gmail.com>
4
- * @copyright Alex Kovalev 30.09.2017
5
- */
6
- #WBCR .wbcr-clearfy-components {
7
- padding: 0 20px 20px;
8
- text-align: center;
9
- }
10
- #WBCR .wbcr-clearfy-components .plugin-card {
11
- position: relative;
12
- display: inline-block;
13
- width: 32.7%;
14
- height: 250px;
15
- margin-left: 0;
16
- margin-right: 0;
17
- text-align: left;
18
- float: none;
19
- vertical-align: top;
20
- }
21
- #WBCR .wbcr-clearfy-components .plugin-card:first-child {
22
- margin-left: 0;
23
- }
24
- #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-bottom {
25
- position: absolute;
26
- bottom: 0;
27
- right: 0;
28
- left: 0;
29
- }
30
- #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-top {
31
- min-height: 163px;
32
- }
33
- #WBCR .wbcr-clearfy-components .plugin-card .desc,
34
- #WBCR .wbcr-clearfy-components .plugin-card .name {
35
- margin-right: 0 !important;
36
- }
37
- #WBCR .wbcr-clearfy-components .plugin-card .name h3 {
38
- font-size: 17px;
39
- margin-top: 0 !important;
40
- }
41
- #WBCR .wbcr-clearfy-components .plugin-card .install-now {
42
- float: right;
43
- }
44
- #WBCR .wbcr-clearfy-components .plugin-card .delete-now {
45
- float: right;
46
- margin-left: 5px;
47
- }
48
- #WBCR .wbcr-clearfy-components .plugin-card .delete-now .dashicons,
49
- #WBCR .wbcr-clearfy-components .plugin-card .delete-now .dashicons-before:before {
50
- font-size: 16px !important;
51
- line-height: 1.5 !important;
52
- color: #62696f;
53
- }
54
- #WBCR .wbcr-clearfy-components .plugin-card a.open-plugin-details-modal {
55
- color: #5c5d5f;
56
- text-decoration: none;
57
- font-weight: 600;
58
- font-size: 15px;
59
- }
60
- #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-premium-ribbon {
61
- position: absolute;
62
- bottom: 60px;
63
- right: 0;
64
- height: 30px;
65
- width: 120px;
66
- border-radius: 3px 0 0 3px;
67
- background-color: #f7dea9;
68
- color: #67532f;
69
- text-align: center;
70
- font-size: 12px;
71
- font-weight: 600;
72
- line-height: 2.4;
73
- text-transform: uppercase;
74
- z-index: 1;
75
- }
76
- #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-free-ribbon {
77
- position: absolute;
78
- bottom: 60px;
79
- right: 0;
80
- height: 30px;
81
- width: 120px;
82
- border-radius: 3px 0 0 3px;
83
- background-color: #cccccc;
84
- color: #6b6b6b;
85
- text-align: center;
86
- font-size: 12px;
87
- font-weight: 600;
88
- line-height: 2.4;
89
- text-transform: uppercase;
90
- z-index: 1;
91
- }
92
- #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-freemium-ribbon {
93
- position: absolute;
94
- bottom: 60px;
95
- right: 0;
96
- height: 30px;
97
- width: 120px;
98
- border-radius: 3px 0 0 3px;
99
- background-color: #cae2b3;
100
- color: #546742;
101
- text-align: center;
102
- font-size: 12px;
103
- font-weight: 600;
104
- line-height: 2.4;
105
- text-transform: uppercase;
106
- z-index: 1;
107
- }
108
- #WBCR .wbcr-clearfy-components .plugin-card.premium {
109
- border-color: #e8d7b2;
110
- background-color: #fff9eb;
111
- }
112
- #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive {
113
- background-color: #f1f1f1;
114
- }
115
- #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive a.open-plugin-details-modal {
116
- color: #ababab;
117
- text-decoration: none;
118
- font-weight: 600;
119
- font-size: 15px;
120
- }
121
- #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive .plugin-icon {
122
- opacity: 0.3;
123
- }
124
- #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive .desc {
125
- color: #afafaf;
126
- }
127
- #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive.premium {
128
- background-color: #f9f2f1;
129
- }
130
- @media screen and (max-width: 1750px) {
131
- #WBCR .wbcr-clearfy-components .plugin-card {
132
- width: 49%;
133
- }
134
- }
135
- @media screen and (max-width: 1350px) {
136
- #WBCR .wbcr-clearfy-components .plugin-card {
137
- width: 100%;
138
- }
139
- }
140
  /*# sourceMappingURL=components.css.map */
1
+ /**
2
+ * Page components
3
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
4
+ * @copyright Alex Kovalev 30.09.2017
5
+ */
6
+ #WBCR .wbcr-clearfy-components {
7
+ padding: 0 20px 20px;
8
+ text-align: center;
9
+ }
10
+ #WBCR .wbcr-clearfy-components .plugin-card {
11
+ position: relative;
12
+ display: inline-block;
13
+ width: 32.7%;
14
+ height: 250px;
15
+ margin-left: 0;
16
+ margin-right: 0;
17
+ text-align: left;
18
+ float: none;
19
+ vertical-align: top;
20
+ }
21
+ #WBCR .wbcr-clearfy-components .plugin-card:first-child {
22
+ margin-left: 0;
23
+ }
24
+ #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-bottom {
25
+ position: absolute;
26
+ bottom: 0;
27
+ right: 0;
28
+ left: 0;
29
+ }
30
+ #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-top {
31
+ min-height: 163px;
32
+ }
33
+ #WBCR .wbcr-clearfy-components .plugin-card .desc,
34
+ #WBCR .wbcr-clearfy-components .plugin-card .name {
35
+ margin-right: 0 !important;
36
+ }
37
+ #WBCR .wbcr-clearfy-components .plugin-card .name h3 {
38
+ font-size: 17px;
39
+ margin-top: 0 !important;
40
+ }
41
+ #WBCR .wbcr-clearfy-components .plugin-card .install-now {
42
+ float: right;
43
+ }
44
+ #WBCR .wbcr-clearfy-components .plugin-card .delete-now {
45
+ float: right;
46
+ margin-left: 5px;
47
+ }
48
+ #WBCR .wbcr-clearfy-components .plugin-card .delete-now .dashicons,
49
+ #WBCR .wbcr-clearfy-components .plugin-card .delete-now .dashicons-before:before {
50
+ font-size: 16px !important;
51
+ line-height: 1.5 !important;
52
+ color: #62696f;
53
+ }
54
+ #WBCR .wbcr-clearfy-components .plugin-card a.open-plugin-details-modal {
55
+ color: #5c5d5f;
56
+ text-decoration: none;
57
+ font-weight: 600;
58
+ font-size: 15px;
59
+ }
60
+ #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-premium-ribbon {
61
+ position: absolute;
62
+ bottom: 60px;
63
+ right: 0;
64
+ height: 30px;
65
+ width: 120px;
66
+ border-radius: 3px 0 0 3px;
67
+ background-color: #f7dea9;
68
+ color: #67532f;
69
+ text-align: center;
70
+ font-size: 12px;
71
+ font-weight: 600;
72
+ line-height: 2.4;
73
+ text-transform: uppercase;
74
+ z-index: 1;
75
+ }
76
+ #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-free-ribbon {
77
+ position: absolute;
78
+ bottom: 60px;
79
+ right: 0;
80
+ height: 30px;
81
+ width: 120px;
82
+ border-radius: 3px 0 0 3px;
83
+ background-color: #cccccc;
84
+ color: #6b6b6b;
85
+ text-align: center;
86
+ font-size: 12px;
87
+ font-weight: 600;
88
+ line-height: 2.4;
89
+ text-transform: uppercase;
90
+ z-index: 1;
91
+ }
92
+ #WBCR .wbcr-clearfy-components .plugin-card .plugin-card-freemium-ribbon {
93
+ position: absolute;
94
+ bottom: 60px;
95
+ right: 0;
96
+ height: 30px;
97
+ width: 120px;
98
+ border-radius: 3px 0 0 3px;
99
+ background-color: #cae2b3;
100
+ color: #546742;
101
+ text-align: center;
102
+ font-size: 12px;
103
+ font-weight: 600;
104
+ line-height: 2.4;
105
+ text-transform: uppercase;
106
+ z-index: 1;
107
+ }
108
+ #WBCR .wbcr-clearfy-components .plugin-card.premium {
109
+ border-color: #e8d7b2;
110
+ background-color: #fff9eb;
111
+ }
112
+ #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive {
113
+ background-color: #f1f1f1;
114
+ }
115
+ #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive a.open-plugin-details-modal {
116
+ color: #ababab;
117
+ text-decoration: none;
118
+ font-weight: 600;
119
+ font-size: 15px;
120
+ }
121
+ #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive .plugin-icon {
122
+ opacity: 0.3;
123
+ }
124
+ #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive .desc {
125
+ color: #afafaf;
126
+ }
127
+ #WBCR .wbcr-clearfy-components .plugin-card.plugin-status-deactive.premium {
128
+ background-color: #f9f2f1;
129
+ }
130
+ @media screen and (max-width: 1750px) {
131
+ #WBCR .wbcr-clearfy-components .plugin-card {
132
+ width: 49%;
133
+ }
134
+ }
135
+ @media screen and (max-width: 1350px) {
136
+ #WBCR .wbcr-clearfy-components .plugin-card {
137
+ width: 100%;
138
+ }
139
+ }
140
  /*# sourceMappingURL=components.css.map */
admin/assets/css/components.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["components.less"],"names":[],"mappings":";;;;;AAMA,KAkBE;EACE,oBAAA;EACA,kBAAA;;AApBJ,KAkBE,yBAIE;EACE,kBAAA;EACA,qBAAA;EACA,YAAA;EACA,aAAA;EACA,cAAA;EACA,eAAA;EACA,gBAAA;EACA,WAAA;EACA,mBAAA;;AAEA,KAfJ,yBAIE,aAWG;EACC,cAAA;;AAlCR,KAkBE,yBAIE,aAeE;EACE,kBAAA;EACA,SAAA;EACA,QAAA;EACA,OAAA;;AAzCR,KAkBE,yBAIE,aAsBE;EACE,iBAAA;;AA7CR,KAkBE,yBAIE,aA0BE;AAhDN,KAkBE,yBAIE,aA0BS;EACL,0BAAA;;AAjDR,KAkBE,yBAIE,aA8BE,MACE;EACE,eAAA;EACA,wBAAA;;AAvDV,KAkBE,yBAIE,aAqCE;EACE,YAAA;;AA5DR,KAkBE,yBAIE,aAyCE;EACE,YAAA;EACA,gBAAA;;AAjER,KAkBE,yBAIE,aAyCE,YAIE;AAnER,KAkBE,yBAIE,aAyCE,YAIc,kBAAiB;EAC3B,0BAAA;EACA,gBAAA;EACA,cAAA;;AAtEV,KAkBE,yBAIE,aAoDE,EAAC;EACC,cAAA;EACA,qBAAA;EACA,gBAAA;EACA,eAAA;;AA9ER,KAkBE,yBAIE,aA4DE;EAhFF,kBAAA;EACA,YAAA;EACA,QAAA;EACA,YAAA;EACA,YAAA;EACA,0BAAA;EACA,yBAAA;EACA,cAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,yBAAA;EACA,UAAA;;AAfJ,KAkBE,yBAIE,aAiEE;EArFF,kBAAA;EACA,YAAA;EACA,QAAA;EACA,YAAA;EACA,YAAA;EACA,0BAAA;EACA,yBAAA;EACA,cAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,yBAAA;EACA,UAAA;;AAfJ,KAkBE,yBAIE,aAsEE;EA1FF,kBAAA;EACA,YAAA;EACA,QAAA;EACA,YAAA;EACA,YAAA;EACA,0BAAA;EACA,yBAAA;EACA,cAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,yBAAA;EACA,UAAA;;AAiFE,KA9EJ,yBAIE,aA0EG;EACC,qBAAA;EACA,yBAAA;;AAGF,KAnFJ,yBAIE,aA+EG;EACC,yBAAA;;AADF,KAnFJ,yBAIE,aA+EG,uBAIC,EAAC;EACC,cAAA;EACA,qBAAA;EACA,gBAAA;EACA,eAAA;;AARJ,KAnFJ,yBAIE,aA+EG,uBAWC;EACE,YAAA;;AAZJ,KAnFJ,yBAIE,aA+EG,uBAeC;EACE,cAAA;;AAGF,KAtGN,yBAIE,aA+EG,uBAmBE;EACC,yBAAA;;AAOV,mBAAsC;EACpC,KACE,yBACE;IACE,UAAA;;;AAMR,mBAAsC;EACpC,KACE,yBACE;IACE,WAAA","file":"components.css"}
admin/assets/css/components.less CHANGED
@@ -1,153 +1,153 @@
1
- /**
2
- * Page components
3
- * @author Alex Kovalev <alex.kovalevv@gmail.com>
4
- * @copyright Alex Kovalev 30.09.2017
5
- */
6
-
7
- #WBCR {
8
- .card-ribbon(@bgColor:#f7dea9, @color:#67532f) {
9
- position: absolute;
10
- bottom: 60px;
11
- right: 0;
12
- height: 30px;
13
- width: 120px;
14
- border-radius: 3px 0 0 3px;
15
- background-color: @bgColor;
16
- color: @color;
17
- text-align: center;
18
- font-size: 12px;
19
- font-weight: 600;
20
- line-height: 2.4;
21
- text-transform: uppercase;
22
- z-index: 1;
23
- }
24
-
25
- .wbcr-clearfy-components {
26
- padding: 0 20px 20px;
27
- text-align: center;
28
-
29
- .plugin-card {
30
- position: relative;
31
- display: inline-block;
32
- width: 32.7%;
33
- height: 250px;
34
- margin-left: 0;
35
- margin-right: 0;
36
- text-align: left;
37
- float: none;
38
- vertical-align: top;
39
-
40
- &:first-child {
41
- margin-left: 0;
42
- }
43
-
44
- .plugin-card-bottom {
45
- position: absolute;
46
- bottom: 0;
47
- right: 0;
48
- left: 0;
49
- }
50
-
51
- .plugin-card-top {
52
- min-height: 163px;
53
- }
54
-
55
- .desc, .name {
56
- margin-right: 0 !important;
57
- }
58
-
59
- .name {
60
- h3 {
61
- font-size: 17px;
62
- margin-top: 0 !important;
63
- }
64
- }
65
-
66
- .install-now {
67
- float: right;
68
- }
69
-
70
- .delete-now {
71
- float: right;
72
- margin-left: 5px;
73
-
74
- .dashicons, .dashicons-before:before {
75
- font-size: 16px !important;
76
- line-height: 1.5 !important;
77
- color: #62696f;
78
- }
79
- }
80
-
81
- a.open-plugin-details-modal {
82
- color: #5c5d5f;
83
- text-decoration: none;
84
- font-weight: 600;
85
- font-size: 15px;
86
- }
87
-
88
- // Premium
89
- .plugin-card-premium-ribbon {
90
- .card-ribbon();
91
- }
92
-
93
- // Free
94
- .plugin-card-free-ribbon {
95
- .card-ribbon(#cccccc, #6b6b6b);
96
- }
97
-
98
- // Freemium
99
- .plugin-card-freemium-ribbon {
100
- .card-ribbon(#cae2b3, #546742);
101
- }
102
-
103
- &.premium {
104
- border-color: #e8d7b2;
105
- background-color: #fff9eb;
106
- }
107
-
108
- &.plugin-status-deactive {
109
- background-color: #f1f1f1;
110
- //background-color: #f9f2f1;
111
-
112
- a.open-plugin-details-modal {
113
- color: #ababab;
114
- text-decoration: none;
115
- font-weight: 600;
116
- font-size: 15px;
117
- }
118
-
119
- .plugin-icon {
120
- opacity: 0.3;
121
- }
122
-
123
- .desc {
124
- color: #afafaf;
125
- }
126
-
127
- &.premium {
128
- background-color: #f9f2f1;
129
- }
130
- }
131
- }
132
- }
133
- }
134
-
135
- @media screen and (max-width: 1750px) {
136
- #WBCR {
137
- .wbcr-clearfy-components {
138
- .plugin-card {
139
- width: 49%;
140
- }
141
- }
142
- }
143
- }
144
-
145
- @media screen and (max-width: 1350px) {
146
- #WBCR {
147
- .wbcr-clearfy-components {
148
- .plugin-card {
149
- width: 100%;
150
- }
151
- }
152
- }
153
  }
1
+ /**
2
+ * Page components
3
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>
4
+ * @copyright Alex Kovalev 30.09.2017
5
+ */
6
+
7
+ #WBCR {
8
+ .card-ribbon(@bgColor:#f7dea9, @color:#67532f) {
9
+ position: absolute;
10
+ bottom: 60px;
11
+ right: 0;
12
+ height: 30px;
13
+ width: 120px;
14
+ border-radius: 3px 0 0 3px;
15
+ background-color: @bgColor;
16
+ color: @color;
17
+ text-align: center;
18
+ font-size: 12px;
19
+ font-weight: 600;
20
+ line-height: 2.4;
21
+ text-transform: uppercase;
22
+ z-index: 1;
23
+ }
24
+
25
+ .wbcr-clearfy-components {
26
+ padding: 0 20px 20px;
27
+ text-align: center;
28
+
29
+ .plugin-card {
30
+ position: relative;
31
+ display: inline-block;
32
+ width: 32.7%;
33
+ height: 250px;
34
+ margin-left: 0;
35
+ margin-right: 0;
36
+ text-align: left;
37
+ float: none;
38
+ vertical-align: top;
39
+
40
+ &:first-child {
41
+ margin-left: 0;
42
+ }
43
+
44
+ .plugin-card-bottom {
45
+ position: absolute;
46
+ bottom: 0;
47
+ right: 0;
48
+ left: 0;
49
+ }
50
+
51
+ .plugin-card-top {
52
+ min-height: 163px;
53
+ }
54
+
55
+ .desc, .name {
56
+ margin-right: 0 !important;
57
+ }
58
+
59
+ .name {
60
+ h3 {
61
+ font-size: 17px;
62
+ margin-top: 0 !important;
63
+ }
64
+ }
65
+
66
+ .install-now {
67
+ float: right;
68
+ }
69
+
70
+ .delete-now {
71
+ float: right;
72
+ margin-left: 5px;
73
+
74
+ .dashicons, .dashicons-before:before {
75
+ font-size: 16px !important;
76
+ line-height: 1.5 !important;
77
+ color: #62696f;
78
+ }
79
+ }
80
+
81
+ a.open-plugin-details-modal {
82
+ color: #5c5d5f;
83
+ text-decoration: none;
84
+ font-weight: 600;
85
+ font-size: 15px;
86
+ }
87
+
88
+ // Premium
89
+ .plugin-card-premium-ribbon {
90
+ .card-ribbon();
91
+ }
92
+
93
+ // Free
94
+ .plugin-card-free-ribbon {
95
+ .card-ribbon(#cccccc, #6b6b6b);
96
+ }
97
+
98
+ // Freemium
99
+ .plugin-card-freemium-ribbon {
100
+ .card-ribbon(#cae2b3, #546742);
101
+ }
102
+
103
+ &.premium {
104
+ border-color: #e8d7b2;
105
+ background-color: #fff9eb;
106
+ }
107
+
108
+ &.plugin-status-deactive {
109
+ background-color: #f1f1f1;
110
+ //background-color: #f9f2f1;
111
+
112
+ a.open-plugin-details-modal {
113
+ color: #ababab;
114
+ text-decoration: none;
115
+ font-weight: 600;
116
+ font-size: 15px;
117
+ }
118
+
119
+ .plugin-icon {
120
+ opacity: 0.3;
121
+ }
122
+
123
+ .desc {
124
+ color: #afafaf;
125
+ }
126
+
127
+ &.premium {
128
+ background-color: #f9f2f1;
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
134
+
135
+ @media screen and (max-width: 1750px) {
136
+ #WBCR {
137
+ .wbcr-clearfy-components {
138
+ .plugin-card {
139
+ width: 49%;
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ @media screen and (max-width: 1350px) {
146
+ #WBCR {
147
+ .wbcr-clearfy-components {
148
+ .plugin-card {
149
+ width: 100%;
150
+ }
151
+ }
152
+ }
153
  }
admin/assets/css/dashboard-dashboard.css CHANGED
@@ -1,308 +1,308 @@
1
- #wpfooter {
2
- position: initial !important;
3
- /*display: inline;*/
4
- }
5
-
6
- .wt-dashboard-container {
7
- margin: 10px 5px 10px 5px;
8
- /*display: inline-block;*/
9
- }
10
-
11
- .wt-dashboard-block {
12
- /*width: 100%;*/
13
- border: 1px solid #d6d6d6;
14
- background: #fff;
15
- text-align: center;
16
- border-radius: 5px;
17
- min-height: 16em !important;
18
- }
19
-
20
- .wt-row {
21
- width: 100%;
22
- display: inline-block;
23
- }
24
-
25
- .wt-row .row {
26
- display: block !important;
27
- width: auto !important;
28
- }
29
-
30
- .wt-dashboard-block div.row {
31
- padding: 0 15px 0 15px;
32
- }
33
-
34
- .wt-block-gutter {
35
- padding: 0 10px 0 5px !important;
36
- }
37
-
38
- .wt-dashboard-block-header {
39
- text-align: left;
40
- padding: 0 !important;
41
- }
42
-
43
- .wt-dashboard-block-header h4 {
44
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
45
- font-size: 12px;
46
- font-weight: 600;
47
- margin: 10px;
48
- color: #868686;
49
- text-transform: uppercase;
50
- }
51
-
52
- .wt-dashboard-block-header-right {
53
- text-align: right;
54
- }
55
-
56
- .wt-dashboard-block-content {
57
- margin: 10px -20px 10px 20px;
58
- text-align: left;
59
- }
60
-
61
- .wt-dashboard-block-content-right {
62
- margin: 10px 20px 10px -20px;
63
- text-align: right;
64
- }
65
-
66
- .wt-block-description {
67
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
68
- font-size: 12px;
69
- margin-top: 10px;
70
- color: #868686;
71
- }
72
-
73
- .wt-firewall-icon-ok, .wt-firewall-icon-clock, .wt-firewall-icon-dissmiss, .wt-dashboard-icon-loader {
74
- width: 50px;
75
- height: 60px;
76
- display: inline-block;
77
- }
78
-
79
- .wt-firewall-icon-ok {
80
- background: url('../img/check.png') no-repeat center bottom;
81
- background-size: contain;
82
- }
83
-
84
- .wt-firewall-icon-clock {
85
- background: url('../img/clock.png') no-repeat center bottom;
86
- background-size: contain;
87
- }
88
-
89
- .wt-firewall-icon-dissmiss {
90
- background: url('../img/x.png') no-repeat center bottom;
91
- background-size: contain;
92
- }
93
-
94
- .wt-dashboard-icon-loader {
95
- background: transparent url("../img/loader.gif") no-repeat center bottom;
96
- background-size: contain;
97
- }
98
-
99
- .wt-block-loading {
100
- opacity: 0.5;
101
- }
102
-
103
- .wt-checkbox {
104
- background-color: #5d05b7 !important;
105
- border: 2px solid #5d05b7 !important;
106
- border-radius: 5px !important;
107
- }
108
-
109
- .factory-bootstrap-455 .factory-buttons-way .factory-on.active {
110
- background-color: #5d05b7 !important;
111
- box-shadow: none !important;
112
- border: none !important;
113
- }
114
-
115
- .factory-bootstrap-455 .factory-buttons-way .factory-off.active {
116
- background-color: #5d05b7 !important;
117
- box-shadow: none !important;
118
- border: none !important;
119
- }
120
-
121
- .wt-scanner-tabs-container {
122
- background: #fff !important;
123
- }
124
-
125
- .factory-bootstrap-455 .nav-tabs > li.active > a, .factory-bootstrap-455 .nav-tabs > li.active > a:focus, .factory-bootstrap-455 .nav-tabs > li.active > a:hover {
126
- background-color: #efefef !important;
127
- }
128
-
129
- .wtitan-tab-table-container {
130
- background-color: #efefef !important;
131
- }
132
-
133
- .wtitan-scanner-vulner-table-container table thead td {
134
- background-color: #efefef !important;
135
- }
136
-
137
- .wtitan-scanner-results table td {
138
- word-break: break-word;
139
- }
140
-
141
- .wtitan-scanner-results table td code {
142
- word-break: break-word;
143
- white-space: normal;
144
- }
145
-
146
- /*----------------*/
147
- li.wt-tabs-pro a:after {
148
- display: inline-block;
149
- position: relative;
150
- content: 'PRO';
151
- background: #f6065b;
152
- border-radius: 4px;
153
- color: #fff;
154
- font-size: 10px;
155
- line-height: 1;
156
- font-style: normal;
157
- padding: 4px 6px;
158
- margin-left: 4px;
159
- vertical-align: top;
160
- top: 0;
161
- left: 5px;
162
- right: 0;
163
- z-index: 11;
164
- cursor: pointer;
165
- }
166
-
167
- .wt-dashboard-pro-span {
168
- background: #f6065b;
169
- border-radius: 4px;
170
- color: #fff;
171
- font-size: 10px;
172
- line-height: 1;
173
- font-style: normal;
174
- padding: 4px 6px;
175
- margin-left: 4px;
176
- }
177
-
178
- .wt-scan-icon-loader {
179
- height: 55px;
180
- background: transparent url("../img/loader.gif");
181
- background-repeat: no-repeat;
182
- background-position: center center;
183
- background-size: 60px;
184
- }
185
-
186
- .wt-magenta-text {
187
- color: #5d05b7;
188
- font-weight: 500;
189
- }
190
-
191
- .wt-dashboard-audit-button, .wt-dashboard-scan-button {
192
- font-size: 16px !important;
193
- }
194
-
195
- .wt-dashboard-audit-button {
196
- margin: 20px 10px 0 0 !important;
197
- }
198
-
199
- /*--- Scanner -------*/
200
- .wt-dashboard-scan-button-loader, .wt-scan-icon-loader {
201
- display: inline-block;
202
- height: 34px;
203
- width: 34px;
204
- background: transparent url("../img/loader.gif") no-repeat center bottom;
205
- background-size: contain;
206
- vertical-align: bottom;
207
-
208
- }
209
-
210
- .wt-scanner-chart, .wt-scanner-legend {
211
- border-radius: 5px;
212
- margin: 0 10px 10px 10px;
213
- }
214
-
215
- .wt-scanner-chart-clean[style*="width: 0%"],
216
- .wt-scanner-chart-suspicious[style*="width: 0%"],
217
- .wt-scanner-chart-notverified[style*="width: 0%"] {
218
- display: none !important;
219
- }
220
-
221
- .wt-scanner-chart-clean, .wt-scanner-chart-suspicious, .wt-scanner-chart-notverified {
222
- border: 1px solid #c1c1c1;
223
- border-radius: 5px;
224
- display: inline-block !important;
225
- content: "";
226
- height: 30px;
227
- margin: 0 -5px;
228
- position: relative;
229
- }
230
-
231
- .wt-scanner-chart-clean {
232
- background-color: #5d05b7;
233
- z-index: 10;
234
- border-right: 0;
235
- }
236
-
237
- .wt-scanner-chart-suspicious {
238
- background-color: #f6065b;
239
- z-index: 9;
240
- border-right: 0;
241
- }
242
-
243
- .wt-scanner-chart-notverified {
244
- background-color: #dadada;
245
- z-index: 8;
246
- }
247
-
248
- .wt-scanner-legend td {
249
- padding: 0 0 0 10px;
250
- font-size: 12px;
251
- -webkit-transition: background-color 200ms ease-in-out;
252
- -moz-transition: background-color 200ms ease-in-out;
253
- -o-transition: background-color 200ms ease-in-out;
254
- transition: background-color 200ms ease-in-out;
255
- }
256
-
257
- span.wt-legend-item {
258
- display: inline-block;
259
- width: 30px;
260
- height: 30px;
261
- border-radius: 50%;
262
- padding-top: 6px;
263
- }
264
-
265
- .wt-scanner-legend td:nth-child(odd) {
266
- padding: 0 0 0 20px !important;
267
- }
268
-
269
- .wbcr-titan-content {
270
- overflow: auto;
271
- height: 500px;
272
- }
273
-
274
- .wbcr-titan-content table thead th {
275
- text-align: center;
276
- }
277
-
278
- .wbcr-titan-content table tbody td {
279
- word-break: break-word;
280
- text-align: left;
281
- padding: 10px 20px;
282
- }
283
-
284
- .wbcr-titan-content table tbody td:first-child {
285
- width: 50%;
286
- }
287
-
288
- .wt-nobutton {
289
- cursor: inherit !important;
290
- margin: 0 5px;
291
- }
292
-
293
- .wt-dashboard-form-label {
294
- width: unset;
295
- float: unset;
296
- display: block;
297
- vertical-align: middle;
298
- font-size: 16px;
299
- margin-right: 10px;
300
- }
301
-
302
- .wt-dashboard-block-content .factory-buttons-group .btn-default {
303
- font-size: 16px;
304
- }
305
-
306
- .factory-hints {
307
- text-align: left !important;
308
  }
1
+ #wpfooter {
2
+ position: initial !important;
3
+ /*display: inline;*/
4
+ }
5
+
6
+ .wt-dashboard-container {
7
+ margin: 10px 5px 10px 5px;
8
+ /*display: inline-block;*/
9
+ }
10
+
11
+ .wt-dashboard-block {
12
+ /*width: 100%;*/
13
+ border: 1px solid #d6d6d6;
14
+ background: #fff;
15
+ text-align: center;
16
+ border-radius: 5px;
17
+ min-height: 16em !important;
18
+ }
19
+
20
+ .wt-row {
21
+ width: 100%;
22
+ display: inline-block;
23
+ }
24
+
25
+ .wt-row .row {
26
+ display: block !important;
27
+ width: auto !important;
28
+ }
29
+
30
+ .wt-dashboard-block div.row {
31
+ padding: 0 15px 0 15px;
32
+ }
33
+
34
+ .wt-block-gutter {
35
+ padding: 0 10px 0 5px !important;
36
+ }
37
+
38
+ .wt-dashboard-block-header {
39
+ text-align: left;
40
+ padding: 0 !important;
41
+ }
42
+
43
+ .wt-dashboard-block-header h4 {
44
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
45
+ font-size: 12px;
46
+ font-weight: 600;
47
+ margin: 10px;
48
+ color: #868686;
49
+ text-transform: uppercase;
50
+ }
51
+
52
+ .wt-dashboard-block-header-right {
53
+ text-align: right;
54
+ }
55
+
56
+ .wt-dashboard-block-content {
57
+ margin: 10px -20px 10px 20px;
58
+ text-align: left;
59
+ }
60
+
61
+ .wt-dashboard-block-content-right {
62
+ margin: 10px 20px 10px -20px;
63
+ text-align: right;
64
+ }
65
+
66
+ .wt-block-description {
67
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
68
+ font-size: 12px;
69
+ margin-top: 10px;
70
+ color: #868686;
71
+ }
72
+
73
+ .wt-firewall-icon-ok, .wt-firewall-icon-clock, .wt-firewall-icon-dissmiss, .wt-dashboard-icon-loader {
74
+ width: 50px;
75
+ height: 60px;
76
+ display: inline-block;
77
+ }
78
+
79
+ .wt-firewall-icon-ok {
80
+ background: url('../img/check.png') no-repeat center bottom;
81
+ background-size: contain;
82
+ }
83
+
84
+ .wt-firewall-icon-clock {
85
+ background: url('../img/clock.png') no-repeat center bottom;
86
+ background-size: contain;
87
+ }
88
+
89
+ .wt-firewall-icon-dissmiss {
90
+ background: url('../img/x.png') no-repeat center bottom;
91
+ background-size: contain;
92
+ }
93
+
94
+ .wt-dashboard-icon-loader {
95
+ background: transparent url("../img/loader.gif") no-repeat center bottom;
96
+ background-size: contain;
97
+ }
98
+
99
+ .wt-block-loading {
100
+ opacity: 0.5;
101
+ }
102
+
103
+ .wt-checkbox {
104
+ background-color: #5d05b7 !important;
105
+ border: 2px solid #5d05b7 !important;
106
+ border-radius: 5px !important;
107
+ }
108
+
109
+ .factory-bootstrap-459 .factory-buttons-way .factory-on.active {
110
+ background-color: #5d05b7 !important;
111
+ box-shadow: none !important;
112
+ border: none !important;
113
+ }
114
+
115
+ .factory-bootstrap-459 .factory-buttons-way .factory-off.active {
116
+ background-color: #5d05b7 !important;
117
+ box-shadow: none !important;
118
+ border: none !important;
119
+ }
120
+
121
+ .wt-scanner-tabs-container {
122
+ background: #fff !important;
123
+ }
124
+
125
+ .factory-bootstrap-459 .nav-tabs > li.active > a, .factory-bootstrap-459 .nav-tabs > li.active > a:focus, .factory-bootstrap-459 .nav-tabs > li.active > a:hover {
126
+ background-color: #efefef !important;
127
+ }
128
+
129
+ .wtitan-tab-table-container {
130
+ background-color: #efefef !important;
131
+ }
132
+
133
+ .wtitan-scanner-vulner-table-container table thead td {
134
+ background-color: #efefef !important;
135
+ }
136
+
137
+ .wtitan-scanner-results table td {
138
+ word-break: break-word;
139
+ }
140
+
141
+ .wtitan-scanner-results table td code {
142
+ word-break: break-word;
143
+ white-space: normal;
144
+ }
145
+
146
+ /*----------------*/
147
+ li.wt-tabs-pro a:after {
148
+ display: inline-block;
149
+ position: relative;
150
+ content: 'PRO';
151
+ background: #f6065b;
152
+ border-radius: 4px;
153
+ color: #fff;
154
+ font-size: 10px;
155
+ line-height: 1;
156
+ font-style: normal;
157
+ padding: 4px 6px;
158
+ margin-left: 4px;
159
+ vertical-align: top;
160
+ top: 0;
161
+ left: 5px;
162
+ right: 0;
163
+ z-index: 11;
164
+ cursor: pointer;
165
+ }
166
+
167
+ .wt-dashboard-pro-span {
168
+ background: #f6065b;
169
+ border-radius: 4px;
170
+ color: #fff;
171
+ font-size: 10px;
172
+ line-height: 1;
173
+ font-style: normal;
174
+ padding: 4px 6px;
175
+ margin-left: 4px;
176
+ }
177
+
178
+ .wt-scan-icon-loader {
179
+ height: 55px;
180
+ background: transparent url("../img/loader.gif");
181
+ background-repeat: no-repeat;
182
+ background-position: center center;
183
+ background-size: 60px;
184
+ }
185
+
186
+ .wt-magenta-text {
187
+ color: #5d05b7;
188
+ font-weight: 500;
189
+ }
190
+
191
+ .wt-dashboard-audit-button, .wt-dashboard-scan-button {
192
+ font-size: 16px !important;
193
+ }
194
+
195
+ .wt-dashboard-audit-button {
196
+ margin: 20px 10px 0 0 !important;
197
+ }
198
+
199
+ /*--- Scanner -------*/
200
+ .wt-dashboard-scan-button-loader, .wt-scan-icon-loader {
201
+ display: inline-block;
202
+ height: 34px;
203
+ width: 34px;
204
+ background: transparent url("../img/loader.gif") no-repeat center bottom;
205
+ background-size: contain;
206
+ vertical-align: bottom;
207
+
208
+ }
209
+
210
+ .wt-scanner-chart, .wt-scanner-legend {
211
+ border-radius: 5px;
212
+ margin: 0 10px 10px 10px;
213
+ }
214
+
215
+ .wt-scanner-chart-clean[style*="width: 0%"],
216
+ .wt-scanner-chart-suspicious[style*="width: 0%"],
217
+ .wt-scanner-chart-notverified[style*="width: 0%"] {
218
+ display: none !important;
219
+ }
220
+
221
+ .wt-scanner-chart-clean, .wt-scanner-chart-suspicious, .wt-scanner-chart-notverified {
222
+ border: 1px solid #c1c1c1;
223
+ border-radius: 5px;
224
+ display: inline-block !important;
225
+ content: "";
226
+ height: 30px;
227
+ margin: 0 -5px;
228
+ position: relative;
229
+ }
230
+
231
+ .wt-scanner-chart-clean {
232
+ background-color: #5d05b7;
233
+ z-index: 10;
234
+ border-right: 0;
235
+ }
236
+
237
+ .wt-scanner-chart-suspicious {
238
+ background-color: #f6065b;
239
+ z-index: 9;
240
+ border-right: 0;
241
+ }
242
+
243
+ .wt-scanner-chart-notverified {
244
+ background-color: #dadada;
245
+ z-index: 8;
246
+ }
247
+
248
+ .wt-scanner-legend td {
249
+ padding: 0 0 0 10px;
250
+ font-size: 12px;
251
+ -webkit-transition: background-color 200ms ease-in-out;
252
+ -moz-transition: background-color 200ms ease-in-out;
253
+ -o-transition: background-color 200ms ease-in-out;
254
+ transition: background-color 200ms ease-in-out;
255
+ }
256
+
257
+ span.wt-legend-item {
258
+ display: inline-block;
259
+ width: 30px;
260
+ height: 30px;
261
+ border-radius: 50%;
262
+ padding-top: 6px;
263
+ }
264
+
265
+ .wt-scanner-legend td:nth-child(odd) {
266
+ padding: 0 0 0 20px !important;
267
+ }
268
+
269
+ .wbcr-titan-content {
270
+ overflow: auto;
271
+ height: 500px;
272
+ }
273
+
274
+ .wbcr-titan-content table thead th {
275
+ text-align: center;
276
+ }
277
+
278
+ .wbcr-titan-content table tbody td {
279
+ word-break: break-word;
280
+ text-align: left;
281
+ padding: 10px 20px;
282
+ }
283
+
284
+ .wbcr-titan-content table tbody td:first-child {
285
+ width: 50%;
286
+ }
287
+
288
+ .wt-nobutton {
289
+ cursor: inherit !important;
290
+ margin: 0 5px;
291
+ }
292
+
293
+ .wt-dashboard-form-label {
294
+ width: unset;
295
+ float: unset;
296
+ display: block;
297
+ vertical-align: middle;
298
+ font-size: 16px;
299
+ margin-right: 10px;
300
+ }
301
+
302
+ .wt-dashboard-block-content .factory-buttons-group .btn-default {
303
+ font-size: 16px;
304
+ }
305
+
306
+ .factory-hints {
307
+ text-align: left !important;
308
  }
admin/assets/css/firewall/firewall-attacks-log.css CHANGED
@@ -1,68 +1,68 @@
1
- .wtitan-attacks-log {
2
- padding: 0 20px;
3
- }
4
- .wtitan-attacks-log.wtitan-section-disabled {
5
- opacity: 0.4;
6
- }
7
- .wtitan-attacks-log.wtitan-section-disabled select,
8
- .wtitan-attacks-log.wtitan-section-disabled button,
9
- .wtitan-attacks-log.wtitan-section-disabled a {
10
- pointer-events: none;
11
- cursor: not-allowed;
12
- opacity: 0.65;
13
- filter: alpha(opacity=65);
14
- -webkit-box-shadow: none;
15
- box-shadow: none;
16
- }
17
- .wtitan-attacks-log__nav {
18
- padding: 15px;
19
- text-align: right;
20
- }
21
- .wtitan-attacks-log__pages {
22
- display: inline-block;
23
- }
24
- .wtitan-attacks-log__pages .page-numbers {
25
- display: inline-block;
26
- vertical-align: baseline;
27
- text-decoration: none;
28
- min-width: 30px;
29
- min-height: 30px;
30
- margin: 0;
31
- padding: 0 4px;
32
- font-size: 13px;
33
- line-height: 2.1;
34
- text-align: center;
35
- box-shadow: 0 0 0 transparent;
36
- border-radius: 4px;
37
- border: 1px solid #e6e6e6;
38
- background-color: #efefef;
39
- color: #424242;
40
- }
41
- .wtitan-attacks-log__pages .page-numbers.current {
42
- background-color: #fff;
43
- }
44
- .wtitan-attacks-log__table td,
45
- .wtitan-attacks-log__table th {
46
- padding: 10px 20px !important;
47
- }
48
- .wtitan-attacks-log__table-column-event ul {
49
- margin: 0;
50
- padding: 0;
51
- }
52
- .wtitan-attacks-log__table-column-event ul li {
53
- display: block;
54
- margin: 0;
55
- padding: 3px 0;
56
- }
57
- .wtitan-attacks-log__table-label--red {
58
- background: #dc7a7a;
59
- color: #fff;
60
- padding: 3px;
61
- }
62
- .wtitan-ip-blocking__form {
63
- margin: 0 auto;
64
- }
65
- .wtitan-ip-blocking__form__form-label {
66
- display: block;
67
- }
68
  /*# sourceMappingURL=firewall-attacks-log.css.map */
1
+ .wtitan-attacks-log {
2
+ padding: 0 20px;
3
+ }
4
+ .wtitan-attacks-log.wtitan-section-disabled {
5
+ opacity: 0.4;
6
+ }
7
+ .wtitan-attacks-log.wtitan-section-disabled select,
8
+ .wtitan-attacks-log.wtitan-section-disabled button,
9
+ .wtitan-attacks-log.wtitan-section-disabled a {
10
+ pointer-events: none;
11
+ cursor: not-allowed;
12
+ opacity: 0.65;
13
+ filter: alpha(opacity=65);
14
+ -webkit-box-shadow: none;
15
+ box-shadow: none;
16
+ }
17
+ .wtitan-attacks-log__nav {
18
+ padding: 15px;
19
+ text-align: right;
20
+ }
21
+ .wtitan-attacks-log__pages {
22
+ display: inline-block;
23
+ }
24
+ .wtitan-attacks-log__pages .page-numbers {
25
+ display: inline-block;
26
+ vertical-align: baseline;
27
+ text-decoration: none;
28
+ min-width: 30px;
29
+ min-height: 30px;
30
+ margin: 0;
31
+ padding: 0 4px;
32
+ font-size: 13px;
33
+ line-height: 2.1;
34
+ text-align: center;
35
+ box-shadow: 0 0 0 transparent;
36
+ border-radius: 4px;
37
+ border: 1px solid #e6e6e6;
38
+ background-color: #efefef;
39
+ color: #424242;
40
+ }
41
+ .wtitan-attacks-log__pages .page-numbers.current {
42
+ background-color: #fff;
43
+ }
44
+ .wtitan-attacks-log__table td,
45
+ .wtitan-attacks-log__table th {
46
+ padding: 10px 20px !important;
47
+ }
48
+ .wtitan-attacks-log__table-column-event ul {
49
+ margin: 0;
50
+ padding: 0;
51
+ }
52
+ .wtitan-attacks-log__table-column-event ul li {
53
+ display: block;
54
+ margin: 0;
55
+ padding: 3px 0;
56
+ }
57
+ .wtitan-attacks-log__table-label--red {
58
+ background: #dc7a7a;
59
+ color: #fff;
60
+ padding: 3px;
61
+ }
62
+ .wtitan-ip-blocking__form {
63
+ margin: 0 auto;
64
+ }
65
+ .wtitan-ip-blocking__form__form-label {
66
+ display: block;
67
+ }
68
  /*# sourceMappingURL=firewall-attacks-log.css.map */
admin/assets/css/firewall/firewall-attacks-log.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["firewall-attacks-log.less"],"names":[],"mappings":"AAAA;EACE,eAAA;;AAEA,mBAAC;EACC,YAAA;;AADF,mBAAC,wBAGC;AAHF,mBAAC,wBAGS;AAHV,mBAAC,wBAGiB;EACd,oBAAA;EACA,mBAAA;EACA,aAAA;EACA,yBAAA;EACA,wBAAA;EACA,gBAAA;;AAIJ,mBAAC;EACC,aAAA;EACA,iBAAA;;AAGF,mBAAC;EACC,qBAAA;;AADF,mBAAC,OAGC;EACE,qBAAA;EACA,wBAAA;EACA,qBAAA;EACA,eAAA;EACA,gBAAA;EACA,SAAA;EACA,cAAA;EACA,eAAA;EACA,gBAAA;EACA,kBAAA;EACA,6BAAA;EACA,kBAAA;EACA,yBAAA;EACA,yBAAA;EACA,cAAA;;AAEA,mBApBH,OAGC,cAiBG;EACC,sBAAA;;AASN,mBAAC,OACC;AADF,mBAAC,OACK;EACF,6BAAA;;AAGF,mBALD,OAKE,aACC;EACE,SAAA;EACA,UAAA;;AAHJ,mBALD,OAKE,aACC,GAIE;EACE,cAAA;EACA,SAAA;EACA,cAAA;;AAKN,mBAlBD,OAkBE;EACC,mBAAA;EACA,WAAA;EACA,YAAA;;AAMJ,mBAAC;EACC,cAAA;;AAEA,mBAHD,MAGE;EACC,cAAA","file":"firewall-attacks-log.css"}
admin/assets/css/firewall/firewall-attacks-log.less CHANGED
@@ -1,86 +1,86 @@
1
- .wtitan-attacks-log {
2
- padding: 0 20px;
3
-
4
- &.wtitan-section-disabled {
5
- opacity: 0.4;
6
-
7
- select, button, a {
8
- pointer-events: none;
9
- cursor: not-allowed;
10
- opacity: 0.65;
11
- filter: alpha(opacity=65);
12
- -webkit-box-shadow: none;
13
- box-shadow: none;
14
- }
15
- }
16
-
17
- &__nav {
18
- padding: 15px;
19
- text-align: right;
20
- }
21
-
22
- &__pages {
23
- display: inline-block;
24
-
25
- .page-numbers {
26
- display: inline-block;
27
- vertical-align: baseline;
28
- text-decoration: none;
29
- min-width: 30px;
30
- min-height: 30px;
31
- margin: 0;
32
- padding: 0 4px;
33
- font-size: 13px;
34
- line-height: 2.1;
35
- text-align: center;
36
- box-shadow: 0 0 0 transparent;
37
- border-radius: 4px;
38
- border: 1px solid #e6e6e6;
39
- background-color: #efefef;
40
- color: #424242;
41
-
42
- &.current {
43
- background-color: #fff;
44
- }
45
- }
46
- }
47
-
48
- &__form {
49
-
50
- }
51
-
52
- &__table {
53
- td, th {
54
- padding: 10px 20px !important;
55
- }
56
-
57
- &-column-event {
58
- ul {
59
- margin: 0;
60
- padding: 0;
61
-
62
- li {
63
- display: block;
64
- margin: 0;
65
- padding: 3px 0;
66
- }
67
- }
68
- }
69
-
70
- &-label--red {
71
- background: #dc7a7a;
72
- color: #fff;
73
- padding: 3px;
74
- }
75
- }
76
- }
77
-
78
- .wtitan-ip-blocking {
79
- &__form {
80
- margin: 0 auto;
81
-
82
- &__form-label {
83
- display: block;
84
- }
85
- }
86
  }
1
+ .wtitan-attacks-log {
2
+ padding: 0 20px;
3
+
4
+ &.wtitan-section-disabled {
5
+ opacity: 0.4;
6
+
7
+ select, button, a {
8
+ pointer-events: none;
9
+ cursor: not-allowed;
10
+ opacity: 0.65;
11
+ filter: alpha(opacity=65);
12
+ -webkit-box-shadow: none;
13
+ box-shadow: none;
14
+ }
15
+ }
16
+
17
+ &__nav {
18
+ padding: 15px;
19
+ text-align: right;
20
+ }
21
+
22
+ &__pages {
23
+ display: inline-block;
24
+
25
+ .page-numbers {
26
+ display: inline-block;
27
+ vertical-align: baseline;
28
+ text-decoration: none;
29
+ min-width: 30px;
30
+ min-height: 30px;
31
+ margin: 0;
32
+ padding: 0 4px;
33
+ font-size: 13px;
34
+ line-height: 2.1;
35
+ text-align: center;
36
+ box-shadow: 0 0 0 transparent;
37
+ border-radius: 4px;
38
+ border: 1px solid #e6e6e6;
39
+ background-color: #efefef;
40
+ color: #424242;
41
+
42
+ &.current {
43
+ background-color: #fff;
44
+ }
45
+ }
46
+ }
47
+
48
+ &__form {
49
+
50
+ }
51
+
52
+ &__table {
53
+ td, th {
54
+ padding: 10px 20px !important;
55
+ }
56
+
57
+ &-column-event {
58
+ ul {
59
+ margin: 0;
60
+ padding: 0;
61
+
62
+ li {
63
+ display: block;
64
+ margin: 0;
65
+ padding: 3px 0;
66
+ }
67
+ }
68
+ }
69
+
70
+ &-label--red {
71
+ background: #dc7a7a;
72
+ color: #fff;
73
+ padding: 3px;
74
+ }
75
+ }
76
+ }
77
+
78
+ .wtitan-ip-blocking {
79
+ &__form {
80
+ margin: 0 auto;
81
+
82
+ &__form-label {
83
+ display: block;
84
+ }
85
+ }
86
  }
admin/assets/css/firewall/firewall-dashboard.css CHANGED
@@ -1,83 +1,83 @@
1
- #wtitan-firewall-dashboard-top-section table {
2
- width: 100%;
3
- table-layout: fixed;
4
- }
5
- #wtitan-firewall-dashboard-top-section table td {
6
- border: 1px solid #efefef;
7
- background: #fff;
8
- text-align: center;
9
- padding: 20px;
10
- }
11
- #wtitan-firewall-dashboard-top-section table td h4 {
12
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
13
- font-size: 16px;
14
- }
15
- .wtitan-status-circular {
16
- position: relative;
17
- margin: 0 auto;
18
- }
19
- .wtitan-status-circular-text {
20
- position: absolute;
21
- left: 50%;
22
- top: 50%;
23
- padding: 0;
24
- margin: 0;
25
- transform: translate(-50%, -50%);
26
- color: #aaa;
27
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
28
- font-size: 1.3125rem;
29
- font-weight: 300;
30
- line-height: 1.5;
31
- }
32
- .wtitan-status-circular .wf-status-overlay-text {
33
- position: absolute;
34
- left: 50%;
35
- top: 50%;
36
- padding: 0;
37
- margin: 0;
38
- width: 200%;
39
- text-align: center;
40
- transform: translate(-50%, -50%);
41
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
42
- font-size: 0.875rem;
43
- font-weight: normal;
44
- line-height: 1.3125;
45
- opacity: 0;
46
- color: #777;
47
- }
48
- .wf-status-warning,
49
- .wf-status-critical,
50
- .wf-status-payment-expiring,
51
- .wf-status-renewing {
52
- width: 100px;
53
- height: 100px;
54
- margin-bottom: 1rem;
55
- }
56
- .wf-status-warning svg path {
57
- fill: #fcb214;
58
- }
59
- .wf-status-critical svg path {
60
- fill: #930000;
61
- }
62
- .wf-status-payment-expiring svg rect,
63
- .wf-status-payment-expiring svg path {
64
- fill: #930000;
65
- }
66
- .wf-status-renewing svg rect,
67
- .wf-status-renewing svg path {
68
- fill: #11967a;
69
- }
70
- .wtitan-section-disabled {
71
- opacity: 0.4;
72
- }
73
- .wtitan-section-disabled select,
74
- .wtitan-section-disabled button,
75
- .wtitan-section-disabled a {
76
- pointer-events: none;
77
- cursor: not-allowed;
78
- opacity: 0.65;
79
- filter: alpha(opacity=65);
80
- -webkit-box-shadow: none;
81
- box-shadow: none;
82
- }
83
  /*# sourceMappingURL=firewall-dashboard.css.map */
1
+ #wtitan-firewall-dashboard-top-section table {
2
+ width: 100%;
3
+ table-layout: fixed;
4
+ }
5
+ #wtitan-firewall-dashboard-top-section table td {
6
+ border: 1px solid #efefef;
7
+ background: #fff;
8
+ text-align: center;
9
+ padding: 20px;
10
+ }
11
+ #wtitan-firewall-dashboard-top-section table td h4 {
12
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
13
+ font-size: 16px;
14
+ }
15
+ .wtitan-status-circular {
16
+ position: relative;
17
+ margin: 0 auto;
18
+ }
19
+ .wtitan-status-circular-text {
20
+ position: absolute;
21
+ left: 50%;
22
+ top: 50%;
23
+ padding: 0;
24
+ margin: 0;
25
+ transform: translate(-50%, -50%);
26
+ color: #aaa;
27
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
28
+ font-size: 1.3125rem;
29
+ font-weight: 300;
30
+ line-height: 1.5;
31
+ }
32
+ .wtitan-status-circular .wf-status-overlay-text {
33
+ position: absolute;
34
+ left: 50%;
35
+ top: 50%;
36
+ padding: 0;
37
+ margin: 0;
38
+ width: 200%;
39
+ text-align: center;
40
+ transform: translate(-50%, -50%);
41
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
42
+ font-size: 0.875rem;
43
+ font-weight: normal;
44
+ line-height: 1.3125;
45
+ opacity: 0;
46
+ color: #777;
47
+ }
48
+ .wf-status-warning,
49
+ .wf-status-critical,
50
+ .wf-status-payment-expiring,
51
+ .wf-status-renewing {
52
+ width: 100px;
53
+ height: 100px;
54
+ margin-bottom: 1rem;
55
+ }
56
+ .wf-status-warning svg path {
57
+ fill: #fcb214;
58
+ }
59
+ .wf-status-critical svg path {
60
+ fill: #930000;
61
+ }
62
+ .wf-status-payment-expiring svg rect,
63
+ .wf-status-payment-expiring svg path {
64
+ fill: #930000;
65
+ }
66
+ .wf-status-renewing svg rect,
67
+ .wf-status-renewing svg path {
68
+ fill: #11967a;
69
+ }
70
+ .wtitan-section-disabled {
71
+ opacity: 0.4;
72
+ }
73
+ .wtitan-section-disabled select,
74
+ .wtitan-section-disabled button,
75
+ .wtitan-section-disabled a {
76
+ pointer-events: none;
77
+ cursor: not-allowed;
78
+ opacity: 0.65;
79
+ filter: alpha(opacity=65);
80
+ -webkit-box-shadow: none;
81
+ box-shadow: none;
82
+ }
83
  /*# sourceMappingURL=firewall-dashboard.css.map */
admin/assets/css/firewall/firewall-dashboard.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["firewall-dashboard.less"],"names":[],"mappings":"AACA,sCACE;EACE,WAAA;EACA,mBAAA;;AAHJ,sCACE,MAKE;EACE,yBAAA;EACA,gBAAA;EACA,kBAAA;EACA,aAAA;;AAVN,sCACE,MAKE,GAME;EACE,qBAAqB,8CAArB;EACA,eAAA;;AAMR;EACE,kBAAA;EACA,cAAA;;AAGF;EACE,kBAAA;EACA,SAAA;EACA,QAAA;EACA,UAAA;EACA,SAAA;EACA,WAAW,qBAAX;EACA,WAAA;EACA,qBAAqB,8CAArB;EACA,oBAAA;EACA,gBAAA;EACA,gBAAA;;AAGF,uBAAwB;EACtB,kBAAA;EACA,SAAA;EACA,QAAA;EACA,UAAA;EACA,SAAA;EACA,WAAA;EACA,kBAAA;EACA,WAAW,qBAAX;EACA,qBAAqB,8CAArB;EACA,mBAAA;EACA,mBAAA;EACA,mBAAA;EACA,UAAA;EACA,WAAA;;AAGF;AAAoB;AAAqB;AAA6B;EACpE,YAAA;EACA,aAAA;EACA,mBAAA;;AAGF,kBAAmB,IAAI;EACrB,aAAA;;AAGF,mBAAoB,IAAI;EACtB,aAAA;;AAGF,2BAA4B,IAAI;AAAM,2BAA4B,IAAI;EACpE,aAAA;;AAGF,mBAAoB,IAAI;AAAM,mBAAoB,IAAI;EACpD,aAAA;;AAGF;EACE,YAAA;;AADF,wBAGE;AAHF,wBAGU;AAHV,wBAGkB;EACd,oBAAA;EACA,mBAAA;EACA,aAAA;EACA,yBAAA;EACA,wBAAA;EACA,gBAAA","file":"firewall-dashboard.css"}
admin/assets/css/firewall/firewall-dashboard.less CHANGED
@@ -1,91 +1,91 @@
1
-
2
- #wtitan-firewall-dashboard-top-section {
3
- table {
4
- width: 100%;
5
- table-layout: fixed;
6
-
7
-
8
- td {
9
- border: 1px solid #efefef;
10
- background: #fff;
11
- text-align: center;
12
- padding: 20px;
13
-
14
- h4 {
15
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
16
- font-size: 16px;
17
- }
18
- }
19
- }
20
- }
21
-
22
- .wtitan-status-circular {
23
- position: relative;
24
- margin: 0 auto;
25
- }
26
-
27
- .wtitan-status-circular-text {
28
- position: absolute;
29
- left: 50%;
30
- top: 50%;
31
- padding: 0;
32
- margin: 0;
33
- transform: translate(-50%, -50%);
34
- color: #aaa;
35
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
36
- font-size: 1.3125rem;
37
- font-weight: 300;
38
- line-height: 1.5
39
- }
40
-
41
- .wtitan-status-circular .wf-status-overlay-text {
42
- position: absolute;
43
- left: 50%;
44
- top: 50%;
45
- padding: 0;
46
- margin: 0;
47
- width: 200%;
48
- text-align: center;
49
- transform: translate(-50%, -50%);
50
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
51
- font-size: .875rem;
52
- font-weight: normal;
53
- line-height: 1.3125;
54
- opacity: 0.0;
55
- color: #777
56
- }
57
-
58
- .wf-status-warning, .wf-status-critical, .wf-status-payment-expiring, .wf-status-renewing {
59
- width: 100px;
60
- height: 100px;
61
- margin-bottom: 1rem
62
- }
63
-
64
- .wf-status-warning svg path {
65
- fill: #fcb214
66
- }
67
-
68
- .wf-status-critical svg path {
69
- fill: #930000
70
- }
71
-
72
- .wf-status-payment-expiring svg rect, .wf-status-payment-expiring svg path {
73
- fill: #930000
74
- }
75
-
76
- .wf-status-renewing svg rect, .wf-status-renewing svg path {
77
- fill: #11967a
78
- }
79
-
80
- .wtitan-section-disabled {
81
- opacity: 0.4;
82
-
83
- select, button, a {
84
- pointer-events: none;
85
- cursor: not-allowed;
86
- opacity: 0.65;
87
- filter: alpha(opacity=65);
88
- -webkit-box-shadow: none;
89
- box-shadow: none;
90
- }
91
- }
1
+
2
+ #wtitan-firewall-dashboard-top-section {
3
+ table {
4
+ width: 100%;
5
+ table-layout: fixed;
6
+
7
+
8
+ td {
9
+ border: 1px solid #efefef;
10
+ background: #fff;
11
+ text-align: center;
12
+ padding: 20px;
13
+
14
+ h4 {
15
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
16
+ font-size: 16px;
17
+ }
18
+ }
19
+ }
20
+ }
21
+
22
+ .wtitan-status-circular {
23
+ position: relative;
24
+ margin: 0 auto;
25
+ }
26
+
27
+ .wtitan-status-circular-text {
28
+ position: absolute;
29
+ left: 50%;
30
+ top: 50%;
31
+ padding: 0;
32
+ margin: 0;
33
+ transform: translate(-50%, -50%);
34
+ color: #aaa;
35
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
36
+ font-size: 1.3125rem;
37
+ font-weight: 300;
38
+ line-height: 1.5
39
+ }
40
+
41
+ .wtitan-status-circular .wf-status-overlay-text {
42
+ position: absolute;
43
+ left: 50%;
44
+ top: 50%;
45
+ padding: 0;
46
+ margin: 0;
47
+ width: 200%;
48
+ text-align: center;
49
+ transform: translate(-50%, -50%);
50
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
51
+ font-size: .875rem;
52
+ font-weight: normal;
53
+ line-height: 1.3125;
54
+ opacity: 0.0;
55
+ color: #777
56
+ }
57
+
58
+ .wf-status-warning, .wf-status-critical, .wf-status-payment-expiring, .wf-status-renewing {
59
+ width: 100px;
60
+ height: 100px;
61
+ margin-bottom: 1rem
62
+ }
63
+
64
+ .wf-status-warning svg path {
65
+ fill: #fcb214
66
+ }
67
+
68
+ .wf-status-critical svg path {
69
+ fill: #930000
70
+ }
71
+
72
+ .wf-status-payment-expiring svg rect, .wf-status-payment-expiring svg path {
73
+ fill: #930000
74
+ }
75
+
76
+ .wf-status-renewing svg rect, .wf-status-renewing svg path {
77
+ fill: #11967a
78
+ }
79
+
80
+ .wtitan-section-disabled {
81
+ opacity: 0.4;
82
+
83
+ select, button, a {
84
+ pointer-events: none;
85
+ cursor: not-allowed;
86
+ opacity: 0.65;
87
+ filter: alpha(opacity=65);
88
+ -webkit-box-shadow: none;
89
+ box-shadow: none;
90
+ }
91
+ }
admin/assets/css/firewall/firewall-ips-blocking.css CHANGED
@@ -1,98 +1,98 @@
1
- .wtitan-ips-blocking {
2
- padding: 5px 20px;
3
- }
4
- .wtitan-ips-blocking.wtitan-section-disabled {
5
- opacity: 0.4;
6
- }
7
- .wtitan-ips-blocking.wtitan-section-disabled select,
8
- .wtitan-ips-blocking.wtitan-section-disabled button,
9
- .wtitan-ips-blocking.wtitan-section-disabled a {
10
- pointer-events: none;
11
- cursor: not-allowed;
12
- opacity: 0.65;
13
- filter: alpha(opacity=65);
14
- -webkit-box-shadow: none;
15
- box-shadow: none;
16
- }
17
- .wtitan-ips-blocking__controls {
18
- display: flex;
19
- flex-direction: row;
20
- }
21
- .wtitan-ips-blocking__controls-left {
22
- flex-grow: 0 !important;
23
- }
24
- .wtitan-ips-blocking__controls-right {
25
- flex-grow: 1 !important;
26
- text-align: right;
27
- }
28
- .wtitan-ips-blocking__controls li {
29
- display: block;
30
- }
31
- .wtitan-ips-blocking__table th,
32
- .wtitan-ips-blocking__table td {
33
- padding: 20px;
34
- }
35
- .wtitan-ips-blocking__table th {
36
- background-color: #ebebeb;
37
- color: #777;
38
- font-weight: bold;
39
- text-align: left;
40
- border-left: 1px solid #bdbdbd;
41
- }
42
- .wtitan-ips-blocking__table th:first-child {
43
- border: 0;
44
- }
45
- .wtitan-ips-blocking-modal__tabs {
46
- border-bottom: 1px solid #d0d0d0;
47
- }
48
- .wtitan-ips-blocking-modal__tab {
49
- display: inline-block;
50
- border: 1px solid #ccc;
51
- border-bottom: none;
52
- margin: 0;
53
- padding: 5px 10px;
54
- font-size: 14px;
55
- line-height: 1.71428571;
56
- font-weight: 600;
57
- background: #e5e5e5;
58
- color: #555;
59
- text-decoration: none;
60
- white-space: nowrap;
61
- }
62
- .wtitan-ips-blocking-modal__tab a {
63
- color: #555;
64
- text-decoration: none;
65
- font-size: 13px;
66
- }
67
- .wtitan-ips-blocking-modal__tab a:active,
68
- .wtitan-ips-blocking-modal__tab a:focus {
69
- outline: none;
70
- box-shadow: none;
71
- }
72
- .wtitan-ips-blocking-modal__tab--active {
73
- background: #ffffff;
74
- box-shadow: 0 2px 0 #efefef;
75
- }
76
- .wtitan-ips-blocking-modal__tab-content {
77
- display: none;
78
- }
79
- .wtitan-ips-blocking-modal__tab-content--active {
80
- display: block;
81
- }
82
- .wtitan-ips-blocking-modal__form {
83
- margin: 0 auto;
84
- }
85
- .wtitan-ips-blocking-modal__form-label {
86
- display: block;
87
- font-size: 14px;
88
- font-weight: 600;
89
- }
90
- .wtitan-ips-blocking-modal__form input[type="text"] {
91
- width: 100%;
92
- height: 40px;
93
- }
94
- .wtitan-ips-blocking-modal__form textarea {
95
- width: 100%;
96
- height: 100px;
97
- }
98
  /*# sourceMappingURL=firewall-ips-blocking.css.map */
1
+ .wtitan-ips-blocking {
2
+ padding: 5px 20px;
3
+ }
4
+ .wtitan-ips-blocking.wtitan-section-disabled {
5
+ opacity: 0.4;
6
+ }
7
+ .wtitan-ips-blocking.wtitan-section-disabled select,
8
+ .wtitan-ips-blocking.wtitan-section-disabled button,
9
+ .wtitan-ips-blocking.wtitan-section-disabled a {
10
+ pointer-events: none;
11
+ cursor: not-allowed;
12
+ opacity: 0.65;
13
+ filter: alpha(opacity=65);
14
+ -webkit-box-shadow: none;
15
+ box-shadow: none;
16
+ }
17
+ .wtitan-ips-blocking__controls {
18
+ display: flex;
19
+ flex-direction: row;
20
+ }
21
+ .wtitan-ips-blocking__controls-left {
22
+ flex-grow: 0 !important;
23
+ }
24
+ .wtitan-ips-blocking__controls-right {
25
+ flex-grow: 1 !important;
26
+ text-align: right;
27
+ }
28
+ .wtitan-ips-blocking__controls li {
29
+ display: block;
30
+ }
31
+ .wtitan-ips-blocking__table th,
32
+ .wtitan-ips-blocking__table td {
33
+ padding: 20px;
34
+ }
35
+ .wtitan-ips-blocking__table th {
36
+ background-color: #ebebeb;
37
+ color: #777;
38
+ font-weight: bold;
39
+ text-align: left;
40
+ border-left: 1px solid #bdbdbd;
41
+ }
42
+ .wtitan-ips-blocking__table th:first-child {
43
+ border: 0;
44
+ }
45
+ .wtitan-ips-blocking-modal__tabs {
46
+ border-bottom: 1px solid #d0d0d0;
47
+ }
48
+ .wtitan-ips-blocking-modal__tab {
49
+ display: inline-block;
50
+ border: 1px solid #ccc;
51
+ border-bottom: none;
52
+ margin: 0;
53
+ padding: 5px 10px;
54
+ font-size: 14px;
55
+ line-height: 1.71428571;
56
+ font-weight: 600;
57
+ background: #e5e5e5;
58
+ color: #555;
59
+ text-decoration: none;
60
+ white-space: nowrap;
61
+ }
62
+ .wtitan-ips-blocking-modal__tab a {
63
+ color: #555;
64
+ text-decoration: none;
65
+ font-size: 13px;
66
+ }
67
+ .wtitan-ips-blocking-modal__tab a:active,
68
+ .wtitan-ips-blocking-modal__tab a:focus {
69
+ outline: none;
70
+ box-shadow: none;
71
+ }
72
+ .wtitan-ips-blocking-modal__tab--active {
73
+ background: #ffffff;
74
+ box-shadow: 0 2px 0 #efefef;
75
+ }
76
+ .wtitan-ips-blocking-modal__tab-content {
77
+ display: none;
78
+ }
79
+ .wtitan-ips-blocking-modal__tab-content--active {
80
+ display: block;
81
+ }
82
+ .wtitan-ips-blocking-modal__form {
83
+ margin: 0 auto;
84
+ }
85
+ .wtitan-ips-blocking-modal__form-label {
86
+ display: block;
87
+ font-size: 14px;
88
+ font-weight: 600;
89
+ }
90
+ .wtitan-ips-blocking-modal__form input[type="text"] {
91
+ width: 100%;
92
+ height: 40px;
93
+ }
94
+ .wtitan-ips-blocking-modal__form textarea {
95
+ width: 100%;
96
+ height: 100px;
97
+ }
98
  /*# sourceMappingURL=firewall-ips-blocking.css.map */
admin/assets/css/firewall/firewall-ips-blocking.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["firewall-ips-blocking.less"],"names":[],"mappings":"AAAA;EACE,iBAAA;;AAEA,oBAAC;EACC,YAAA;;AADF,oBAAC,wBAGC;AAHF,oBAAC,wBAGS;AAHV,oBAAC,wBAGiB;EACd,oBAAA;EACA,mBAAA;EACA,aAAA;EACA,yBAAA;EACA,wBAAA;EACA,gBAAA;;AAKJ,oBAAC;EACC,aAAA;EACA,mBAAA;;AAEA,oBAJD,UAIE;EACC,uBAAA;;AAGF,oBARD,UAQE;EACC,uBAAA;EACA,iBAAA;;AAVJ,oBAAC,UAaC;EACE,cAAA;;AAIJ,oBAAC,OACC;AADF,oBAAC,OACK;EACF,aAAA;;AAFJ,oBAAC,OAKC;EACE,yBAAA;EACA,WAAA;EACA,iBAAA;EACA,gBAAA;EACA,8BAAA;;AAEA,oBAZH,OAKC,GAOG;EACC,SAAA;;AAON,0BAAC;EACC,gCAAA;;AAGF,0BAAC;EACC,qBAAA;EACA,sBAAA;EACA,mBAAA;EACA,SAAA;EACA,iBAAA;EACA,eAAA;EACA,uBAAA;EACA,gBAAA;EACA,mBAAA;EACA,WAAA;EACA,qBAAA;EACA,mBAAA;;AAZF,0BAAC,KAcC;EACE,WAAA;EACA,qBAAA;EACA,eAAA;;AAEA,0BAnBH,KAcC,EAKG;AAAS,0BAnBb,KAcC,EAKa;EACT,aAAA;EACA,gBAAA;;AAIJ,0BAzBD,KAyBE;EACC,mBAAA;EACA,2BAAA;;AAGF,0BA9BD,KA8BE;EACC,aAAA;;AAEA,0BAjCH,KA8BE,QAGE;EACC,cAAA;;AAMN,0BAAC;EACC,cAAA;;AAEA,0BAHD,MAGE;EACC,cAAA;EACA,eAAA;EACA,gBAAA;;AANJ,0BAAC,MASC,MAAK;EACH,WAAA;EACA,YAAA;;AAXJ,0BAAC,MAcC;EACE,WAAA;EACA,aAAA","file":"firewall-ips-blocking.css"}
admin/assets/css/firewall/firewall-ips-blocking.less CHANGED
@@ -1,121 +1,121 @@
1
- .wtitan-ips-blocking {
2
- padding: 5px 20px;
3
-
4
- &.wtitan-section-disabled {
5
- opacity: 0.4;
6
-
7
- select, button, a {
8
- pointer-events: none;
9
- cursor: not-allowed;
10
- opacity: 0.65;
11
- filter: alpha(opacity=65);
12
- -webkit-box-shadow: none;
13
- box-shadow: none;
14
- }
15
- }
16
-
17
-
18
- &__controls {
19
- display: flex;
20
- flex-direction: row;
21
-
22
- &-left {
23
- flex-grow: 0 !important;
24
- }
25
-
26
- &-right {
27
- flex-grow: 1 !important;
28
- text-align: right;
29
- }
30
-
31
- li {
32
- display: block;
33
- }
34
- }
35
-
36
- &__table {
37
- th, td {
38
- padding: 20px;
39
- }
40
-
41
- th {
42
- background-color: #ebebeb;
43
- color: #777;
44
- font-weight: bold;
45
- text-align: left;
46
- border-left: 1px solid #bdbdbd;
47
-
48
- &:first-child {
49
- border: 0;
50
- }
51
- }
52
- }
53
- }
54
-
55
- .wtitan-ips-blocking-modal {
56
- &__tabs {
57
- border-bottom: 1px solid #d0d0d0;
58
- }
59
-
60
- &__tab {
61
- display: inline-block;
62
- border: 1px solid #ccc;
63
- border-bottom: none;
64
- margin: 0;
65
- padding: 5px 10px;
66
- font-size: 14px;
67
- line-height: 1.71428571;
68
- font-weight: 600;
69
- background: #e5e5e5;
70
- color: #555;
71
- text-decoration: none;
72
- white-space: nowrap;
73
-
74
- a {
75
- color: #555;
76
- text-decoration: none;
77
- font-size: 13px;
78
-
79
- &:active, &:focus {
80
- outline: none;
81
- box-shadow: none;
82
- }
83
- }
84
-
85
- &--active {
86
- background: #ffffff;
87
- box-shadow: 0 2px 0 #efefef;
88
- }
89
-
90
- &-content {
91
- display: none;
92
-
93
- &--active {
94
- display: block;
95
- }
96
- }
97
- }
98
-
99
-
100
- &__form {
101
- margin: 0 auto;
102
-
103
- &-label {
104
- display: block;
105
- font-size: 14px;
106
- font-weight: 600;
107
- }
108
-
109
- input[type="text"] {
110
- width: 100%;
111
- height: 40px;
112
- }
113
-
114
- textarea {
115
- width: 100%;
116
- height: 100px;
117
- }
118
- }
119
- }
120
-
121
-
1
+ .wtitan-ips-blocking {
2
+ padding: 5px 20px;
3
+
4
+ &.wtitan-section-disabled {
5
+ opacity: 0.4;
6
+
7
+ select, button, a {
8
+ pointer-events: none;
9
+ cursor: not-allowed;
10
+ opacity: 0.65;
11
+ filter: alpha(opacity=65);
12
+ -webkit-box-shadow: none;
13
+ box-shadow: none;
14
+ }
15
+ }
16
+
17
+
18
+ &__controls {
19
+ display: flex;
20
+ flex-direction: row;
21
+
22
+ &-left {
23
+ flex-grow: 0 !important;
24
+ }
25
+
26
+ &-right {
27
+ flex-grow: 1 !important;
28
+ text-align: right;
29
+ }
30
+
31
+ li {
32
+ display: block;
33
+ }
34
+ }
35
+
36
+ &__table {
37
+ th, td {
38
+ padding: 20px;
39
+ }
40
+
41
+ th {
42
+ background-color: #ebebeb;
43
+ color: #777;
44
+ font-weight: bold;
45
+ text-align: left;
46
+ border-left: 1px solid #bdbdbd;
47
+
48
+ &:first-child {
49
+ border: 0;
50
+ }
51
+ }
52
+ }
53
+ }
54
+
55
+ .wtitan-ips-blocking-modal {
56
+ &__tabs {
57
+ border-bottom: 1px solid #d0d0d0;
58
+ }
59
+
60
+ &__tab {
61
+ display: inline-block;
62
+ border: 1px solid #ccc;
63
+ border-bottom: none;
64
+ margin: 0;
65
+ padding: 5px 10px;
66
+ font-size: 14px;
67
+ line-height: 1.71428571;
68
+ font-weight: 600;
69
+ background: #e5e5e5;
70
+ color: #555;
71
+ text-decoration: none;
72
+ white-space: nowrap;
73
+
74
+ a {
75
+ color: #555;
76
+ text-decoration: none;
77
+ font-size: 13px;
78
+
79
+ &:active, &:focus {
80
+ outline: none;
81
+ box-shadow: none;
82
+ }
83
+ }
84
+
85
+ &--active {
86
+ background: #ffffff;
87
+ box-shadow: 0 2px 0 #efefef;
88
+ }
89
+
90
+ &-content {
91
+ display: none;
92
+
93
+ &--active {
94
+ display: block;
95
+ }
96
+ }
97
+ }
98
+
99
+
100
+ &__form {
101
+ margin: 0 auto;
102
+
103
+ &-label {
104
+ display: block;
105
+ font-size: 14px;
106
+ font-weight: 600;
107
+ }
108
+
109
+ input[type="text"] {
110
+ width: 100%;
111
+ height: 40px;
112
+ }
113
+
114
+ textarea {
115
+ width: 100%;
116
+ height: 100px;
117
+ }
118
+ }
119
+ }
120
+
121
+
admin/assets/css/firewall/firewall-settings.css CHANGED
@@ -1,205 +1,205 @@
1
- #WBCR .factory-textarea.factory-control-premium-label:before {
2
- border: 1px solid red;
3
- display: inline-block;
4
- position: absolute;
5
- content: 'PRO';
6
- background: #f6065b;
7
- border-radius: 4px;
8
- color: #fff;
9
- font-size: 10px;
10
- line-height: 1;
11
- font-style: normal;
12
- padding: 4px 6px;
13
- margin-left: 4px;
14
- vertical-align: top;
15
- top: 0px;
16
- left: -5px;
17
- right: auto;
18
- bottom: auto;
19
- z-index: 11;
20
- cursor: pointer;
21
- }
22
- #WBCR .factory-list.factory-control-premium-label {
23
- box-shadow: 20px 20px 20px #222;
24
- }
25
- #WBCR .factory-list.factory-control-premium-label:before {
26
- display: inline-block;
27
- position: absolute;
28
- content: 'PRO';
29
- background: #f6065b;
30
- border-radius: 4px;
31
- color: #fff;
32
- font-size: 10px;
33
- line-height: 1;
34
- font-style: normal;
35
- padding: 4px 6px;
36
- margin-left: 4px;
37
- vertical-align: top;
38
- top: 0px;
39
- left: 70px;
40
- right: auto;
41
- bottom: auto;
42
- z-index: 11;
43
- cursor: pointer;
44
- }
45
- #WBCR .factory-checkbox.factory-control-premium-label:after {
46
- display: inline-block;
47
- position: absolute;
48
- content: 'PRO';
49
- background: #f6065b;
50
- border-radius: 4px;
51
- color: #fff;
52
- font-size: 10px;
53
- line-height: 1;
54
- font-style: normal;
55
- padding: 4px 6px;
56
- margin-left: 4px;
57
- vertical-align: top;
58
- top: -10px;
59
- left: auto;
60
- right: -15px;
61
- bottom: auto;
62
- z-index: 11;
63
- cursor: pointer;
64
- }
65
- #WBCR .factory-dropdown.factory-control-premium-label .factory-buttons-group:after {
66
- display: inline-block;
67
- position: absolute;
68
- content: 'PRO';
69
- background: #f6065b;
70
- border-radius: 4px;
71
- color: #fff;
72
- font-size: 10px;
73
- line-height: 1;
74
- font-style: normal;
75
- padding: 4px 6px;
76
- margin-left: 4px;
77
- vertical-align: top;
78
- top: -10px;
79
- left: auto;
80
- right: -15px;
81
- bottom: auto;
82
- z-index: 11;
83
- cursor: pointer;
84
- }
85
- #WBCR .factory-checkbox.factory-control--disabled,
86
- #WBCR .factory-dropdown.factory-control--disabled,
87
- #WBCR .factory-textarea.factory-control--disabled,
88
- #WBCR .factory-list.factory-control--disabled,
89
- #WBCR .factory-checkbox.factory-control--disabled input,
90
- #WBCR .factory-dropdown.factory-control--disabled input,
91
- #WBCR .factory-textarea.factory-control--disabled input,
92
- #WBCR .factory-list.factory-control--disabled input,
93
- #WBCR .factory-checkbox.factory-control--disabled button,
94
- #WBCR .factory-dropdown.factory-control--disabled button,
95
- #WBCR .factory-textarea.factory-control--disabled button,
96
- #WBCR .factory-list.factory-control--disabled button {
97
- pointer-events: none;
98
- cursor: not-allowed;
99
- opacity: 0.65;
100
- filter: alpha(opacity=65);
101
- -webkit-box-shadow: none;
102
- box-shadow: none;
103
- }
104
- #WBCR .wtitan-section-disabled {
105
- opacity: 0.4;
106
- }
107
- #WBCR .wtitan-section-disabled select,
108
- #WBCR .wtitan-section-disabled button,
109
- #WBCR .wtitan-section-disabled a {
110
- pointer-events: none;
111
- cursor: not-allowed;
112
- opacity: 0.65;
113
- filter: alpha(opacity=65);
114
- -webkit-box-shadow: none;
115
- box-shadow: none;
116
- }
117
- .wtitan-excluded-rules {
118
- height: 150px;
119
- width: 100%;
120
- padding: 10px 10px 0;
121
- background: #fff;
122
- border: 1px solid #ccc;
123
- overflow-y: scroll;
124
- overflow-x: hidden;
125
- }
126
- .wtitan-rate-limit-settings__control li {
127
- display: inline-block;
128
- width: 49%;
129
- }
130
- .wtitan-rate-limit-settings__control-title {
131
- padding: 0 40px;
132
- font-size: 13px;
133
- }
134
- .wtitan-rate-limit-settings__control-subtitle {
135
- display: block;
136
- font-size: 12px;
137
- color: #afafaf;
138
- }
139
- .wtitan-rate-limit-settings__control-block-time-select {
140
- width: 200px;
141
- }
142
- .wtitan-rate-limit-settings__control-action-select {
143
- width: 168px;
144
- }
145
- .wtitan-rate-limit-settings__control-allowed404s-textarea {
146
- width: 100%;
147
- height: 100px;
148
- }
149
- .wtitan-whitelist {
150
- padding: 0 20px;
151
- }
152
- .wtitan-whitelist__hint {
153
- display: block;
154
- font-size: 12px;
155
- color: #afafaf;
156
- }
157
- .wtitan-whitelist__form-group {
158
- display: inline-block;
159
- vertical-align: middle;
160
- }
161
- .wtitan-whitelist__table-controls {
162
- display: flex;
163
- flex-direction: row;
164
- }
165
- .wtitan-whitelist__table-controls-left {
166
- flex-grow: 0 !important;
167
- }
168
- .wtitan-whitelist__table-controls-right {
169
- text-align: right;
170
- flex-grow: 1 !important;
171
- }
172
- .wtitan-whitelist__table-controls-right select,
173
- .wtitan-whitelist__table-controls-right input,
174
- .wtitan-whitelist__table-controls-right a {
175
- display: inline-block;
176
- vertical-align: middle;
177
- }
178
- .wtitan-whitelist__table th,
179
- .wtitan-whitelist__table td {
180
- padding: 20px;
181
- }
182
- .wtitan-whitelist__table th {
183
- background-color: #ebebeb;
184
- color: #777;
185
- font-weight: bold;
186
- text-align: left;
187
- border-left: 1px solid #bdbdbd;
188
- }
189
- .wtitan-whitelist__table th:first-child {
190
- border: 0;
191
- }
192
- .wtitan-whitelist__table td {
193
- background-color: #fafafa;
194
- }
195
- .wtitan-whitelist__bg-requests-controls ul > li {
196
- display: inline-block;
197
- margin-right: 20px;
198
- }
199
- .wtitan-whitelist__bg-requests-controls ul > li label {
200
- font-weight: normal;
201
- }
202
- .wtitan-whitelist__bg-requests-controls ul > li input[type="checkbox"] {
203
- margin: 0;
204
- }
205
  /*# sourceMappingURL=firewall-settings.css.map */
1
+ #WBCR .factory-textarea.factory-control-premium-label:before {
2
+ border: 1px solid red;
3
+ display: inline-block;
4
+ position: absolute;
5
+ content: 'PRO';
6
+ background: #f6065b;
7
+ border-radius: 4px;
8
+ color: #fff;
9
+ font-size: 10px;
10
+ line-height: 1;
11
+ font-style: normal;
12
+ padding: 4px 6px;
13
+ margin-left: 4px;
14
+ vertical-align: top;
15
+ top: 0px;
16
+ left: -5px;
17
+ right: auto;
18
+ bottom: auto;
19
+ z-index: 11;
20
+ cursor: pointer;
21
+ }
22
+ #WBCR .factory-list.factory-control-premium-label {
23
+ box-shadow: 20px 20px 20px #222;
24
+ }
25
+ #WBCR .factory-list.factory-control-premium-label:before {
26
+ display: inline-block;
27
+ position: absolute;
28
+ content: 'PRO';
29
+ background: #f6065b;
30
+ border-radius: 4px;
31
+ color: #fff;
32
+ font-size: 10px;
33
+ line-height: 1;
34
+ font-style: normal;
35
+ padding: 4px 6px;
36
+ margin-left: 4px;
37
+ vertical-align: top;
38
+ top: 0px;
39
+ left: 70px;
40
+ right: auto;
41
+ bottom: auto;
42
+ z-index: 11;
43
+ cursor: pointer;
44
+ }
45
+ #WBCR .factory-checkbox.factory-control-premium-label:after {
46
+ display: inline-block;
47
+ position: absolute;
48
+ content: 'PRO';
49
+ background: #f6065b;
50
+ border-radius: 4px;
51
+ color: #fff;
52
+ font-size: 10px;
53
+ line-height: 1;
54
+ font-style: normal;
55
+ padding: 4px 6px;
56
+ margin-left: 4px;
57
+ vertical-align: top;
58
+ top: -10px;
59
+ left: auto;
60
+ right: -15px;
61
+ bottom: auto;
62
+ z-index: 11;
63
+ cursor: pointer;
64
+ }
65
+ #WBCR .factory-dropdown.factory-control-premium-label .factory-buttons-group:after {
66
+ display: inline-block;
67
+ position: absolute;
68
+ content: 'PRO';
69
+ background: #f6065b;
70
+ border-radius: 4px;
71
+ color: #fff;
72
+ font-size: 10px;
73
+ line-height: 1;
74
+ font-style: normal;
75
+ padding: 4px 6px;
76
+ margin-left: 4px;
77
+ vertical-align: top;
78
+ top: -10px;
79
+ left: auto;
80
+ right: -15px;
81
+ bottom: auto;
82
+ z-index: 11;
83
+ cursor: pointer;
84
+ }
85
+ #WBCR .factory-checkbox.factory-control--disabled,
86
+ #WBCR .factory-dropdown.factory-control--disabled,
87
+ #WBCR .factory-textarea.factory-control--disabled,
88
+ #WBCR .factory-list.factory-control--disabled,
89
+ #WBCR .factory-checkbox.factory-control--disabled input,
90
+ #WBCR .factory-dropdown.factory-control--disabled input,
91
+ #WBCR .factory-textarea.factory-control--disabled input,
92
+ #WBCR .factory-list.factory-control--disabled input,
93
+ #WBCR .factory-checkbox.factory-control--disabled button,
94
+ #WBCR .factory-dropdown.factory-control--disabled button,
95
+ #WBCR .factory-textarea.factory-control--disabled button,
96
+ #WBCR .factory-list.factory-control--disabled button {
97
+ pointer-events: none;
98
+ cursor: not-allowed;
99
+ opacity: 0.65;
100
+ filter: alpha(opacity=65);
101
+ -webkit-box-shadow: none;
102
+ box-shadow: none;
103
+ }
104
+ #WBCR .wtitan-section-disabled {
105
+ opacity: 0.4;
106
+ }
107
+ #WBCR .wtitan-section-disabled select,
108
+ #WBCR .wtitan-section-disabled button,
109
+ #WBCR .wtitan-section-disabled a {
110
+ pointer-events: none;
111
+ cursor: not-allowed;
112
+ opacity: 0.65;
113
+ filter: alpha(opacity=65);
114
+ -webkit-box-shadow: none;
115
+ box-shadow: none;
116
+ }
117
+ .wtitan-excluded-rules {
118
+ height: 150px;
119
+ width: 100%;
120
+ padding: 10px 10px 0;
121
+ background: #fff;
122
+ border: 1px solid #ccc;
123
+ overflow-y: scroll;
124
+ overflow-x: hidden;
125
+ }
126
+ .wtitan-rate-limit-settings__control li {
127
+ display: inline-block;
128
+ width: 49%;
129
+ }
130
+ .wtitan-rate-limit-settings__control-title {
131
+ padding: 0 40px;
132
+ font-size: 13px;
133
+ }
134
+ .wtitan-rate-limit-settings__control-subtitle {
135
+ display: block;
136
+ font-size: 12px;
137
+ color: #afafaf;
138
+ }
139
+ .wtitan-rate-limit-settings__control-block-time-select {
140
+ width: 200px;
141
+ }
142
+ .wtitan-rate-limit-settings__control-action-select {
143
+ width: 168px;
144
+ }
145
+ .wtitan-rate-limit-settings__control-allowed404s-textarea {
146
+ width: 100%;
147
+ height: 100px;
148
+ }
149
+ .wtitan-whitelist {
150
+ padding: 0 20px;
151
+ }
152
+ .wtitan-whitelist__hint {
153
+ display: block;
154
+ font-size: 12px;
155
+ color: #afafaf;
156
+ }
157
+ .wtitan-whitelist__form-group {
158
+ display: inline-block;
159
+ vertical-align: middle;
160
+ }
161
+ .wtitan-whitelist__table-controls {
162
+ display: flex;
163
+ flex-direction: row;
164
+ }
165
+ .wtitan-whitelist__table-controls-left {
166
+ flex-grow: 0 !important;
167
+ }
168
+ .wtitan-whitelist__table-controls-right {
169
+ text-align: right;
170
+ flex-grow: 1 !important;
171
+ }
172
+ .wtitan-whitelist__table-controls-right select,
173
+ .wtitan-whitelist__table-controls-right input,
174
+ .wtitan-whitelist__table-controls-right a {
175
+ display: inline-block;
176
+ vertical-align: middle;
177
+ }
178
+ .wtitan-whitelist__table th,
179
+ .wtitan-whitelist__table td {
180
+ padding: 20px;
181
+ }
182
+ .wtitan-whitelist__table th {
183
+ background-color: #ebebeb;
184
+ color: #777;
185
+ font-weight: bold;
186
+ text-align: left;
187
+ border-left: 1px solid #bdbdbd;
188
+ }
189
+ .wtitan-whitelist__table th:first-child {
190
+ border: 0;
191
+ }
192
+ .wtitan-whitelist__table td {
193
+ background-color: #fafafa;
194
+ }
195
+ .wtitan-whitelist__bg-requests-controls ul > li {
196
+ display: inline-block;
197
+ margin-right: 20px;
198
+ }
199
+ .wtitan-whitelist__bg-requests-controls ul > li label {
200
+ font-weight: normal;
201
+ }
202
+ .wtitan-whitelist__bg-requests-controls ul > li input[type="checkbox"] {
203
+ margin: 0;
204
+ }
205
  /*# sourceMappingURL=firewall-settings.css.map */
admin/assets/css/firewall/firewall-settings.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["firewall-settings.less"],"names":[],"mappings":"AA+BI,KADF,kBACG,8BAA8B;EAC7B,qBAAA;EA9BF,qBAAA;EACA,kBAAA;EACA,SAAS,KAAT;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,eAAA;EACA,cAAA;EACA,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,mBAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,WAAA;EACA,eAAA;;AAmBA,KADF,cACG;EACC,+BAAA;;AAGF,KALF,cAKG,8BAA8B;EAxC/B,qBAAA;EACA,kBAAA;EACA,SAAS,KAAT;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,eAAA;EACA,cAAA;EACA,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,mBAAA;EACA,QAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,WAAA;EACA,eAAA;;AA6BA,KADF,kBACG,8BAA8B;EA9C/B,qBAAA;EACA,kBAAA;EACA,SAAS,KAAT;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,eAAA;EACA,cAAA;EACA,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,mBAAA;EACA,UAAA;EACA,UAAA;EACA,YAAA;EACA,YAAA;EACA,WAAA;EACA,eAAA;;AAmCA,KADF,kBACG,8BAA+B,uBAAsB;EApDtD,qBAAA;EACA,kBAAA;EACA,SAAS,KAAT;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,eAAA;EACA,cAAA;EACA,kBAAA;EACA,gBAAA;EACA,gBAAA;EACA,mBAAA;EACA,UAAA;EACA,UAAA;EACA,YAAA;EACA,YAAA;EACA,WAAA;EACA,eAAA;;AAyCA,KADF,kBACG;AAAD,KADiB,kBAChB;AAAD,KADoC,kBACnC;AAAD,KADuD,cACtD;AACD,KAFF,kBAEG,0BAA2B;AAA5B,KAFiB,kBAEhB,0BAA2B;AA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AC,OAiBC;EACE,yBAAA;;AAIJ,iBAAC,sBACC,GAAG;EACD,qBAAA;EACA,kBAAA;;AAHJ,iBAAC,sBACC,GAAG,KAID;EACE,mBAAA;;AANN,iBAAC,sBACC,GAAG,KAQD,MAAK;EACH,SAAA","file":"firewall-settings.css"}
admin/assets/css/firewall/firewall-settings.less CHANGED
@@ -1,211 +1,211 @@
1
- #WBCR {
2
- .premium-label(@labelPositionTop:-8px, @labelPositionRight:auto, @labelPositionBottom:auto, @labelPositionLeft:-10px) {
3
- display: inline-block;
4
- position: absolute;
5
- content: 'PRO';
6
- background: #f6065b;
7
- border-radius: 4px;
8
- color: #fff;
9
- font-size: 10px;
10
- line-height: 1;
11
- font-style: normal;
12
- padding: 4px 6px;
13
- margin-left: 4px;
14
- vertical-align: top;
15
- top: @labelPositionTop;
16
- left: @labelPositionLeft;
17
- right: @labelPositionRight;
18
- bottom: @labelPositionBottom;
19
- z-index: 11;
20
- cursor: pointer;
21
- }
22
- .premium-disabled() {
23
- pointer-events: none;
24
- cursor: not-allowed;
25
- opacity: 0.65;
26
- filter: alpha(opacity=65);
27
- -webkit-box-shadow: none;
28
- box-shadow: none;
29
- }
30
-
31
- .factory-textarea {
32
- &.factory-control-premium-label:before {
33
- border: 1px solid red;
34
- .premium-label(0px, auto, auto, -5px);
35
- }
36
- }
37
-
38
- .factory-list {
39
- &.factory-control-premium-label {
40
- box-shadow: 20px 20px 20px #222;
41
- }
42
-
43
- &.factory-control-premium-label:before {
44
- .premium-label(0px, auto, auto, 70px);
45
- }
46
- }
47
-
48
- .factory-checkbox {
49
- &.factory-control-premium-label:after {
50
- .premium-label(-10px, -15px, auto, auto);
51
- }
52
- }
53
-
54
- .factory-dropdown {
55
- &.factory-control-premium-label .factory-buttons-group:after {
56
- .premium-label(-10px, -15px, auto, auto);
57
- }
58
- }
59
-
60
- .factory-checkbox, .factory-dropdown, .factory-textarea, .factory-list {
61
- &.factory-control--disabled,
62
- &.factory-control--disabled input,
63
- &.factory-control--disabled button {
64
- .premium-disabled();
65
- }
66
- }
67
-
68
- .wtitan-section-disabled {
69
- opacity: 0.4;
70
-
71
- select, button, a {
72
- .premium-disabled();
73
- }
74
- }
75
- }
76
-
77
- .wtitan-excluded-rules {
78
- height: 150px;
79
- width: 100%;
80
- padding: 10px 10px 0;
81
- background: #fff;
82
- border: 1px solid #ccc;
83
- overflow-y: scroll;
84
- overflow-x: hidden;
85
- }
86
-
87
- .wtitan-rate-limit-settings {
88
- @elementClass: ~"wtitan-rate-limit-settings";
89
-
90
- //@{elementClass}
91
-
92
- &__control {
93
- li {
94
- display: inline-block;
95
- width: 49%;
96
- }
97
-
98
- &-title {
99
- padding: 0 40px;
100
- font-size: 13px;
101
- }
102
-
103
- &-subtitle {
104
- display: block;
105
- font-size: 12px;
106
- color: #afafaf;
107
- }
108
-
109
- &-fields {
110
-
111
- }
112
-
113
- &-block-time-select {
114
- width: 200px;
115
- }
116
-
117
- &-action-select {
118
- width: 168px;
119
- }
120
-
121
- &-allowed404s-textarea {
122
- width: 100%;
123
- height: 100px;
124
- }
125
- }
126
- }
127
-
128
- .wtitan-whitelist {
129
- padding: 0 20px;
130
-
131
- &__top-section {
132
- ul > li {
133
- //display: inline-block;
134
- }
135
- }
136
-
137
- &__bottom-section {
138
-
139
- }
140
-
141
-
142
- &__hint {
143
- display: block;
144
- font-size: 12px;
145
- color: #afafaf;
146
- }
147
-
148
- &__form-group {
149
- display: inline-block;
150
- vertical-align: middle;
151
- }
152
-
153
- &__table-controls {
154
- display: flex;
155
- flex-direction: row;
156
- }
157
-
158
- &__table-controls-left {
159
- flex-grow: 0 !important;
160
-
161
- }
162
-
163
- &__table-controls-right {
164
- text-align: right;
165
- flex-grow: 1 !important;
166
-
167
-
168
- select, input, a {
169
- display: inline-block;
170
- vertical-align: middle;
171
- }
172
- }
173
-
174
- &__table {
175
- th, td {
176
- padding: 20px;
177
- }
178
-
179
- th {
180
- background-color: #ebebeb;
181
- color: #777;
182
- font-weight: bold;
183
- text-align: left;
184
- border-left: 1px solid #bdbdbd;
185
-
186
- &:first-child {
187
- border: 0;
188
- }
189
- }
190
-
191
- td {
192
- background-color: #fafafa;
193
- }
194
- }
195
-
196
- &__bg-requests-controls {
197
- ul > li {
198
- display: inline-block;
199
- margin-right: 20px;
200
-
201
- label {
202
- font-weight: normal;
203
- }
204
-
205
- input[type="checkbox"] {
206
- margin: 0;
207
- }
208
- }
209
-
210
- }
211
- }
1
+ #WBCR {
2
+ .premium-label(@labelPositionTop:-8px, @labelPositionRight:auto, @labelPositionBottom:auto, @labelPositionLeft:-10px) {
3
+ display: inline-block;
4
+ position: absolute;
5
+ content: 'PRO';
6
+ background: #f6065b;
7
+ border-radius: 4px;
8
+ color: #fff;
9
+ font-size: 10px;
10
+ line-height: 1;
11
+ font-style: normal;
12
+ padding: 4px 6px;
13
+ margin-left: 4px;
14
+ vertical-align: top;
15
+ top: @labelPositionTop;
16
+ left: @labelPositionLeft;
17
+ right: @labelPositionRight;
18
+ bottom: @labelPositionBottom;
19
+ z-index: 11;
20
+ cursor: pointer;
21
+ }
22
+ .premium-disabled() {
23
+ pointer-events: none;
24
+ cursor: not-allowed;
25
+ opacity: 0.65;
26
+ filter: alpha(opacity=65);
27
+ -webkit-box-shadow: none;
28
+ box-shadow: none;
29
+ }
30
+
31
+ .factory-textarea {
32
+ &.factory-control-premium-label:before {
33
+ border: 1px solid red;
34
+ .premium-label(0px, auto, auto, -5px);
35
+ }
36
+ }
37
+
38
+ .factory-list {
39
+ &.factory-control-premium-label {
40
+ box-shadow: 20px 20px 20px #222;
41
+ }
42
+
43
+ &.factory-control-premium-label:before {
44
+ .premium-label(0px, auto, auto, 70px);
45
+ }
46
+ }
47
+
48
+ .factory-checkbox {
49
+ &.factory-control-premium-label:after {
50
+ .premium-label(-10px, -15px, auto, auto);
51
+ }
52
+ }
53
+
54
+ .factory-dropdown {
55
+ &.factory-control-premium-label .factory-buttons-group:after {
56
+ .premium-label(-10px, -15px, auto, auto);
57
+ }
58
+ }
59
+
60
+ .factory-checkbox, .factory-dropdown, .factory-textarea, .factory-list {
61
+ &.factory-control--disabled,
62
+ &.factory-control--disabled input,
63
+ &.factory-control--disabled button {
64
+ .premium-disabled();
65
+ }
66
+ }
67
+
68
+ .wtitan-section-disabled {
69
+ opacity: 0.4;
70
+
71
+ select, button, a {
72
+ .premium-disabled();
73
+ }
74
+ }
75
+ }
76
+
77
+ .wtitan-excluded-rules {
78
+ height: 150px;
79
+ width: 100%;
80
+ padding: 10px 10px 0;
81
+ background: #fff;
82
+ border: 1px solid #ccc;
83
+ overflow-y: scroll;
84
+ overflow-x: hidden;
85
+ }
86
+
87
+ .wtitan-rate-limit-settings {
88
+ @elementClass: ~"wtitan-rate-limit-settings";
89
+
90
+ //@{elementClass}
91
+
92
+ &__control {
93
+ li {
94
+ display: inline-block;
95
+ width: 49%;
96
+ }
97
+
98
+ &-title {
99
+ padding: 0 40px;
100
+ font-size: 13px;
101
+ }
102
+
103
+ &-subtitle {
104
+ display: block;
105
+ font-size: 12px;
106
+ color: #afafaf;
107
+ }
108
+
109
+ &-fields {
110
+
111
+ }
112
+
113
+ &-block-time-select {
114
+ width: 200px;
115
+ }
116
+
117
+ &-action-select {
118
+ width: 168px;
119
+ }
120
+
121
+ &-allowed404s-textarea {
122
+ width: 100%;
123
+ height: 100px;
124
+ }
125
+ }
126
+ }
127
+
128
+ .wtitan-whitelist {
129
+ padding: 0 20px;
130
+
131
+ &__top-section {
132
+ ul > li {
133
+ //display: inline-block;
134
+ }
135
+ }
136
+
137
+ &__bottom-section {
138
+
139
+ }
140
+
141
+
142
+ &__hint {
143
+ display: block;
144
+ font-size: 12px;
145
+ color: #afafaf;
146
+ }
147
+
148
+ &__form-group {
149
+ display: inline-block;
150
+ vertical-align: middle;
151
+ }
152
+
153
+ &__table-controls {
154
+ display: flex;
155
+ flex-direction: row;
156
+ }
157
+
158
+ &__table-controls-left {
159
+ flex-grow: 0 !important;
160
+
161
+ }
162
+
163
+ &__table-controls-right {
164
+ text-align: right;
165
+ flex-grow: 1 !important;
166
+
167
+
168
+ select, input, a {
169
+ display: inline-block;
170
+ vertical-align: middle;
171
+ }
172
+ }
173
+
174
+ &__table {
175
+ th, td {
176
+ padding: 20px;
177
+ }
178
+
179
+ th {
180
+ background-color: #ebebeb;
181
+ color: #777;
182
+ font-weight: bold;
183
+ text-align: left;
184
+ border-left: 1px solid #bdbdbd;
185
+
186
+ &:first-child {
187
+ border: 0;
188
+ }
189
+ }
190
+
191
+ td {
192
+ background-color: #fafafa;
193
+ }
194
+ }
195
+
196
+ &__bg-requests-controls {
197
+ ul > li {
198
+ display: inline-block;
199
+ margin-right: 20px;
200
+
201
+ label {
202
+ font-weight: normal;
203
+ }
204
+
205
+ input[type="checkbox"] {
206
+ margin: 0;
207
+ }
208
+ }
209
+
210
+ }
211
+ }
admin/assets/css/install-addons.css CHANGED
@@ -1,44 +1,44 @@
1
- /**
2
- * Install addons global styles
3
- * @author Webcraftic <wordpress.webraftic@gmail.com>
4
- * @copyright Webcraftic 11.07.2018
5
- */
6
- .wtitan-new-component
7
- {
8
- background: #f7f7f7;
9
- border: 1px solid #eaeaea;
10
- padding: 5px 20px;
11
- margin-bottom: 10px;
12
- }
13
-
14
- .wtitan-new-component h4
15
- {
16
- margin: 5px 0;
17
- display: inline-block;
18
- }
19
-
20
- .wtitan-new-component .wtitan-proccess-button
21
- {
22
- display: inline-block;
23
- margin: 5px 0;
24
- }
25
-
26
- .wtitan-new-component.wtitan-premium
27
- {
28
- background: #fff6db;
29
- border: 1px solid #e4dea9;
30
- }
31
-
32
- .wtitan-new-component.wtitan-premium h4
33
- {
34
- color: #88690c;
35
- }
36
-
37
- .wtitan-proccess-button.button-link,
38
- .wtitan-proccess-button.button-link:focus
39
- {
40
- outline: none !important;
41
- box-shadow: none !important;
42
- }
43
-
44
  /*# sourceMappingURL=install-addons.css.map */
1
+ /**
2
+ * Install addons global styles
3
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
4
+ * @copyright Webcraftic 11.07.2018
5
+ */
6
+ .wtitan-new-component
7
+ {
8
+ background: #f7f7f7;
9
+ border: 1px solid #eaeaea;
10
+ padding: 5px 20px;
11
+ margin-bottom: 10px;
12
+ }
13
+
14
+ .wtitan-new-component h4
15
+ {
16
+ margin: 5px 0;
17
+ display: inline-block;
18
+ }
19
+
20
+ .wtitan-new-component .wtitan-proccess-button
21
+ {
22
+ display: inline-block;
23
+ margin: 5px 0;
24
+ }
25
+
26
+ .wtitan-new-component.wtitan-premium
27
+ {
28
+ background: #fff6db;
29
+ border: 1px solid #e4dea9;
30
+ }
31
+
32
+ .wtitan-new-component.wtitan-premium h4
33
+ {
34
+ color: #88690c;
35
+ }
36
+
37
+ .wtitan-proccess-button.button-link,
38
+ .wtitan-proccess-button.button-link:focus
39
+ {
40
+ outline: none !important;
41
+ box-shadow: none !important;
42
+ }
43
+
44
  /*# sourceMappingURL=install-addons.css.map */
admin/assets/css/libs/jquery.datetimepicker.min.css CHANGED
@@ -1 +1 @@
1
- .xdsoft_datetimepicker{box-shadow:0 5px 15px -5px rgba(0,0,0,0.506);background:#fff;border-bottom:1px solid #bbb;border-left:1px solid #ccc;border-right:1px solid #ccc;border-top:1px solid #ccc;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:8px;padding-left:0;padding-top:2px;position:absolute;z-index:9999;-moz-box-sizing:border-box;box-sizing:border-box;display:none}.xdsoft_datetimepicker.xdsoft_rtl{padding:8px 0 8px 8px}.xdsoft_datetimepicker iframe{position:absolute;left:0;top:0;width:75px;height:210px;background:transparent;border:0}.xdsoft_datetimepicker button{border:none !important}.xdsoft_noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.xdsoft_noselect::selection{background:transparent}.xdsoft_noselect::-moz-selection{background:transparent}.xdsoft_datetimepicker.xdsoft_inline{display:inline-block;position:static;box-shadow:none}.xdsoft_datetimepicker *{-moz-box-sizing:border-box;box-sizing:border-box;padding:0;margin:0}.xdsoft_datetimepicker .xdsoft_datepicker,.xdsoft_datetimepicker .xdsoft_timepicker{display:none}.xdsoft_datetimepicker .xdsoft_datepicker.active,.xdsoft_datetimepicker .xdsoft_timepicker.active{display:block}.xdsoft_datetimepicker .xdsoft_datepicker{width:224px;float:left;margin-left:8px}.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_datepicker{float:right;margin-right:8px;margin-left:0}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{width:256px}.xdsoft_datetimepicker .xdsoft_timepicker{width:58px;float:left;text-align:center;margin-left:8px;margin-top:0}.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker{float:right;margin-right:8px;margin-left:0}.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{margin-top:8px;margin-bottom:3px}.xdsoft_datetimepicker .xdsoft_monthpicker{position:relative;text-align:center}.xdsoft_datetimepicker .xdsoft_label i,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_today_button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZG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gHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC)}.xdsoft_datetimepicker .xdsoft_label i{opacity:.5;background-position:-92px -19px;display:inline-block;width:9px;height:20px;vertical-align:middle}.xdsoft_datetimepicker .xdsoft_prev{float:left;background-position:-20px 0}.xdsoft_datetimepicker .xdsoft_today_button{float:left;background-position:-70px 0;margin-left:5px}.xdsoft_datetimepicker .xdsoft_next{float:right;background-position:0 0}.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_today_button{background-color:transparent;background-repeat:no-repeat;border:0 none;cursor:pointer;display:block;height:30px;opacity:.5;-ms-filter:"alpha(opacity=50)";outline:medium none;overflow:hidden;padding:0;position:relative;text-indent:100%;white-space:nowrap;width:20px;min-width:0}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{float:none;background-position:-40px -15px;height:15px;width:30px;display:block;margin-left:14px;margin-top:7px}.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_prev,.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_next{float:none;margin-left:0;margin-right:14px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{background-position:-40px 0;margin-bottom:7px;margin-top:0}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{height:151px;overflow:hidden;border-bottom:1px solid #ddd}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div{background:#f5f5f5;border-top:1px solid #ddd;color:#666;font-size:12px;text-align:center;border-collapse:collapse;cursor:pointer;border-bottom-width:0;height:25px;line-height:25px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:first-child{border-top-width:0}.xdsoft_datetimepicker .xdsoft_today_button:hover,.xdsoft_datetimepicker .xdsoft_next:hover,.xdsoft_datetimepicker .xdsoft_prev:hover{opacity:1;-ms-filter:"alpha(opacity=100)"}.xdsoft_datetimepicker .xdsoft_label{display:inline;position:relative;z-index:9999;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:bold;background-color:#fff;float:left;width:182px;text-align:center;cursor:pointer}.xdsoft_datetimepicker .xdsoft_label:hover>span{text-decoration:underline}.xdsoft_datetimepicker .xdsoft_label:hover i{opacity:1.0}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select{border:1px solid #ccc;position:absolute;right:0;top:30px;z-index:101;display:none;background:#fff;max-height:160px;overflow-y:hidden}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_monthselect{right:-7px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_yearselect{right:2px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option:hover{color:#fff;background:#ff8000}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option{padding:2px 10px 2px 5px;text-decoration:none !important}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option.xdsoft_current{background:#3af;box-shadow:#178fe5 0 1px 3px 0 inset;color:#fff;font-weight:700}.xdsoft_datetimepicker .xdsoft_month{width:100px;text-align:right}.xdsoft_datetimepicker .xdsoft_calendar{clear:both}.xdsoft_datetimepicker .xdsoft_year{width:48px;margin-left:5px}.xdsoft_datetimepicker .xdsoft_calendar table{border-collapse:collapse;width:100%}.xdsoft_datetimepicker .xdsoft_calendar td>div{padding-right:5px}.xdsoft_datetimepicker .xdsoft_calendar th{height:25px}.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{width:14.2857142%;background:#f5f5f5;border:1px solid #ddd;color:#666;font-size:12px;text-align:right;vertical-align:middle;padding:0;border-collapse:collapse;cursor:pointer;height:25px}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{width:12.5%}.xdsoft_datetimepicker .xdsoft_calendar th{background:#f1f1f1}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{color:#3af}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_default{background:#ffe9d2;box-shadow:#ffb871 0 1px 4px 0 inset;color:#000}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_mint{background:#c1ffc9;box-shadow:#00dd1c 0 1px 4px 0 inset;color:#000}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current{background:#3af;box-shadow:#178fe5 0 1px 3px 0 inset;color:#fff;font-weight:700}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,.xdsoft_datetimepicker .xdsoft_time_box>div>div.xdsoft_disabled{opacity:.5;-ms-filter:"alpha(opacity=50)";cursor:default}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{opacity:.2;-ms-filter:"alpha(opacity=20)"}.xdsoft_datetimepicker .xdsoft_calendar td:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:hover{color:#fff !important;background:#ff8000 !important;box-shadow:none !important}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover{background:#3af !important;box-shadow:#178fe5 0 1px 3px 0 inset !important;color:#fff !important}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_disabled:hover{color:inherit !important;background:inherit !important;box-shadow:inherit !important}.xdsoft_datetimepicker .xdsoft_calendar th{font-weight:700;text-align:center;color:#999;cursor:default}.xdsoft_datetimepicker .xdsoft_copyright{color:#ccc !important;font-size:10px;clear:both;float:none;margin-left:8px}.xdsoft_datetimepicker .xdsoft_copyright a{color:#eee !important}.xdsoft_datetimepicker .xdsoft_copyright a:hover{color:#aaa !important}.xdsoft_time_box{position:relative;border:1px solid #ccc}.xdsoft_scrollbar>.xdsoft_scroller{background:#ccc !important;height:20px;border-radius:3px}.xdsoft_scrollbar{position:absolute;width:7px;right:0;top:0;bottom:0;cursor:pointer}.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_scrollbar{left:0;right:auto}.xdsoft_scroller_box{position:relative}.xdsoft_datetimepicker.xdsoft_dark{box-shadow:0 5px 15px -5px rgba(255,255,255,0.506);background:#000;border-bottom:1px solid #444;border-left:1px solid #333;border-right:1px solid #333;border-top:1px solid #333;color:#ccc}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{border-bottom:1px solid #222}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box>div>div{background:#0a0a0a;border-top:1px solid #222;color:#999}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{background-color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label>.xdsoft_select{border:1px solid #333;background:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label>.xdsoft_select>div>.xdsoft_option:hover{color:#000;background:#007fff}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label>.xdsoft_select>div>.xdsoft_option.xdsoft_current{background:#c50;box-shadow:#b03e00 0 1px 3px 0 inset;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRD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ABJRU5ErkJggg==)}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{background:#0a0a0a;border:1px solid #222;color:#999}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{background:#0e0e0e}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today{color:#c50}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_default{background:#ffe9d2;box-shadow:#ffb871 0 1px 4px 0 inset;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_mint{background:#c1ffc9;box-shadow:#00dd1c 0 1px 4px 0 inset;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current{background:#c50;box-shadow:#b03e00 0 1px 3px 0 inset;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box>div>div:hover{color:#000 !important;background:#007fff !important}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{color:#666}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{color:#333 !important}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{color:#111 !important}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{color:#555 !important}.xdsoft_dark .xdsoft_time_box{border:1px solid #333}.xdsoft_dark .xdsoft_scrollbar>.xdsoft_scroller{background:#333 !important}.xdsoft_datetimepicker .xdsoft_save_selected{display:block;border:1px solid #ddd !important;margin-top:5px;width:100%;color:#454551;font-size:13px}.xdsoft_datetimepicker .blue-gradient-button{font-family:"museo-sans","Book Antiqua",sans-serif;font-size:12px;font-weight:300;color:#82878c;height:28px;position:relative;padding:4px 17px 4px 33px;border:1px solid #d7d8da;background:-moz-linear-gradient(top,#fff 0,#f4f8fa 73%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(73%,#f4f8fa));background:-webkit-linear-gradient(top,#fff 0,#f4f8fa 73%);background:-o-linear-gradient(top,#fff 0,#f4f8fa 73%);background:-ms-linear-gradient(top,#fff 0,#f4f8fa 73%);background:linear-gradient(to bottom,#fff 0,#f4f8fa 73%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff',endColorstr='#f4f8fa',GradientType=0)}.xdsoft_datetimepicker .blue-gradient-button:hover,.xdsoft_datetimepicker .blue-gradient-button:focus,.xdsoft_datetimepicker .blue-gradient-button:hover span,.xdsoft_datetimepicker .blue-gradient-button:focus span{color:#454551;background:-moz-linear-gradient(top,#f4f8fa 0,#FFF 73%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#f4f8fa),color-stop(73%,#FFF));background:-webkit-linear-gradient(top,#f4f8fa 0,#FFF 73%);background:-o-linear-gradient(top,#f4f8fa 0,#FFF 73%);background:-ms-linear-gradient(top,#f4f8fa 0,#FFF 73%);background:linear-gradient(to bottom,#f4f8fa 0,#FFF 73%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f8fa',endColorstr='#FFF',GradientType=0)}
1
+ .xdsoft_datetimepicker{box-shadow:0 5px 15px -5px rgba(0,0,0,0.506);background:#fff;border-bottom:1px solid #bbb;border-left:1px solid #ccc;border-right:1px solid #ccc;border-top:1px solid #ccc;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:8px;padding-left:0;padding-top:2px;position:absolute;z-index:9999;-moz-box-sizing:border-box;box-sizing:border-box;display:none}.xdsoft_datetimepicker.xdsoft_rtl{padding:8px 0 8px 8px}.xdsoft_datetimepicker iframe{position:absolute;left:0;top:0;width:75px;height:210px;background:transparent;border:0}.xdsoft_datetimepicker button{border:none !important}.xdsoft_noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.xdsoft_noselect::selection{background:transparent}.xdsoft_noselect::-moz-selection{background:transparent}.xdsoft_datetimepicker.xdsoft_inline{display:inline-block;position:static;box-shadow:none}.xdsoft_datetimepicker *{-moz-box-sizing:border-box;box-sizing:border-box;padding:0;margin:0}.xdsoft_datetimepicker .xdsoft_datepicker,.xdsoft_datetimepicker .xdsoft_timepicker{display:none}.xdsoft_datetimepicker .xdsoft_datepicker.active,.xdsoft_datetimepicker .xdsoft_timepicker.active{display:block}.xdsoft_datetimepicker .xdsoft_datepicker{width:224px;float:left;margin-left:8px}.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_datepicker{float:right;margin-right:8px;margin-left:0}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{width:256px}.xdsoft_datetimepicker .xdsoft_timepicker{width:58px;float:left;text-align:center;margin-left:8px;margin-top:0}.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker{float:right;margin-right:8px;margin-left:0}.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{margin-top:8px;margin-bottom:3px}.xdsoft_datetimepicker .xdsoft_monthpicker{position:relative;text-align:center}.xdsoft_datetimepicker .xdsoft_label i,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_today_button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhN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0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC)}.xdsoft_datetimepicker .xdsoft_label i{opacity:.5;background-position:-92px -19px;display:inline-block;width:9px;height:20px;vertical-align:middle}.xdsoft_datetimepicker .xdsoft_prev{float:left;background-position:-20px 0}.xdsoft_datetimepicker .xdsoft_today_button{float:left;background-position:-70px 0;margin-left:5px}.xdsoft_datetimepicker .xdsoft_next{float:right;background-position:0 0}.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_today_button{background-color:transparent;background-repeat:no-repeat;border:0 none;cursor:pointer;display:block;height:30px;opacity:.5;-ms-filter:"alpha(opacity=50)";outline:medium none;overflow:hidden;padding:0;position:relative;text-indent:100%;white-space:nowrap;width:20px;min-width:0}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{float:none;background-position:-40px -15px;height:15px;width:30px;display:block;margin-left:14px;margin-top:7px}.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_prev,.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_next{float:none;margin-left:0;margin-right:14px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{background-position:-40px 0;margin-bottom:7px;margin-top:0}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{height:151px;overflow:hidden;border-bottom:1px solid #ddd}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div{background:#f5f5f5;border-top:1px solid #ddd;color:#666;font-size:12px;text-align:center;border-collapse:collapse;cursor:pointer;border-bottom-width:0;height:25px;line-height:25px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:first-child{border-top-width:0}.xdsoft_datetimepicker .xdsoft_today_button:hover,.xdsoft_datetimepicker .xdsoft_next:hover,.xdsoft_datetimepicker .xdsoft_prev:hover{opacity:1;-ms-filter:"alpha(opacity=100)"}.xdsoft_datetimepicker .xdsoft_label{display:inline;position:relative;z-index:9999;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:bold;background-color:#fff;float:left;width:182px;text-align:center;cursor:pointer}.xdsoft_datetimepicker .xdsoft_label:hover>span{text-decoration:underline}.xdsoft_datetimepicker .xdsoft_label:hover i{opacity:1.0}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select{border:1px solid #ccc;position:absolute;right:0;top:30px;z-index:101;display:none;background:#fff;max-height:160px;overflow-y:hidden}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_monthselect{right:-7px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_yearselect{right:2px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option:hover{color:#fff;background:#ff8000}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option{padding:2px 10px 2px 5px;text-decoration:none !important}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option.xdsoft_current{background:#3af;box-shadow:#178fe5 0 1px 3px 0 inset;color:#fff;font-weight:700}.xdsoft_datetimepicker .xdsoft_month{width:100px;text-align:right}.xdsoft_datetimepicker .xdsoft_calendar{clear:both}.xdsoft_datetimepicker .xdsoft_year{width:48px;margin-left:5px}.xdsoft_datetimepicker .xdsoft_calendar table{border-collapse:collapse;width:100%}.xdsoft_datetimepicker .xdsoft_calendar td>div{padding-right:5px}.xdsoft_datetimepicker .xdsoft_calendar th{height:25px}.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{width:14.2857142%;background:#f5f5f5;border:1px solid #ddd;color:#666;font-size:12px;text-align:right;vertical-align:middle;padding:0;border-collapse:collapse;cursor:pointer;height:25px}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{width:12.5%}.xdsoft_datetimepicker .xdsoft_calendar th{background:#f1f1f1}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{color:#3af}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_default{background:#ffe9d2;box-shadow:#ffb871 0 1px 4px 0 inset;color:#000}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_mint{background:#c1ffc9;box-shadow:#00dd1c 0 1px 4px 0 inset;color:#000}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current{background:#3af;box-shadow:#178fe5 0 1px 3px 0 inset;color:#fff;font-weight:700}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,.xdsoft_datetimepicker .xdsoft_time_box>div>div.xdsoft_disabled{opacity:.5;-ms-filter:"alpha(opacity=50)";cursor:default}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{opacity:.2;-ms-filter:"alpha(opacity=20)"}.xdsoft_datetimepicker .xdsoft_calendar td:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:hover{color:#fff !important;background:#ff8000 !important;box-shadow:none !important}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover{background:#3af !important;box-shadow:#178fe5 0 1px 3px 0 inset !important;color:#fff !important}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_disabled:hover{color:inherit !important;background:inherit !important;box-shadow:inherit !important}.xdsoft_datetimepicker .xdsoft_calendar th{font-weight:700;text-align:center;color:#999;cursor:default}.xdsoft_datetimepicker .xdsoft_copyright{color:#ccc !important;font-size:10px;clear:both;float:none;margin-left:8px}.xdsoft_datetimepicker .xdsoft_copyright a{color:#eee !important}.xdsoft_datetimepicker .xdsoft_copyright a:hover{color:#aaa !important}.xdsoft_time_box{position:relative;border:1px solid #ccc}.xdsoft_scrollbar>.xdsoft_scroller{background:#ccc !important;height:20px;border-radius:3px}.xdsoft_scrollbar{position:absolute;width:7px;right:0;top:0;bottom:0;cursor:pointer}.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_scrollbar{left:0;right:auto}.xdsoft_scroller_box{position:relative}.xdsoft_datetimepicker.xdsoft_dark{box-shadow:0 5px 15px -5px rgba(255,255,255,0.506);background:#000;border-bottom:1px solid #444;border-left:1px solid #333;border-right:1px solid #333;border-top:1px solid #333;color:#ccc}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{border-bottom:1px solid #222}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box>div>div{background:#0a0a0a;border-top:1px solid #222;color:#999}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{background-color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label>.xdsoft_select{border:1px solid #333;background:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label>.xdsoft_select>div>.xdsoft_option:hover{color:#000;background:#007fff}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label>.xdsoft_select>div>.xdsoft_option.xdsoft_current{background:#c50;box-shadow:#b03e00 0 1px 3px 0 inset;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly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B7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==)}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{background:#0a0a0a;border:1px solid #222;color:#999}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{background:#0e0e0e}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today{color:#c50}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_default{background:#ffe9d2;box-shadow:#ffb871 0 1px 4px 0 inset;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_mint{background:#c1ffc9;box-shadow:#00dd1c 0 1px 4px 0 inset;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current{background:#c50;box-shadow:#b03e00 0 1px 3px 0 inset;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box>div>div:hover{color:#000 !important;background:#007fff !important}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{color:#666}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{color:#333 !important}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{color:#111 !important}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{color:#555 !important}.xdsoft_dark .xdsoft_time_box{border:1px solid #333}.xdsoft_dark .xdsoft_scrollbar>.xdsoft_scroller{background:#333 !important}.xdsoft_datetimepicker .xdsoft_save_selected{display:block;border:1px solid #ddd !important;margin-top:5px;width:100%;color:#454551;font-size:13px}.xdsoft_datetimepicker .blue-gradient-button{font-family:"museo-sans","Book Antiqua",sans-serif;font-size:12px;font-weight:300;color:#82878c;height:28px;position:relative;padding:4px 17px 4px 33px;border:1px solid #d7d8da;background:-moz-linear-gradient(top,#fff 0,#f4f8fa 73%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(73%,#f4f8fa));background:-webkit-linear-gradient(top,#fff 0,#f4f8fa 73%);background:-o-linear-gradient(top,#fff 0,#f4f8fa 73%);background:-ms-linear-gradient(top,#fff 0,#f4f8fa 73%);background:linear-gradient(to bottom,#fff 0,#f4f8fa 73%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff',endColorstr='#f4f8fa',GradientType=0)}.xdsoft_datetimepicker .blue-gradient-button:hover,.xdsoft_datetimepicker .blue-gradient-button:focus,.xdsoft_datetimepicker .blue-gradient-button:hover span,.xdsoft_datetimepicker .blue-gradient-button:focus span{color:#454551;background:-moz-linear-gradient(top,#f4f8fa 0,#FFF 73%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#f4f8fa),color-stop(73%,#FFF));background:-webkit-linear-gradient(top,#f4f8fa 0,#FFF 73%);background:-o-linear-gradient(top,#f4f8fa 0,#FFF 73%);background:-ms-linear-gradient(top,#f4f8fa 0,#FFF 73%);background:linear-gradient(to bottom,#f4f8fa 0,#FFF 73%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f4f8fa',endColorstr='#FFF',GradientType=0)}
admin/assets/css/libs/sweetalert2.css CHANGED
@@ -1,1105 +1,1105 @@
1
- body.swal2-shown
2
- {
3
- overflow-y: hidden;
4
- }
5
-
6
- body.swal2-iosfix
7
- {
8
- position: fixed;
9
- left: 0;
10
- right: 0;
11
- }
12
-
13
- .swal2-container
14
- {
15
- display: -webkit-box;
16
- display: -ms-flexbox;
17
- display: flex;
18
- -webkit-box-align: center;
19
- -ms-flex-align: center;
20
- align-items: center;
21
- position: fixed;
22
- top: 0;
23
- left: 0;
24
- bottom: 0;
25
- right: 0;
26
- padding: 10px;
27
- background-color: transparent;
28
- z-index: 1060;
29
- }
30
-
31
- .swal2-container.swal2-fade
32
- {
33
- -webkit-transition: background-color .1s;
34
- transition: background-color .1s;
35
- }
36
-
37
- .swal2-container.swal2-shown
38
- {
39
- background-color: rgba(0, 0, 0, 0.4);
40
- }
41
-
42
- .swal2-modal
43
- {
44
- background-color: #fff;
45
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
46
- border-radius: 5px;
47
- -webkit-box-sizing: border-box;
48
- box-sizing: border-box;
49
- text-align: center;
50
- margin: auto;
51
- overflow-x: hidden;
52
- overflow-y: auto;
53
- display: none;
54
- position: relative;
55
- max-width: 100%;
56
- }
57
-
58
- .swal2-modal:focus
59
- {
60
- outline: none;
61
- }
62
-
63
- .swal2-modal.swal2-loading
64
- {
65
- overflow-y: hidden;
66
- }
67
-
68
- .swal2-modal .swal2-title
69
- {
70
- color: #595959;
71
- font-size: 30px;
72
- text-align: center;
73
- font-weight: 600;
74
- text-transform: none;
75
- position: relative;
76
- margin: 0 0 .4em;
77
- padding: 0;
78
- display: block;
79
- word-wrap: break-word;
80
- }
81
-
82
- .swal2-modal .swal2-buttonswrapper
83
- {
84
- margin-top: 15px;
85
- }
86
-
87
- .swal2-modal .swal2-buttonswrapper:not(.swal2-loading) .swal2-styled[disabled]
88
- {
89
- opacity: .4;
90
- cursor: no-drop;
91
- }
92
-
93
- .swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-confirm
94
- {
95
- -webkit-box-sizing: border-box;
96
- box-sizing: border-box;
97
- border: 4px solid transparent;
98
- border-color: transparent;
99
- width: 40px;
100
- height: 40px;
101
- padding: 0;
102
- margin: 7.5px;
103
- vertical-align: top;
104
- background-color: transparent !important;
105
- color: transparent;
106
- cursor: default;
107
- border-radius: 100%;
108
- -webkit-animation: rotate-loading 1.5s linear 0s infinite normal;
109
- animation: rotate-loading 1.5s linear 0s infinite normal;
110
- -webkit-user-select: none;
111
- -moz-user-select: none;
112
- -ms-user-select: none;
113
- user-select: none;
114
- }
115
-
116
- .swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-cancel
117
- {
118
- margin-left: 30px;
119
- margin-right: 30px;
120
- }
121
-
122
- .swal2-modal .swal2-buttonswrapper.swal2-loading :not(.swal2-styled).swal2-confirm::after
123
- {
124
- display: inline-block;
125
- content: '';
126
- margin-left: 5px 0 15px;
127
- vertical-align: -1px;
128
- height: 15px;
129
- width: 15px;
130
- border: 3px solid #999999;
131
- -webkit-box-shadow: 1px 1px 1px #fff;
132
- box-shadow: 1px 1px 1px #fff;
133
- border-right-color: transparent;
134
- border-radius: 50%;
135
- -webkit-animation: rotate-loading 1.5s linear 0s infinite normal;
136
- animation: rotate-loading 1.5s linear 0s infinite normal;
137
- }
138
-
139
- .swal2-modal .swal2-styled
140
- {
141
- border: 0;
142
- border-radius: 3px;
143
- -webkit-box-shadow: none;
144
- box-shadow: none;
145
- color: #fff;
146
- cursor: pointer;
147
- font-size: 17px;
148
- font-weight: 500;
149
- margin: 15px 5px 0;
150
- padding: 10px 32px;
151
- }
152
-
153
- .swal2-modal .swal2-image
154
- {
155
- margin: 20px auto;
156
- max-width: 100%;
157
- }
158
-
159
- .swal2-modal .swal2-close
160
- {
161
- background: transparent;
162
- border: 0;
163
- margin: 0;
164
- padding: 0;
165
- width: 38px;
166
- height: 40px;
167
- font-size: 36px;
168
- line-height: 40px;
169
- font-family: serif;
170
- position: absolute;
171
- top: 5px;
172
- right: 8px;
173
- cursor: pointer;
174
- color: #cccccc;
175
- -webkit-transition: color .1s ease;
176
- transition: color .1s ease;
177
- }
178
-
179
- .swal2-modal .swal2-close:hover
180
- {
181
- color: #d55;
182
- }
183
-
184
- .swal2-modal > .swal2-input,
185
- .swal2-modal > .swal2-file,
186
- .swal2-modal > .swal2-textarea,
187
- .swal2-modal > .swal2-select,
188
- .swal2-modal > .swal2-radio,
189
- .swal2-modal > .swal2-checkbox
190
- {
191
- display: none;
192
- }
193
-
194
- .swal2-modal .swal2-content
195
- {
196
- font-size: 18px;
197
- text-align: center;
198
- font-weight: 300;
199
- position: relative;
200
- float: none;
201
- margin: 0;
202
- padding: 0;
203
- line-height: normal;
204
- color: #545454;
205
- word-wrap: break-word;
206
- }
207
-
208
- .swal2-modal .swal2-input,
209
- .swal2-modal .swal2-file,
210
- .swal2-modal .swal2-textarea,
211
- .swal2-modal .swal2-select,
212
- .swal2-modal .swal2-radio,
213
- .swal2-modal .swal2-checkbox
214
- {
215
- margin: 20px auto;
216
- }
217
-
218
- .swal2-modal .swal2-input,
219
- .swal2-modal .swal2-file,
220
- .swal2-modal .swal2-textarea
221
- {
222
- width: 100%;
223
- -webkit-box-sizing: border-box;
224
- box-sizing: border-box;
225
- font-size: 18px;
226
- border-radius: 3px;
227
- border: 1px solid #d9d9d9;
228
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
229
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
230
- -webkit-transition: border-color box-shadow .3s;
231
- transition: border-color box-shadow .3s;
232
- }
233
-
234
- .swal2-modal .swal2-input.swal2-inputerror,
235
- .swal2-modal .swal2-file.swal2-inputerror,
236
- .swal2-modal .swal2-textarea.swal2-inputerror
237
- {
238
- border-color: #f27474 !important;
239
- -webkit-box-shadow: 0 0 2px #f27474 !important;
240
- box-shadow: 0 0 2px #f27474 !important;
241
- }
242
-
243
- .swal2-modal .swal2-input:focus,
244
- .swal2-modal .swal2-file:focus,
245
- .swal2-modal .swal2-textarea:focus
246
- {
247
- outline: none;
248
- border: 1px solid #b4dbed;
249
- -webkit-box-shadow: 0 0 3px #c4e6f5;
250
- box-shadow: 0 0 3px #c4e6f5;
251
- }
252
-
253
- .swal2-modal .swal2-input:focus::-webkit-input-placeholder,
254
- .swal2-modal .swal2-file:focus::-webkit-input-placeholder,
255
- .swal2-modal .swal2-textarea:focus::-webkit-input-placeholder
256
- {
257
- -webkit-transition: opacity .3s .03s ease;
258
- transition: opacity .3s .03s ease;
259
- opacity: .8;
260
- }
261
-
262
- .swal2-modal .swal2-input:focus:-ms-input-placeholder,
263
- .swal2-modal .swal2-file:focus:-ms-input-placeholder,
264
- .swal2-modal .swal2-textarea:focus:-ms-input-placeholder
265
- {
266
- -webkit-transition: opacity .3s .03s ease;
267
- transition: opacity .3s .03s ease;
268
- opacity: .8;
269
- }
270
-
271
- .swal2-modal .swal2-input:focus::placeholder,
272
- .swal2-modal .swal2-file:focus::placeholder,
273
- .swal2-modal .swal2-textarea:focus::placeholder
274
- {
275
- -webkit-transition: opacity .3s .03s ease;
276
- transition: opacity .3s .03s ease;
277
- opacity: .8;
278
- }
279
-
280
- .swal2-modal .swal2-input::-webkit-input-placeholder,
281
- .swal2-modal .swal2-file::-webkit-input-placeholder,
282
- .swal2-modal .swal2-textarea::-webkit-input-placeholder
283
- {
284
- color: #e6e6e6;
285
- }
286
-
287
- .swal2-modal .swal2-input:-ms-input-placeholder,
288
- .swal2-modal .swal2-file:-ms-input-placeholder,
289
- .swal2-modal .swal2-textarea:-ms-input-placeholder
290
- {
291
- color: #e6e6e6;
292
- }
293
-
294
- .swal2-modal .swal2-input::placeholder,
295
- .swal2-modal .swal2-file::placeholder,
296
- .swal2-modal .swal2-textarea::placeholder
297
- {
298
- color: #e6e6e6;
299
- }
300
-
301
- .swal2-modal .swal2-range input
302
- {
303
- float: left;
304
- width: 80%;
305
- }
306
-
307
- .swal2-modal .swal2-range output
308
- {
309
- float: right;
310
- width: 20%;
311
- font-size: 20px;
312
- font-weight: 600;
313
- text-align: center;
314
- }
315
-
316
- .swal2-modal .swal2-range input,
317
- .swal2-modal .swal2-range output
318
- {
319
- height: 43px;
320
- line-height: 43px;
321
- vertical-align: middle;
322
- margin: 20px auto;
323
- padding: 0;
324
- }
325
-
326
- .swal2-modal .swal2-input
327
- {
328
- height: 43px;
329
- padding: 0 12px;
330
- }
331
-
332
- .swal2-modal .swal2-input[type='number']
333
- {
334
- max-width: 150px;
335
- }
336
-
337
- .swal2-modal .swal2-file
338
- {
339
- font-size: 20px;
340
- }
341
-
342
- .swal2-modal .swal2-textarea
343
- {
344
- height: 108px;
345
- padding: 12px;
346
- }
347
-
348
- .swal2-modal .swal2-select
349
- {
350
- color: #545454;
351
- font-size: inherit;
352
- padding: 5px 10px;
353
- min-width: 40%;
354
- max-width: 100%;
355
- }
356
-
357
- .swal2-modal .swal2-radio
358
- {
359
- border: 0;
360
- }
361
-
362
- .swal2-modal .swal2-radio label:not(:first-child)
363
- {
364
- margin-left: 20px;
365
- }
366
-
367
- .swal2-modal .swal2-radio input,
368
- .swal2-modal .swal2-radio span
369
- {
370
- vertical-align: middle;
371
- }
372
-
373
- .swal2-modal .swal2-radio input
374
- {
375
- margin: 0 3px 0 0;
376
- }
377
-
378
- .swal2-modal .swal2-checkbox
379
- {
380
- color: #545454;
381
- }
382
-
383
- .swal2-modal .swal2-checkbox input,
384
- .swal2-modal .swal2-checkbox span
385
- {
386
- vertical-align: middle;
387
- }
388
-
389
- .swal2-modal .swal2-validationerror
390
- {
391
- background-color: #f0f0f0;
392
- margin: 0 -20px;
393
- overflow: hidden;
394
- padding: 10px;
395
- color: gray;
396
- font-size: 16px;
397
- font-weight: 300;
398
- display: none;
399
- }
400
-
401
- .swal2-modal .swal2-validationerror::before
402
- {
403
- content: '!';
404
- display: inline-block;
405
- width: 24px;
406
- height: 24px;
407
- border-radius: 50%;
408
- background-color: #ea7d7d;
409
- color: #fff;
410
- line-height: 24px;
411
- text-align: center;
412
- margin-right: 10px;
413
- }
414
-
415
- @supports (-ms-accelerator: true)
416
- {
417
- .swal2-range input
418
- {
419
- width: 100% !important;
420
- }
421
-
422
- .swal2-range output
423
- {
424
- display: none;
425
- }
426
- }
427
-
428
- @media all and (-ms-high-contrast: none), (-ms-high-contrast: active)
429
- {
430
- .swal2-range input
431
- {
432
- width: 100% !important;
433
- }
434
-
435
- .swal2-range output
436
- {
437
- display: none;
438
- }
439
- }
440
-
441
- .swal2-icon
442
- {
443
- width: 80px;
444
- height: 80px;
445
- border: 4px solid transparent;
446
- border-radius: 50%;
447
- margin: 20px auto 30px;
448
- padding: 0;
449
- position: relative;
450
- -webkit-box-sizing: content-box;
451
- box-sizing: content-box;
452
- cursor: default;
453
- -webkit-user-select: none;
454
- -moz-user-select: none;
455
- -ms-user-select: none;
456
- user-select: none;
457
- }
458
-
459
- .swal2-icon.swal2-error
460
- {
461
- border-color: #f27474;
462
- }
463
-
464
- .swal2-icon.swal2-error .swal2-x-mark
465
- {
466
- position: relative;
467
- display: block;
468
- }
469
-
470
- .swal2-icon.swal2-error [class^='swal2-x-mark-line']
471
- {
472
- position: absolute;
473
- height: 5px;
474
- width: 47px;
475
- background-color: #f27474;
476
- display: block;
477
- top: 37px;
478
- border-radius: 2px;
479
- }
480
-
481
- .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left']
482
- {
483
- -webkit-transform: rotate(45deg);
484
- transform: rotate(45deg);
485
- left: 17px;
486
- }
487
-
488
- .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right']
489
- {
490
- -webkit-transform: rotate(-45deg);
491
- transform: rotate(-45deg);
492
- right: 16px;
493
- }
494
-
495
- .swal2-icon.swal2-warning
496
- {
497
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
498
- color: #f8bb86;
499
- border-color: #facea8;
500
- font-size: 60px;
501
- line-height: 80px;
502
- text-align: center;
503
- }
504
-
505
- .swal2-icon.swal2-info
506
- {
507
- font-family: 'Open Sans', sans-serif;
508
- color: #3fc3ee;
509
- border-color: #9de0f6;
510
- font-size: 60px;
511
- line-height: 80px;
512
- text-align: center;
513
- }
514
-
515
- .swal2-icon.swal2-question
516
- {
517
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
518
- color: #87adbd;
519
- border-color: #c9dae1;
520
- font-size: 60px;
521
- line-height: 80px;
522
- text-align: center;
523
- }
524
-
525
- .swal2-icon.swal2-success
526
- {
527
- border-color: #a5dc86;
528
- }
529
-
530
- .swal2-icon.swal2-success [class^='swal2-success-circular-line']
531
- {
532
- border-radius: 50%;
533
- position: absolute;
534
- width: 60px;
535
- height: 120px;
536
- -webkit-transform: rotate(45deg);
537
- transform: rotate(45deg);
538
- }
539
-
540
- .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='left']
541
- {
542
- border-radius: 120px 0 0 120px;
543
- top: -7px;
544
- left: -33px;
545
- -webkit-transform: rotate(-45deg);
546
- transform: rotate(-45deg);
547
- -webkit-transform-origin: 60px 60px;
548
- transform-origin: 60px 60px;
549
- }
550
-
551
- .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='right']
552
- {
553
- border-radius: 0 120px 120px 0;
554
- top: -11px;
555
- left: 30px;
556
- -webkit-transform: rotate(-45deg);
557
- transform: rotate(-45deg);
558
- -webkit-transform-origin: 0 60px;
559
- transform-origin: 0 60px;
560
- }
561
-
562
- .swal2-icon.swal2-success .swal2-success-ring
563
- {
564
- width: 80px;
565
- height: 80px;
566
- border: 4px solid rgba(165, 220, 134, 0.2);
567
- border-radius: 50%;
568
- -webkit-box-sizing: content-box;
569
- box-sizing: content-box;
570
- position: absolute;
571
- left: -4px;
572
- top: -4px;
573
- z-index: 2;
574
- }
575
-
576
- .swal2-icon.swal2-success .swal2-success-fix
577
- {
578
- width: 7px;
579
- height: 90px;
580
- position: absolute;
581
- left: 28px;
582
- top: 8px;
583
- z-index: 1;
584
- -webkit-transform: rotate(-45deg);
585
- transform: rotate(-45deg);
586
- }
587
-
588
- .swal2-icon.swal2-success [class^='swal2-success-line']
589
- {
590
- height: 5px;
591
- background-color: #a5dc86;
592
- display: block;
593
- border-radius: 2px;
594
- position: absolute;
595
- z-index: 2;
596
- }
597
-
598
- .swal2-icon.swal2-success [class^='swal2-success-line'][class$='tip']
599
- {
600
- width: 25px;
601
- left: 14px;
602
- top: 46px;
603
- -webkit-transform: rotate(45deg);
604
- transform: rotate(45deg);
605
- }
606
-
607
- .swal2-icon.swal2-success [class^='swal2-success-line'][class$='long']
608
- {
609
- width: 47px;
610
- right: 8px;
611
- top: 38px;
612
- -webkit-transform: rotate(-45deg);
613
- transform: rotate(-45deg);
614
- }
615
-
616
- .swal2-progresssteps
617
- {
618
- font-weight: 600;
619
- margin: 0 0 20px;
620
- padding: 0;
621
- }
622
-
623
- .swal2-progresssteps li
624
- {
625
- display: inline-block;
626
- position: relative;
627
- }
628
-
629
- .swal2-progresssteps .swal2-progresscircle
630
- {
631
- background: #3085d6;
632
- border-radius: 2em;
633
- color: #fff;
634
- height: 2em;
635
- line-height: 2em;
636
- text-align: center;
637
- width: 2em;
638
- z-index: 20;
639
- }
640
-
641
- .swal2-progresssteps .swal2-progresscircle:first-child
642
- {
643
- margin-left: 0;
644
- }
645
-
646
- .swal2-progresssteps .swal2-progresscircle:last-child
647
- {
648
- margin-right: 0;
649
- }
650
-
651
- .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep
652
- {
653
- background: #3085d6;
654
- }
655
-
656
- .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progresscircle
657
- {
658
- background: #add8e6;
659
- }
660
-
661
- .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progressline
662
- {
663
- background: #add8e6;
664
- }
665
-
666
- .swal2-progresssteps .swal2-progressline
667
- {
668
- background: #3085d6;
669
- height: .4em;
670
- margin: 0 -1px;
671
- z-index: 10;
672
- }
673
-
674
- [class^='swal2']
675
- {
676
- -webkit-tap-highlight-color: transparent;
677
- }
678
-
679
- @-webkit-keyframes showSweetAlert
680
- {
681
- 0%
682
- {
683
- -webkit-transform: scale(0.7);
684
- transform: scale(0.7);
685
- }
686
- 45%
687
- {
688
- -webkit-transform: scale(1.05);
689
- transform: scale(1.05);
690
- }
691
- 80%
692
- {
693
- -webkit-transform: scale(0.95);
694
- transform: scale(0.95);
695
- }
696
- 100%
697
- {
698
- -webkit-transform: scale(1);
699
- transform: scale(1);
700
- }
701
- }
702
-
703
- @keyframes showSweetAlert
704
- {
705
- 0%
706
- {
707
- -webkit-transform: scale(0.7);
708
- transform: scale(0.7);
709
- }
710
- 45%
711
- {
712
- -webkit-transform: scale(1.05);
713
- transform: scale(1.05);
714
- }
715
- 80%
716
- {
717
- -webkit-transform: scale(0.95);
718
- transform: scale(0.95);
719
- }
720
- 100%
721
- {
722
- -webkit-transform: scale(1);
723
- transform: scale(1);
724
- }
725
- }
726
-
727
- @-webkit-keyframes hideSweetAlert
728
- {
729
- 0%
730
- {
731
- -webkit-transform: scale(1);
732
- transform: scale(1);
733
- opacity: 1;
734
- }
735
- 100%
736
- {
737
- -webkit-transform: scale(0.5);
738
- transform: scale(0.5);
739
- opacity: 0;
740
- }
741
- }
742
-
743
- @keyframes hideSweetAlert
744
- {
745
- 0%
746
- {
747
- -webkit-transform: scale(1);
748
- transform: scale(1);
749
- opacity: 1;
750
- }
751
- 100%
752
- {
753
- -webkit-transform: scale(0.5);
754
- transform: scale(0.5);
755
- opacity: 0;
756
- }
757
- }
758
-
759
- .swal2-show
760
- {
761
- -webkit-animation: showSweetAlert 0.3s;
762
- animation: showSweetAlert 0.3s;
763
- }
764
-
765
- .swal2-show.swal2-noanimation
766
- {
767
- -webkit-animation: none;
768
- animation: none;
769
- }
770
-
771
- .swal2-hide
772
- {
773
- -webkit-animation: hideSweetAlert 0.15s forwards;
774
- animation: hideSweetAlert 0.15s forwards;
775
- }
776
-
777
- .swal2-hide.swal2-noanimation
778
- {
779
- -webkit-animation: none;
780
- animation: none;
781
- }
782
-
783
- @-webkit-keyframes animate-success-tip
784
- {
785
- 0%
786
- {
787
- width: 0;
788
- left: 1px;
789
- top: 19px;
790
- }
791
- 54%
792
- {
793
- width: 0;
794
- left: 1px;
795
- top: 19px;
796
- }
797
- 70%
798
- {
799
- width: 50px;
800
- left: -8px;
801
- top: 37px;
802
- }
803
- 84%
804
- {
805
- width: 17px;
806
- left: 21px;
807
- top: 48px;
808
- }
809
- 100%
810
- {
811
- width: 25px;
812
- left: 14px;
813
- top: 45px;
814
- }
815
- }
816
-
817
- @keyframes animate-success-tip
818
- {
819
- 0%
820
- {
821
- width: 0;
822
- left: 1px;
823
- top: 19px;
824
- }
825
- 54%
826
- {
827
- width: 0;
828
- left: 1px;
829
- top: 19px;
830
- }
831
- 70%
832
- {
833
- width: 50px;
834
- left: -8px;
835
- top: 37px;
836
- }
837
- 84%
838
- {
839
- width: 17px;
840
- left: 21px;
841
- top: 48px;
842
- }
843
- 100%
844
- {
845
- width: 25px;
846
- left: 14px;
847
- top: 45px;
848
- }
849
- }
850
-
851
- @-webkit-keyframes animate-success-long
852
- {
853
- 0%
854
- {
855
- width: 0;
856
- right: 46px;
857
- top: 54px;
858
- }
859
- 65%
860
- {
861
- width: 0;
862
- right: 46px;
863
- top: 54px;
864
- }
865
- 84%
866
- {
867
- width: 55px;
868
- right: 0;
869
- top: 35px;
870
- }
871
- 100%
872
- {
873
- width: 47px;
874
- right: 8px;
875
- top: 38px;
876
- }
877
- }
878
-
879
- @keyframes animate-success-long
880
- {
881
- 0%
882
- {
883
- width: 0;
884
- right: 46px;
885
- top: 54px;
886
- }
887
- 65%
888
- {
889
- width: 0;
890
- right: 46px;
891
- top: 54px;
892
- }
893
- 84%
894
- {
895
- width: 55px;
896
- right: 0;
897
- top: 35px;
898
- }
899
- 100%
900
- {
901
- width: 47px;
902
- right: 8px;
903
- top: 38px;
904
- }
905
- }
906
-
907
- @-webkit-keyframes rotatePlaceholder
908
- {
909
- 0%
910
- {
911
- -webkit-transform: rotate(-45deg);
912
- transform: rotate(-45deg);
913
- }
914
- 5%
915
- {
916
- -webkit-transform: rotate(-45deg);
917
- transform: rotate(-45deg);
918
- }
919
- 12%
920
- {
921
- -webkit-transform: rotate(-405deg);
922
- transform: rotate(-405deg);
923
- }
924
- 100%
925
- {
926
- -webkit-transform: rotate(-405deg);
927
- transform: rotate(-405deg);
928
- }
929
- }
930
-
931
- @keyframes rotatePlaceholder
932
- {
933
- 0%
934
- {
935
- -webkit-transform: rotate(-45deg);
936
- transform: rotate(-45deg);
937
- }
938
- 5%
939
- {
940
- -webkit-transform: rotate(-45deg);
941
- transform: rotate(-45deg);
942
- }
943
- 12%
944
- {
945
- -webkit-transform: rotate(-405deg);
946
- transform: rotate(-405deg);
947
- }
948
- 100%
949
- {
950
- -webkit-transform: rotate(-405deg);
951
- transform: rotate(-405deg);
952
- }
953
- }
954
-
955
- .swal2-animate-success-line-tip
956
- {
957
- -webkit-animation: animate-success-tip 0.75s;
958
- animation: animate-success-tip 0.75s;
959
- }
960
-
961
- .swal2-animate-success-line-long
962
- {
963
- -webkit-animation: animate-success-long 0.75s;
964
- animation: animate-success-long 0.75s;
965
- }
966
-
967
- .swal2-success.swal2-animate-success-icon .swal2-success-circular-line-right
968
- {
969
- -webkit-animation: rotatePlaceholder 4.25s ease-in;
970
- animation: rotatePlaceholder 4.25s ease-in;
971
- }
972
-
973
- @-webkit-keyframes animate-error-icon
974
- {
975
- 0%
976
- {
977
- -webkit-transform: rotateX(100deg);
978
- transform: rotateX(100deg);
979
- opacity: 0;
980
- }
981
- 100%
982
- {
983
- -webkit-transform: rotateX(0deg);
984
- transform: rotateX(0deg);
985
- opacity: 1;
986
- }
987
- }
988
-
989
- @keyframes animate-error-icon
990
- {
991
- 0%
992
- {
993
- -webkit-transform: rotateX(100deg);
994
- transform: rotateX(100deg);
995
- opacity: 0;
996
- }
997
- 100%
998
- {
999
- -webkit-transform: rotateX(0deg);
1000
- transform: rotateX(0deg);
1001
- opacity: 1;
1002
- }
1003
- }
1004
-
1005
- .swal2-animate-error-icon
1006
- {
1007
- -webkit-animation: animate-error-icon 0.5s;
1008
- animation: animate-error-icon 0.5s;
1009
- }
1010
-
1011
- @-webkit-keyframes animate-x-mark
1012
- {
1013
- 0%
1014
- {
1015
- -webkit-transform: scale(0.4);
1016
- transform: scale(0.4);
1017
- margin-top: 26px;
1018
- opacity: 0;
1019
- }
1020
- 50%
1021
- {
1022
- -webkit-transform: scale(0.4);
1023
- transform: scale(0.4);
1024
- margin-top: 26px;
1025
- opacity: 0;
1026
- }
1027
- 80%
1028
- {
1029
- -webkit-transform: scale(1.15);
1030
- transform: scale(1.15);
1031
- margin-top: -6px;
1032
- }
1033
- 100%
1034
- {
1035
- -webkit-transform: scale(1);
1036
- transform: scale(1);
1037
- margin-top: 0;
1038
- opacity: 1;
1039
- }
1040
- }
1041
-
1042
- @keyframes animate-x-mark
1043
- {
1044
- 0%
1045
- {
1046
- -webkit-transform: scale(0.4);
1047
- transform: scale(0.4);
1048
- margin-top: 26px;
1049
- opacity: 0;
1050
- }
1051
- 50%
1052
- {
1053
- -webkit-transform: scale(0.4);
1054
- transform: scale(0.4);
1055
- margin-top: 26px;
1056
- opacity: 0;
1057
- }
1058
- 80%
1059
- {
1060
- -webkit-transform: scale(1.15);
1061
- transform: scale(1.15);
1062
- margin-top: -6px;
1063
- }
1064
- 100%
1065
- {
1066
- -webkit-transform: scale(1);
1067
- transform: scale(1);
1068
- margin-top: 0;
1069
- opacity: 1;
1070
- }
1071
- }
1072
-
1073
- .swal2-animate-x-mark
1074
- {
1075
- -webkit-animation: animate-x-mark 0.5s;
1076
- animation: animate-x-mark 0.5s;
1077
- }
1078
-
1079
- @-webkit-keyframes rotate-loading
1080
- {
1081
- 0%
1082
- {
1083
- -webkit-transform: rotate(0deg);
1084
- transform: rotate(0deg);
1085
- }
1086
- 100%
1087
- {
1088
- -webkit-transform: rotate(360deg);
1089
- transform: rotate(360deg);
1090
- }
1091
- }
1092
-
1093
- @keyframes rotate-loading
1094
- {
1095
- 0%
1096
- {
1097
- -webkit-transform: rotate(0deg);
1098
- transform: rotate(0deg);
1099
- }
1100
- 100%
1101
- {
1102
- -webkit-transform: rotate(360deg);
1103
- transform: rotate(360deg);
1104
- }
1105
- }
1
+ body.swal2-shown
2
+ {
3
+ overflow-y: hidden;
4
+ }
5
+
6
+ body.swal2-iosfix
7
+ {
8
+ position: fixed;
9
+ left: 0;
10
+ right: 0;
11
+ }
12
+
13
+ .swal2-container
14
+ {
15
+ display: -webkit-box;
16
+ display: -ms-flexbox;
17
+ display: flex;
18
+ -webkit-box-align: center;
19
+ -ms-flex-align: center;
20
+ align-items: center;
21
+ position: fixed;
22
+ top: 0;
23
+ left: 0;
24
+ bottom: 0;
25
+ right: 0;
26
+ padding: 10px;
27
+ background-color: transparent;
28
+ z-index: 1060;
29
+ }
30
+
31
+ .swal2-container.swal2-fade
32
+ {
33
+ -webkit-transition: background-color .1s;
34
+ transition: background-color .1s;
35
+ }
36
+
37
+ .swal2-container.swal2-shown
38
+ {
39
+ background-color: rgba(0, 0, 0, 0.4);
40
+ }
41
+
42
+ .swal2-modal
43
+ {
44
+ background-color: #fff;
45
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
46
+ border-radius: 5px;
47
+ -webkit-box-sizing: border-box;
48
+ box-sizing: border-box;
49
+ text-align: center;
50
+ margin: auto;
51
+ overflow-x: hidden;
52
+ overflow-y: auto;
53
+ display: none;
54
+ position: relative;
55
+ max-width: 100%;
56
+ }
57
+
58
+ .swal2-modal:focus
59
+ {
60
+ outline: none;
61
+ }
62
+
63
+ .swal2-modal.swal2-loading
64
+ {
65
+ overflow-y: hidden;
66
+ }
67
+
68
+ .swal2-modal .swal2-title
69
+ {
70
+ color: #595959;
71
+ font-size: 30px;
72
+ text-align: center;
73
+ font-weight: 600;
74
+ text-transform: none;
75
+ position: relative;
76
+ margin: 0 0 .4em;
77
+ padding: 0;
78
+ display: block;
79
+ word-wrap: break-word;
80
+ }
81
+
82
+ .swal2-modal .swal2-buttonswrapper
83
+ {
84
+ margin-top: 15px;
85
+ }
86
+
87
+ .swal2-modal .swal2-buttonswrapper:not(.swal2-loading) .swal2-styled[disabled]
88
+ {
89
+ opacity: .4;
90
+ cursor: no-drop;
91
+ }
92
+
93
+ .swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-confirm
94
+ {
95
+ -webkit-box-sizing: border-box;
96
+ box-sizing: border-box;
97
+ border: 4px solid transparent;
98
+ border-color: transparent;
99
+ width: 40px;
100
+ height: 40px;
101
+ padding: 0;
102
+ margin: 7.5px;
103
+ vertical-align: top;
104
+ background-color: transparent !important;
105
+ color: transparent;
106
+ cursor: default;
107
+ border-radius: 100%;
108
+ -webkit-animation: rotate-loading 1.5s linear 0s infinite normal;
109
+ animation: rotate-loading 1.5s linear 0s infinite normal;
110
+ -webkit-user-select: none;
111
+ -moz-user-select: none;
112
+ -ms-user-select: none;
113
+ user-select: none;
114
+ }
115
+
116
+ .swal2-modal .swal2-buttonswrapper.swal2-loading .swal2-styled.swal2-cancel
117
+ {
118
+ margin-left: 30px;
119
+ margin-right: 30px;
120
+ }
121
+
122
+ .swal2-modal .swal2-buttonswrapper.swal2-loading :not(.swal2-styled).swal2-confirm::after
123
+ {
124
+ display: inline-block;
125
+ content: '';
126
+ margin-left: 5px 0 15px;
127
+ vertical-align: -1px;
128
+ height: 15px;
129
+ width: 15px;
130
+ border: 3px solid #999999;
131
+ -webkit-box-shadow: 1px 1px 1px #fff;
132
+ box-shadow: 1px 1px 1px #fff;
133
+ border-right-color: transparent;
134
+ border-radius: 50%;
135
+ -webkit-animation: rotate-loading 1.5s linear 0s infinite normal;
136
+ animation: rotate-loading 1.5s linear 0s infinite normal;
137
+ }
138
+
139
+ .swal2-modal .swal2-styled
140
+ {
141
+ border: 0;
142
+ border-radius: 3px;
143
+ -webkit-box-shadow: none;
144
+ box-shadow: none;
145
+ color: #fff;
146
+ cursor: pointer;
147
+ font-size: 17px;
148
+ font-weight: 500;
149
+ margin: 15px 5px 0;
150
+ padding: 10px 32px;
151
+ }
152
+
153
+ .swal2-modal .swal2-image
154
+ {
155
+ margin: 20px auto;
156
+ max-width: 100%;
157
+ }
158
+
159
+ .swal2-modal .swal2-close
160
+ {
161
+ background: transparent;
162
+ border: 0;
163
+ margin: 0;
164
+ padding: 0;
165
+ width: 38px;
166
+ height: 40px;
167
+ font-size: 36px;
168
+ line-height: 40px;
169
+ font-family: serif;
170
+ position: absolute;
171
+ top: 5px;
172
+ right: 8px;
173
+ cursor: pointer;
174
+ color: #cccccc;
175
+ -webkit-transition: color .1s ease;
176
+ transition: color .1s ease;
177
+ }
178
+
179
+ .swal2-modal .swal2-close:hover
180
+ {
181
+ color: #d55;
182
+ }
183
+
184
+ .swal2-modal > .swal2-input,
185
+ .swal2-modal > .swal2-file,
186
+ .swal2-modal > .swal2-textarea,
187
+ .swal2-modal > .swal2-select,
188
+ .swal2-modal > .swal2-radio,
189
+ .swal2-modal > .swal2-checkbox
190
+ {
191
+ display: none;
192
+ }
193
+
194
+ .swal2-modal .swal2-content
195
+ {
196
+ font-size: 18px;
197
+ text-align: center;
198
+ font-weight: 300;
199
+ position: relative;
200
+ float: none;
201
+ margin: 0;
202
+ padding: 0;
203
+ line-height: normal;
204
+ color: #545454;
205
+ word-wrap: break-word;
206
+ }
207
+
208
+ .swal2-modal .swal2-input,
209
+ .swal2-modal .swal2-file,
210
+ .swal2-modal .swal2-textarea,
211
+ .swal2-modal .swal2-select,
212
+ .swal2-modal .swal2-radio,
213
+ .swal2-modal .swal2-checkbox
214
+ {
215
+ margin: 20px auto;
216
+ }
217
+
218
+ .swal2-modal .swal2-input,
219
+ .swal2-modal .swal2-file,
220
+ .swal2-modal .swal2-textarea
221
+ {
222
+ width: 100%;
223
+ -webkit-box-sizing: border-box;
224
+ box-sizing: border-box;
225
+ font-size: 18px;
226
+ border-radius: 3px;
227
+ border: 1px solid #d9d9d9;
228
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
229
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
230
+ -webkit-transition: border-color box-shadow .3s;
231
+ transition: border-color box-shadow .3s;
232
+ }
233
+
234
+ .swal2-modal .swal2-input.swal2-inputerror,
235
+ .swal2-modal .swal2-file.swal2-inputerror,
236
+ .swal2-modal .swal2-textarea.swal2-inputerror
237
+ {
238
+ border-color: #f27474 !important;
239
+ -webkit-box-shadow: 0 0 2px #f27474 !important;
240
+ box-shadow: 0 0 2px #f27474 !important;
241
+ }
242
+
243
+ .swal2-modal .swal2-input:focus,
244
+ .swal2-modal .swal2-file:focus,
245
+ .swal2-modal .swal2-textarea:focus
246
+ {
247
+ outline: none;
248
+ border: 1px solid #b4dbed;
249
+ -webkit-box-shadow: 0 0 3px #c4e6f5;
250
+ box-shadow: 0 0 3px #c4e6f5;
251
+ }
252
+
253
+ .swal2-modal .swal2-input:focus::-webkit-input-placeholder,
254
+ .swal2-modal .swal2-file:focus::-webkit-input-placeholder,
255
+ .swal2-modal .swal2-textarea:focus::-webkit-input-placeholder
256
+ {
257
+ -webkit-transition: opacity .3s .03s ease;
258
+ transition: opacity .3s .03s ease;
259
+ opacity: .8;
260
+ }
261
+
262
+ .swal2-modal .swal2-input:focus:-ms-input-placeholder,
263
+ .swal2-modal .swal2-file:focus:-ms-input-placeholder,
264
+ .swal2-modal .swal2-textarea:focus:-ms-input-placeholder
265
+ {
266
+ -webkit-transition: opacity .3s .03s ease;
267
+ transition: opacity .3s .03s ease;
268
+ opacity: .8;
269
+ }
270
+
271
+ .swal2-modal .swal2-input:focus::placeholder,
272
+ .swal2-modal .swal2-file:focus::placeholder,
273
+ .swal2-modal .swal2-textarea:focus::placeholder
274
+ {
275
+ -webkit-transition: opacity .3s .03s ease;
276
+ transition: opacity .3s .03s ease;
277
+ opacity: .8;
278
+ }
279
+
280
+ .swal2-modal .swal2-input::-webkit-input-placeholder,
281
+ .swal2-modal .swal2-file::-webkit-input-placeholder,
282
+ .swal2-modal .swal2-textarea::-webkit-input-placeholder
283
+ {
284
+ color: #e6e6e6;
285
+ }
286
+
287
+ .swal2-modal .swal2-input:-ms-input-placeholder,
288
+ .swal2-modal .swal2-file:-ms-input-placeholder,
289
+ .swal2-modal .swal2-textarea:-ms-input-placeholder
290
+ {
291
+ color: #e6e6e6;
292
+ }
293
+
294
+ .swal2-modal .swal2-input::placeholder,
295
+ .swal2-modal .swal2-file::placeholder,
296
+ .swal2-modal .swal2-textarea::placeholder
297
+ {
298
+ color: #e6e6e6;
299
+ }
300
+
301
+ .swal2-modal .swal2-range input
302
+ {
303
+ float: left;
304
+ width: 80%;
305
+ }
306
+
307
+ .swal2-modal .swal2-range output
308
+ {
309
+ float: right;
310
+ width: 20%;
311
+ font-size: 20px;
312
+ font-weight: 600;
313
+ text-align: center;
314
+ }
315
+
316
+ .swal2-modal .swal2-range input,
317
+ .swal2-modal .swal2-range output
318
+ {
319
+ height: 43px;
320
+ line-height: 43px;
321
+ vertical-align: middle;
322
+ margin: 20px auto;
323
+ padding: 0;
324
+ }
325
+
326
+ .swal2-modal .swal2-input
327
+ {
328
+ height: 43px;
329
+ padding: 0 12px;
330
+ }
331
+
332
+ .swal2-modal .swal2-input[type='number']
333
+ {
334
+ max-width: 150px;
335
+ }
336
+
337
+ .swal2-modal .swal2-file
338
+ {
339
+ font-size: 20px;
340
+ }
341
+
342
+ .swal2-modal .swal2-textarea
343
+ {
344
+ height: 108px;
345
+ padding: 12px;
346
+ }
347
+
348
+ .swal2-modal .swal2-select
349
+ {
350
+ color: #545454;
351
+ font-size: inherit;
352
+ padding: 5px 10px;
353
+ min-width: 40%;
354
+ max-width: 100%;
355
+ }
356
+
357
+ .swal2-modal .swal2-radio
358
+ {
359
+ border: 0;
360
+ }
361
+
362
+ .swal2-modal .swal2-radio label:not(:first-child)
363
+ {
364
+ margin-left: 20px;
365
+ }
366
+
367
+ .swal2-modal .swal2-radio input,
368
+ .swal2-modal .swal2-radio span
369
+ {
370
+ vertical-align: middle;
371
+ }
372
+
373
+ .swal2-modal .swal2-radio input
374
+ {
375
+ margin: 0 3px 0 0;
376
+ }
377
+
378
+ .swal2-modal .swal2-checkbox
379
+ {
380
+ color: #545454;
381
+ }
382
+
383
+ .swal2-modal .swal2-checkbox input,
384
+ .swal2-modal .swal2-checkbox span
385
+ {
386
+ vertical-align: middle;
387
+ }
388
+
389
+ .swal2-modal .swal2-validationerror
390
+ {
391
+ background-color: #f0f0f0;
392
+ margin: 0 -20px;
393
+ overflow: hidden;
394
+ padding: 10px;
395
+ color: gray;
396
+ font-size: 16px;
397
+ font-weight: 300;
398
+ display: none;
399
+ }
400
+
401
+ .swal2-modal .swal2-validationerror::before
402
+ {
403
+ content: '!';
404
+ display: inline-block;
405
+ width: 24px;
406
+ height: 24px;
407
+ border-radius: 50%;
408
+ background-color: #ea7d7d;
409
+ color: #fff;
410
+ line-height: 24px;
411
+ text-align: center;
412
+ margin-right: 10px;
413
+ }
414
+
415
+ @supports (-ms-accelerator: true)
416
+ {
417
+ .swal2-range input
418
+ {
419
+ width: 100% !important;
420
+ }
421
+
422
+ .swal2-range output
423
+ {
424
+ display: none;
425
+ }
426
+ }
427
+
428
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active)
429
+ {
430
+ .swal2-range input
431
+ {
432
+ width: 100% !important;
433
+ }
434
+
435
+ .swal2-range output
436
+ {
437
+ display: none;
438
+ }
439
+ }
440
+
441
+ .swal2-icon
442
+ {
443
+ width: 80px;
444
+ height: 80px;
445
+ border: 4px solid transparent;
446
+ border-radius: 50%;
447
+ margin: 20px auto 30px;
448
+ padding: 0;
449
+ position: relative;
450
+ -webkit-box-sizing: content-box;
451
+ box-sizing: content-box;
452
+ cursor: default;
453
+ -webkit-user-select: none;
454
+ -moz-user-select: none;
455
+ -ms-user-select: none;
456
+ user-select: none;
457
+ }
458
+
459
+ .swal2-icon.swal2-error
460
+ {
461
+ border-color: #f27474;
462
+ }
463
+
464
+ .swal2-icon.swal2-error .swal2-x-mark
465
+ {
466
+ position: relative;
467
+ display: block;
468
+ }
469
+
470
+ .swal2-icon.swal2-error [class^='swal2-x-mark-line']
471
+ {
472
+ position: absolute;
473
+ height: 5px;
474
+ width: 47px;
475
+ background-color: #f27474;
476
+ display: block;
477
+ top: 37px;
478
+ border-radius: 2px;
479
+ }
480
+
481
+ .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='left']
482
+ {
483
+ -webkit-transform: rotate(45deg);
484
+ transform: rotate(45deg);
485
+ left: 17px;
486
+ }
487
+
488
+ .swal2-icon.swal2-error [class^='swal2-x-mark-line'][class$='right']
489
+ {
490
+ -webkit-transform: rotate(-45deg);
491
+ transform: rotate(-45deg);
492
+ right: 16px;
493
+ }
494
+
495
+ .swal2-icon.swal2-warning
496
+ {
497
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
498
+ color: #f8bb86;
499
+ border-color: #facea8;
500
+ font-size: 60px;
501
+ line-height: 80px;
502
+ text-align: center;
503
+ }
504
+
505
+ .swal2-icon.swal2-info
506
+ {
507
+ font-family: 'Open Sans', sans-serif;
508
+ color: #3fc3ee;
509
+ border-color: #9de0f6;
510
+ font-size: 60px;
511
+ line-height: 80px;
512
+ text-align: center;
513
+ }
514
+
515
+ .swal2-icon.swal2-question
516
+ {
517
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
518
+ color: #87adbd;
519
+ border-color: #c9dae1;
520
+ font-size: 60px;
521
+ line-height: 80px;
522
+ text-align: center;
523
+ }
524
+
525
+ .swal2-icon.swal2-success
526
+ {
527
+ border-color: #a5dc86;
528
+ }
529
+
530
+ .swal2-icon.swal2-success [class^='swal2-success-circular-line']
531
+ {
532
+ border-radius: 50%;
533
+ position: absolute;
534
+ width: 60px;
535
+ height: 120px;
536
+ -webkit-transform: rotate(45deg);
537
+ transform: rotate(45deg);
538
+ }
539
+
540
+ .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='left']
541
+ {
542
+ border-radius: 120px 0 0 120px;
543
+ top: -7px;
544
+ left: -33px;
545
+ -webkit-transform: rotate(-45deg);
546
+ transform: rotate(-45deg);
547
+ -webkit-transform-origin: 60px 60px;
548
+ transform-origin: 60px 60px;
549
+ }
550
+
551
+ .swal2-icon.swal2-success [class^='swal2-success-circular-line'][class$='right']
552
+ {
553
+ border-radius: 0 120px 120px 0;
554
+ top: -11px;
555
+ left: 30px;
556
+ -webkit-transform: rotate(-45deg);
557
+ transform: rotate(-45deg);
558
+ -webkit-transform-origin: 0 60px;
559
+ transform-origin: 0 60px;
560
+ }
561
+
562
+ .swal2-icon.swal2-success .swal2-success-ring
563
+ {
564
+ width: 80px;
565
+ height: 80px;
566
+ border: 4px solid rgba(165, 220, 134, 0.2);
567
+ border-radius: 50%;
568
+ -webkit-box-sizing: content-box;
569
+ box-sizing: content-box;
570
+ position: absolute;
571
+ left: -4px;
572
+ top: -4px;
573
+ z-index: 2;
574
+ }
575
+
576
+ .swal2-icon.swal2-success .swal2-success-fix
577
+ {
578
+ width: 7px;
579
+ height: 90px;
580
+ position: absolute;
581
+ left: 28px;
582
+ top: 8px;
583
+ z-index: 1;
584
+ -webkit-transform: rotate(-45deg);
585
+ transform: rotate(-45deg);
586
+ }
587
+
588
+ .swal2-icon.swal2-success [class^='swal2-success-line']
589
+ {
590
+ height: 5px;
591
+ background-color: #a5dc86;
592
+ display: block;
593
+ border-radius: 2px;
594
+ position: absolute;
595
+ z-index: 2;
596
+ }
597
+
598
+ .swal2-icon.swal2-success [class^='swal2-success-line'][class$='tip']
599
+ {
600
+ width: 25px;
601
+ left: 14px;
602
+ top: 46px;
603
+ -webkit-transform: rotate(45deg);
604
+ transform: rotate(45deg);
605
+ }
606
+
607
+ .swal2-icon.swal2-success [class^='swal2-success-line'][class$='long']
608
+ {
609
+ width: 47px;
610
+ right: 8px;
611
+ top: 38px;
612
+ -webkit-transform: rotate(-45deg);
613
+ transform: rotate(-45deg);
614
+ }
615
+
616
+ .swal2-progresssteps
617
+ {
618
+ font-weight: 600;
619
+ margin: 0 0 20px;
620
+ padding: 0;
621
+ }
622
+
623
+ .swal2-progresssteps li
624
+ {
625
+ display: inline-block;
626
+ position: relative;
627
+ }
628
+
629
+ .swal2-progresssteps .swal2-progresscircle
630
+ {
631
+ background: #3085d6;
632
+ border-radius: 2em;
633
+ color: #fff;
634
+ height: 2em;
635
+ line-height: 2em;
636
+ text-align: center;
637
+ width: 2em;
638
+ z-index: 20;
639
+ }
640
+
641
+ .swal2-progresssteps .swal2-progresscircle:first-child
642
+ {
643
+ margin-left: 0;
644
+ }
645
+
646
+ .swal2-progresssteps .swal2-progresscircle:last-child
647
+ {
648
+ margin-right: 0;
649
+ }
650
+
651
+ .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep
652
+ {
653
+ background: #3085d6;
654
+ }
655
+
656
+ .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progresscircle
657
+ {
658
+ background: #add8e6;
659
+ }
660
+
661
+ .swal2-progresssteps .swal2-progresscircle.swal2-activeprogressstep ~ .swal2-progressline
662
+ {
663
+ background: #add8e6;
664
+ }
665
+
666
+ .swal2-progresssteps .swal2-progressline
667
+ {
668
+ background: #3085d6;
669
+ height: .4em;
670
+ margin: 0 -1px;
671
+ z-index: 10;
672
+ }
673
+
674
+ [class^='swal2']
675
+ {
676
+ -webkit-tap-highlight-color: transparent;
677
+ }
678
+
679
+ @-webkit-keyframes showSweetAlert
680
+ {
681
+ 0%
682
+ {
683
+ -webkit-transform: scale(0.7);
684
+ transform: scale(0.7);
685
+ }
686
+ 45%
687
+ {
688
+ -webkit-transform: scale(1.05);
689
+ transform: scale(1.05);
690
+ }
691
+ 80%
692
+ {
693
+ -webkit-transform: scale(0.95);
694
+ transform: scale(0.95);
695
+ }
696
+ 100%
697
+ {
698
+ -webkit-transform: scale(1);
699
+ transform: scale(1);
700
+ }
701
+ }
702
+
703
+ @keyframes showSweetAlert
704
+ {
705
+ 0%
706
+ {
707
+ -webkit-transform: scale(0.7);
708
+ transform: scale(0.7);
709
+ }
710
+ 45%
711
+ {
712
+ -webkit-transform: scale(1.05);
713
+ transform: scale(1.05);
714
+ }
715
+ 80%
716
+ {
717
+ -webkit-transform: scale(0.95);
718
+ transform: scale(0.95);
719
+ }
720
+ 100%
721
+ {
722
+ -webkit-transform: scale(1);
723
+ transform: scale(1);
724
+ }
725
+ }
726
+
727
+ @-webkit-keyframes hideSweetAlert
728
+ {
729
+ 0%
730
+ {
731
+ -webkit-transform: scale(1);
732
+ transform: scale(1);
733
+ opacity: 1;
734
+ }
735
+ 100%
736
+ {
737
+ -webkit-transform: scale(0.5);
738
+ transform: scale(0.5);
739
+ opacity: 0;
740
+ }
741
+ }
742
+
743
+ @keyframes hideSweetAlert
744
+ {
745
+ 0%
746
+ {
747
+ -webkit-transform: scale(1);
748
+ transform: scale(1);
749
+ opacity: 1;
750
+ }
751
+ 100%
752
+ {
753
+ -webkit-transform: scale(0.5);
754
+ transform: scale(0.5);
755
+ opacity: 0;
756
+ }
757
+ }
758
+
759
+ .swal2-show
760
+ {
761
+ -webkit-animation: showSweetAlert 0.3s;
762
+ animation: showSweetAlert 0.3s;
763
+ }
764
+
765
+ .swal2-show.swal2-noanimation
766
+ {
767
+ -webkit-animation: none;
768
+ animation: none;
769
+ }
770
+
771
+ .swal2-hide
772
+ {
773
+ -webkit-animation: hideSweetAlert 0.15s forwards;
774
+ animation: hideSweetAlert 0.15s forwards;
775
+ }
776
+
777
+ .swal2-hide.swal2-noanimation
778
+ {
779
+ -webkit-animation: none;
780
+ animation: none;
781
+ }
782
+
783
+ @-webkit-keyframes animate-success-tip
784
+ {
785
+ 0%
786
+ {
787
+ width: 0;
788
+ left: 1px;
789
+ top: 19px;
790
+ }
791
+ 54%
792
+ {
793
+ width: 0;
794
+ left: 1px;
795
+ top: 19px;
796
+ }
797
+ 70%
798
+ {
799
+ width: 50px;
800
+ left: -8px;
801
+ top: 37px;
802
+ }
803
+ 84%
804
+ {
805
+ width: 17px;
806
+ left: 21px;
807
+ top: 48px;
808
+ }
809
+ 100%
810
+ {
811
+ width: 25px;
812
+ left: 14px;
813
+ top: 45px;
814
+ }
815
+ }
816
+
817
+ @keyframes animate-success-tip
818
+ {
819
+ 0%
820
+ {
821
+ width: 0;
822
+ left: 1px;
823
+ top: 19px;
824
+ }
825
+ 54%
826
+ {
827
+ width: 0;
828
+ left: 1px;
829
+ top: 19px;
830
+ }
831
+ 70%
832
+ {
833
+ width: 50px;
834
+ left: -8px;
835
+ top: 37px;
836
+ }
837
+ 84%
838
+ {
839
+ width: 17px;
840
+ left: 21px;
841
+ top: 48px;
842
+ }
843
+ 100%
844
+ {
845
+ width: 25px;
846
+ left: 14px;
847
+ top: 45px;
848
+ }
849
+ }
850
+
851
+ @-webkit-keyframes animate-success-long
852
+ {
853
+ 0%
854
+ {
855
+ width: 0;
856
+ right: 46px;
857
+ top: 54px;
858
+ }
859
+ 65%
860
+ {
861
+ width: 0;
862
+ right: 46px;
863
+ top: 54px;
864
+ }
865
+ 84%
866
+ {
867
+ width: 55px;
868
+ right: 0;
869
+ top: 35px;
870
+ }
871
+ 100%
872
+ {
873
+ width: 47px;
874
+ right: 8px;
875
+ top: 38px;
876
+ }
877
+ }
878
+
879
+ @keyframes animate-success-long
880
+ {
881
+ 0%
882
+ {
883
+ width: 0;
884
+ right: 46px;
885
+ top: 54px;
886
+ }
887
+ 65%
888
+ {
889
+ width: 0;
890
+ right: 46px;
891
+ top: 54px;
892
+ }
893
+ 84%
894
+ {
895
+ width: 55px;
896
+ right: 0;
897
+ top: 35px;
898
+ }
899
+ 100%
900
+ {
901
+ width: 47px;
902
+ right: 8px;
903
+ top: 38px;
904
+ }
905
+ }
906
+
907
+ @-webkit-keyframes rotatePlaceholder
908
+ {
909
+ 0%
910
+ {
911
+ -webkit-transform: rotate(-45deg);
912
+ transform: rotate(-45deg);
913
+ }
914
+ 5%
915
+ {
916
+ -webkit-transform: rotate(-45deg);
917
+ transform: rotate(-45deg);
918
+ }
919
+ 12%
920
+ {
921
+ -webkit-transform: rotate(-405deg);
922
+ transform: rotate(-405deg);
923
+ }
924
+ 100%
925
+ {
926
+ -webkit-transform: rotate(-405deg);
927
+ transform: rotate(-405deg);
928
+ }
929
+ }
930
+
931
+ @keyframes rotatePlaceholder
932
+ {
933
+ 0%
934
+ {
935
+ -webkit-transform: rotate(-45deg);
936
+ transform: rotate(-45deg);
937
+ }
938
+ 5%
939
+ {
940
+ -webkit-transform: rotate(-45deg);
941
+ transform: rotate(-45deg);
942
+ }
943
+ 12%
944
+ {
945
+ -webkit-transform: rotate(-405deg);
946
+ transform: rotate(-405deg);
947
+ }
948
+ 100%
949
+ {
950
+ -webkit-transform: rotate(-405deg);
951
+ transform: rotate(-405deg);
952
+ }
953
+ }
954
+
955
+ .swal2-animate-success-line-tip
956
+ {
957
+ -webkit-animation: animate-success-tip 0.75s;
958
+ animation: animate-success-tip 0.75s;
959
+ }
960
+
961
+ .swal2-animate-success-line-long
962
+ {
963
+ -webkit-animation: animate-success-long 0.75s;
964
+ animation: animate-success-long 0.75s;
965
+ }
966
+
967
+ .swal2-success.swal2-animate-success-icon .swal2-success-circular-line-right
968
+ {
969
+ -webkit-animation: rotatePlaceholder 4.25s ease-in;
970
+ animation: rotatePlaceholder 4.25s ease-in;
971
+ }
972
+
973
+ @-webkit-keyframes animate-error-icon
974
+ {
975
+ 0%
976
+ {
977
+ -webkit-transform: rotateX(100deg);
978
+ transform: rotateX(100deg);
979
+ opacity: 0;
980
+ }
981
+ 100%
982
+ {
983
+ -webkit-transform: rotateX(0deg);
984
+ transform: rotateX(0deg);
985
+ opacity: 1;
986
+ }
987
+ }
988
+
989
+ @keyframes animate-error-icon
990
+ {
991
+ 0%
992
+ {
993
+ -webkit-transform: rotateX(100deg);
994
+ transform: rotateX(100deg);
995
+ opacity: 0;
996
+ }
997
+ 100%
998
+ {
999
+ -webkit-transform: rotateX(0deg);
1000
+ transform: rotateX(0deg);
1001
+ opacity: 1;
1002
+ }
1003
+ }
1004
+
1005
+ .swal2-animate-error-icon
1006
+ {
1007
+ -webkit-animation: animate-error-icon 0.5s;
1008
+ animation: animate-error-icon 0.5s;
1009
+ }
1010
+
1011
+ @-webkit-keyframes animate-x-mark
1012
+ {
1013
+ 0%
1014
+ {
1015
+ -webkit-transform: scale(0.4);
1016
+ transform: scale(0.4);
1017
+ margin-top: 26px;
1018
+ opacity: 0;
1019
+ }
1020
+ 50%
1021
+ {
1022
+ -webkit-transform: scale(0.4);
1023
+ transform: scale(0.4);
1024
+ margin-top: 26px;
1025
+ opacity: 0;
1026
+ }
1027
+ 80%
1028
+ {
1029
+ -webkit-transform: scale(1.15);
1030
+ transform: scale(1.15);
1031
+ margin-top: -6px;
1032
+ }
1033
+ 100%
1034
+ {
1035
+ -webkit-transform: scale(1);
1036
+ transform: scale(1);
1037
+ margin-top: 0;
1038
+ opacity: 1;
1039
+ }
1040
+ }
1041
+
1042
+ @keyframes animate-x-mark
1043
+ {
1044
+ 0%
1045
+ {
1046
+ -webkit-transform: scale(0.4);
1047
+ transform: scale(0.4);
1048
+ margin-top: 26px;
1049
+ opacity: 0;
1050
+ }
1051
+ 50%
1052
+ {
1053
+ -webkit-transform: scale(0.4);
1054
+ transform: scale(0.4);
1055
+ margin-top: 26px;
1056
+ opacity: 0;
1057
+ }
1058
+ 80%
1059
+ {
1060
+ -webkit-transform: scale(1.15);
1061
+ transform: scale(1.15);
1062
+ margin-top: -6px;
1063
+ }
1064
+ 100%
1065
+ {
1066
+ -webkit-transform: scale(1);
1067
+ transform: scale(1);
1068
+ margin-top: 0;
1069
+ opacity: 1;
1070
+ }
1071
+ }
1072
+
1073
+ .swal2-animate-x-mark
1074
+ {
1075
+ -webkit-animation: animate-x-mark 0.5s;
1076
+ animation: animate-x-mark 0.5s;
1077
+ }
1078
+
1079
+ @-webkit-keyframes rotate-loading
1080
+ {
1081
+ 0%
1082
+ {
1083
+ -webkit-transform: rotate(0deg);
1084
+ transform: rotate(0deg);
1085
+ }
1086
+ 100%
1087
+ {
1088
+ -webkit-transform: rotate(360deg);
1089
+ transform: rotate(360deg);
1090
+ }
1091
+ }
1092
+
1093
+ @keyframes rotate-loading
1094
+ {
1095
+ 0%
1096
+ {
1097
+ -webkit-transform: rotate(0deg);
1098
+ transform: rotate(0deg);
1099
+ }
1100
+ 100%
1101
+ {
1102
+ -webkit-transform: rotate(360deg);
1103
+ transform: rotate(360deg);
1104
+ }
1105
+ }
admin/assets/css/quick-dashboard.css CHANGED
@@ -1,327 +1,327 @@
1
- .wt-scanner-container
2
- {
3
- margin: 15px 15px 15px 15px;
4
- }
5
-
6
- .wt-dashboard-container
7
- {
8
- margin: 15px 10px 15px 10px;
9
- }
10
-
11
- /*----------------*/
12
- #wt-quickstart-scan
13
- {
14
- width: 100%;
15
- }
16
-
17
- .wt-scanner-block-scan
18
- {
19
- text-align: center;
20
- }
21
-
22
- .wt-scanner-block-scan table
23
- {
24
- width: 100%;
25
- }
26
-
27
- .wt-scanner-block-scan table td:first-child
28
- {
29
- width: 20%;
30
- }
31
-
32
- .wt-scanner-block-scan table td
33
- {
34
- border: 1px solid #d6d6d6;
35
- background: #fff;
36
- text-align: center;
37
- padding: 20px;
38
- border-radius: 10px;
39
- }
40
-
41
- .wt-scanner-block-scan table td h4
42
- {
43
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
44
- font-size: 16px;
45
- }
46
-
47
- .wt-scan-icon-loader
48
- {
49
- height: 55px;
50
- background: transparent url("../img/loader.gif");
51
- background-repeat: no-repeat;
52
- background-position: center center;
53
- background-size: 60px;
54
- }
55
-
56
- #wt-dashboard-section table.wt-dashboard-table
57
- {
58
- width: 100%;
59
- table-layout: fixed;
60
- border-spacing: 5px 0;
61
- border-collapse: separate;
62
- margin-bottom: 5px;
63
- }
64
-
65
- #wt-dashboard-section table.wt-dashboard-table > thead > tr > td
66
- {
67
- border: 1px solid #d6d6d6;
68
- border-bottom: 0;
69
- background: #efefef;
70
- text-align: left;
71
- padding: 10px;
72
- border-radius: 10px 10px 0 0;
73
- }
74
-
75
- #wt-dashboard-section table.wt-dashboard-table > thead > tr > td > h4
76
- {
77
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
78
- font-size: 14px;
79
- font-weight: 700;
80
- margin: 5px;
81
- color: #868686;
82
- text-transform: uppercase;
83
- }
84
-
85
- #wt-dashboard-section table.wt-dashboard-table > tbody > tr > td
86
- {
87
- border: 1px solid #d6d6d6;
88
- border-top: 0;
89
- background: #fff;
90
- text-align: center;
91
- padding: 15px;
92
- border-radius: 0 0 10px 10px;
93
- }
94
-
95
- #wt-dashboard-section table.wt-dashboard-table > tbody > tr > td > h4
96
- {
97
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
98
- font-size: 14px;
99
- }
100
-
101
- #wt-dashboard-section table.wt-dashboard-table > tbody > tr > td h4
102
- {
103
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
104
- font-size: 14px;
105
- font-weight: bold;
106
- }
107
-
108
- .wt-full-block
109
- {
110
- width: 100%;
111
- display: block;
112
- height: 50%;
113
- }
114
-
115
- .wt-left-block, .wt-right-block
116
- {
117
- width: 50%;
118
- display: inline-block;
119
-
120
- }
121
-
122
- div.wt-block-span-count
123
- {
124
- width: 100%;
125
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
126
- font-size: 12px;
127
- font-weight: bold;
128
- }
129
-
130
- .wt-block-span-count div
131
- {
132
- padding: 1px 4px;
133
- border: 1px solid #b1b1b1;
134
- display: inline-block;
135
- margin: 1px;
136
- border-radius: 5px;
137
- }
138
-
139
- .wt-left-block
140
- {
141
- float: left;
142
- }
143
-
144
- .wt-right-block
145
- {
146
- float: right;
147
- }
148
-
149
- .wtitan-status-circular
150
- {
151
- /*height: 100px !important;*/
152
- width: auto !important;
153
- }
154
-
155
- .wt-caption-block
156
- {
157
- width: auto;
158
- float: left;
159
- display: inline-block;
160
- }
161
-
162
- .wt-manage-link-block
163
- {
164
- width: auto;
165
- float: right;
166
- display: inline-block;
167
- padding: 4px;
168
- }
169
-
170
- .wt-manage-link-block a
171
- {
172
- color: #5d05b7;
173
- font-weight: bold;
174
- text-decoration: underline;
175
- }
176
-
177
- table.wt-sitechecker-block-table
178
- {
179
- width: 100%;
180
- border: 0;
181
- table-layout: fixed;
182
- }
183
-
184
- table.wt-sitechecker-block-table tbody td
185
- {
186
- border: 0 !important;
187
- font-size: 40px;
188
- color: #5d05b7;
189
- font-weight: bold;
190
- padding: 15px 0;
191
- text-align: center;
192
- }
193
-
194
- table.wt-sitechecker-block-table tbody td span
195
- {
196
- font-size: 20px;
197
- }
198
-
199
- table.wt-sitechecker-block-table thead td
200
- {
201
- border: 0 !important;
202
- }
203
-
204
- table.wt-sitechecker-block-table thead td h4
205
- {
206
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
207
- font-size: 14px;
208
- font-weight: 700;
209
- margin: 5px;
210
- color: #868686;
211
- text-transform: uppercase;
212
- }
213
-
214
- .wt-push-status
215
- {
216
- font-size: inherit !important;
217
- }
218
-
219
- .wtitan-status-circular-text
220
- {
221
- left: 110px;
222
- position: relative;
223
- bottom: 53px;
224
- padding: 0;
225
- margin: 0;
226
- transform: translate(-50%, -50%);
227
- color: #aaa;
228
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
229
- font-size: 1.3125rem;
230
- font-weight: 300;
231
- line-height: 1.5;
232
- }
233
-
234
- /*--- Scanner -------*/
235
- #WBCR .wio-chart-container canvas
236
- {
237
- display: inline-block !important;
238
- }
239
-
240
- #WBCR .wio-chart-container
241
- {
242
- position: relative;
243
- display: inline-block;
244
- margin-right: 5px;
245
- }
246
-
247
- #WBCR .wio-chart-percent
248
- {
249
- position: absolute;
250
- left: 3px;
251
- right: 0;
252
- top: 35%;
253
- margin-top: -0.5em;
254
- line-height: 0.8;
255
- text-align: center;
256
- font-size: 32px;
257
- font-weight: bold;
258
- color: #afafaf;
259
- }
260
-
261
- #WBCR .wio-chart-percent span
262
- {
263
- font-size: 15px;
264
- vertical-align: super;
265
- }
266
-
267
- #WBCR .wio-page-statistic .wio-chart-percent
268
- {
269
- margin-top: -1.1em;
270
- }
271
-
272
- #WBCR .wio-widget .wio-chart-percent
273
- {
274
- font-size: 44px;
275
- line-height: 1;
276
- }
277
-
278
- #WBCR .wio-doughnut-legend li
279
- {
280
- display: table;
281
- position: relative;
282
- border-radius: 5px;
283
- padding: 3px 8px 2px 31px;
284
- font-size: 12px;
285
- cursor: default;
286
- -webkit-transition: background-color 200ms ease-in-out;
287
- -moz-transition: background-color 200ms ease-in-out;
288
- -o-transition: background-color 200ms ease-in-out;
289
- transition: background-color 200ms ease-in-out;
290
- }
291
-
292
- #WBCR .wio-doughnut-legend li span
293
- {
294
- display: inline-block;
295
- width: 30px;
296
- height: 30px;
297
- border-radius: 50%;
298
- padding-top: 6px;
299
- }
300
-
301
- /*-------------------*/
302
- .wt-pink
303
- {
304
- color: #f1b1b6 !important;
305
- }
306
-
307
- .wt-firewall-icon-ok, .wt-firewall-icon-clock, .wt-firewall-icon-dissmiss
308
- {
309
- width: 97px;
310
- height: 97px;
311
- display: inline-block;
312
- }
313
-
314
- .wt-firewall-icon-ok
315
- {
316
- background: url('../img/check.png');
317
- }
318
-
319
- .wt-firewall-icon-clock
320
- {
321
- background: url('../img/check.png');
322
- }
323
-
324
- .wt-firewall-icon-dissmiss
325
- {
326
- background: url('../img/check.png');
327
- }
1
+ .wt-scanner-container
2
+ {
3
+ margin: 15px 15px 15px 15px;
4
+ }
5
+
6
+ .wt-dashboard-container
7
+ {
8
+ margin: 15px 10px 15px 10px;
9
+ }
10
+
11
+ /*----------------*/
12
+ #wt-quickstart-scan
13
+ {
14
+ width: 100%;
15
+ }
16
+
17
+ .wt-scanner-block-scan
18
+ {
19
+ text-align: center;
20
+ }
21
+
22
+ .wt-scanner-block-scan table
23
+ {
24
+ width: 100%;
25
+ }
26
+
27
+ .wt-scanner-block-scan table td:first-child
28
+ {
29
+ width: 20%;
30
+ }
31
+
32
+ .wt-scanner-block-scan table td
33
+ {
34
+ border: 1px solid #d6d6d6;
35
+ background: #fff;
36
+ text-align: center;
37
+ padding: 20px;
38
+ border-radius: 10px;
39
+ }
40
+
41
+ .wt-scanner-block-scan table td h4
42
+ {
43
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
44
+ font-size: 16px;
45
+ }
46
+
47
+ .wt-scan-icon-loader
48
+ {
49
+ height: 55px;
50
+ background: transparent url("../img/loader.gif");
51
+ background-repeat: no-repeat;
52
+ background-position: center center;
53
+ background-size: 60px;
54
+ }
55
+
56
+ #wt-dashboard-section table.wt-dashboard-table
57
+ {
58
+ width: 100%;
59
+ table-layout: fixed;
60
+ border-spacing: 5px 0;
61
+ border-collapse: separate;
62
+ margin-bottom: 5px;
63
+ }
64
+
65
+ #wt-dashboard-section table.wt-dashboard-table > thead > tr > td
66
+ {
67
+ border: 1px solid #d6d6d6;
68
+ border-bottom: 0;
69
+ background: #efefef;
70
+ text-align: left;
71
+ padding: 10px;
72
+ border-radius: 10px 10px 0 0;
73
+ }
74
+
75
+ #wt-dashboard-section table.wt-dashboard-table > thead > tr > td > h4
76
+ {
77
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
78
+ font-size: 14px;
79
+ font-weight: 700;
80
+ margin: 5px;
81
+ color: #868686;
82
+ text-transform: uppercase;
83
+ }
84
+
85
+ #wt-dashboard-section table.wt-dashboard-table > tbody > tr > td
86
+ {
87
+ border: 1px solid #d6d6d6;
88
+ border-top: 0;
89
+ background: #fff;
90
+ text-align: center;
91
+ padding: 15px;
92
+ border-radius: 0 0 10px 10px;
93
+ }
94
+
95
+ #wt-dashboard-section table.wt-dashboard-table > tbody > tr > td > h4
96
+ {
97
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
98
+ font-size: 14px;
99
+ }
100
+
101
+ #wt-dashboard-section table.wt-dashboard-table > tbody > tr > td h4
102
+ {
103
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
104
+ font-size: 14px;
105
+ font-weight: bold;
106
+ }
107
+
108
+ .wt-full-block
109
+ {
110
+ width: 100%;
111
+ display: block;
112
+ height: 50%;
113
+ }
114
+
115
+ .wt-left-block, .wt-right-block
116
+ {
117
+ width: 50%;
118
+ display: inline-block;
119
+
120
+ }
121
+
122
+ div.wt-block-span-count
123
+ {
124
+ width: 100%;
125
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
126
+ font-size: 12px;
127
+ font-weight: bold;
128
+ }
129
+
130
+ .wt-block-span-count div
131
+ {
132
+ padding: 1px 4px;
133
+ border: 1px solid #b1b1b1;
134
+ display: inline-block;
135
+ margin: 1px;
136
+ border-radius: 5px;
137
+ }
138
+
139
+ .wt-left-block
140
+ {
141
+ float: left;
142
+ }
143
+
144
+ .wt-right-block
145
+ {
146
+ float: right;
147
+ }
148
+
149
+ .wtitan-status-circular
150
+ {
151
+ /*height: 100px !important;*/
152
+ width: auto !important;
153
+ }
154
+
155
+ .wt-caption-block
156
+ {
157
+ width: auto;
158
+ float: left;
159
+ display: inline-block;
160
+ }
161
+
162
+ .wt-manage-link-block
163
+ {
164
+ width: auto;
165
+ float: right;
166
+ display: inline-block;
167
+ padding: 4px;
168
+ }
169
+
170
+ .wt-manage-link-block a
171
+ {
172
+ color: #5d05b7;
173
+ font-weight: bold;
174
+ text-decoration: underline;
175
+ }
176
+
177
+ table.wt-sitechecker-block-table
178
+ {
179
+ width: 100%;
180
+ border: 0;
181
+ table-layout: fixed;
182
+ }
183
+
184
+ table.wt-sitechecker-block-table tbody td
185
+ {
186
+ border: 0 !important;
187
+ font-size: 40px;
188
+ color: #5d05b7;
189
+ font-weight: bold;
190
+ padding: 15px 0;
191
+ text-align: center;
192
+ }
193
+
194
+ table.wt-sitechecker-block-table tbody td span
195
+ {
196
+ font-size: 20px;
197
+ }
198
+
199
+ table.wt-sitechecker-block-table thead td
200
+ {
201
+ border: 0 !important;
202
+ }
203
+
204
+ table.wt-sitechecker-block-table thead td h4
205
+ {
206
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
207
+ font-size: 14px;
208
+ font-weight: 700;
209
+ margin: 5px;
210
+ color: #868686;
211
+ text-transform: uppercase;
212
+ }
213
+
214
+ .wt-push-status
215
+ {
216
+ font-size: inherit !important;
217
+ }
218
+
219
+ .wtitan-status-circular-text
220
+ {
221
+ left: 110px;
222
+ position: relative;
223
+ bottom: 53px;
224
+ padding: 0;
225
+ margin: 0;
226
+ transform: translate(-50%, -50%);
227
+ color: #aaa;
228
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
229
+ font-size: 1.3125rem;
230
+ font-weight: 300;
231
+ line-height: 1.5;
232
+ }
233
+
234
+ /*--- Scanner -------*/
235
+ #WBCR .wio-chart-container canvas
236
+ {
237
+ display: inline-block !important;
238
+ }
239
+
240
+ #WBCR .wio-chart-container
241
+ {
242
+ position: relative;
243
+ display: inline-block;
244
+ margin-right: 5px;
245
+ }
246
+
247
+ #WBCR .wio-chart-percent
248
+ {
249
+ position: absolute;
250
+ left: 3px;
251
+ right: 0;
252
+ top: 35%;
253
+ margin-top: -0.5em;
254
+ line-height: 0.8;
255
+ text-align: center;
256
+ font-size: 32px;
257
+ font-weight: bold;
258
+ color: #afafaf;
259
+ }
260
+
261
+ #WBCR .wio-chart-percent span
262
+ {
263
+ font-size: 15px;
264
+ vertical-align: super;
265
+ }
266
+
267
+ #WBCR .wio-page-statistic .wio-chart-percent
268
+ {
269
+ margin-top: -1.1em;
270
+ }
271
+
272
+ #WBCR .wio-widget .wio-chart-percent
273
+ {
274
+ font-size: 44px;
275
+ line-height: 1;
276
+ }
277
+
278
+ #WBCR .wio-doughnut-legend li
279
+ {
280
+ display: table;
281
+ position: relative;
282
+ border-radius: 5px;
283
+ padding: 3px 8px 2px 31px;
284
+ font-size: 12px;
285
+ cursor: default;
286
+ -webkit-transition: background-color 200ms ease-in-out;
287
+ -moz-transition: background-color 200ms ease-in-out;
288
+ -o-transition: background-color 200ms ease-in-out;
289
+ transition: background-color 200ms ease-in-out;
290
+ }
291
+
292
+ #WBCR .wio-doughnut-legend li span
293
+ {
294
+ display: inline-block;
295
+ width: 30px;
296
+ height: 30px;
297
+ border-radius: 50%;
298
+ padding-top: 6px;
299
+ }
300
+
301
+ /*-------------------*/
302
+ .wt-pink
303
+ {
304
+ color: #f1b1b6 !important;
305
+ }
306
+
307
+ .wt-firewall-icon-ok, .wt-firewall-icon-clock, .wt-firewall-icon-dissmiss
308
+ {
309
+ width: 97px;
310
+ height: 97px;
311
+ display: inline-block;
312
+ }
313
+
314
+ .wt-firewall-icon-ok
315
+ {
316
+ background: url('../img/check.png');
317
+ }
318
+
319
+ .wt-firewall-icon-clock
320
+ {
321
+ background: url('../img/check.png');
322
+ }
323
+
324
+ .wt-firewall-icon-dissmiss
325
+ {
326
+ background: url('../img/check.png');
327
+ }
admin/assets/css/setup/page-setup.css CHANGED
@@ -1,165 +1,165 @@
1
- .w-factory-templates-106-setup-steps li.active {
2
- border-color: #5d05b7 !important;
3
- }
4
- .w-factory-templates-106-setup-steps li.active::before {
5
- border-color: #5d05b7 !important;
6
- }
7
- .wtitan-status-circular {
8
- position: relative;
9
- margin: 0 auto;
10
- }
11
- .wtitan-status-circular-text {
12
- position: absolute;
13
- left: 50%;
14
- top: 50%;
15
- padding: 0;
16
- margin: 0;
17
- transform: translate(-50%, -50%);
18
- color: #aaa;
19
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
20
- font-size: 1.3125rem;
21
- font-weight: 300;
22
- line-height: 1.5;
23
- }
24
- .wtitan-status-circular .wf-status-overlay-text {
25
- position: absolute;
26
- left: 50%;
27
- top: 50%;
28
- padding: 0;
29
- margin: 0;
30
- width: 200%;
31
- text-align: center;
32
- transform: translate(-50%, -50%);
33
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
34
- font-size: 0.875rem;
35
- font-weight: normal;
36
- line-height: 1.3125;
37
- opacity: 0;
38
- color: #777;
39
- }
40
- .wtitan-setup__color--red > .dashicons {
41
- color: red;
42
- }
43
- .wtitan-setup__color--green > .dashicons {
44
- color: green;
45
- }
46
- .wtitan-setup__install-component-button {
47
- background-color: #5d05b7 !important;
48
- border-color: #5d05b7 !important;
49
- color: white !important;
50
- text-transform: uppercase !important;
51
- border-radius: 5px !important;
52
- padding: 10px 30px !important;
53
- text-decoration: none !important;
54
- }
55
- .wtitan-setup__install-component-button:link,
56
- .wtitan-setup__install-component-button:active {
57
- text-decoration: none !important;
58
- }
59
- .wtitan-setup__install-component-button:hover {
60
- color: #f3f4ef;
61
- }
62
- /*.wtitan-danger-message {
63
- position: relative;
64
- padding: 15px;
65
- background: #ffe0de;
66
- color: #9c6e6e;
67
- border-radius: 3px;
68
- }*/
69
- .wtitan-step-audit__preloader {
70
- display: block;
71
- width: 100%;
72
- height: 100px;
73
- background: url("../../img/setup-preloader-124x124.gif") center no-repeat;
74
- }
75
- .wtitan-vulner-table-first-col {
76
- padding: 0 2px !important;
77
- }
78
- .wtitan-vulner-table-name {
79
- width: 250px;
80
- }
81
- .wtitan-vulner-table__td {
82
- vertical-align: top;
83
- }
84
- .wtitan-vulner-table__td.wtitan-vulner-table__title {
85
- font-size: 13px;
86
- font-weight: bold;
87
- }
88
- .wtitan-vulner-table__td.wtitan-vulner-table__description {
89
- font-size: 12px;
90
- }
91
- .wt-severity-low {
92
- box-shadow: inset 20px 0px 0px 0px #5d05b7;
93
- }
94
- .wt-severity-medium {
95
- box-shadow: inset 20px 0px 0px 0px #ff8f62;
96
- }
97
- .wt-severity-high {
98
- box-shadow: inset 20px 0px 0px 0px #ff0035;
99
- }
100
- .wt-scanner-hide-button {
101
- margin-bottom: 5px !important;
102
- }
103
- /*--- Scanner -------*/
104
- .wt-dashboard-scan-button-loader,
105
- .wt-scan-icon-loader {
106
- display: inline-block;
107
- height: 34px;
108
- width: 34px;
109
- background: transparent url("../img/loader.gif") no-repeat center bottom;
110
- background-size: contain;
111
- vertical-align: bottom;
112
- }
113
- .wt-scanner-chart,
114
- .wt-scanner-legend {
115
- border-radius: 5px;
116
- margin: 0 10px 10px 10px;
117
- }
118
- .wt-scanner-chart-clean[style*="width: 0%"],
119
- .wt-scanner-chart-suspicious[style*="width: 0%"],
120
- .wt-scanner-chart-notverified[style*="width: 0%"] {
121
- display: none !important;
122
- }
123
- .wt-scanner-chart-clean,
124
- .wt-scanner-chart-suspicious,
125
- .wt-scanner-chart-notverified {
126
- border: 1px solid #c1c1c1;
127
- border-radius: 5px;
128
- display: inline-block !important;
129
- content: "";
130
- height: 30px;
131
- margin: 0 -5px;
132
- position: relative;
133
- }
134
- .wt-scanner-chart-clean {
135
- background-color: #5d05b7;
136
- z-index: 10;
137
- border-right: 0;
138
- }
139
- .wt-scanner-chart-suspicious {
140
- background-color: #f6065b;
141
- z-index: 9;
142
- border-right: 0;
143
- }
144
- .wt-scanner-chart-notverified {
145
- background-color: #dadada;
146
- z-index: 8;
147
- }
148
- .wt-scanner-legend td {
149
- padding: 0 0 0 10px;
150
- font-size: 12px;
151
- -webkit-transition: background-color 200ms ease-in-out;
152
- -moz-transition: background-color 200ms ease-in-out;
153
- -o-transition: background-color 200ms ease-in-out;
154
- transition: background-color 200ms ease-in-out;
155
- }
156
- span.wt-legend-item {
157
- display: inline-block;
158
- width: 30px;
159
- height: 30px;
160
- border-radius: 50%;
161
- }
162
- .wt-scanner-legend td:nth-child(odd) {
163
- padding: 0 0 0 20px !important;
164
- }
165
  /*# sourceMappingURL=page-setup.css.map */
1
+ .w-factory-templates-110-setup-steps li.active {
2
+ border-color: #5d05b7 !important;
3
+ }
4
+ .w-factory-templates-110-setup-steps li.active::before {
5
+ border-color: #5d05b7 !important;
6
+ }
7
+ .wtitan-status-circular {
8
+ position: relative;
9
+ margin: 0 auto;
10
+ }
11
+ .wtitan-status-circular-text {
12
+ position: absolute;
13
+ left: 50%;
14
+ top: 50%;
15
+ padding: 0;
16
+ margin: 0;
17
+ transform: translate(-50%, -50%);
18
+ color: #aaa;
19
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
20
+ font-size: 1.3125rem;
21
+ font-weight: 300;
22
+ line-height: 1.5;
23
+ }
24
+ .wtitan-status-circular .wf-status-overlay-text {
25
+ position: absolute;
26
+ left: 50%;
27
+ top: 50%;
28
+ padding: 0;
29
+ margin: 0;
30
+ width: 200%;
31
+ text-align: center;
32
+ transform: translate(-50%, -50%);
33
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
34
+ font-size: 0.875rem;
35
+ font-weight: normal;
36
+ line-height: 1.3125;
37
+ opacity: 0;
38
+ color: #777;
39
+ }
40
+ .wtitan-setup__color--red > .dashicons {
41
+ color: red;
42
+ }
43
+ .wtitan-setup__color--green > .dashicons {
44
+ color: green;
45
+ }
46
+ .wtitan-setup__install-component-button {
47
+ background-color: #5d05b7 !important;
48
+ border-color: #5d05b7 !important;
49
+ color: white !important;
50
+ text-transform: uppercase !important;
51
+ border-radius: 5px !important;
52
+ padding: 10px 30px !important;
53
+ text-decoration: none !important;
54
+ }
55
+ .wtitan-setup__install-component-button:link,
56
+ .wtitan-setup__install-component-button:active {
57
+ text-decoration: none !important;
58
+ }
59
+ .wtitan-setup__install-component-button:hover {
60
+ color: #f3f4ef;
61
+ }
62
+ /*.wtitan-danger-message {
63
+ position: relative;
64
+ padding: 15px;
65
+ background: #ffe0de;
66
+ color: #9c6e6e;
67
+ border-radius: 3px;
68
+ }*/
69
+ .wtitan-step-audit__preloader {
70
+ display: block;
71
+ width: 100%;
72
+ height: 100px;
73
+ background: url("../../img/setup-preloader-124x124.gif") center no-repeat;
74
+ }
75
+ .wtitan-vulner-table-first-col {
76
+ padding: 0 2px !important;
77
+ }
78
+ .wtitan-vulner-table-name {
79
+ width: 250px;
80
+ }
81
+ .wtitan-vulner-table__td {
82
+ vertical-align: top;
83
+ }
84
+ .wtitan-vulner-table__td.wtitan-vulner-table__title {
85
+ font-size: 13px;
86
+ font-weight: bold;
87
+ }
88
+ .wtitan-vulner-table__td.wtitan-vulner-table__description {
89
+ font-size: 12px;
90
+ }
91
+ .wt-severity-low {
92
+ box-shadow: inset 20px 0px 0px 0px #5d05b7;
93
+ }
94
+ .wt-severity-medium {
95
+ box-shadow: inset 20px 0px 0px 0px #ff8f62;
96
+ }
97
+ .wt-severity-high {
98
+ box-shadow: inset 20px 0px 0px 0px #ff0035;
99
+ }
100
+ .wt-scanner-hide-button {
101
+ margin-bottom: 5px !important;
102
+ }
103
+ /*--- Scanner -------*/
104
+ .wt-dashboard-scan-button-loader,
105
+ .wt-scan-icon-loader {
106
+ display: inline-block;
107
+ height: 34px;
108
+ width: 34px;
109
+ background: transparent url("../img/loader.gif") no-repeat center bottom;
110
+ background-size: contain;
111
+ vertical-align: bottom;
112
+ }
113
+ .wt-scanner-chart,
114
+ .wt-scanner-legend {
115
+ border-radius: 5px;
116
+ margin: 0 10px 10px 10px;
117
+ }
118
+ .wt-scanner-chart-clean[style*="width: 0%"],
119
+ .wt-scanner-chart-suspicious[style*="width: 0%"],
120
+ .wt-scanner-chart-notverified[style*="width: 0%"] {
121
+ display: none !important;
122
+ }
123
+ .wt-scanner-chart-clean,
124
+ .wt-scanner-chart-suspicious,
125
+ .wt-scanner-chart-notverified {
126
+ border: 1px solid #c1c1c1;
127
+ border-radius: 5px;
128
+ display: inline-block !important;
129
+ content: "";
130
+ height: 30px;
131
+ margin: 0 -5px;
132
+ position: relative;
133
+ }
134
+ .wt-scanner-chart-clean {
135
+ background-color: #5d05b7;
136
+ z-index: 10;
137
+ border-right: 0;
138
+ }
139
+ .wt-scanner-chart-suspicious {
140
+ background-color: #f6065b;
141
+ z-index: 9;
142
+ border-right: 0;
143
+ }
144
+ .wt-scanner-chart-notverified {
145
+ background-color: #dadada;
146
+ z-index: 8;
147
+ }
148
+ .wt-scanner-legend td {
149
+ padding: 0 0 0 10px;
150
+ font-size: 12px;
151
+ -webkit-transition: background-color 200ms ease-in-out;
152
+ -moz-transition: background-color 200ms ease-in-out;
153
+ -o-transition: background-color 200ms ease-in-out;
154
+ transition: background-color 200ms ease-in-out;
155
+ }
156
+ span.wt-legend-item {
157
+ display: inline-block;
158
+ width: 30px;
159
+ height: 30px;
160
+ border-radius: 50%;
161
+ }
162
+ .wt-scanner-legend td:nth-child(odd) {
163
+ padding: 0 0 0 20px !important;
164
+ }
165
  /*# sourceMappingURL=page-setup.css.map */
admin/assets/css/setup/page-setup.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["page-setup.less"],"names":[],"mappings":"AAAA,oCACE,GAAE;EACA,qBAAA;;AAFJ,oCAKE,GAAE,OAAO;EACP,qBAAA;;AAIJ;EACE,kBAAA;EACA,cAAA;;AAGF;EACE,kBAAA;EACA,SAAA;EACA,QAAA;EACA,UAAA;EACA,SAAA;EACA,WAAW,qBAAX;EACA,WAAA;EACA,qBAAqB,8CAArB;EACA,oBAAA;EACA,gBAAA;EACA,gBAAA;;AAGF,uBAAwB;EACtB,kBAAA;EACA,SAAA;EACA,QAAA;EACA,UAAA;EACA,SAAA;EACA,WAAA;EACA,kBAAA;EACA,WAAW,qBAAX;EACA,qBAAqB,8CAArB;EACA,mBAAA;EACA,mBAAA;EACA,mBAAA;EACA,UAAA;EACA,WAAA;;AAIA,yBAAE;EACA,UAAA;;AAKF,2BAAE;EACA,YAAA;;AAIJ;EACE,yBAAA;EACA,qBAAA;EACA,uBAAA;EACA,oCAAA;EACA,6BAAA;EACA,6BAAA;EACA,gCAAA;;AAEA,uCAAC;AAAO,uCAAC;EACP,gCAAA;;AAGF,uCAAC;EACC,cAAA;;;;;;;;;AAYJ;EACE,cAAA;EACA,WAAA;EACA,aAAA;EACA,gBAAgB,yDAAhB;;AAGF;EACE,yBAAA;;AAGF;EACE,YAAA;;AAGF;EACE,mBAAA;;AAGF,wBAAwB;EACtB,eAAA;EACA,iBAAA;;AAGF,wBAAwB;EACtB,eAAA;;AAGF;EACE,0CAAA;;AAGF;EACE,0CAAA;;AAGF;EACE,0CAAA;;AAGF;EACE,6BAAA;;;AAIF;AAAkC;EAChC,qBAAA;EACA,YAAA;EACA,WAAA;EACA,4BAA4B,4CAA5B;EACA,wBAAA;EACA,sBAAA;;AAIF;AAAmB;EACjB,kBAAA;EACA,wBAAA;;AAGF,uBAAuB;AACvB,4BAA4B;AAC5B,6BAA6B;EAC3B,wBAAA;;AAGF;AAAyB;AAA8B;EACrD,yBAAA;EACA,kBAAA;EACA,qBAAA;EACA,SAAS,EAAT;EACA,YAAA;EACA,cAAA;EACA,kBAAA;;AAGF;EACE,yBAAA;EACA,WAAA;EACA,eAAA;;AAGF;EACE,yBAAA;EACA,UAAA;EACA,eAAA;;AAGF;EACE,yBAAA;EACA,UAAA;;AAGF,kBAAmB;EACjB,mBAAA;EACA,eAAA;EACA,sDAAA;EACA,mDAAA;EACA,iDAAA;EACA,8CAAA;;AAGF,IAAI;EACF,qBAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;;AAIF,kBAAmB,GAAE,UAAU;EAC7B,8BAAA","file":"page-setup.css"}
admin/assets/css/setup/page-setup.less CHANGED
@@ -1,197 +1,197 @@
1
- .w-factory-templates-000-setup-steps {
2
- li.active {
3
- border-color: #5d05b7 !important;
4
- }
5
-
6
- li.active::before {
7
- border-color: #5d05b7 !important;
8
- }
9
- }
10
-
11
- .wtitan-status-circular {
12
- position: relative;
13
- margin: 0 auto;
14
- }
15
-
16
- .wtitan-status-circular-text {
17
- position: absolute;
18
- left: 50%;
19
- top: 50%;
20
- padding: 0;
21
- margin: 0;
22
- transform: translate(-50%, -50%);
23
- color: #aaa;
24
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
25
- font-size: 1.3125rem;
26
- font-weight: 300;
27
- line-height: 1.5
28
- }
29
-
30
- .wtitan-status-circular .wf-status-overlay-text {
31
- position: absolute;
32
- left: 50%;
33
- top: 50%;
34
- padding: 0;
35
- margin: 0;
36
- width: 200%;
37
- text-align: center;
38
- transform: translate(-50%, -50%);
39
- font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
40
- font-size: .875rem;
41
- font-weight: normal;
42
- line-height: 1.3125;
43
- opacity: 0.0;
44
- color: #777
45
- }
46
-
47
- .wtitan-setup__color--red {
48
- & > .dashicons {
49
- color: red;
50
- }
51
- }
52
-
53
- .wtitan-setup__color--green {
54
- & > .dashicons {
55
- color: green;
56
- }
57
- }
58
-
59
- .wtitan-setup__install-component-button {
60
- background-color: #5d05b7 !important;
61
- border-color: #5d05b7 !important;
62
- color: white !important;
63
- text-transform: uppercase !important;
64
- border-radius: 5px !important;
65
- padding: 10px 30px !important;
66
- text-decoration: none !important;
67
-
68
- &:link, &:active {
69
- text-decoration: none !important;
70
- }
71
-
72
- &:hover {
73
- color: #f3f4ef;
74
- }
75
- }
76
-
77
- /*.wtitan-danger-message {
78
- position: relative;
79
- padding: 15px;
80
- background: #ffe0de;
81
- color: #9c6e6e;
82
- border-radius: 3px;
83
- }*/
84
-
85
- .wtitan-step-audit__preloader {
86
- display: block;
87
- width: 100%;
88
- height: 100px;
89
- background: url("../../img/setup-preloader-124x124.gif") center no-repeat;
90
- }
91
-
92
- .wtitan-vulner-table-first-col {
93
- padding: 0 2px !important;
94
- }
95
-
96
- .wtitan-vulner-table-name {
97
- width: 250px;
98
- }
99
-
100
- .wtitan-vulner-table__td {
101
- vertical-align: top;
102
- }
103
-
104
- .wtitan-vulner-table__td.wtitan-vulner-table__title {
105
- font-size: 13px;
106
- font-weight: bold;
107
- }
108
-
109
- .wtitan-vulner-table__td.wtitan-vulner-table__description {
110
- font-size: 12px;
111
- }
112
-
113
- .wt-severity-low {
114
- box-shadow: inset 20px 0px 0px 0px #5d05b7;
115
- }
116
-
117
- .wt-severity-medium {
118
- box-shadow: inset 20px 0px 0px 0px #ff8f62;
119
- }
120
-
121
- .wt-severity-high {
122
- box-shadow: inset 20px 0px 0px 0px #ff0035;
123
- }
124
-
125
- .wt-scanner-hide-button {
126
- margin-bottom: 5px !important;
127
- }
128
-
129
- /*--- Scanner -------*/
130
- .wt-dashboard-scan-button-loader, .wt-scan-icon-loader {
131
- display: inline-block;
132
- height: 34px;
133
- width: 34px;
134
- background: transparent url("../img/loader.gif") no-repeat center bottom;
135
- background-size: contain;
136
- vertical-align: bottom;
137
-
138
- }
139
-
140
- .wt-scanner-chart, .wt-scanner-legend {
141
- border-radius: 5px;
142
- margin: 0 10px 10px 10px;
143
- }
144
-
145
- .wt-scanner-chart-clean[style*="width: 0%"],
146
- .wt-scanner-chart-suspicious[style*="width: 0%"],
147
- .wt-scanner-chart-notverified[style*="width: 0%"] {
148
- display: none !important;
149
- }
150
-
151
- .wt-scanner-chart-clean, .wt-scanner-chart-suspicious, .wt-scanner-chart-notverified {
152
- border: 1px solid #c1c1c1;
153
- border-radius: 5px;
154
- display: inline-block !important;
155
- content: "";
156
- height: 30px;
157
- margin: 0 -5px;
158
- position: relative;
159
- }
160
-
161
- .wt-scanner-chart-clean {
162
- background-color: #5d05b7;
163
- z-index: 10;
164
- border-right: 0;
165
- }
166
-
167
- .wt-scanner-chart-suspicious {
168
- background-color: #f6065b;
169
- z-index: 9;
170
- border-right: 0;
171
- }
172
-
173
- .wt-scanner-chart-notverified {
174
- background-color: #dadada;
175
- z-index: 8;
176
- }
177
-
178
- .wt-scanner-legend td {
179
- padding: 0 0 0 10px;
180
- font-size: 12px;
181
- -webkit-transition: background-color 200ms ease-in-out;
182
- -moz-transition: background-color 200ms ease-in-out;
183
- -o-transition: background-color 200ms ease-in-out;
184
- transition: background-color 200ms ease-in-out;
185
- }
186
-
187
- span.wt-legend-item {
188
- display: inline-block;
189
- width: 30px;
190
- height: 30px;
191
- border-radius: 50%;
192
- //padding-top: 6px;
193
- }
194
-
195
- .wt-scanner-legend td:nth-child(odd) {
196
- padding: 0 0 0 20px !important;
197
- }
1
+ .w-factory-templates-000-setup-steps {
2
+ li.active {
3
+ border-color: #5d05b7 !important;
4
+ }
5
+
6
+ li.active::before {
7
+ border-color: #5d05b7 !important;
8
+ }
9
+ }
10
+
11
+ .wtitan-status-circular {
12
+ position: relative;
13
+ margin: 0 auto;
14
+ }
15
+
16
+ .wtitan-status-circular-text {
17
+ position: absolute;
18
+ left: 50%;
19
+ top: 50%;
20
+ padding: 0;
21
+ margin: 0;
22
+ transform: translate(-50%, -50%);
23
+ color: #aaa;
24
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
25
+ font-size: 1.3125rem;
26
+ font-weight: 300;
27
+ line-height: 1.5
28
+ }
29
+
30
+ .wtitan-status-circular .wf-status-overlay-text {
31
+ position: absolute;
32
+ left: 50%;
33
+ top: 50%;
34
+ padding: 0;
35
+ margin: 0;
36
+ width: 200%;
37
+ text-align: center;
38
+ transform: translate(-50%, -50%);
39
+ font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
40
+ font-size: .875rem;
41
+ font-weight: normal;
42
+ line-height: 1.3125;
43
+ opacity: 0.0;
44
+ color: #777
45
+ }
46
+
47
+ .wtitan-setup__color--red {
48
+ & > .dashicons {
49
+ color: red;
50
+ }
51
+ }
52
+
53
+ .wtitan-setup__color--green {
54
+ & > .dashicons {
55
+ color: green;
56
+ }
57
+ }
58
+
59
+ .wtitan-setup__install-component-button {
60
+ background-color: #5d05b7 !important;
61
+ border-color: #5d05b7 !important;
62
+ color: white !important;
63
+ text-transform: uppercase !important;
64
+ border-radius: 5px !important;
65
+ padding: 10px 30px !important;
66
+ text-decoration: none !important;
67
+
68
+ &:link, &:active {
69
+ text-decoration: none !important;
70
+ }
71
+
72
+ &:hover {
73
+ color: #f3f4ef;
74
+ }
75
+ }
76
+
77
+ /*.wtitan-danger-message {
78
+ position: relative;
79
+ padding: 15px;
80
+ background: #ffe0de;
81
+ color: #9c6e6e;
82
+ border-radius: 3px;
83
+ }*/
84
+
85
+ .wtitan-step-audit__preloader {
86
+ display: block;
87
+ width: 100%;
88
+ height: 100px;
89
+ background: url("../../img/setup-preloader-124x124.gif") center no-repeat;
90
+ }
91
+
92
+ .wtitan-vulner-table-first-col {
93
+ padding: 0 2px !important;
94
+ }
95
+
96
+ .wtitan-vulner-table-name {
97
+ width: 250px;
98
+ }
99
+
100
+ .wtitan-vulner-table__td {
101
+ vertical-align: top;
102
+ }
103
+
104
+ .wtitan-vulner-table__td.wtitan-vulner-table__title {
105
+ font-size: 13px;
106
+ font-weight: bold;
107
+ }
108
+
109
+ .wtitan-vulner-table__td.wtitan-vulner-table__description {
110
+ font-size: 12px;
111
+ }
112
+
113
+ .wt-severity-low {
114
+ box-shadow: inset 20px 0px 0px 0px #5d05b7;
115
+ }
116
+
117
+ .wt-severity-medium {
118
+ box-shadow: inset 20px 0px 0px 0px #ff8f62;
119
+ }
120
+
121
+ .wt-severity-high {
122
+ box-shadow: inset 20px 0px 0px 0px #ff0035;
123
+ }
124
+
125
+ .wt-scanner-hide-button {
126
+ margin-bottom: 5px !important;
127
+ }
128
+
129
+ /*--- Scanner -------*/
130
+ .wt-dashboard-scan-button-loader, .wt-scan-icon-loader {
131
+ display: inline-block;
132
+ height: 34px;
133
+ width: 34px;
134
+ background: transparent url("../img/loader.gif") no-repeat center bottom;
135
+ background-size: contain;
136
+ vertical-align: bottom;
137
+
138
+ }
139
+
140
+ .wt-scanner-chart, .wt-scanner-legend {
141
+ border-radius: 5px;
142
+ margin: 0 10px 10px 10px;
143
+ }
144
+
145
+ .wt-scanner-chart-clean[style*="width: 0%"],
146
+ .wt-scanner-chart-suspicious[style*="width: 0%"],
147
+ .wt-scanner-chart-notverified[style*="width: 0%"] {
148
+ display: none !important;
149
+ }
150
+
151
+ .wt-scanner-chart-clean, .wt-scanner-chart-suspicious, .wt-scanner-chart-notverified {
152
+ border: 1px solid #c1c1c1;
153
+ border-radius: 5px;
154
+ display: inline-block !important;
155
+ content: "";
156
+ height: 30px;
157
+ margin: 0 -5px;
158
+ position: relative;
159
+ }
160
+
161
+ .wt-scanner-chart-clean {
162
+ background-color: #5d05b7;
163
+ z-index: 10;
164
+ border-right: 0;
165
+ }
166
+
167
+ .wt-scanner-chart-suspicious {
168
+ background-color: #f6065b;
169
+ z-index: 9;
170
+ border-right: 0;
171
+ }
172
+
173
+ .wt-scanner-chart-notverified {
174
+ background-color: #dadada;
175
+ z-index: 8;
176
+ }
177
+
178
+ .wt-scanner-legend td {
179
+ padding: 0 0 0 10px;
180
+ font-size: 12px;
181
+ -webkit-transition: background-color 200ms ease-in-out;
182
+ -moz-transition: background-color 200ms ease-in-out;
183
+ -o-transition: background-color 200ms ease-in-out;
184
+ transition: background-color 200ms ease-in-out;
185
+ }
186
+
187
+ span.wt-legend-item {
188
+ display: inline-block;
189
+ width: 30px;
190
+ height: 30px;
191
+ border-radius: 50%;
192
+ //padding-top: 6px;
193
+ }
194
+
195
+ .wt-scanner-legend td:nth-child(odd) {
196
+ padding: 0 0 0 20px !important;
197
+ }
admin/assets/css/sweetalert-custom.css CHANGED
@@ -1,153 +1,153 @@
1
- /* Sub Layerr */
2
- body[class*="_license-wtitan"] .swal2-container.swal2-shown {
3
- background: rgba(16, 17, 21, 0.9);
4
- z-index: 100000;
5
- }
6
- .wtitan-modal {
7
- padding: 0 !important;
8
- }
9
- .wtitan-modal .swal2-close {
10
- color: rgba(0, 0, 0, 0.8);
11
- }
12
- .wtitan-modal .swal2-modal {
13
- border-radius: 2px;
14
- }
15
- .wtitan-modal .swal2-icon {
16
- margin-bottom: 25px;
17
- }
18
- .wtitan-modal .swal2-title,
19
- .wtitan-modal .wtitan-modal__title {
20
- margin: 0;
21
- padding: 15px 32px;
22
- font-size: 20px;
23
- text-align: left;
24
- color: #fff !important;
25
- background: #3e3e3e !important;
26
- }
27
- .wtitan-modal .swal2-content,
28
- .wtitan-modal .wtitan-modal__content {
29
- font-size: 16px;
30
- padding: 0;
31
- background: #efefef;
32
- }
33
- .wtitan-modal .swal2-actions {
34
- margin-top: 0;
35
- padding: 10px;
36
- background: #F4F7F9;
37
- }
38
- .wtitan-modal .swal2-actions a.button svg {
39
- margin-right: 12px;
40
- vertical-align: -2px;
41
- }
42
- .wtitan-modal .swal2-actions button.loading {
43
- border-radius: 100% !important;
44
- height: 40px !important;
45
- padding: 0 !important;
46
- box-shadow: none !important;
47
- }
48
- .wtitan-modal .swal2-actions button.swal2-styled {
49
- height: auto;
50
- padding: 12px 32px;
51
- margin: 10px;
52
- font-size: 14px;
53
- letter-spacing: 1px;
54
- text-transform: uppercase;
55
- border-radius: 3px;
56
- font-weight: bold;
57
- outline: none;
58
- }
59
- .wtitan-modal .swal2-actions button.swal2-styled.swal2-confirm {
60
- background-color: #fdd599 !important;
61
- text-shadow: none !important;
62
- box-shadow: 0 3px 0 #ceac7a !important;
63
- color: #a57b3c !important;
64
- }
65
- .wtitan-modal .swal2-actions button.swal2-styled.swal2-cancel {
66
- background-color: #d2d2d2 !important;
67
- color: #656464 !important;
68
- text-shadow: none !important;
69
- box-shadow: 0 3px 0 #a9a9a9;
70
- /*background-color: #c9deb2 !important;
71
- color: #606956 !important;
72
- text-shadow: none !important;
73
- box-shadow: 0 3px 0 #a7b994;*/
74
- }
75
- .wtitan-modal .swal2-actions button.swal2-styled:focus,
76
- .wtitan-modal .swal2-actions button.swal2-styled:hover {
77
- outline: none;
78
- text-shadow: none;
79
- color: #FFF;
80
- }
81
- .wtitan-modal__content {
82
- padding: 20px !important;
83
- }
84
- .wtitan-modal__content,
85
- .wtitan-modal__content p {
86
- text-align: left;
87
- font-size: 13px;
88
- line-height: 1.5;
89
- }
90
- .wtitan-modal__content p {
91
- margin: 1em 0;
92
- }
93
- .wtitan-modal__content .wtitan-notice {
94
- margin: 12px 0;
95
- padding: 8px;
96
- background-color: #ffffe0;
97
- border: 1px solid #ffd975;
98
- border-width: 1px 1px 1px 10px;
99
- font-size: 13px;
100
- }
101
- .wtitan-modal__content .wtitan-pre {
102
- margin: 8px 0 20px;
103
- padding: 12px;
104
- background: #ffffff;
105
- border: 1px solid #999999;
106
- font-size: 13px;
107
- overflow: auto;
108
- }
109
- .wtitan-modal__content .wtitan-switch {
110
- display: -webkit-flex !important;
111
- display: flex !important;
112
- -webkit-align-items: stretch !important;
113
- align-items: stretch !important;
114
- -webkit-justify-content: flex-start !important;
115
- justify-content: flex-start !important;
116
- -webkit-flex-direction: row !important;
117
- flex-direction: row !important;
118
- margin: 0;
119
- padding: 0;
120
- }
121
- .wtitan-modal__content .wtitan-switch > li {
122
- margin: 0 !important;
123
- padding: 0.5rem 0.7rem !important;
124
- text-transform: uppercase;
125
- cursor: pointer;
126
- color: #aaa;
127
- font-weight: 400;
128
- border-top: 1px solid #bfbfbf;
129
- border-bottom: 1px solid #bfbfbf;
130
- border-right: 1px solid #bfbfbf;
131
- }
132
- .wtitan-modal__content .wtitan-switch > li:first-of-type {
133
- border-left: 1px solid #bfbfbf;
134
- -moz-border-radius-topleft: 6px;
135
- -webkit-border-top-left-radius: 6px;
136
- border-top-left-radius: 6px;
137
- -moz-border-radius-bottomleft: 6px;
138
- -webkit-border-bottom-left-radius: 6px;
139
- border-bottom-left-radius: 6px;
140
- }
141
- .wtitan-modal__content .wtitan-switch > li:last-of-type {
142
- -moz-border-radius-topright: 6px;
143
- -webkit-border-top-right-radius: 6px;
144
- border-top-right-radius: 6px;
145
- -moz-border-radius-bottomright: 6px;
146
- -webkit-border-bottom-right-radius: 6px;
147
- border-bottom-right-radius: 6px;
148
- }
149
- .wtitan-modal__content .wtitan-switch > li.wtitan-active {
150
- color: #ffffff;
151
- background-color: #00709e;
152
- }
153
  /*# sourceMappingURL=sweetalert-custom.css.map */
1
+ /* Sub Layerr */
2
+ body[class*="_license-wtitan"] .swal2-container.swal2-shown {
3
+ background: rgba(16, 17, 21, 0.9);
4
+ z-index: 100000;
5
+ }
6
+ .wtitan-modal {
7
+ padding: 0 !important;
8
+ }
9
+ .wtitan-modal .swal2-close {
10
+ color: rgba(0, 0, 0, 0.8);
11
+ }
12
+ .wtitan-modal .swal2-modal {
13
+ border-radius: 2px;
14
+ }
15
+ .wtitan-modal .swal2-icon {
16
+ margin-bottom: 25px;
17
+ }
18
+ .wtitan-modal .swal2-title,
19
+ .wtitan-modal .wtitan-modal__title {
20
+ margin: 0;
21
+ padding: 15px 32px;
22
+ font-size: 20px;
23
+ text-align: left;
24
+ color: #fff !important;
25
+ background: #3e3e3e !important;
26
+ }
27
+ .wtitan-modal .swal2-content,
28
+ .wtitan-modal .wtitan-modal__content {
29
+ font-size: 16px;
30
+ padding: 0;
31
+ background: #efefef;
32
+ }
33
+ .wtitan-modal .swal2-actions {
34
+ margin-top: 0;
35
+ padding: 10px;
36
+ background: #F4F7F9;
37
+ }
38
+ .wtitan-modal .swal2-actions a.button svg {
39
+ margin-right: 12px;
40
+ vertical-align: -2px;
41
+ }
42
+ .wtitan-modal .swal2-actions button.loading {
43
+ border-radius: 100% !important;
44
+ height: 40px !important;
45
+ padding: 0 !important;
46
+ box-shadow: none !important;
47
+ }
48
+ .wtitan-modal .swal2-actions button.swal2-styled {
49
+ height: auto;
50
+ padding: 12px 32px;
51
+ margin: 10px;
52
+ font-size: 14px;
53
+ letter-spacing: 1px;
54
+ text-transform: uppercase;
55
+ border-radius: 3px;
56
+ font-weight: bold;
57
+ outline: none;
58
+ }
59
+ .wtitan-modal .swal2-actions button.swal2-styled.swal2-confirm {
60
+ background-color: #fdd599 !important;
61
+ text-shadow: none !important;
62
+ box-shadow: 0 3px 0 #ceac7a !important;
63
+ color: #a57b3c !important;
64
+ }
65
+ .wtitan-modal .swal2-actions button.swal2-styled.swal2-cancel {
66
+ background-color: #d2d2d2 !important;
67
+ color: #656464 !important;
68
+ text-shadow: none !important;
69
+ box-shadow: 0 3px 0 #a9a9a9;
70
+ /*background-color: #c9deb2 !important;
71
+ color: #606956 !important;
72
+ text-shadow: none !important;
73
+ box-shadow: 0 3px 0 #a7b994;*/
74
+ }
75
+ .wtitan-modal .swal2-actions button.swal2-styled:focus,
76
+ .wtitan-modal .swal2-actions button.swal2-styled:hover {
77
+ outline: none;
78
+ text-shadow: none;
79
+ color: #FFF;
80
+ }
81
+ .wtitan-modal__content {
82
+ padding: 20px !important;
83
+ }
84
+ .wtitan-modal__content,
85
+ .wtitan-modal__content p {
86
+ text-align: left;
87
+ font-size: 13px;
88
+ line-height: 1.5;
89
+ }
90
+ .wtitan-modal__content p {
91
+ margin: 1em 0;
92
+ }
93
+ .wtitan-modal__content .wtitan-notice {
94
+ margin: 12px 0;
95
+ padding: 8px;
96
+ background-color: #ffffe0;
97
+ border: 1px solid #ffd975;
98
+ border-width: 1px 1px 1px 10px;
99
+ font-size: 13px;
100
+ }
101
+ .wtitan-modal__content .wtitan-pre {
102
+ margin: 8px 0 20px;
103
+ padding: 12px;
104
+ background: #ffffff;
105
+ border: 1px solid #999999;
106
+ font-size: 13px;
107
+ overflow: auto;
108
+ }
109
+ .wtitan-modal__content .wtitan-switch {
110
+ display: -webkit-flex !important;
111
+ display: flex !important;
112
+ -webkit-align-items: stretch !important;
113
+ align-items: stretch !important;
114
+ -webkit-justify-content: flex-start !important;
115
+ justify-content: flex-start !important;
116
+ -webkit-flex-direction: row !important;
117
+ flex-direction: row !important;
118
+ margin: 0;
119
+ padding: 0;
120
+ }
121
+ .wtitan-modal__content .wtitan-switch > li {
122
+ margin: 0 !important;
123
+ padding: 0.5rem 0.7rem !important;
124
+ text-transform: uppercase;
125
+ cursor: pointer;
126
+ color: #aaa;
127
+ font-weight: 400;
128
+ border-top: 1px solid #bfbfbf;
129
+ border-bottom: 1px solid #bfbfbf;
130
+ border-right: 1px solid #bfbfbf;
131
+ }
132
+ .wtitan-modal__content .wtitan-switch > li:first-of-type {
133
+ border-left: 1px solid #bfbfbf;
134
+ -moz-border-radius-topleft: 6px;
135
+ -webkit-border-top-left-radius: 6px;
136
+ border-top-left-radius: 6px;
137
+ -moz-border-radius-bottomleft: 6px;
138
+ -webkit-border-bottom-left-radius: 6px;
139
+ border-bottom-left-radius: 6px;
140
+ }
141
+ .wtitan-modal__content .wtitan-switch > li:last-of-type {
142
+ -moz-border-radius-topright: 6px;
143
+ -webkit-border-top-right-radius: 6px;
144
+ border-top-right-radius: 6px;
145
+ -moz-border-radius-bottomright: 6px;
146
+ -webkit-border-bottom-right-radius: 6px;
147
+ border-bottom-right-radius: 6px;
148
+ }
149
+ .wtitan-modal__content .wtitan-switch > li.wtitan-active {
150
+ color: #ffffff;
151
+ background-color: #00709e;
152
+ }
153
  /*# sourceMappingURL=sweetalert-custom.css.map */
admin/assets/css/sweetalert-custom.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["sweetalert-custom.less"],"names":[],"mappings":";AACA,IAAI,0BAA2B,iBAAgB;EAC7C,iCAAA;EACA,eAAA;;AAGF;EACE,qBAAA;;AADF,aAGE;EACE,yBAAA;;AAJJ,aAOE;EACE,kBAAA;;AARJ,aAWE;EACE,mBAAA;;AAZJ,aAeE;AAfF,aAegB;EACZ,SAAA;EACA,kBAAA;EACA,eAAA;EACA,gBAAA;EACA,WAAA;EACA,mBAAA;;AArBJ,aAwBE;AAxBF,aAwBkB;EACd,eAAA;EACA,UAAA;EACA,mBAAA;;AA3BJ,aA8BE;EACE,aAAA;EACA,aAAA;EACA,mBAAA;;AAjCJ,aA8BE,eAKE,EAAC,OAAQ;EACP,kBAAA;EACA,oBAAA;;AArCN,aA8BE,eAUE,OAAM;EACJ,8BAAA;EACA,uBAAA;EACA,qBAAA;EACA,2BAAA;;AA5CN,aA8BE,eAiBE,OAAM;EACJ,YAAA;EACA,kBAAA;EACA,YAAA;EACA,eAAA;EACA,mBAAA;EACA,yBAAA;EACA,kBAAA;EACA,iBAAA;EACA,aAAA;;AAEA,aA5BJ,eAiBE,OAAM,aAWH;EACC,yBAAA;EACA,4BAAA;EACA,2BAAA;EACA,cAAA;;AAGF,aAnCJ,eAiBE,OAAM,aAkBH;EACC,yBAAA;EACA,cAAA;EACA,4BAAA;EACA,2BAAA;;;;;;AAOF,aA9CJ,eAiBE,OAAM,aA6BH;AAAQ,aA9Cb,eAiBE,OAAM,aA6BM;EACR,aAAA;EACA,iBAAA;EACA,WAAA;;AAMR;EACE,wBAAA;;AAEA;AAHF,sBAGK;EACD,gBAAA;EACA,eAAA;EACA,gBAAA;;AANJ,sBASE;EACE,aAAA;;AAVJ,sBAaE;EACE,cAAA;EACA,YAAA;EACA,yBAAA;EACA,yBAAA;EACA,8BAAA;EACA,eAAA;;AAnBJ,sBAsBE;EACE,kBAAA;EACA,aAAA;EACA,mBAAA;EACA,yBAAA;EACA,eAAA;EACA,cAAA;;AA5BJ,sBA+BE;EACE,qBAAA;EACA,wBAAA;EACA,uCAAA;EACA,+BAAA;EACA,mCAAA;EACA,2BAAA;EACA,sCAAA;EACA,8BAAA;EACA,SAAA;EACA,UAAA;;AAzCJ,sBA4CE,eAAe;EACb,oBAAA;EACA,sBAAA;EACA,yBAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;EACA,6BAAA;EACA,gCAAA;EACA,+BAAA;;AArDJ,sBAwDE,eAAe,KAAI;EACjB,8BAAA;EACA,+BAAA;EACA,mCAAA;EACA,2BAAA;EACA,kCAAA;EACA,sCAAA;EACA,8BAAA;;AA/DJ,sBAkEE,eAAe,KAAI;EACjB,gCAAA;EACA,oCAAA;EACA,4BAAA;EACA,mCAAA;EACA,uCAAA;EACA,+BAAA;;AAxEJ,sBA2EE,eAAe,KAAI;EACjB,cAAA;EACA,yBAAA","file":"sweetalert-custom.css"}
admin/assets/css/sweetalert-custom.less CHANGED
@@ -1,171 +1,171 @@
1
- /* Sub Layerr */
2
- body[class*="_license-wtitan"] .swal2-container.swal2-shown {
3
- background: rgba(16, 17, 21, 0.9);
4
- z-index: 100000;
5
- }
6
-
7
- .wtitan-modal {
8
- padding: 0 !important;
9
-
10
- .swal2-close {
11
- color: rgba(0, 0, 0, .8);
12
- }
13
-
14
- .swal2-modal {
15
- border-radius: 2px;
16
- }
17
-
18
- .swal2-icon {
19
- margin-bottom: 25px;
20
- }
21
-
22
- .swal2-title, .wtitan-modal__title {
23
- margin: 0;
24
- padding: 15px 32px;
25
- font-size: 20px;
26
- text-align: left;
27
- color: #fff !important;
28
- background: #3e3e3e !important;
29
- }
30
-
31
- .swal2-content, .wtitan-modal__content {
32
- font-size: 16px;
33
- padding: 0;
34
- background: #efefef;
35
- }
36
-
37
- .swal2-actions {
38
- margin-top: 0;
39
- padding: 10px;
40
- background: #F4F7F9;
41
-
42
- a.button svg {
43
- margin-right: 12px;
44
- vertical-align: -2px;
45
- }
46
-
47
- button.loading {
48
- border-radius: 100% !important;
49
- height: 40px !important;
50
- padding: 0 !important;
51
- box-shadow: none !important;
52
- }
53
-
54
- button.swal2-styled {
55
- height: auto;
56
- padding: 12px 32px;
57
- margin: 10px;
58
- font-size: 14px;
59
- letter-spacing: 1px;
60
- text-transform: uppercase;
61
- border-radius: 3px;
62
- font-weight: bold;
63
- outline: none;
64
-
65
- &.swal2-confirm {
66
- background-color: #fdd599 !important;
67
- text-shadow: none !important;
68
- box-shadow: 0 3px 0 #ceac7a !important;
69
- color: #a57b3c !important;
70
- }
71
-
72
- &.swal2-cancel {
73
- background-color: #d2d2d2 !important;
74
- color: #656464 !important;
75
- text-shadow: none !important;
76
- box-shadow: 0 3px 0 #a9a9a9;
77
- /*background-color: #c9deb2 !important;
78
- color: #606956 !important;
79
- text-shadow: none !important;
80
- box-shadow: 0 3px 0 #a7b994;*/
81
- }
82
-
83
- &:focus, &:hover {
84
- outline: none;
85
- text-shadow: none;
86
- color: #FFF;
87
- }
88
- }
89
- }
90
- }
91
-
92
- .wtitan-modal__content {
93
- padding: 20px !important;
94
-
95
- &, p {
96
- text-align: left;
97
- font-size: 13px;
98
- line-height: 1.5;
99
- }
100
-
101
- p {
102
- margin: 1em 0;
103
- }
104
-
105
- .wtitan-notice {
106
- margin: 12px 0;
107
- padding: 8px;
108
- background-color: #ffffe0;
109
- border: 1px solid #ffd975;
110
- border-width: 1px 1px 1px 10px;
111
- font-size: 13px;
112
- }
113
-
114
- .wtitan-pre {
115
- margin: 8px 0 20px;
116
- padding: 12px;
117
- background: #ffffff;
118
- border: 1px solid #999999;
119
- font-size: 13px;
120
- overflow: auto;
121
- }
122
-
123
- .wtitan-switch {
124
- display: -webkit-flex !important;
125
- display: flex !important;
126
- -webkit-align-items: stretch !important;
127
- align-items: stretch !important;
128
- -webkit-justify-content: flex-start !important;
129
- justify-content: flex-start !important;
130
- -webkit-flex-direction: row !important;
131
- flex-direction: row !important;
132
- margin: 0;
133
- padding: 0
134
- }
135
-
136
- .wtitan-switch > li {
137
- margin: 0 !important;
138
- padding: 0.5rem 0.7rem !important;
139
- text-transform: uppercase;
140
- cursor: pointer;
141
- color: #aaa;
142
- font-weight: 400;
143
- border-top: 1px solid #bfbfbf;
144
- border-bottom: 1px solid #bfbfbf;
145
- border-right: 1px solid #bfbfbf
146
- }
147
-
148
- .wtitan-switch > li:first-of-type {
149
- border-left: 1px solid #bfbfbf;
150
- -moz-border-radius-topleft: 6px;
151
- -webkit-border-top-left-radius: 6px;
152
- border-top-left-radius: 6px;
153
- -moz-border-radius-bottomleft: 6px;
154
- -webkit-border-bottom-left-radius: 6px;
155
- border-bottom-left-radius: 6px
156
- }
157
-
158
- .wtitan-switch > li:last-of-type {
159
- -moz-border-radius-topright: 6px;
160
- -webkit-border-top-right-radius: 6px;
161
- border-top-right-radius: 6px;
162
- -moz-border-radius-bottomright: 6px;
163
- -webkit-border-bottom-right-radius: 6px;
164
- border-bottom-right-radius: 6px
165
- }
166
-
167
- .wtitan-switch > li.wtitan-active {
168
- color: #ffffff;
169
- background-color: #00709e
170
- }
171
  }
1
+ /* Sub Layerr */
2
+ body[class*="_license-wtitan"] .swal2-container.swal2-shown {
3
+ background: rgba(16, 17, 21, 0.9);
4
+ z-index: 100000;
5
+ }
6
+
7
+ .wtitan-modal {
8
+ padding: 0 !important;
9
+
10
+ .swal2-close {
11
+ color: rgba(0, 0, 0, .8);
12
+ }
13
+
14
+ .swal2-modal {
15
+ border-radius: 2px;
16
+ }
17
+
18
+ .swal2-icon {
19
+ margin-bottom: 25px;
20
+ }
21
+
22
+ .swal2-title, .wtitan-modal__title {
23
+ margin: 0;
24
+ padding: 15px 32px;
25
+ font-size: 20px;
26
+ text-align: left;
27
+ color: #fff !important;
28
+ background: #3e3e3e !important;
29
+ }
30
+
31
+ .swal2-content, .wtitan-modal__content {
32
+ font-size: 16px;
33
+ padding: 0;
34
+ background: #efefef;
35
+ }
36
+
37
+ .swal2-actions {
38
+ margin-top: 0;
39
+ padding: 10px;
40
+ background: #F4F7F9;
41
+
42
+ a.button svg {
43
+ margin-right: 12px;
44
+ vertical-align: -2px;
45
+ }
46
+
47
+ button.loading {
48
+ border-radius: 100% !important;
49
+ height: 40px !important;
50
+ padding: 0 !important;
51
+ box-shadow: none !important;
52
+ }
53
+
54
+ button.swal2-styled {
55
+ height: auto;
56
+ padding: 12px 32px;
57
+ margin: 10px;
58
+ font-size: 14px;
59
+ letter-spacing: 1px;
60
+ text-transform: uppercase;
61
+ border-radius: 3px;
62
+ font-weight: bold;
63
+ outline: none;
64
+
65
+ &.swal2-confirm {
66
+ background-color: #fdd599 !important;
67
+ text-shadow: none !important;
68
+ box-shadow: 0 3px 0 #ceac7a !important;
69
+ color: #a57b3c !important;
70
+ }
71
+
72
+ &.swal2-cancel {
73
+ background-color: #d2d2d2 !important;
74
+ color: #656464 !important;
75
+ text-shadow: none !important;
76
+ box-shadow: 0 3px 0 #a9a9a9;
77
+ /*background-color: #c9deb2 !important;
78
+ color: #606956 !important;
79
+ text-shadow: none !important;
80
+ box-shadow: 0 3px 0 #a7b994;*/
81
+ }
82
+
83
+ &:focus, &:hover {
84
+ outline: none;
85
+ text-shadow: none;
86
+ color: #FFF;
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ .wtitan-modal__content {
93
+ padding: 20px !important;
94
+
95
+ &, p {
96
+ text-align: left;
97
+ font-size: 13px;
98
+ line-height: 1.5;
99
+ }
100
+
101
+ p {
102
+ margin: 1em 0;
103
+ }
104
+
105
+ .wtitan-notice {
106
+ margin: 12px 0;
107
+ padding: 8px;
108
+ background-color: #ffffe0;
109
+ border: 1px solid #ffd975;
110
+ border-width: 1px 1px 1px 10px;
111
+ font-size: 13px;
112
+ }
113
+
114
+ .wtitan-pre {
115
+ margin: 8px 0 20px;
116
+ padding: 12px;
117
+ background: #ffffff;
118
+ border: 1px solid #999999;
119
+ font-size: 13px;
120
+ overflow: auto;
121
+ }
122
+
123
+ .wtitan-switch {
124
+ display: -webkit-flex !important;
125
+ display: flex !important;
126
+ -webkit-align-items: stretch !important;
127
+ align-items: stretch !important;
128
+ -webkit-justify-content: flex-start !important;
129
+ justify-content: flex-start !important;
130
+ -webkit-flex-direction: row !important;
131
+ flex-direction: row !important;
132
+ margin: 0;
133
+ padding: 0
134
+ }
135
+
136
+ .wtitan-switch > li {
137
+ margin: 0 !important;
138
+ padding: 0.5rem 0.7rem !important;
139
+ text-transform: uppercase;
140
+ cursor: pointer;
141
+ color: #aaa;
142
+ font-weight: 400;
143
+ border-top: 1px solid #bfbfbf;
144
+ border-bottom: 1px solid #bfbfbf;
145
+ border-right: 1px solid #bfbfbf
146
+ }
147
+
148
+ .wtitan-switch > li:first-of-type {
149
+ border-left: 1px solid #bfbfbf;
150
+ -moz-border-radius-topleft: 6px;
151
+ -webkit-border-top-left-radius: 6px;
152
+ border-top-left-radius: 6px;
153
+ -moz-border-radius-bottomleft: 6px;
154
+ -webkit-border-bottom-left-radius: 6px;
155
+ border-bottom-left-radius: 6px
156
+ }
157
+
158
+ .wtitan-switch > li:last-of-type {
159
+ -moz-border-radius-topright: 6px;
160
+ -webkit-border-top-right-radius: 6px;
161
+ border-top-right-radius: 6px;
162
+ -moz-border-radius-bottomright: 6px;
163
+ -webkit-border-bottom-right-radius: 6px;
164
+ border-bottom-right-radius: 6px
165
+ }
166
+
167
+ .wtitan-switch > li.wtitan-active {
168
+ color: #ffffff;
169
+ background-color: #00709e
170
+ }
171
  }
admin/assets/css/titan-security.css CHANGED
@@ -1,263 +1,263 @@
1
- h2.nav-tab-wrapper {
2
- margin-left: 10px !important;
3
- }
4
-
5
- .wbcr-factory-subscribe-widget__button {
6
- background-color:#5d05b7 !important;
7
- }
8
-
9
- /*#WBCR .wbcr-factory-pages-453-impressive-page-template .alert
10
- {
11
- padding: 10px !important;
12
- /*position: absolute !important;
13
- width: 100%;
14
-
15
- opacity: 0.8;
16
- }*/
17
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-page-inner-wrap .nav-tab {
18
-
19
- /*opacity: 0.8;*/
20
- }
21
-
22
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-page-inner-wrap .nav-tab {
23
- border-radius: 5px 5px 0 0;
24
- }
25
-
26
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-page-header {
27
- background-color: #5d05b7 !important;
28
- }
29
-
30
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a {
31
- border-left: 5px solid #efefef !important;
32
- }
33
-
34
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab.wbcr-factory-active-tab {
35
- border: 0 !important;
36
- }
37
-
38
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab.wbcr-factory-active-tab a,
39
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a:hover {
40
- color: #5d05b7 !important;
41
- border-left: 5px solid #5d05b7 !important;
42
- }
43
-
44
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab.wbcr-factory-active-tab a .dashicons,
45
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a:hover .dashicons {
46
- color: #5d05b7 !important;
47
- }
48
-
49
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-page-header .wbcr-factory-button.wbcr-factory-type-save {
50
- background-color: #5d05b7 !important;
51
- color: #ffffff !important;
52
- display: block;
53
- position: fixed !important;
54
- right: 40px;
55
- top: 50px;
56
- border-radius: 15px;
57
- border: 2px solid #ffffff;
58
- }
59
-
60
- #WBCR .wbcr-factory-pages-453-impressive-page-template .wbcr-factory-page-header .wbcr-factory-button.wbcr-factory-type-save:hover {
61
- background-color: #ffffff !important;
62
- color: #5d05b7 !important;
63
- border-color: #5d05b7 !important;
64
- }
65
-
66
- #WBCR .wbcr-factory-pages-453-impressive-page-template input[type="checkbox"]:checked::before {
67
- content: url(data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%235d05b7%27%2F%3E%3C%2Fsvg%3E) !important;
68
- }
69
-
70
- /*--------------------------*/
71
- .factory-bootstrap-455 select.form-control {
72
- display: inline;
73
- background: #fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E) no-repeat right 5px top 55%;
74
- background-size: 16px 16px !important;
75
- }
76
-
77
- .factory-bootstrap-455 .btn-default.active, .factory-bootstrap-455 .btn-default:active {
78
- background: #b083de !important;
79
- color: #ffffff !important;
80
- }
81
-
82
- .factory-bootstrap-455 .btn-primary {
83
- background: #5d05b7 !important;
84
- border-color: #27004e !important;
85
- box-shadow: none !important;
86
- -webkit-box-shadow: none !important;
87
- }
88
-
89
- .factory-bootstrap-455 .factory-buttons-way .factory-on.active {
90
- background-color: #b083de !important;
91
- -webkit-box-shadow: inset 0 1px 1px #8651bd !important;
92
- box-shadow: inset 0 1px 3px #8651bd !important;
93
- border-top: 1px solid #8651bd !important;
94
- border-bottom: 1px solid #8651bd !important;
95
- border-left: 1px solid #8651bd !important;
96
- }
97
-
98
- .factory-bootstrap-455 .factory-buttons-way .factory-off.active {
99
- background-color: #b083de !important;
100
- -webkit-box-shadow: inset 0 1px 1px #8651bd !important;
101
- box-shadow: inset 0 1px 3px #8651bd !important;
102
- border-top: 1px solid #8651bd !important;
103
- border-bottom: 1px solid #8651bd !important;
104
- border-right: 1px solid #8651bd !important;
105
- color: #ffffff !important;
106
-
107
- }
108
-
109
- .wt-plugin-header-logo {
110
- background: transparent url(../img/titan-icon.png) no-repeat left center !important;
111
- background-size: 30px !important;
112
- display: block;
113
- float: left;
114
- height: 30px;
115
- width: 35px;
116
- }
117
-
118
- .wbcr-factory-header-logo {
119
- font-weight: 700 !important;
120
- text-shadow: 0px 0px 3px #000000;
121
- color: #ffffff !important;
122
- }
123
-
124
- .wbcr-titan-export-import {
125
- padding: 0 50px;
126
- text-align: right;
127
- }
128
-
129
- .wbcr-titan-export-import label {
130
- display: block;
131
- width: 100%;
132
- text-align: left;
133
- padding: 7px 0;
134
- }
135
-
136
- .wbcr-titan-export-import #wbcr-titan-export-textarea {
137
- width: 100%;
138
- box-sizing: border-box;
139
- height: 200px;
140
- line-height: inherit;
141
- margin: 0;
142
- padding: 7px 14px;
143
- box-shadow: none;
144
- border: 1px solid #dedede;
145
- border-radius: 3px;
146
- background-color: #f1f1f1;
147
- color: #444;
148
- transition: border-color 0.3s;
149
- -webkit-appearance: none;
150
- }
151
-
152
- .wtitan-import-options-button {
153
- margin: 15px !important;
154
- }
155
-
156
- .wbcr-factory-nav-tab .dashicons-yes-alt {
157
- color: green !important;
158
- }
159
-
160
- input[id*="scanner_schedule"], select[id*="scanner_schedule"] {
161
- width: 200px !important;
162
- }
163
-
164
- .wt-schedule-controls-daily, .wt-schedule-controls-weekly, .wt-schedule-controls-custom {
165
- display: none;
166
- }
167
-
168
- .wtitan-audit-empty-container {
169
- text-align: left;
170
- font-size: 16px;
171
- margin: 20px 0 20px 55px;
172
- }
173
-
174
- .wt-element-pro:after {
175
- display: inline-block;
176
- position: relative;
177
- content: 'PRO';
178
- background: #f6065b;
179
- border-radius: 4px;
180
- color: #fff;
181
- font-size: 10px;
182
- line-height: 1;
183
- font-style: normal;
184
- padding: 4px 6px;
185
- margin-left: 4px;
186
- vertical-align: top;
187
- top: -10px;
188
- left: -25px;
189
- right: 0;
190
- z-index: 11;
191
- }
192
-
193
- .wtitan-control-premium-label .factory-buttons-group:after {
194
- display: inline-block;
195
- position: relative;
196
- content: 'PRO';
197
- background: #f6065b;
198
- border-radius: 4px;
199
- color: #fff;
200
- font-size: 10px;
201
- line-height: 1;
202
- font-style: normal;
203
- padding: 4px 6px;
204
- margin-left: 4px;
205
- vertical-align: top;
206
- top: -8px;
207
- left: -10px;
208
- right: auto;
209
- z-index: 11;
210
- cursor: pointer;
211
- }
212
-
213
- .factory-checkbox--disabled button {
214
- pointer-events: none;
215
- cursor: not-allowed;
216
- opacity: 0.65;
217
- filter: alpha(opacity=65);
218
- -webkit-box-shadow: none;
219
- box-shadow: none;
220
- }
221
-
222
- #wp-admin-bar-titan-premium a span {
223
- color: #ffbe00;
224
- }
225
-
226
- .wt-notice-trial-button {
227
- padding-top: 2px !important;
228
- padding-bottom: 2px !important;
229
- vertical-align: baseline;
230
- }
231
-
232
- .wt-notice-hide-link {
233
- float: right;
234
- cursor: pointer;
235
- }
236
-
237
- .wtitan-get-plugins-scanner__notice .dashicons-plugins-checked {
238
- /*border: 1px solid #222;*/
239
- color: #222;
240
-
241
- }
242
-
243
- .wtitan-get-plugins-scanner__notice p {
244
- font-size: 17px;
245
- font-weight: normal;
246
- color: #222;
247
- }
248
-
249
- .wtitan-get-plugins-scanner__btn {
250
- display: inline-block;
251
- padding: 3px 15px;
252
- border-radius: 5px;
253
- font-size: 14px;
254
- text-decoration: none;
255
- background-color: #ff6fb8 !important;
256
- color: #fff;
257
- float: right;
258
- }
259
-
260
- .wtitan-get-plugins-scanner__btn:hover {
261
- background-color: #ff6fb8 !important;
262
- color: #fff;
263
- }
1
+ h2.nav-tab-wrapper {
2
+ margin-left: 10px !important;
3
+ }
4
+
5
+ .wbcr-factory-subscribe-widget__button {
6
+ background-color:#5d05b7 !important;
7
+ }
8
+
9
+ /*#WBCR .wbcr-factory-pages-457-impressive-page-template .alert
10
+ {
11
+ padding: 10px !important;
12
+ /*position: absolute !important;
13
+ width: 100%;
14
+
15
+ opacity: 0.8;
16
+ }*/
17
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-page-inner-wrap .nav-tab {
18
+
19
+ /*opacity: 0.8;*/
20
+ }
21
+
22
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-page-inner-wrap .nav-tab {
23
+ border-radius: 5px 5px 0 0;
24
+ }
25
+
26
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-page-header {
27
+ background-color: #5d05b7 !important;
28
+ }
29
+
30
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a {
31
+ border-left: 5px solid #efefef !important;
32
+ }
33
+
34
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab.wbcr-factory-active-tab {
35
+ border: 0 !important;
36
+ }
37
+
38
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab.wbcr-factory-active-tab a,
39
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a:hover {
40
+ color: #5d05b7 !important;
41
+ border-left: 5px solid #5d05b7 !important;
42
+ }
43
+
44
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab.wbcr-factory-active-tab a .dashicons,
45
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-left-navigation-bar ul .wbcr-factory-nav-tab a:hover .dashicons {
46
+ color: #5d05b7 !important;
47
+ }
48
+
49
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-page-header .wbcr-factory-button.wbcr-factory-type-save {
50
+ background-color: #5d05b7 !important;
51
+ color: #ffffff !important;
52
+ display: block;
53
+ position: fixed !important;
54
+ right: 40px;
55
+ top: 50px;
56
+ border-radius: 15px;
57
+ border: 2px solid #ffffff;
58
+ }
59
+
60
+ #WBCR .wbcr-factory-pages-457-impressive-page-template .wbcr-factory-page-header .wbcr-factory-button.wbcr-factory-type-save:hover {
61
+ background-color: #ffffff !important;
62
+ color: #5d05b7 !important;
63
+ border-color: #5d05b7 !important;
64
+ }
65
+
66
+ #WBCR .wbcr-factory-pages-457-impressive-page-template input[type="checkbox"]:checked::before {
67
+ content: url(data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%235d05b7%27%2F%3E%3C%2Fsvg%3E) !important;
68
+ }
69
+
70
+ /*--------------------------*/
71
+ .factory-bootstrap-459 select.form-control {
72
+ display: inline;
73
+ background: #fff url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E) no-repeat right 5px top 55%;
74
+ background-size: 16px 16px !important;
75
+ }
76
+
77
+ .factory-bootstrap-459 .btn-default.active, .factory-bootstrap-459 .btn-default:active {
78
+ background: #b083de !important;
79
+ color: #ffffff !important;
80
+ }
81
+
82
+ .factory-bootstrap-459 .btn-primary {
83
+ background: #5d05b7 !important;
84
+ border-color: #27004e !important;
85
+ box-shadow: none !important;
86
+ -webkit-box-shadow: none !important;
87
+ }
88
+
89
+ .factory-bootstrap-459 .factory-buttons-way .factory-on.active {
90
+ background-color: #b083de !important;
91
+ -webkit-box-shadow: inset 0 1px 1px #8651bd !important;
92
+ box-shadow: inset 0 1px 3px #8651bd !important;
93
+ border-top: 1px solid #8651bd !important;
94
+ border-bottom: 1px solid #8651bd !important;
95
+ border-left: 1px solid #8651bd !important;
96
+ }
97
+
98
+ .factory-bootstrap-459 .factory-buttons-way .factory-off.active {
99
+ background-color: #b083de !important;
100
+ -webkit-box-shadow: inset 0 1px 1px #8651bd !important;
101
+ box-shadow: inset 0 1px 3px #8651bd !important;
102
+ border-top: 1px solid #8651bd !important;
103
+ border-bottom: 1px solid #8651bd !important;
104
+ border-right: 1px solid #8651bd !important;
105
+ color: #ffffff !important;
106
+
107
+ }
108
+
109
+ .wt-plugin-header-logo {
110
+ background: transparent url(../img/titan-icon.png) no-repeat left center !important;
111
+ background-size: 30px !important;
112
+ display: block;
113
+ float: left;
114
+ height: 30px;
115
+ width: 35px;
116
+ }
117
+
118
+ .wbcr-factory-header-logo {
119
+ font-weight: 700 !important;
120
+ text-shadow: 0px 0px 3px #000000;
121
+ color: #ffffff !important;
122
+ }
123
+
124
+ .wbcr-titan-export-import {
125
+ padding: 0 50px;
126
+ text-align: right;
127
+ }
128
+
129
+ .wbcr-titan-export-import label {
130
+ display: block;
131
+ width: 100%;
132
+ text-align: left;
133
+ padding: 7px 0;
134
+ }
135
+
136
+ .wbcr-titan-export-import #wbcr-titan-export-textarea {
137
+ width: 100%;
138
+ box-sizing: border-box;
139
+ height: 200px;
140
+ line-height: inherit;
141
+ margin: 0;
142
+ padding: 7px 14px;
143
+ box-shadow: none;
144
+ border: 1px solid #dedede;
145
+ border-radius: 3px;
146
+ background-color: #f1f1f1;
147
+ color: #444;
148
+ transition: border-color 0.3s;
149
+ -webkit-appearance: none;
150
+ }
151
+
152
+ .wtitan-import-options-button {
153
+ margin: 15px !important;
154
+ }
155
+
156
+ .wbcr-factory-nav-tab .dashicons-yes-alt {
157
+ color: green !important;
158
+ }
159
+
160
+ input[id*="scanner_schedule"], select[id*="scanner_schedule"] {
161
+ width: 200px !important;
162
+ }
163
+
164
+ .wt-schedule-controls-daily, .wt-schedule-controls-weekly, .wt-schedule-controls-custom {
165
+ display: none;
166
+ }
167
+
168
+ .wtitan-audit-empty-container {
169
+ text-align: left;
170
+ font-size: 16px;
171
+ margin: 20px 0 20px 55px;
172
+ }
173
+
174
+ .wt-element-pro:after {
175
+ display: inline-block;
176
+ position: relative;
177
+ content: 'PRO';
178
+ background: #f6065b;
179
+ border-radius: 4px;
180
+ color: #fff;
181
+ font-size: 10px;
182
+ line-height: 1;
183
+ font-style: normal;
184
+ padding: 4px 6px;
185
+ margin-left: 4px;
186
+ vertical-align: top;
187
+ top: -10px;
188
+ left: -25px;
189
+ right: 0;
190
+ z-index: 11;
191
+ }
192
+
193
+ .wtitan-control-premium-label .factory-buttons-group:after {
194
+ display: inline-block;
195
+ position: relative;
196
+ content: 'PRO';
197
+ background: #f6065b;
198
+ border-radius: 4px;
199
+ color: #fff;
200
+ font-size: 10px;
201
+ line-height: 1;
202
+ font-style: normal;
203
+ padding: 4px 6px;
204
+ margin-left: 4px;
205
+ vertical-align: top;
206
+ top: -8px;
207
+ left: -10px;
208
+ right: auto;
209
+ z-index: 11;
210
+ cursor: pointer;
211
+ }
212
+
213
+ .factory-checkbox--disabled button {
214
+ pointer-events: none;
215
+ cursor: not-allowed;
216
+ opacity: 0.65;
217
+ filter: alpha(opacity=65);
218
+ -webkit-box-shadow: none;
219
+ box-shadow: none;
220
+ }
221
+
222
+ #wp-admin-bar-titan-premium a span {
223
+ color: #ffbe00;
224
+ }
225
+
226
+ .wt-notice-trial-button {
227
+ padding-top: 2px !important;
228
+ padding-bottom: 2px !important;
229
+ vertical-align: baseline;
230
+ }
231
+
232
+ .wt-notice-hide-link {
233
+ float: right;
234
+ cursor: pointer;
235
+ }
236
+
237
+ .wtitan-get-plugins-scanner__notice .dashicons-plugins-checked {
238
+ /*border: 1px solid #222;*/
239
+ color: #222;
240
+
241
+ }
242
+
243
+ .wtitan-get-plugins-scanner__notice p {
244
+ font-size: 17px;
245
+ font-weight: normal;
246
+ color: #222;
247
+ }
248
+
249
+ .wtitan-get-plugins-scanner__btn {
250
+ display: inline-block;
251
+ padding: 3px 15px;
252
+ border-radius: 5px;
253
+ font-size: 14px;
254
+ text-decoration: none;
255
+ background-color: #ff6fb8 !important;
256
+ color: #fff;
257
+ float: right;
258
+ }
259
+
260
+ .wtitan-get-plugins-scanner__btn:hover {
261
+ background-color: #ff6fb8 !important;
262
+ color: #fff;
263
+ }
admin/assets/js/dashboard.js CHANGED
@@ -1,237 +1,237 @@
1
- jQuery(document).ready(function ($) {
2
- $('#js-wtitan-firewall-mode').change(function () {
3
- var selectmode = $(this);
4
- console.log(selectmode.val());
5
-
6
- $('.wtitan-status-block').hide();
7
- $('.wtitan-status-block.wtitan-status--loading').show();
8
-
9
- $.ajax(ajaxurl, {
10
- type: 'post',
11
- dataType: 'json',
12
- data: {
13
- action: 'wtitan-change-firewall-mode',
14
- mode: $(this).val(),
15
- _wpnonce: $(this).data('nonce')
16
- },
17
- success: function (data, textStatus, jqXHR) {
18
- var noticeId;
19
-
20
- console.log(data);
21
-
22
- if (!data || data.error) {
23
- $('.wtitan-status-block.wtitan-status--loading').hide();
24
- console.log(data);
25
-
26
- if (data) {
27
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.error_message, 'danger');
28
- }
29
-
30
- setTimeout(function () {
31
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
32
- }, 5000);
33
- return;
34
- } else {
35
- $('.wtitan-status-block.wtitan-status--loading').hide();
36
- $('.wtitan-status-block.wtitan-status--' + selectmode.val()).show();
37
- }
38
-
39
- },
40
- error: function (xhr, ajaxOptions, thrownError) {
41
- $('.wtitan-status-block.wtitan-status--loading').hide();
42
- console.log(xhr.status);
43
- console.log(xhr.responseText);
44
- console.log(thrownError);
45
-
46
- var noticeId = $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
47
- }
48
- });
49
- });
50
-
51
- $('#wt-antispam-status').change(function () {
52
- var selectmode = $(this);
53
- var block = $('#wt-antispam-status-block');
54
-
55
- block.addClass('wt-block-loading');
56
-
57
- $.ajax(ajaxurl, {
58
- type: 'post',
59
- dataType: 'json',
60
- data: {
61
- action: 'wtitan-change-antispam-mode',
62
- mode: selectmode.val(),
63
- _wpnonce: $(this).data('nonce')
64
- },
65
- success: function (data, textStatus, jqXHR) {
66
- var noticeId;
67
- console.log(data);
68
- block.removeClass('wt-block-loading');
69
-
70
- if (data.error_message) {
71
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.error_message, 'danger');
72
- } else {
73
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.message, 'success');
74
- }
75
-
76
- setTimeout(function () {
77
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
78
- }, 5000);
79
- return;
80
-
81
- },
82
- error: function (xhr, ajaxOptions, thrownError) {
83
- block.removeClass('wt-block-loading');
84
- console.log(xhr.status);
85
- console.log(xhr.responseText);
86
- console.log(thrownError);
87
-
88
- var noticeId = $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
89
- }
90
- });
91
- });
92
-
93
- $('.wt-scanner-speed-button').click(function () {
94
- var select_speed = $(this);
95
- console.log(select_speed.val());
96
-
97
- $('.wt-scanner-speed-button').addClass('disabled');
98
-
99
- $.ajax(ajaxurl, {
100
- type: 'post',
101
- dataType: 'json',
102
- data: {
103
- action: 'wtitan_change_scanner_speed',
104
- speed: select_speed.data('value'),
105
- _wpnonce: wtdashboard.nonce
106
- },
107
- success: function (data, textStatus, jqXHR) {
108
- var noticeId;
109
-
110
- console.log(data);
111
-
112
- if (!data || data.error) {
113
-
114
- if (data) {
115
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.error_message, 'danger');
116
- }
117
-
118
- setTimeout(function () {
119
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
120
- }, 5000);
121
- return;
122
- } else {
123
- if (data) {
124
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.message, 'success');
125
- }
126
- setTimeout(function () {
127
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
128
- }, 5000);
129
- }
130
- $('.wt-scanner-speed-button').removeClass('disabled');
131
-
132
- },
133
- error: function (xhr, ajaxOptions, thrownError) {
134
- $('.wt-scanner-speed-button').removeClass('disabled');
135
- console.log(xhr.status);
136
- console.log(xhr.responseText);
137
- console.log(thrownError);
138
-
139
- var noticeId = $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
140
- }
141
- });
142
-
143
- });
144
-
145
- $('.wt-scanner-schedule-button').click(function () {
146
- var select = $(this);
147
- console.log(select.val());
148
-
149
- $('.wt-scanner-schedule-button').addClass('disabled');
150
-
151
- $.ajax(ajaxurl, {
152
- type: 'post',
153
- dataType: 'json',
154
- data: {
155
- action: 'wtitan_change_scanner_schedule',
156
- schedule: select.data('value'),
157
- _wpnonce: wtdashboard.nonce
158
- },
159
- success: function (data, textStatus, jqXHR) {
160
- var noticeId;
161
-
162
- console.log(data);
163
-
164
- if (!data || data.error) {
165
-
166
- if (data) {
167
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.error_message, 'danger');
168
- }
169
-
170
- setTimeout(function () {
171
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
172
- }, 5000);
173
- return;
174
- } else {
175
- if (data) {
176
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.message, 'success');
177
- }
178
- setTimeout(function () {
179
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
180
- }, 5000);
181
- }
182
- $('.wt-scanner-schedule-button').removeClass('disabled');
183
-
184
- },
185
- error: function (xhr, ajaxOptions, thrownError) {
186
- $('.wt-scanner-schedule-button').removeClass('disabled');
187
- console.log(xhr.status);
188
- console.log(xhr.responseText);
189
- console.log(thrownError);
190
-
191
- var noticeId = $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
192
- }
193
- });
194
-
195
- });
196
-
197
- jQuery('[data-action="digest-state"]').on('click', function (e) {
198
- e.preventDefault();
199
- var btn = jQuery(this);
200
-
201
- var enable = btn.attr('data-value');
202
-
203
- jQuery.post(ajaxurl, {
204
- action: 'wtitan_change_digest_state',
205
- _wpnonce: wtdashboard.digest_nonce,
206
- value: enable,
207
- }, function (response) {
208
- console.log(response);
209
-
210
- var msg = (!response || response.error_message) ? response.error_message : response.message;
211
- var type = (!response || response.error_message) ? 'danger' : 'success';
212
-
213
- jQuery('[data-action="digest-state"][disabled]').removeAttr('disabled');
214
- btn.attr('disabled', 'disabled');
215
-
216
- var noticeId = jQuery.wbcr_factory_templates_106.app.showNotice(msg, type);
217
- setTimeout(function () {
218
- jQuery.wbcr_factory_templates_106.app.hideNotice(noticeId);
219
- }, 5000);
220
- });
221
- })
222
-
223
- jQuery('#wt-quickstart-scan').on('click', function (e) {
224
- e.preventDefault();
225
- var btn = jQuery(this);
226
- btn.hide();
227
- jQuery('.wt-scan-icon-loader').show();
228
- //jQuery('#scan').trigger('click');
229
- vulnerability_ajax(false);
230
- audit_ajax(false);
231
- });
232
-
233
- $('.factory-checkbox--disabled.wtitan-control-premium-label .factory-buttons-group').click(function (e) {
234
- e.stopPropagation();
235
- window.location.href = 'https://titansitescanner.com/pricing/';
236
- });
237
- });
1
+ jQuery(document).ready(function ($) {
2
+ $('#js-wtitan-firewall-mode').change(function () {
3
+ var selectmode = $(this);
4
+ console.log(selectmode.val());
5
+
6
+ $('.wtitan-status-block').hide();
7
+ $('.wtitan-status-block.wtitan-status--loading').show();
8
+
9
+ $.ajax(ajaxurl, {
10
+ type: 'post',
11
+ dataType: 'json',
12
+ data: {
13
+ action: 'wtitan-change-firewall-mode',
14
+ mode: $(this).val(),
15
+ _wpnonce: $(this).data('nonce')
16
+ },
17
+ success: function (data, textStatus, jqXHR) {
18
+ var noticeId;
19
+
20
+ console.log(data);
21
+
22
+ if (!data || data.error) {
23
+ $('.wtitan-status-block.wtitan-status--loading').hide();
24
+ console.log(data);
25
+
26
+ if (data) {
27
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.error_message, 'danger');
28
+ }
29
+
30
+ setTimeout(function () {
31
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
32
+ }, 5000);
33
+ return;
34
+ } else {
35
+ $('.wtitan-status-block.wtitan-status--loading').hide();
36
+ $('.wtitan-status-block.wtitan-status--' + selectmode.val()).show();
37
+ }
38
+
39
+ },
40
+ error: function (xhr, ajaxOptions, thrownError) {
41
+ $('.wtitan-status-block.wtitan-status--loading').hide();
42
+ console.log(xhr.status);
43
+ console.log(xhr.responseText);
44
+ console.log(thrownError);
45
+
46
+ var noticeId = $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
47
+ }
48
+ });
49
+ });
50
+
51
+ $('#wt-antispam-status').change(function () {
52
+ var selectmode = $(this);
53
+ var block = $('#wt-antispam-status-block');
54
+
55
+ block.addClass('wt-block-loading');
56
+
57
+ $.ajax(ajaxurl, {
58
+ type: 'post',
59
+ dataType: 'json',
60
+ data: {
61
+ action: 'wtitan-change-antispam-mode',
62
+ mode: selectmode.val(),
63
+ _wpnonce: $(this).data('nonce')
64
+ },
65
+ success: function (data, textStatus, jqXHR) {
66
+ var noticeId;
67
+ console.log(data);
68
+ block.removeClass('wt-block-loading');
69
+
70
+ if (data.error_message) {
71
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.error_message, 'danger');
72
+ } else {
73
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.message, 'success');
74
+ }
75
+
76
+ setTimeout(function () {
77
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
78
+ }, 5000);
79
+ return;
80
+
81
+ },
82
+ error: function (xhr, ajaxOptions, thrownError) {
83
+ block.removeClass('wt-block-loading');
84
+ console.log(xhr.status);
85
+ console.log(xhr.responseText);
86
+ console.log(thrownError);
87
+
88
+ var noticeId = $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
89
+ }
90
+ });
91
+ });
92
+
93
+ $('.wt-scanner-speed-button').click(function () {
94
+ var select_speed = $(this);
95
+ console.log(select_speed.val());
96
+
97
+ $('.wt-scanner-speed-button').addClass('disabled');
98
+
99
+ $.ajax(ajaxurl, {
100
+ type: 'post',
101
+ dataType: 'json',
102
+ data: {
103
+ action: 'wtitan_change_scanner_speed',
104
+ speed: select_speed.data('value'),
105
+ _wpnonce: wtdashboard.nonce
106
+ },
107
+ success: function (data, textStatus, jqXHR) {
108
+ var noticeId;
109
+
110
+ console.log(data);
111
+
112
+ if (!data || data.error) {
113
+
114
+ if (data) {
115
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.error_message, 'danger');
116
+ }
117
+
118
+ setTimeout(function () {
119
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
120
+ }, 5000);
121
+ return;
122
+ } else {
123
+ if (data) {
124
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.message, 'success');
125
+ }
126
+ setTimeout(function () {
127
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
128
+ }, 5000);
129
+ }
130
+ $('.wt-scanner-speed-button').removeClass('disabled');
131
+
132
+ },
133
+ error: function (xhr, ajaxOptions, thrownError) {
134
+ $('.wt-scanner-speed-button').removeClass('disabled');
135
+ console.log(xhr.status);
136
+ console.log(xhr.responseText);
137
+ console.log(thrownError);
138
+
139
+ var noticeId = $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
140
+ }
141
+ });
142
+
143
+ });
144
+
145
+ $('.wt-scanner-schedule-button').click(function () {
146
+ var select = $(this);
147
+ console.log(select.val());
148
+
149
+ $('.wt-scanner-schedule-button').addClass('disabled');
150
+
151
+ $.ajax(ajaxurl, {
152
+ type: 'post',
153
+ dataType: 'json',
154
+ data: {
155
+ action: 'wtitan_change_scanner_schedule',
156
+ schedule: select.data('value'),
157
+ _wpnonce: wtdashboard.nonce
158
+ },
159
+ success: function (data, textStatus, jqXHR) {
160
+ var noticeId;
161
+
162
+ console.log(data);
163
+
164
+ if (!data || data.error) {
165
+
166
+ if (data) {
167
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.error_message, 'danger');
168
+ }
169
+
170
+ setTimeout(function () {
171
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
172
+ }, 5000);
173
+ return;
174
+ } else {
175
+ if (data) {
176
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.message, 'success');
177
+ }
178
+ setTimeout(function () {
179
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
180
+ }, 5000);
181
+ }
182
+ $('.wt-scanner-schedule-button').removeClass('disabled');
183
+
184
+ },
185
+ error: function (xhr, ajaxOptions, thrownError) {
186
+ $('.wt-scanner-schedule-button').removeClass('disabled');
187
+ console.log(xhr.status);
188
+ console.log(xhr.responseText);
189
+ console.log(thrownError);
190
+
191
+ var noticeId = $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
192
+ }
193
+ });
194
+
195
+ });
196
+
197
+ jQuery('[data-action="digest-state"]').on('click', function (e) {
198
+ e.preventDefault();
199
+ var btn = jQuery(this);
200
+
201
+ var enable = btn.attr('data-value');
202
+
203
+ jQuery.post(ajaxurl, {
204
+ action: 'wtitan_change_digest_state',
205
+ _wpnonce: wtdashboard.digest_nonce,
206
+ value: enable,
207
+ }, function (response) {
208
+ console.log(response);
209
+
210
+ var msg = (!response || response.error_message) ? response.error_message : response.message;
211
+ var type = (!response || response.error_message) ? 'danger' : 'success';
212
+
213
+ jQuery('[data-action="digest-state"][disabled]').removeAttr('disabled');
214
+ btn.attr('disabled', 'disabled');
215
+
216
+ var noticeId = jQuery.wbcr_factory_templates_110.app.showNotice(msg, type);
217
+ setTimeout(function () {
218
+ jQuery.wbcr_factory_templates_110.app.hideNotice(noticeId);
219
+ }, 5000);
220
+ });
221
+ })
222
+
223
+ jQuery('#wt-quickstart-scan').on('click', function (e) {
224
+ e.preventDefault();
225
+ var btn = jQuery(this);
226
+ btn.hide();
227
+ jQuery('.wt-scan-icon-loader').show();
228
+ //jQuery('#scan').trigger('click');
229
+ vulnerability_ajax(false);
230
+ audit_ajax(false);
231
+ });
232
+
233
+ $('.factory-checkbox--disabled.wtitan-control-premium-label .factory-buttons-group').click(function (e) {
234
+ e.stopPropagation();
235
+ window.location.href = 'https://titansitescanner.com/pricing/';
236
+ });
237
+ });
admin/assets/js/firewall/firewall-block-ip.js CHANGED
@@ -1,126 +1,126 @@
1
- (function ($) {
2
- 'use strict';
3
-
4
- class FirewallBlockIps {
5
- constructor() {
6
- this.initEvents();
7
- this.createTableRow('IP Block', '191.168.200.201', '22.03.2020 22:42', 'Yahoo crawler', 'Permanent', '0', 'Never');
8
- this.createTableRow('IP Block', '192.168.200.145', '22.03.2020 00:42', 'Bad bot', 'Permanent', '0', 'Never');
9
- }
10
-
11
- initEvents() {
12
- var self = this;
13
-
14
- $('#wtitan-blocks-ips').click(function (e) {
15
- e.preventDefault();
16
-
17
- let $self = $(this),
18
- infosModal = $('#wtitan-tmpl-block-ips-modal'),
19
- btn = jQuery(this);
20
-
21
- if (!infosModal.length) {
22
- console.log('[Error]: Html template for modal not found.');
23
- return;
24
- }
25
-
26
- Swal.fire({
27
- html: infosModal.html(),
28
- customClass: 'wtitan-modal wtitan-ips-blocking-modal',
29
- width: 500,
30
- showCancelButton: true,
31
- showCloseButton: true,
32
- confirmButtonText: 'Block',
33
- preConfirm: function () {
34
- return self.preConfirmModal();
35
- },
36
- onOpen: function () {
37
- $('.wtitan-ips-blocking-modal__tab').find('a').click(function () {
38
- $('.wtitan-ips-blocking-modal__tab').removeClass('wtitan-ips-blocking-modal__tab--active');
39
- $('.wtitan-ips-blocking-modal__tab-content').removeClass('wtitan-ips-blocking-modal__tab-content--active');
40
-
41
- $(this).parent().addClass('wtitan-ips-blocking-modal__tab--active');
42
-
43
- let tabID = $(this).attr('href').replace('#', '');
44
- $('#wtitan-ips-blocking-modal__' + tabID + '-tab-content').addClass('wtitan-ips-blocking-modal__tab-content--active')
45
- });
46
- }
47
- }).then(function (result) {
48
- if (result.value) {
49
- console.log(result);
50
- }
51
- });
52
- });
53
- }
54
-
55
- preConfirmModal() {
56
- return new Promise((resolve, reject) => {
57
- $.ajax(ajaxurl, {
58
- type: 'post',
59
- dataType: 'json',
60
- data: {
61
- action: 'wtitan-block-ips',
62
- payload: {
63
- type: $('.wtitan-ips-blocking-modal__tab--active').find('a').attr('href').replace('#', ''),
64
- duration: 0,
65
- reason: $('#wtitan-ips-blocking-modal__form-reason-field').val(),
66
- ip: $('#wtitan-ips-blocking-modal__form-ip-field').val(),
67
- ipRange: $('#wtitan-ips-blocking-modal__form-range-ip-field').val(),
68
- hostname: $('#wtitan-ips-blocking-modal__form-hostname-field').val(),
69
- userAgent: $('#wtitan-ips-blocking-modal__form-user-agent-field').val(),
70
- referrer: $('#wtitan-ips-blocking-modal__form-referrer-field').val(),
71
- },
72
- _wpnonce: $('#wtitan-blocks-ips').data('nonce')
73
- },
74
- success: function (data, textStatus, jqXHR) {
75
- var noticeId;
76
-
77
- console.log(data);
78
-
79
- if (!data || data.error) {
80
- console.log(data);
81
-
82
- if (data) {
83
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.error_message, 'danger');
84
- }
85
-
86
- setTimeout(function () {
87
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
88
- }, 5000);
89
- return data;
90
- }
91
-
92
- resolve(data)
93
- },
94
- error: function (xhr, ajaxOptions, thrownError) {
95
- console.log(xhr.status);
96
- console.log(xhr.responseText);
97
- console.log(thrownError);
98
-
99
- var noticeId = $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
100
- reject(thrownError);
101
- Swal.close();
102
- }
103
- });
104
- })
105
- }
106
-
107
- createTableRow(blockType, detail, ruleAdded, reason, expiration, blockCount, lastAttempt) {
108
- let tableBodyElement = $('.wtitan-ips-blocking__table').find('tbody'),
109
- row = $('<tr>').clone();
110
-
111
- row.appendTo(tableBodyElement);
112
- row.append($('<td>').html('<input type="checkbox">').clone());
113
- row.append($('<td>').html(blockType).clone());
114
- row.append($('<td>').html(detail).clone());
115
- row.append($('<td>').html(ruleAdded).clone());
116
- row.append($('<td>').html(reason).clone());
117
- row.append($('<td>').html(expiration).clone());
118
- row.append($('<td>').html(blockCount).clone());
119
- row.append($('<td>').html(lastAttempt).clone());
120
- }
121
- }
122
-
123
- jQuery(document).ready(function ($) {
124
- new FirewallBlockIps();
125
- });
126
- })(jQuery);
1
+ (function ($) {
2
+ 'use strict';
3
+
4
+ class FirewallBlockIps {
5
+ constructor() {
6
+ this.initEvents();
7
+ this.createTableRow('IP Block', '191.168.200.201', '22.03.2020 22:42', 'Yahoo crawler', 'Permanent', '0', 'Never');
8
+ this.createTableRow('IP Block', '192.168.200.145', '22.03.2020 00:42', 'Bad bot', 'Permanent', '0', 'Never');
9
+ }
10
+
11
+ initEvents() {
12
+ var self = this;
13
+
14
+ $('#wtitan-blocks-ips').click(function (e) {
15
+ e.preventDefault();
16
+
17
+ let $self = $(this),
18
+ infosModal = $('#wtitan-tmpl-block-ips-modal'),
19
+ btn = jQuery(this);
20
+
21
+ if (!infosModal.length) {
22
+ console.log('[Error]: Html template for modal not found.');
23
+ return;
24
+ }
25
+
26
+ Swal.fire({
27
+ html: infosModal.html(),
28
+ customClass: 'wtitan-modal wtitan-ips-blocking-modal',
29
+ width: 500,
30
+ showCancelButton: true,
31
+ showCloseButton: true,
32
+ confirmButtonText: 'Block',
33
+ preConfirm: function () {
34
+ return self.preConfirmModal();
35
+ },
36
+ onOpen: function () {
37
+ $('.wtitan-ips-blocking-modal__tab').find('a').click(function () {
38
+ $('.wtitan-ips-blocking-modal__tab').removeClass('wtitan-ips-blocking-modal__tab--active');
39
+ $('.wtitan-ips-blocking-modal__tab-content').removeClass('wtitan-ips-blocking-modal__tab-content--active');
40
+
41
+ $(this).parent().addClass('wtitan-ips-blocking-modal__tab--active');
42
+
43
+ let tabID = $(this).attr('href').replace('#', '');
44
+ $('#wtitan-ips-blocking-modal__' + tabID + '-tab-content').addClass('wtitan-ips-blocking-modal__tab-content--active')
45
+ });
46
+ }
47
+ }).then(function (result) {
48
+ if (result.value) {
49
+ console.log(result);
50
+ }
51
+ });
52
+ });
53
+ }
54
+
55
+ preConfirmModal() {
56
+ return new Promise((resolve, reject) => {
57
+ $.ajax(ajaxurl, {
58
+ type: 'post',
59
+ dataType: 'json',
60
+ data: {
61
+ action: 'wtitan-block-ips',
62
+ payload: {
63
+ type: $('.wtitan-ips-blocking-modal__tab--active').find('a').attr('href').replace('#', ''),
64
+ duration: 0,
65
+ reason: $('#wtitan-ips-blocking-modal__form-reason-field').val(),
66
+ ip: $('#wtitan-ips-blocking-modal__form-ip-field').val(),
67
+ ipRange: $('#wtitan-ips-blocking-modal__form-range-ip-field').val(),
68
+ hostname: $('#wtitan-ips-blocking-modal__form-hostname-field').val(),
69
+ userAgent: $('#wtitan-ips-blocking-modal__form-user-agent-field').val(),
70
+ referrer: $('#wtitan-ips-blocking-modal__form-referrer-field').val(),
71
+ },
72
+ _wpnonce: $('#wtitan-blocks-ips').data('nonce')
73
+ },
74
+ success: function (data, textStatus, jqXHR) {
75
+ var noticeId;
76
+
77
+ console.log(data);
78
+
79
+ if (!data || data.error) {
80
+ console.log(data);
81
+
82
+ if (data) {
83
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.error_message, 'danger');
84
+ }
85
+
86
+ setTimeout(function () {
87
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
88
+ }, 5000);
89
+ return data;
90
+ }
91
+
92
+ resolve(data)
93
+ },
94
+ error: function (xhr, ajaxOptions, thrownError) {
95
+ console.log(xhr.status);
96
+ console.log(xhr.responseText);
97
+ console.log(thrownError);
98
+
99
+ var noticeId = $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
100
+ reject(thrownError);
101
+ Swal.close();
102
+ }
103
+ });
104
+ })
105
+ }
106
+
107
+ createTableRow(blockType, detail, ruleAdded, reason, expiration, blockCount, lastAttempt) {
108
+ let tableBodyElement = $('.wtitan-ips-blocking__table').find('tbody'),
109
+ row = $('<tr>').clone();
110
+
111
+ row.appendTo(tableBodyElement);
112
+ row.append($('<td>').html('<input type="checkbox">').clone());
113
+ row.append($('<td>').html(blockType).clone());
114
+ row.append($('<td>').html(detail).clone());
115
+ row.append($('<td>').html(ruleAdded).clone());
116
+ row.append($('<td>').html(reason).clone());
117
+ row.append($('<td>').html(expiration).clone());
118
+ row.append($('<td>').html(blockCount).clone());
119
+ row.append($('<td>').html(lastAttempt).clone());
120
+ }
121
+ }
122
+
123
+ jQuery(document).ready(function ($) {
124
+ new FirewallBlockIps();
125
+ });
126
+ })(jQuery);
admin/assets/js/firewall/firewall-dashboard.js CHANGED
@@ -1,289 +1,289 @@
1
- jQuery(document).ready(function ($) {
2
- $('.js-wtitan-excluded-rules__checkbox').click(function () {
3
- let excludedRulesFieldElem = $('#js-wtitan-excluded-rules__field'),
4
- excludedRules = split(',', excludedRulesFieldElem.val());
5
-
6
- console.log(excludedRules);
7
-
8
- return false;
9
- });
10
-
11
- $("#wtitan-circle-firewall-coverage").fu_popover({
12
- content: $('#wtitan-status-tooltip').html(),
13
- dismissable: true,
14
- placement: 'left',
15
- trigger: 'hover',
16
- width: '350px',
17
- autoHide: false
18
- });
19
-
20
- $('#js-wtitan-firewall-mode').change(function () {
21
- console.log($(this).val());
22
-
23
- $('.wtitan-status-block').hide();
24
- $('.wtitan-status-block.wtitan-status--' + $(this).val()).show();
25
-
26
- $.ajax(ajaxurl, {
27
- type: 'post',
28
- dataType: 'json',
29
- data: {
30
- action: 'wtitan-change-firewall-mode',
31
- mode: $(this).val(),
32
- _wpnonce: $(this).data('nonce')
33
- },
34
- success: function (data, textStatus, jqXHR) {
35
- var noticeId;
36
-
37
- console.log(data);
38
-
39
- if (!data || data.error) {
40
- console.log(data);
41
-
42
- if (data) {
43
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.error_message, 'danger');
44
- }
45
-
46
- setTimeout(function () {
47
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
48
- }, 5000);
49
- return;
50
- }
51
-
52
- },
53
- error: function (xhr, ajaxOptions, thrownError) {
54
- console.log(xhr.status);
55
- console.log(xhr.responseText);
56
- console.log(thrownError);
57
-
58
- var noticeId = $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
59
- }
60
- });
61
- });
62
-
63
- $('#js-wtitan-optimize-firewall-protection,#js-wtitan-firewall-uninstall').click(function (e) {
64
- e.preventDefault();
65
- var infosModal, action;
66
- infosModal = $('#wtitan-tmpl-default-modal');
67
- action = 'install';
68
-
69
- if ("js-wtitan-optimize-firewall-protection" !== $(this).attr('id')) {
70
- action = 'uninstall';
71
- }
72
-
73
- if (!infosModal.length) {
74
- console.log('[Error]: Html template for modal not found.');
75
- return;
76
- }
77
-
78
- Swal.fire({
79
- html: infosModal.html(),
80
- customClass: 'wtitan-modal wtitan-modal-confirm',
81
- width: 800,
82
- showCancelButton: true,
83
- showCloseButton: true,
84
- confirmButtonText: 'Continue',
85
- preConfirm: function () {
86
- return new Promise((resolve, reject) => {
87
- $.ajax(ajaxurl, {
88
- type: 'post',
89
- dataType: 'json',
90
- data: {
91
- action: "install" === action
92
- ? 'wtitan-install-auto-prepend'
93
- : 'wtitan-uninstall-auto-prepend',
94
- server_configuration: $('#wtitan-server-config').val(),
95
- //iniModified: true,
96
- //_wpnonce: $(this).data('nonce')
97
- },
98
- success: function (data, textStatus, jqXHR) {
99
- var noticeId;
100
-
101
- console.log(data);
102
-
103
- if (!data || data.error) {
104
- console.log(data);
105
-
106
- if (data) {
107
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.error_message, 'danger');
108
- }
109
-
110
- setTimeout(function () {
111
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
112
- }, 5000);
113
- return data;
114
- }
115
-
116
- resolve(data)
117
- },
118
- error: function (xhr, ajaxOptions, thrownError) {
119
- console.log(xhr.status);
120
- console.log(xhr.responseText);
121
- console.log(thrownError);
122
-
123
- var noticeId = $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
124
- reject(thrownError)
125
- }
126
- });
127
- })
128
-
129
- /*(login) => {
130
- return fetch(`//api.github.com/users/${login}`)
131
- .then(response => {
132
- if( !response.ok ) {
133
- throw new Error(response.statusText)
134
- }
135
- return response.json()
136
- })
137
- .catch(error => {
138
- Swal.showValidationMessage(
139
- `Request failed: ${error}`
140
- )
141
- })*/
142
- },
143
- onOpen: function () {
144
-
145
- if ('install' === action) {
146
- $('.wtitan-modal').find('.wtitan-install-auto-prepend-modal-content').css('display', 'block');
147
- } else {
148
- $('.wtitan-modal').find('.wtitan-uninstall-auto-prepend-modal-content').css('display', 'block');
149
- }
150
-
151
- $('#wtitan-include-prepend > li').each(function (index, element) {
152
- console.log('1111');
153
- $(element).on('click', function (e) {
154
- console.log('fsdf');
155
- e.preventDefault();
156
- e.stopPropagation();
157
-
158
- var control = $(this).closest('.wtitan-switch');
159
- var value = $(this).data('optionValue');
160
-
161
- control.find('li').each(function () {
162
- $(this).toggleClass('wtitan-active', value === $(this).data('optionValue'));
163
- });
164
- });
165
- });
166
-
167
- //var nginxNotice = $('.wtitan-nginx-config');
168
- //var manualNotice = $('.wtitan-manual-config');
169
- $('#wtitan-server-config').on('change', function () {
170
- var el = $(this);
171
- /*if( manualNotice.length ) {
172
- if( el.val() == 'manual' ) {
173
- manualNotice.fadeIn(400, function() {
174
- $.wfcolorbox.resize();
175
- });
176
- } else {
177
- manualNotice.fadeOut(400, function() {
178
- $.wfcolorbox.resize();
179
- });
180
- }
181
- }*/
182
-
183
- var identifier = '.wtitan-backups-' + el.val().replace(/[^a-z0-9\-]/i, '');
184
- $('.wtitan-backups').hide();
185
- $(identifier).show();
186
- if ($(identifier).find('.wtitan-backup-file-list').children().length > 0) {
187
- $('.wtitan-download-instructions').show();
188
- } else {
189
- $('.wtitan-download-instructions').hide();
190
- }
191
-
192
- /*if( nginxNotice.length ) { //Install only
193
- if( el.val() == 'nginx' ) {
194
- nginxNotice.fadeIn(400, function() {
195
- $.wfcolorbox.resize();
196
- });
197
- } else {
198
- nginxNotice.fadeOut(400, function() {
199
- $.wfcolorbox.resize();
200
- });
201
- }
202
-
203
- validateContinue();
204
- return;
205
- }*/
206
-
207
- //$.wfcolorbox.resize();
208
- //validateContinue();
209
- }).triggerHandler('change');
210
- }
211
- }).then(function (result) {
212
- console.log(result);
213
- console.log(action);
214
-
215
- if (result.value && result.value.html) {
216
-
217
- let swalOptions = {
218
- html: result.value.html,
219
- customClass: 'wtitan-modal wtitan-modal-confirm',
220
- showConfirmButton: false,
221
- showCancelButton: false,
222
- showCloseButton: true
223
- };
224
-
225
- // Uninstall action
226
- if ('uninstall' === action && result.value.uninstallation_waiting) {
227
- let timeout = 0;
228
-
229
- if (result.value.timeout) {
230
- timeout = parseInt(result.value.timeout) * 1000;
231
- }
232
-
233
- setTimeout(function () {
234
-
235
- let data = {
236
- action: 'wtitan-uninstall-auto-prepend',
237
- server_configuration: result.value.server_configuration,
238
- ini_modified: true,
239
- //_wpnonce: $(this).data('nonce')};
240
- };
241
-
242
- if (result.value.credentials) {
243
- data['credentials'] = result.value.credentials;
244
- }
245
-
246
- if (result.value.credentials_signature) {
247
- data['credentials_signature'] = result.value.credentials_signature;
248
- }
249
-
250
- $.ajax(ajaxurl, {
251
- type: 'post',
252
- dataType: 'json',
253
- data: data,
254
- success: function (data, textStatus, jqXHR) {
255
- if (data.uninstallation_success) {
256
- swalOptions.html = data.html;
257
-
258
- Swal.fire(swalOptions).then(function (r) {
259
- window.location.reload();
260
- });
261
- }
262
- },
263
- error: function (xhr, ajaxOptions, thrownError) {
264
- console.log(xhr.status);
265
- console.log(xhr.responseText);
266
- console.log(thrownError);
267
-
268
- var noticeId = $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
269
-
270
- }
271
- });
272
- }, timeout);
273
- }
274
-
275
- Swal.fire(swalOptions).then(function (r) {
276
- console.log(result);
277
-
278
- // Install action
279
- if ('install' === action) {
280
- window.location.reload();
281
- return false;
282
- }
283
- });
284
- }
285
-
286
- });
287
- });
288
- })
289
  ;
1
+ jQuery(document).ready(function ($) {
2
+ $('.js-wtitan-excluded-rules__checkbox').click(function () {
3
+ let excludedRulesFieldElem = $('#js-wtitan-excluded-rules__field'),
4
+ excludedRules = split(',', excludedRulesFieldElem.val());
5
+
6
+ console.log(excludedRules);
7
+
8
+ return false;
9
+ });
10
+
11
+ $("#wtitan-circle-firewall-coverage").fu_popover({
12
+ content: $('#wtitan-status-tooltip').html(),
13
+ dismissable: true,
14
+ placement: 'left',
15
+ trigger: 'hover',
16
+ width: '350px',
17
+ autoHide: false
18
+ });
19
+
20
+ $('#js-wtitan-firewall-mode').change(function () {
21
+ console.log($(this).val());
22
+
23
+ $('.wtitan-status-block').hide();
24
+ $('.wtitan-status-block.wtitan-status--' + $(this).val()).show();
25
+
26
+ $.ajax(ajaxurl, {
27
+ type: 'post',
28
+ dataType: 'json',
29
+ data: {
30
+ action: 'wtitan-change-firewall-mode',
31
+ mode: $(this).val(),
32
+ _wpnonce: $(this).data('nonce')
33
+ },
34
+ success: function (data, textStatus, jqXHR) {
35
+ var noticeId;
36
+
37
+ console.log(data);
38
+
39
+ if (!data || data.error) {
40
+ console.log(data);
41
+
42
+ if (data) {
43
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.error_message, 'danger');
44
+ }
45
+
46
+ setTimeout(function () {
47
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
48
+ }, 5000);
49
+ return;
50
+ }
51
+
52
+ },
53
+ error: function (xhr, ajaxOptions, thrownError) {
54
+ console.log(xhr.status);
55
+ console.log(xhr.responseText);
56
+ console.log(thrownError);
57
+
58
+ var noticeId = $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
59
+ }
60
+ });
61
+ });
62
+
63
+ $('#js-wtitan-optimize-firewall-protection,#js-wtitan-firewall-uninstall').click(function (e) {
64
+ e.preventDefault();
65
+ var infosModal, action;
66
+ infosModal = $('#wtitan-tmpl-default-modal');
67
+ action = 'install';
68
+
69
+ if ("js-wtitan-optimize-firewall-protection" !== $(this).attr('id')) {
70
+ action = 'uninstall';
71
+ }
72
+
73
+ if (!infosModal.length) {
74
+ console.log('[Error]: Html template for modal not found.');
75
+ return;
76
+ }
77
+
78
+ Swal.fire({
79
+ html: infosModal.html(),
80
+ customClass: 'wtitan-modal wtitan-modal-confirm',
81
+ width: 800,
82
+ showCancelButton: true,
83
+ showCloseButton: true,
84
+ confirmButtonText: 'Continue',
85
+ preConfirm: function () {
86
+ return new Promise((resolve, reject) => {
87
+ $.ajax(ajaxurl, {
88
+ type: 'post',
89
+ dataType: 'json',
90
+ data: {
91
+ action: "install" === action
92
+ ? 'wtitan-install-auto-prepend'
93
+ : 'wtitan-uninstall-auto-prepend',
94
+ server_configuration: $('#wtitan-server-config').val(),
95
+ //iniModified: true,
96
+ //_wpnonce: $(this).data('nonce')
97
+ },
98
+ success: function (data, textStatus, jqXHR) {
99
+ var noticeId;
100
+
101
+ console.log(data);
102
+
103
+ if (!data || data.error) {
104
+ console.log(data);
105
+
106
+ if (data) {
107
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.error_message, 'danger');
108
+ }
109
+
110
+ setTimeout(function () {
111
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
112
+ }, 5000);
113
+ return data;
114
+ }
115
+
116
+ resolve(data)
117
+ },
118
+ error: function (xhr, ajaxOptions, thrownError) {
119
+ console.log(xhr.status);
120
+ console.log(xhr.responseText);
121
+ console.log(thrownError);
122
+
123
+ var noticeId = $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
124
+ reject(thrownError)
125
+ }
126
+ });
127
+ })
128
+
129
+ /*(login) => {
130
+ return fetch(`//api.github.com/users/${login}`)
131
+ .then(response => {
132
+ if( !response.ok ) {
133
+ throw new Error(response.statusText)
134
+ }
135
+ return response.json()
136
+ })
137
+ .catch(error => {
138
+ Swal.showValidationMessage(
139
+ `Request failed: ${error}`
140
+ )
141
+ })*/
142
+ },
143
+ onOpen: function () {
144
+
145
+ if ('install' === action) {
146
+ $('.wtitan-modal').find('.wtitan-install-auto-prepend-modal-content').css('display', 'block');
147
+ } else {
148
+ $('.wtitan-modal').find('.wtitan-uninstall-auto-prepend-modal-content').css('display', 'block');
149
+ }
150
+
151
+ $('#wtitan-include-prepend > li').each(function (index, element) {
152
+ console.log('1111');
153
+ $(element).on('click', function (e) {
154
+ console.log('fsdf');
155
+ e.preventDefault();
156
+ e.stopPropagation();
157
+
158
+ var control = $(this).closest('.wtitan-switch');
159
+ var value = $(this).data('optionValue');
160
+
161
+ control.find('li').each(function () {
162
+ $(this).toggleClass('wtitan-active', value === $(this).data('optionValue'));
163
+ });
164
+ });
165
+ });
166
+
167
+ //var nginxNotice = $('.wtitan-nginx-config');
168
+ //var manualNotice = $('.wtitan-manual-config');
169
+ $('#wtitan-server-config').on('change', function () {
170
+ var el = $(this);
171
+ /*if( manualNotice.length ) {
172
+ if( el.val() == 'manual' ) {
173
+ manualNotice.fadeIn(400, function() {
174
+ $.wfcolorbox.resize();
175
+ });
176
+ } else {
177
+ manualNotice.fadeOut(400, function() {
178
+ $.wfcolorbox.resize();
179
+ });
180
+ }
181
+ }*/
182
+
183
+ var identifier = '.wtitan-backups-' + el.val().replace(/[^a-z0-9\-]/i, '');
184
+ $('.wtitan-backups').hide();
185
+ $(identifier).show();
186
+ if ($(identifier).find('.wtitan-backup-file-list').children().length > 0) {
187
+ $('.wtitan-download-instructions').show();
188
+ } else {
189
+ $('.wtitan-download-instructions').hide();
190
+ }
191
+
192
+ /*if( nginxNotice.length ) { //Install only
193
+ if( el.val() == 'nginx' ) {
194
+ nginxNotice.fadeIn(400, function() {
195
+ $.wfcolorbox.resize();
196
+ });
197
+ } else {
198
+ nginxNotice.fadeOut(400, function() {
199
+ $.wfcolorbox.resize();
200
+ });
201
+ }
202
+
203
+ validateContinue();
204
+ return;
205
+ }*/
206
+
207
+ //$.wfcolorbox.resize();
208
+ //validateContinue();
209
+ }).triggerHandler('change');
210
+ }
211
+ }).then(function (result) {
212
+ console.log(result);
213
+ console.log(action);
214
+
215
+ if (result.value && result.value.html) {
216
+
217
+ let swalOptions = {
218
+ html: result.value.html,
219
+ customClass: 'wtitan-modal wtitan-modal-confirm',
220
+ showConfirmButton: false,
221
+ showCancelButton: false,
222
+ showCloseButton: true
223
+ };
224
+
225
+ // Uninstall action
226
+ if ('uninstall' === action && result.value.uninstallation_waiting) {
227
+ let timeout = 0;
228
+
229
+ if (result.value.timeout) {
230
+ timeout = parseInt(result.value.timeout) * 1000;
231
+ }
232
+
233
+ setTimeout(function () {
234
+
235
+ let data = {
236
+ action: 'wtitan-uninstall-auto-prepend',
237
+ server_configuration: result.value.server_configuration,
238
+ ini_modified: true,
239
+ //_wpnonce: $(this).data('nonce')};
240
+ };
241
+
242
+ if (result.value.credentials) {
243
+ data['credentials'] = result.value.credentials;
244
+ }
245
+
246
+ if (result.value.credentials_signature) {
247
+ data['credentials_signature'] = result.value.credentials_signature;
248
+ }
249
+
250
+ $.ajax(ajaxurl, {
251
+ type: 'post',
252
+ dataType: 'json',
253
+ data: data,
254
+ success: function (data, textStatus, jqXHR) {
255
+ if (data.uninstallation_success) {
256
+ swalOptions.html = data.html;
257
+
258
+ Swal.fire(swalOptions).then(function (r) {
259
+ window.location.reload();
260
+ });
261
+ }
262
+ },
263
+ error: function (xhr, ajaxOptions, thrownError) {
264
+ console.log(xhr.status);
265
+ console.log(xhr.responseText);
266
+ console.log(thrownError);
267
+
268
+ var noticeId = $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
269
+
270
+ }
271
+ });
272
+ }, timeout);
273
+ }
274
+
275
+ Swal.fire(swalOptions).then(function (r) {
276
+ console.log(result);
277
+
278
+ // Install action
279
+ if ('install' === action) {
280
+ window.location.reload();
281
+ return false;
282
+ }
283
+ });
284
+ }
285
+
286
+ });
287
+ });
288
+ })
289
  ;
admin/assets/js/firewall/firewall-settings.js CHANGED
@@ -1,20 +1,20 @@
1
- (function ($) {
2
- 'use strict';
3
-
4
- jQuery(document).ready(function ($) {
5
- let excludedRulesFieldElem = $('#js-wtitan-excluded-rules__field'),
6
- excludedRules = ("" !== excludedRulesFieldElem.val()) ? excludedRulesFieldElem.val().split(',') : [];
7
-
8
- $('.js-wtitan-excluded-rules__checkbox').click(function () {
9
- let ruleID = parseInt($(this).val());
10
-
11
- if ($(this).is(":checked")) {
12
- excludedRules.splice($.inArray(parseInt(ruleID), excludedRules), 1);
13
- } else {
14
- excludedRules.push(ruleID);
15
- }
16
-
17
- excludedRulesFieldElem.val(excludedRules.join(','));
18
- });
19
- });
20
- })(jQuery);
1
+ (function ($) {
2
+ 'use strict';
3
+
4
+ jQuery(document).ready(function ($) {
5
+ let excludedRulesFieldElem = $('#js-wtitan-excluded-rules__field'),
6
+ excludedRules = ("" !== excludedRulesFieldElem.val()) ? excludedRulesFieldElem.val().split(',') : [];
7
+
8
+ $('.js-wtitan-excluded-rules__checkbox').click(function () {
9
+ let ruleID = parseInt($(this).val());
10
+
11
+ if ($(this).is(":checked")) {
12
+ excludedRules.splice($.inArray(parseInt(ruleID), excludedRules), 1);
13
+ } else {
14
+ excludedRules.push(ruleID);
15
+ }
16
+
17
+ excludedRulesFieldElem.val(excludedRules.join(','));
18
+ });
19
+ });
20
+ })(jQuery);
admin/assets/js/import.js CHANGED
@@ -1,226 +1,226 @@
1
- /**
2
- * General
3
- * @author Webcraftic <wordpress.webraftic@gmail.com>
4
- * @copyright (c) 10.09.2017, Webcraftic
5
- * @version 1.0
6
- */
7
-
8
- (function ($) {
9
- 'use strict';
10
-
11
- var wtitan_import = {
12
- init: function () {
13
- this.importOptions();
14
- },
15
- importOptions: function () {
16
- var self = this;
17
-
18
- $('.wtitan-import-options-button').click(function () {
19
- var settings = $('#wbcr-titan-export-textarea').val(),
20
- $this = $(this);
21
-
22
- if (!settings) {
23
- $.wbcr_factory_templates_106.app.showNotice('Import options is empty!', 'danger');
24
- return false;
25
- }
26
-
27
- if (void 0 == wtitan_ajax || !wtitan_ajax.import_options_nonce) {
28
- $.wbcr_factory_templates_106.app.showNotice('Unknown Javascript error, most likely the wtitan_ajax variable does not exist!', 'danger');
29
- return false;
30
- }
31
-
32
- $(this).prop('disabled', true);
33
-
34
- self.sendRequest({
35
- action: 'wtitan_import_settings',
36
- _wpnonce: wtitan_ajax.import_options_nonce,
37
- settings: settings
38
- }, function (response) {
39
- $this.prop('disabled', false);
40
-
41
- if (response.data.update_notice) {
42
- $.wbcr_factory_templates_106.app.showNotice(response.data.update_notice);
43
- } else {
44
- $('.wbcr-clr-update-package').closest('.wbcr-factory-warning-notice').remove();
45
- }
46
- });
47
-
48
- return false;
49
- });
50
- },
51
- sendRequest: function (request_data, beforeValidateCallback, successCallback) {
52
- var self = this;
53
-
54
- if (wtitan_ajax === undefined) {
55
- console.log('Undefinded wtitan_ajax object.');
56
- return;
57
- }
58
-
59
- if (typeof request_data === 'object') {
60
- request_data.security = wtitan_ajax.ajax_nonce;
61
- }
62
-
63
- $.ajax(ajaxurl, {
64
- type: 'post',
65
- dataType: 'json',
66
- data: request_data,
67
- success: function (data, textStatus, jqXHR) {
68
- var noticeId;
69
-
70
- beforeValidateCallback && beforeValidateCallback(data);
71
-
72
- if (!data || data.error) {
73
- console.log(data);
74
-
75
- if (data) {
76
- noticeId = $.wbcr_factory_templates_106.app.showNotice(data.error_message, 'danger');
77
- } else {
78
- if (void 0 !== wtitan_ajax) {
79
- noticeId = $.wbcr_factory_templates_106.app.showNotice(wtitan_ajax.i18n.unknown_error, 'danger');
80
- }
81
- }
82
-
83
- setTimeout(function () {
84
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
85
- }, 5000);
86
- return;
87
- }
88
-
89
- successCallback && successCallback(data);
90
-
91
- if (!request_data.flush_redirect) {
92
- if (void 0 !== wtitan_ajax) {
93
- noticeId = $.wbcr_factory_templates_106.app.showNotice(wtitan_ajax.i18n.success_update_settings, 'success');
94
-
95
- setTimeout(function () {
96
- $.wbcr_factory_templates_106.app.hideNotice(noticeId);
97
- }, 5000);
98
- }
99
- return;
100
- }
101
-
102
- window.location.href = wtitan_ajax.flush_cache_url;
103
- // открыть уведомление
104
-
105
- },
106
- error: function (xhr, ajaxOptions, thrownError) {
107
- console.log(xhr.status);
108
- console.log(xhr.responseText);
109
- console.log(thrownError);
110
-
111
- var noticeId = $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
112
- }
113
- });
114
- }
115
- };
116
-
117
- $(document).ready(function () {
118
- wtitan_import.init();
119
- });
120
-
121
- })(jQuery);
122
-
123
-
124
- // jQuery(document).ready(function($) {
125
- // $('.wtitan-import-options-button').click(function() {
126
- // var settings = $('#wbcr-titan-export-textarea').val(),
127
- // $this = $(this);
128
- //
129
- // if( !settings ) {
130
- // $.wbcr_factory_clearfy_217.app.showNotice('Import options is empty!', 'danger');
131
- // return false;
132
- // }
133
- //
134
- // if( void 0 == wtitan_ajax || !wtitan_ajax.import_options_nonce ) {
135
- // $.wbcr_factory_clearfy_217.app.showNotice('Unknown Javascript error, most likely the wtitan_ajax variable does not exist!', 'danger');
136
- // return false;
137
- // }
138
- //
139
- // $(this).prop('disabled', true);
140
- //
141
- // sendRequest({
142
- // action: 'wtitan_import_settings',
143
- // _wpnonce: wtitan_ajax.import_options_nonce,
144
- // settings: settings
145
- // }, function(response) {
146
- // $this.prop('disabled', false);
147
- //
148
- // if( response.data.update_notice ) {
149
- // if( !$('.wtitan-update-package').length ) {
150
- // $.wbcr_factory_clearfy_217.app.showNotice(response.data.update_notice);
151
- // }
152
- // } else {
153
- // if( $('.wtitan-update-package').length ) {
154
- // $('.wtitan-update-package').closest('.wbcr-factory-warning-notice').remove();
155
- // }
156
- // }
157
- // });
158
- //
159
- // return false;
160
- // });
161
- //
162
- // function sendRequest(request_data, beforeValidateCallback, successCallback) {
163
- //
164
- // if( wtitan_ajax === undefined ) {
165
- // console.log('Undefinded wtitan_ajax object.');
166
- // return;
167
- // }
168
- //
169
- // if( typeof request_data === 'object' ) {
170
- // request_data.security = wtitan_ajax.ajax_nonce;
171
- // }
172
- //
173
- // $.ajax(ajaxurl, {
174
- // type: 'post',
175
- // dataType: 'json',
176
- // data: request_data,
177
- // success: function(data, textStatus, jqXHR) {
178
- // var noticeId;
179
- //
180
- // beforeValidateCallback && beforeValidateCallback(data);
181
- //
182
- // if( !data || data.error ) {
183
- // console.log(data);
184
- //
185
- // if( data ) {
186
- // noticeId = $.wbcr_factory_clearfy_217.app.showNotice(data.error_message, 'danger');
187
- // } else {
188
- // if( void 0 != wtitan_ajax ) {
189
- // noticeId = $.wbcr_factory_clearfy_217.app.showNotice(wtitan_ajax.i18n.unknown_error, 'danger');
190
- // }
191
- // }
192
- //
193
- // setTimeout(function() {
194
- // $.wbcr_factory_clearfy_217.app.hideNotice(noticeId);
195
- // }, 5000);
196
- // return;
197
- // }
198
- //
199
- // successCallback && successCallback(data);
200
- //
201
- // if( !request_data.flush_redirect ) {
202
- // if( void 0 != wtitan_ajax ) {
203
- // noticeId = $.wbcr_factory_clearfy_217.app.showNotice(wtitan_ajax.i18n.success_update_settings, 'success');
204
- //
205
- // setTimeout(function() {
206
- // $.wbcr_factory_clearfy_217.app.hideNotice(noticeId);
207
- // }, 5000);
208
- // }
209
- // return;
210
- // }
211
- //
212
- // window.location.href = wtitan_ajax.flush_cache_url;
213
- // // открыть уведомление
214
- //
215
- // },
216
- // error: function(xhr, ajaxOptions, thrownError) {
217
- // console.log(xhr.status);
218
- // console.log(xhr.responseText);
219
- // console.log(thrownError);
220
- //
221
- // var noticeId = $.wbcr_factory_clearfy_217.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
222
- // }
223
- // });
224
- // }
225
- //
226
  // });
1
+ /**
2
+ * General
3
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
4
+ * @copyright (c) 10.09.2017, Webcraftic
5
+ * @version 1.0
6
+ */
7
+
8
+ (function ($) {
9
+ 'use strict';
10
+
11
+ var wtitan_import = {
12
+ init: function () {
13
+ this.importOptions();
14
+ },
15
+ importOptions: function () {
16
+ var self = this;
17
+
18
+ $('.wtitan-import-options-button').click(function () {
19
+ var settings = $('#wbcr-titan-export-textarea').val(),
20
+ $this = $(this);
21
+
22
+ if (!settings) {
23
+ $.wbcr_factory_templates_110.app.showNotice('Import options is empty!', 'danger');
24
+ return false;
25
+ }
26
+
27
+ if (void 0 == wtitan_ajax || !wtitan_ajax.import_options_nonce) {
28
+ $.wbcr_factory_templates_110.app.showNotice('Unknown Javascript error, most likely the wtitan_ajax variable does not exist!', 'danger');
29
+ return false;
30
+ }
31
+
32
+ $(this).prop('disabled', true);
33
+
34
+ self.sendRequest({
35
+ action: 'wtitan_import_settings',
36
+ _wpnonce: wtitan_ajax.import_options_nonce,
37
+ settings: settings
38
+ }, function (response) {
39
+ $this.prop('disabled', false);
40
+
41
+ if (response.data.update_notice) {
42
+ $.wbcr_factory_templates_110.app.showNotice(response.data.update_notice);
43
+ } else {
44
+ $('.wbcr-clr-update-package').closest('.wbcr-factory-warning-notice').remove();
45
+ }
46
+ });
47
+
48
+ return false;
49
+ });
50
+ },
51
+ sendRequest: function (request_data, beforeValidateCallback, successCallback) {
52
+ var self = this;
53
+
54
+ if (wtitan_ajax === undefined) {
55
+ console.log('Undefinded wtitan_ajax object.');
56
+ return;
57
+ }
58
+
59
+ if (typeof request_data === 'object') {
60
+ request_data.security = wtitan_ajax.ajax_nonce;
61
+ }
62
+
63
+ $.ajax(ajaxurl, {
64
+ type: 'post',
65
+ dataType: 'json',
66
+ data: request_data,
67
+ success: function (data, textStatus, jqXHR) {
68
+ var noticeId;
69
+
70
+ beforeValidateCallback && beforeValidateCallback(data);
71
+
72
+ if (!data || data.error) {
73
+ console.log(data);
74
+
75
+ if (data) {
76
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(data.error_message, 'danger');
77
+ } else {
78
+ if (void 0 !== wtitan_ajax) {
79
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(wtitan_ajax.i18n.unknown_error, 'danger');
80
+ }
81
+ }
82
+
83
+ setTimeout(function () {
84
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
85
+ }, 5000);
86
+ return;
87
+ }
88
+
89
+ successCallback && successCallback(data);
90
+
91
+ if (!request_data.flush_redirect) {
92
+ if (void 0 !== wtitan_ajax) {
93
+ noticeId = $.wbcr_factory_templates_110.app.showNotice(wtitan_ajax.i18n.success_update_settings, 'success');
94
+
95
+ setTimeout(function () {
96
+ $.wbcr_factory_templates_110.app.hideNotice(noticeId);
97
+ }, 5000);
98
+ }
99
+ return;
100
+ }
101
+
102
+ window.location.href = wtitan_ajax.flush_cache_url;
103
+ // открыть уведомление
104
+
105
+ },
106
+ error: function (xhr, ajaxOptions, thrownError) {
107
+ console.log(xhr.status);
108
+ console.log(xhr.responseText);
109
+ console.log(thrownError);
110
+
111
+ var noticeId = $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
112
+ }
113
+ });
114
+ }
115
+ };
116
+
117
+ $(document).ready(function () {
118
+ wtitan_import.init();
119
+ });
120
+
121
+ })(jQuery);
122
+
123
+
124
+ // jQuery(document).ready(function($) {
125
+ // $('.wtitan-import-options-button').click(function() {
126
+ // var settings = $('#wbcr-titan-export-textarea').val(),
127
+ // $this = $(this);
128
+ //
129
+ // if( !settings ) {
130
+ // $.wbcr_factory_clearfy_217.app.showNotice('Import options is empty!', 'danger');
131
+ // return false;
132
+ // }
133
+ //
134
+ // if( void 0 == wtitan_ajax || !wtitan_ajax.import_options_nonce ) {
135
+ // $.wbcr_factory_clearfy_217.app.showNotice('Unknown Javascript error, most likely the wtitan_ajax variable does not exist!', 'danger');
136
+ // return false;
137
+ // }
138
+ //
139
+ // $(this).prop('disabled', true);
140
+ //
141
+ // sendRequest({
142
+ // action: 'wtitan_import_settings',
143
+ // _wpnonce: wtitan_ajax.import_options_nonce,
144
+ // settings: settings
145
+ // }, function(response) {
146
+ // $this.prop('disabled', false);
147
+ //
148
+ // if( response.data.update_notice ) {
149
+ // if( !$('.wtitan-update-package').length ) {
150
+ // $.wbcr_factory_clearfy_217.app.showNotice(response.data.update_notice);
151
+ // }
152
+ // } else {
153
+ // if( $('.wtitan-update-package').length ) {
154
+ // $('.wtitan-update-package').closest('.wbcr-factory-warning-notice').remove();
155
+ // }
156
+ // }
157
+ // });
158
+ //
159
+ // return false;
160
+ // });
161
+ //
162
+ // function sendRequest(request_data, beforeValidateCallback, successCallback) {
163
+ //
164
+ // if( wtitan_ajax === undefined ) {
165
+ // console.log('Undefinded wtitan_ajax object.');
166
+ // return;
167
+ // }
168
+ //
169
+ // if( typeof request_data === 'object' ) {
170
+ // request_data.security = wtitan_ajax.ajax_nonce;
171
+ // }
172
+ //
173
+ // $.ajax(ajaxurl, {
174
+ // type: 'post',
175
+ // dataType: 'json',
176
+ // data: request_data,
177
+ // success: function(data, textStatus, jqXHR) {
178
+ // var noticeId;
179
+ //
180
+ // beforeValidateCallback && beforeValidateCallback(data);
181
+ //
182
+ // if( !data || data.error ) {
183
+ // console.log(data);
184
+ //
185
+ // if( data ) {
186
+ // noticeId = $.wbcr_factory_clearfy_217.app.showNotice(data.error_message, 'danger');
187
+ // } else {
188
+ // if( void 0 != wtitan_ajax ) {
189
+ // noticeId = $.wbcr_factory_clearfy_217.app.showNotice(wtitan_ajax.i18n.unknown_error, 'danger');
190
+ // }
191
+ // }
192
+ //
193
+ // setTimeout(function() {
194
+ // $.wbcr_factory_clearfy_217.app.hideNotice(noticeId);
195
+ // }, 5000);
196
+ // return;
197
+ // }
198
+ //
199
+ // successCallback && successCallback(data);
200
+ //
201
+ // if( !request_data.flush_redirect ) {
202
+ // if( void 0 != wtitan_ajax ) {
203
+ // noticeId = $.wbcr_factory_clearfy_217.app.showNotice(wtitan_ajax.i18n.success_update_settings, 'success');
204
+ //
205
+ // setTimeout(function() {
206
+ // $.wbcr_factory_clearfy_217.app.hideNotice(noticeId);
207
+ // }, 5000);
208
+ // }
209
+ // return;
210
+ // }
211
+ //
212
+ // window.location.href = wtitan_ajax.flush_cache_url;
213
+ // // открыть уведомление
214
+ //
215
+ // },
216
+ // error: function(xhr, ajaxOptions, thrownError) {
217
+ // console.log(xhr.status);
218
+ // console.log(xhr.responseText);
219
+ // console.log(thrownError);
220
+ //
221
+ // var noticeId = $.wbcr_factory_clearfy_217.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
222
+ // }
223
+ // });
224
+ // }
225
+ //
226
  // });
admin/assets/js/install-addons.js CHANGED
@@ -1,361 +1,361 @@
1
- /**
2
- * This code provides tools for downloading, installing external add-ons for the Clearfy plugin
3
- *
4
- * @author Webcraftic <wordpress.webraftic@gmail.com>
5
- * @copyright (c) 10.09.2017, Webcraftic
6
- * @version 1.0
7
- */
8
-
9
-
10
- (function ($) {
11
- 'use strict';
12
-
13
- var wtitan_externalAddon = {
14
- init: function () {
15
- this.events();
16
- },
17
- events: function () {
18
- var self = this;
19
-
20
- /**
21
- * This event is intended for installation, removal, activation, deactivation of external add-ons
22
- */
23
-
24
- $(document).on('click', '.wtitan-update-component-button', function () {
25
- var $this = $(this),
26
- button_i18n = $(this).data('i18n'),
27
- plugin_slug = $(this).data('slug'),
28
- plugin_action = $(this).data('plugin-action'),
29
- plugin = $(this).data('plugin'),
30
- storage = $(this).data('storage'),
31
- wpnonce = $(this).data('wpnonce');
32
-
33
- var action = 'install-plugin';
34
-
35
- if (storage == 'freemius' || ((storage == 'wordpress' || storage == 'internal') && (plugin_action == 'activate' || plugin_action == 'deactivate'))) {
36
- action = 'wtitan-update-component';
37
- } else if (storage == 'wordpress' && plugin_action == 'delete') {
38
- action = 'delete-plugin';
39
- }
40
-
41
- var data = {
42
- action: action,
43
- slug: plugin_slug,
44
- storage: storage,
45
- plugin: plugin,
46
- plugin_action: plugin_action,
47
- _wpnonce: wpnonce
48
- };
49
-
50
- if (plugin_action == 'install') {
51
- $this.addClass('updating-message');
52
- }
53
-
54
- $this.addClass('disabled').text(button_i18n.loading);
55
-
56
- $.wbcr_factory_templates_106.hooks.run('clearfy/components/pre_update', [$this, data]);
57
-
58
- self.sendRequest(data, function (response) {
59
- if (!response || !response.success) {
60
-
61
- if (response.data && response.data.error_message) {
62
- $.wbcr_factory_templates_106.app.showNotice(response.data.error_message, 'danger');
63
- }
64
-
65
- $.wbcr_factory_templates_106.hooks.run('clearfy/components/update_error', [
66
- $this,
67
- data,
68
- response.data.error_message,
69
- response
70
- ]);
71
-
72
- return;
73
- }
74
-
75
- if (response.success) {
76
- $this.removeClass('disabled').removeClass('updating-message');
77
-
78
- if (storage == 'freemius') {
79
- if (response.data.update_notice) {
80
- if (!$('.wtitan-update-package').length) {
81
- $.wbcr_factory_templates_106.app.showNotice(response.data.update_notice);
82
- }
83
- } else {
84
- if ($('.wtitan-update-package').length) {
85
- $('.wtitan-update-package').closest('.wbcr-factory-warning-notice').remove();
86
- }
87
- }
88
- }
89
-
90
- if (plugin_action == 'install') {
91
-
92
- plugin_action = 'activate';
93
- $this.data('plugin-action', 'activate');
94
- $this.attr('data-plugin-action', 'activate');
95
-
96
- if ($this.hasClass('button')) {
97
- $this.removeClass('button-default').addClass('button-primary');
98
- }
99
-
100
- $.wbcr_factory_templates_106.hooks.run('clearfy/components/installed', [
101
- $this,
102
- data,
103
- response
104
- ]);
105
-
106
- } else if (plugin_action == 'activate') {
107
-
108
- plugin_action = 'deactivate';
109
- $this.data('plugin-action', 'deactivate');
110
- $this.attr('data-plugin-action', 'deactivate');
111
-
112
- if ($this.hasClass('button')) {
113
- $this.removeClass('button-primary').addClass('button-default');
114
- }
115
-
116
- // todo: вынести в отдельный файл
117
- // If the button is installed inside the notification,
118
- // then delete the button container after activating the component
119
-
120
- if ($this.closest('.wtitan-new-component').length) {
121
- $this.closest('.wtitan-new-component').remove();
122
- }
123
-
124
- // todo: вынести в отдельный файл
125
- // If the button is installed inside the notification (inside),
126
- // then delete the button container after activating the component
127
-
128
- if ($this.closest('.alert').length) {
129
- $this.closest('.alert').remove();
130
- }
131
-
132
- // todo: вынести в отдельный файл
133
- // If the button is installed inside the notification (inside),
134
- // then delete the button container after activating the component
135
-
136
- if ($this.closest('.wbcr-clearfy-fake-image-optimizer-board').length) {
137
- $this.remove();
138
- window.location.reload();
139
- }
140
-
141
- // todo: вынести в отдельный файл
142
- // If the button is installed on the components page,
143
- // the active and inactive components are highlighted
144
-
145
- if ($this.closest('.plugin-card').length) {
146
- self.setComponentActivate($this);
147
- $this.closest('.plugin-card').find('.delete-now').remove();
148
- $this.closest('.plugin-card').find('.settings-button').show();
149
- }
150
-
151
- $.wbcr_factory_templates_106.hooks.run('clearfy/components/pre_activate', [
152
- $this,
153
- data,
154
- response
155
- ]);
156
-
157
- /**
158
- * Send an additional request for activation of the component, during activation
159
- * perform the action wbcr/clearfy/activated_component.
160
- *
161
- * Basically, this is necessary to prepare the plugin to work, write the necessary rows and
162
- * tables in the database, rewriting permalinks, checking conflicts, etc.
163
- */
164
- if (storage == 'freemius' || storage == 'internal') {
165
- self.sendRequestToComponentActivationPrepare($this, data, button_i18n);
166
- return;
167
- }
168
-
169
- } else if (plugin_action == 'deactivate') {
170
-
171
- plugin_action = 'activate';
172
- $this.data('plugin-action', 'activate');
173
- $this.attr('data-plugin-action', 'activate');
174
-
175
- if ($this.hasClass('button')) {
176
- $this.removeClass('button-default').addClass('button-primary');
177
- }
178
-
179
- // todo: вынести в отдельный файл
180
- // If the button is installed on the components page,
181
- // the active and inactive components are highlighted
182
-
183
- if ($this.closest('.plugin-card').length) {
184
- self.setComponentDeactivate($this);
185
-
186
- if (response.data['delete_button'] && response.data['delete_button'] != '') {
187
- $this.before($(response.data['delete_button']).addClass('delete-now'));
188
- $this.closest('.plugin-card').find('.settings-button').hide();
189
- }
190
- }
191
-
192
- // todo: вынести в отдельный файл
193
- // If the button is installed on the components page,
194
- // the active and inactive components are highlighted
195
- if ($this.closest('.wbcr-hide-after-action').length) {
196
- $this.closest('.wbcr-hide-after-action').remove();
197
- }
198
-
199
- $.wbcr_factory_templates_106.hooks.run('clearfy/components/deactivated', [
200
- $this,
201
- data,
202
- response
203
- ]);
204
-
205
- } else if (plugin_action == 'delete') {
206
-
207
- plugin_action = 'install';
208
- $this.closest('.plugin-card').find('.install-now').data('plugin-action', 'install');
209
- $this.closest('.plugin-card').find('.install-now').attr('data-plugin-action', 'install');
210
- $this.closest('.plugin-card').find('.install-now').removeClass('button-primary').addClass('button-default');
211
- $this.closest('.plugin-card').find('.install-now').text(button_i18n.install);
212
-
213
- // todo: вынести в отдельный файл
214
- // If the button is installed on the components page,
215
- // the active and inactive components are highlighted
216
-
217
- if ($this.closest('.plugin-card').length) {
218
- self.setComponentDeactivate($this);
219
- $this.remove();
220
- }
221
-
222
- $.wbcr_factory_templates_106.hooks.run('clearfy/components/deleted', [$this, data, response]);
223
- }
224
- } else {
225
- if (plugin_action == 'install') {
226
- $this.removeClass('updating-message');
227
- }
228
- }
229
-
230
- $this.text(button_i18n[plugin_action]);
231
-
232
- if (response.data.need_rewrite_rules && !$('.wtitan-need-rewrite-rules-message').length) {
233
- $.wbcr_factory_templates_106.app.showNotice(response.data.need_rewrite_rules, 'warning');
234
- }
235
-
236
- $.wbcr_factory_templates_106.hooks.run('clearfy/components/updated', [$this, data, response]);
237
- });
238
-
239
- return false;
240
- });
241
-
242
- $(document).on('click', '.wtitan-plugin-update-link', function () {
243
- var $this = $(this),
244
- loading = $(this).data('loading'),
245
- success_msg = $(this).data('ok'),
246
- wpnonce = $(this).data('wpnonce'),
247
- container = $this.closest('p');
248
-
249
- var data = {
250
- action: 'wtitan-update-package',
251
- _wpnonce: wpnonce
252
- };
253
-
254
- container.text(loading);
255
-
256
- self.sendRequest(data, function (response) {
257
- if (!response || !response.success) {
258
- if (response.data && response.data.error_message) {
259
- $.wbcr_factory_templates_106.app.showNotice(response.data.error_message, 'danger');
260
- }
261
- return;
262
- }
263
-
264
- if (response.success) {
265
- container.closest('div').removeClass('notice-warning').addClass('notice-success');
266
- container.text(success_msg);
267
- } else {
268
- container.text(response.data.msg);
269
- }
270
- });
271
-
272
- return false;
273
- });
274
- },
275
-
276
- /**
277
- * Устанавливает стиль компонента
278
- *
279
- * @param {object} componentButton
280
- */
281
- setComponentDeactivate: function (componentButton) {
282
- componentButton.closest('.plugin-card').addClass('plugin-status-deactive');
283
- },
284
-
285
- /**
286
- * Устанавливает стиль компонента
287
- *
288
- * @param {object} componentButton
289
- */
290
- setComponentActivate: function (componentButton) {
291
- componentButton.closest('.plugin-card').removeClass('plugin-status-deactive');
292
- },
293
-
294
- /**
295
- * Отправляет дополнительный запрос на активацию компонента, во время активации
296
- * выполняет хук wbcr/clearfy/activated_component.
297
- *
298
- * В принципе, это необходимо для подготовки плагина к работе, записи необходимых строк и таблиц в
299
- * базу данных, перепись постоянных ссылок, проверка конфликтов и т.д.
300
- *
301
- * @param {object} componentButton
302
- * @param {object} sendData
303
- * @param {object} button_i18n
304
- */
305
- sendRequestToComponentActivationPrepare: function (componentButton, sendData, button_i18n) {
306
- var self = this;
307
-
308
- componentButton.addClass('button-primary')
309
- .addClass('disabled')
310
- .text(button_i18n.preparation);
311
-
312
- sendData.action = 'wbcr-clearfy-prepare-component';
313
-
314
- this.sendRequest(sendData, function (response) {
315
- componentButton.removeClass('disabled');
316
-
317
- if (!response || !response.success) {
318
- componentButton.text(button_i18n['activate']);
319
- self.setComponentDeactivate(componentButton);
320
-
321
- if (response.data && response.data.error_message) {
322
- $.wbcr_factory_templates_106.app.showNotice(response.data.error_message, 'danger');
323
- }
324
-
325
- $.wbcr_factory_templates_106.hooks.run('clearfy/components/activated_error', [sendData.plugin]);
326
- return;
327
- }
328
-
329
- componentButton.removeClass('button-primary').text(button_i18n['deactivate']);
330
- self.setComponentActivate(componentButton);
331
-
332
- $.wbcr_factory_templates_106.hooks.run('clearfy/components/activated', [sendData.plugin]);
333
- });
334
- },
335
-
336
- sendRequest: function (data, callback) {
337
- var self = this;
338
-
339
- $.ajax(ajaxurl, {
340
- type: 'post',
341
- dataType: 'json',
342
- data: data,
343
- success: function (data, textStatus, jqXHR) {
344
- callback && callback(data);
345
- },
346
- error: function (xhr, ajaxOptions, thrownError) {
347
- console.log(xhr.status);
348
- console.log(xhr.responseText);
349
- console.log(thrownError);
350
-
351
- $.wbcr_factory_templates_106.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
352
- }
353
- });
354
- }
355
- };
356
-
357
- $(document).ready(function () {
358
- wtitan_externalAddon.init();
359
- });
360
-
361
- })(jQuery);
1
+ /**
2
+ * This code provides tools for downloading, installing external add-ons for the Clearfy plugin
3
+ *
4
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
5
+ * @copyright (c) 10.09.2017, Webcraftic
6
+ * @version 1.0
7
+ */
8
+
9
+
10
+ (function ($) {
11
+ 'use strict';
12
+
13
+ var wtitan_externalAddon = {
14
+ init: function () {
15
+ this.events();
16
+ },
17
+ events: function () {
18
+ var self = this;
19
+
20
+ /**
21
+ * This event is intended for installation, removal, activation, deactivation of external add-ons
22
+ */
23
+
24
+ $(document).on('click', '.wtitan-update-component-button', function () {
25
+ var $this = $(this),
26
+ button_i18n = $(this).data('i18n'),
27
+ plugin_slug = $(this).data('slug'),
28
+ plugin_action = $(this).data('plugin-action'),
29
+ plugin = $(this).data('plugin'),
30
+ storage = $(this).data('storage'),
31
+ wpnonce = $(this).data('wpnonce');
32
+
33
+ var action = 'install-plugin';
34
+
35
+ if (storage == 'freemius' || ((storage == 'wordpress' || storage == 'internal') && (plugin_action == 'activate' || plugin_action == 'deactivate'))) {
36
+ action = 'wtitan-update-component';
37
+ } else if (storage == 'wordpress' && plugin_action == 'delete') {
38
+ action = 'delete-plugin';
39
+ }
40
+
41
+ var data = {
42
+ action: action,
43
+ slug: plugin_slug,
44
+ storage: storage,
45
+ plugin: plugin,
46
+ plugin_action: plugin_action,
47
+ _wpnonce: wpnonce
48
+ };
49
+
50
+ if (plugin_action == 'install') {
51
+ $this.addClass('updating-message');
52
+ }
53
+
54
+ $this.addClass('disabled').text(button_i18n.loading);
55
+
56
+ $.wbcr_factory_templates_110.hooks.run('clearfy/components/pre_update', [$this, data]);
57
+
58
+ self.sendRequest(data, function (response) {
59
+ if (!response || !response.success) {
60
+
61
+ if (response.data && response.data.error_message) {
62
+ $.wbcr_factory_templates_110.app.showNotice(response.data.error_message, 'danger');
63
+ }
64
+
65
+ $.wbcr_factory_templates_110.hooks.run('clearfy/components/update_error', [
66
+ $this,
67
+ data,
68
+ response.data.error_message,
69
+ response
70
+ ]);
71
+
72
+ return;
73
+ }
74
+
75
+ if (response.success) {
76
+ $this.removeClass('disabled').removeClass('updating-message');
77
+
78
+ if (storage == 'freemius') {
79
+ if (response.data.update_notice) {
80
+ if (!$('.wtitan-update-package').length) {
81
+ $.wbcr_factory_templates_110.app.showNotice(response.data.update_notice);
82
+ }
83
+ } else {
84
+ if ($('.wtitan-update-package').length) {
85
+ $('.wtitan-update-package').closest('.wbcr-factory-warning-notice').remove();
86
+ }
87
+ }
88
+ }
89
+
90
+ if (plugin_action == 'install') {
91
+
92
+ plugin_action = 'activate';
93
+ $this.data('plugin-action', 'activate');
94
+ $this.attr('data-plugin-action', 'activate');
95
+
96
+ if ($this.hasClass('button')) {
97
+ $this.removeClass('button-default').addClass('button-primary');
98
+ }
99
+
100
+ $.wbcr_factory_templates_110.hooks.run('clearfy/components/installed', [
101
+ $this,
102
+ data,
103
+ response
104
+ ]);
105
+
106
+ } else if (plugin_action == 'activate') {
107
+
108
+ plugin_action = 'deactivate';
109
+ $this.data('plugin-action', 'deactivate');
110
+ $this.attr('data-plugin-action', 'deactivate');
111
+
112
+ if ($this.hasClass('button')) {
113
+ $this.removeClass('button-primary').addClass('button-default');
114
+ }
115
+
116
+ // todo: вынести в отдельный файл
117
+ // If the button is installed inside the notification,
118
+ // then delete the button container after activating the component
119
+
120
+ if ($this.closest('.wtitan-new-component').length) {
121
+ $this.closest('.wtitan-new-component').remove();
122
+ }
123
+
124
+ // todo: вынести в отдельный файл
125
+ // If the button is installed inside the notification (inside),
126
+ // then delete the button container after activating the component
127
+
128
+ if ($this.closest('.alert').length) {
129
+ $this.closest('.alert').remove();
130
+ }
131
+
132
+ // todo: вынести в отдельный файл
133
+ // If the button is installed inside the notification (inside),
134
+ // then delete the button container after activating the component
135
+
136
+ if ($this.closest('.wbcr-clearfy-fake-image-optimizer-board').length) {
137
+ $this.remove();
138
+ window.location.reload();
139
+ }
140
+
141
+ // todo: вынести в отдельный файл
142
+ // If the button is installed on the components page,
143
+ // the active and inactive components are highlighted
144
+
145
+ if ($this.closest('.plugin-card').length) {
146
+ self.setComponentActivate($this);
147
+ $this.closest('.plugin-card').find('.delete-now').remove();
148
+ $this.closest('.plugin-card').find('.settings-button').show();
149
+ }
150
+
151
+ $.wbcr_factory_templates_110.hooks.run('clearfy/components/pre_activate', [
152
+ $this,
153
+ data,
154
+ response
155
+ ]);
156
+
157
+ /**
158
+ * Send an additional request for activation of the component, during activation
159
+ * perform the action wbcr/clearfy/activated_component.
160
+ *
161
+ * Basically, this is necessary to prepare the plugin to work, write the necessary rows and
162
+ * tables in the database, rewriting permalinks, checking conflicts, etc.
163
+ */
164
+ if (storage == 'freemius' || storage == 'internal') {
165
+ self.sendRequestToComponentActivationPrepare($this, data, button_i18n);
166
+ return;
167
+ }
168
+
169
+ } else if (plugin_action == 'deactivate') {
170
+
171
+ plugin_action = 'activate';
172
+ $this.data('plugin-action', 'activate');
173
+ $this.attr('data-plugin-action', 'activate');
174
+
175
+ if ($this.hasClass('button')) {
176
+ $this.removeClass('button-default').addClass('button-primary');
177
+ }
178
+
179
+ // todo: вынести в отдельный файл
180
+ // If the button is installed on the components page,
181
+ // the active and inactive components are highlighted
182
+
183
+ if ($this.closest('.plugin-card').length) {
184
+ self.setComponentDeactivate($this);
185
+
186
+ if (response.data['delete_button'] && response.data['delete_button'] != '') {
187
+ $this.before($(response.data['delete_button']).addClass('delete-now'));
188
+ $this.closest('.plugin-card').find('.settings-button').hide();
189
+ }
190
+ }
191
+
192
+ // todo: вынести в отдельный файл
193
+ // If the button is installed on the components page,
194
+ // the active and inactive components are highlighted
195
+ if ($this.closest('.wbcr-hide-after-action').length) {
196
+ $this.closest('.wbcr-hide-after-action').remove();
197
+ }
198
+
199
+ $.wbcr_factory_templates_110.hooks.run('clearfy/components/deactivated', [
200
+ $this,
201
+ data,
202
+ response
203
+ ]);
204
+
205
+ } else if (plugin_action == 'delete') {
206
+
207
+ plugin_action = 'install';
208
+ $this.closest('.plugin-card').find('.install-now').data('plugin-action', 'install');
209
+ $this.closest('.plugin-card').find('.install-now').attr('data-plugin-action', 'install');
210
+ $this.closest('.plugin-card').find('.install-now').removeClass('button-primary').addClass('button-default');
211
+ $this.closest('.plugin-card').find('.install-now').text(button_i18n.install);
212
+
213
+ // todo: вынести в отдельный файл
214
+ // If the button is installed on the components page,
215
+ // the active and inactive components are highlighted
216
+
217
+ if ($this.closest('.plugin-card').length) {
218
+ self.setComponentDeactivate($this);
219
+ $this.remove();
220
+ }
221
+
222
+ $.wbcr_factory_templates_110.hooks.run('clearfy/components/deleted', [$this, data, response]);
223
+ }
224
+ } else {
225
+ if (plugin_action == 'install') {
226
+ $this.removeClass('updating-message');
227
+ }
228
+ }
229
+
230
+ $this.text(button_i18n[plugin_action]);
231
+
232
+ if (response.data.need_rewrite_rules && !$('.wtitan-need-rewrite-rules-message').length) {
233
+ $.wbcr_factory_templates_110.app.showNotice(response.data.need_rewrite_rules, 'warning');
234
+ }
235
+
236
+ $.wbcr_factory_templates_110.hooks.run('clearfy/components/updated', [$this, data, response]);
237
+ });
238
+
239
+ return false;
240
+ });
241
+
242
+ $(document).on('click', '.wtitan-plugin-update-link', function () {
243
+ var $this = $(this),
244
+ loading = $(this).data('loading'),
245
+ success_msg = $(this).data('ok'),
246
+ wpnonce = $(this).data('wpnonce'),
247
+ container = $this.closest('p');
248
+
249
+ var data = {
250
+ action: 'wtitan-update-package',
251
+ _wpnonce: wpnonce
252
+ };
253
+
254
+ container.text(loading);
255
+
256
+ self.sendRequest(data, function (response) {
257
+ if (!response || !response.success) {
258
+ if (response.data && response.data.error_message) {
259
+ $.wbcr_factory_templates_110.app.showNotice(response.data.error_message, 'danger');
260
+ }
261
+ return;
262
+ }
263
+
264
+ if (response.success) {
265
+ container.closest('div').removeClass('notice-warning').addClass('notice-success');
266
+ container.text(success_msg);
267
+ } else {
268
+ container.text(response.data.msg);
269
+ }
270
+ });
271
+
272
+ return false;
273
+ });
274
+ },
275
+
276
+ /**
277
+ * Устанавливает стиль компонента
278
+ *
279
+ * @param {object} componentButton
280
+ */
281
+ setComponentDeactivate: function (componentButton) {
282
+ componentButton.closest('.plugin-card').addClass('plugin-status-deactive');
283
+ },
284
+
285
+ /**
286
+ * Устанавливает стиль компонента
287
+ *
288
+ * @param {object} componentButton
289
+ */
290
+ setComponentActivate: function (componentButton) {
291
+ componentButton.closest('.plugin-card').removeClass('plugin-status-deactive');
292
+ },
293
+
294
+ /**
295
+ * Отправляет дополнительный запрос на активацию компонента, во время активации
296
+ * выполняет хук wbcr/clearfy/activated_component.
297
+ *
298
+ * В принципе, это необходимо для подготовки плагина к работе, записи необходимых строк и таблиц в
299
+ * базу данных, перепись постоянных ссылок, проверка конфликтов и т.д.
300
+ *
301
+ * @param {object} componentButton
302
+ * @param {object} sendData
303
+ * @param {object} button_i18n
304
+ */
305
+ sendRequestToComponentActivationPrepare: function (componentButton, sendData, button_i18n) {
306
+ var self = this;
307
+
308
+ componentButton.addClass('button-primary')
309
+ .addClass('disabled')
310
+ .text(button_i18n.preparation);
311
+
312
+ sendData.action = 'wbcr-clearfy-prepare-component';
313
+
314
+ this.sendRequest(sendData, function (response) {
315
+ componentButton.removeClass('disabled');
316
+
317
+ if (!response || !response.success) {
318
+ componentButton.text(button_i18n['activate']);
319
+ self.setComponentDeactivate(componentButton);
320
+
321
+ if (response.data && response.data.error_message) {
322
+ $.wbcr_factory_templates_110.app.showNotice(response.data.error_message, 'danger');
323
+ }
324
+
325
+ $.wbcr_factory_templates_110.hooks.run('clearfy/components/activated_error', [sendData.plugin]);
326
+ return;
327
+ }
328
+
329
+ componentButton.removeClass('button-primary').text(button_i18n['deactivate']);
330
+ self.setComponentActivate(componentButton);
331
+
332
+ $.wbcr_factory_templates_110.hooks.run('clearfy/components/activated', [sendData.plugin]);
333
+ });
334
+ },
335
+
336
+ sendRequest: function (data, callback) {
337
+ var self = this;
338
+
339
+ $.ajax(ajaxurl, {
340
+ type: 'post',
341
+ dataType: 'json',
342
+ data: data,
343
+ success: function (data, textStatus, jqXHR) {
344
+ callback && callback(data);
345
+ },
346
+ error: function (xhr, ajaxOptions, thrownError) {
347
+ console.log(xhr.status);
348
+ console.log(xhr.responseText);
349
+ console.log(thrownError);
350
+
351
+ $.wbcr_factory_templates_110.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
352
+ }
353
+ });
354
+ }
355
+ };
356
+
357
+ $(document).ready(function () {
358
+ wtitan_externalAddon.init();
359
+ });
360
+
361
+ })(jQuery);
admin/assets/js/libs/circular-progress.js CHANGED
@@ -1,139 +1,139 @@
1
- /**
2
- *
3
- * @author Webcraftic <wordpress.webraftic@gmail.com>
4
- * @copyright (c) 04.02.2020, Webcraftic
5
- * @version 1.0
6
- */
7
-
8
- //wfCircularProgress
9
- jQuery.fn.wfCircularProgress = function (options) {
10
- jQuery(this).each(function () {
11
- var creationOptions;
12
- try {
13
- creationOptions = JSON.parse(jQuery(this).data('wfCircularProgressOptions'));
14
- } catch (e) { /* Ignore */
15
- }
16
- if (typeof creationOptions !== 'object') {
17
- creationOptions = {};
18
- }
19
- var opts = jQuery.extend({}, jQuery.fn.wfCircularProgress.defaults, creationOptions, options);
20
-
21
- var center = Math.floor(opts.diameter / 2);
22
- var insetRadius = center - opts.strokeWidth * 2;
23
-
24
- var circumference = 2 * insetRadius * Math.PI;
25
- var finalOffset = -(circumference * (1 - opts.endPercent));
26
- var initialOffset = -(circumference);
27
-
28
- var terminatorRadius = Math.floor(opts.strokeWidth * 1.5);
29
- var terminatorDiameter = 2 * terminatorRadius;
30
- var finalTerminatorX = center - insetRadius * Math.cos(Math.PI * 2 * (opts.endPercent - 0.25));
31
- var finalTerminatorY = center + insetRadius * Math.sin(Math.PI * 2 * (opts.endPercent - 0.25));
32
- var initialTerminatorX = center - insetRadius * Math.cos(Math.PI * 2 * (opts.startPercent - 0.25));
33
- var initialTerminatorY = center + insetRadius * Math.sin(Math.PI * 2 * (opts.startPercent - 0.25));
34
-
35
- var terminatorSVG = "m 0,-" + terminatorRadius + " a " + terminatorRadius + "," + terminatorRadius + " 0 1 1 0," + terminatorDiameter + " a " + terminatorRadius + "," + terminatorRadius + " 0 1 1 0,-" + terminatorDiameter;
36
-
37
- jQuery(this).data('wfCircularProgressOptions', JSON.stringify(opts));
38
-
39
- jQuery(this).css('width', opts.diameter + 'px');
40
- jQuery(this).css('height', opts.diameter + 'px');
41
-
42
- var svg = jQuery(this).find('svg');
43
- if (svg.length === 0) {
44
- svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
45
- jQuery(this).append(svg);
46
- }
47
- var inactivePath = jQuery(this).find('.wtitan-status-circular-inactive-path');
48
- if (inactivePath.length === 0) {
49
- inactivePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
50
- jQuery(inactivePath).addClass('wtitan-status-circular-inactive-path');
51
- jQuery(svg).append(inactivePath);
52
- }
53
- var activePath = jQuery(this).find('.wtitan-status-circular-active-path');
54
- if (activePath.length === 0) {
55
- activePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
56
- jQuery(activePath).addClass('wtitan-status-circular-active-path');
57
- jQuery(svg).append(activePath);
58
- }
59
- var terminator = jQuery(this).find('.wtitan-status-circular-terminator');
60
- if (terminator.length === 0) {
61
- terminator = document.createElementNS("http://www.w3.org/2000/svg", "path");
62
- jQuery(terminator).addClass('wtitan-status-circular-terminator');
63
- jQuery(svg).append(terminator);
64
- }
65
- var text = jQuery(this).find('.wtitan-status-circular-text');
66
- if (text.length === 0) {
67
- text = jQuery('<div class="wtitan-status-circular-text"></div>');
68
- jQuery(this).append(text);
69
- }
70
- var pendingOverlay = jQuery(this).find('.wf-status-overlay-text');
71
- if (pendingOverlay.length === 0 && opts.pendingMessage.length !== 0) {
72
- pendingOverlay = jQuery('<div class="wf-status-overlay-text"></div>');
73
- jQuery(this).append(pendingOverlay);
74
- }
75
-
76
- jQuery(svg).attr('viewBox', '0 0 ' + opts.diameter + ' ' + opts.diameter);
77
- jQuery(svg).css('display', opts.css_display);
78
- jQuery(svg).css('width', opts.diameter + 'px');
79
- jQuery(svg).css('height', opts.diameter + 'px');
80
- jQuery(inactivePath).attr('d', 'M ' + center + ',' + center + ' m 0,-' + insetRadius + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,' + (2 * insetRadius) + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,-' + (2 * insetRadius));
81
- jQuery(inactivePath).attr('stroke', opts.inactiveColor);
82
- jQuery(inactivePath).attr('stroke-width', opts.strokeWidth);
83
- jQuery(inactivePath).attr('fill-opacity', 0);
84
- jQuery(activePath).attr('d', 'M ' + center + ',' + center + ' m 0,-' + insetRadius + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,' + (2 * insetRadius) + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,-' + (2 * insetRadius));
85
- jQuery(activePath).attr('stroke', opts.color);
86
- jQuery(activePath).attr('stroke-width', opts.strokeWidth);
87
- jQuery(activePath).attr('stroke-dasharray', circumference + ',' + circumference);
88
- jQuery(activePath).attr('stroke-dashoffset', initialOffset);
89
- jQuery(activePath).attr('fill-opacity', 0);
90
- jQuery(terminator).attr('d', 'M ' + initialTerminatorX + ',' + initialTerminatorY + ' ' + terminatorSVG);
91
- jQuery(terminator).attr('stroke', opts.color);
92
- jQuery(terminator).attr('stroke-width', opts.strokeWidth);
93
- jQuery(terminator).attr('fill', '#ffffff');
94
- jQuery(pendingOverlay).html(opts.pendingMessage);
95
-
96
- jQuery(pendingOverlay).animate({
97
- opacity: opts.pendingOverlay ? 1.0 : 0.0,
98
- }, {
99
- duration: 500,
100
- step: function (value) {
101
- var opacity = 1.0 - (value * 0.8);
102
- jQuery(svg).css('opacity', opacity);
103
- jQuery(text).css('opacity', opacity);
104
- },
105
- complete: function () {
106
- jQuery(svg).css('opacity', opts.pendingOverlay ? 0.2 : 1.0);
107
- jQuery(text).css('opacity', opts.pendingOverlay ? 0.2 : 1.0);
108
- }
109
- });
110
-
111
- jQuery(activePath).animate({
112
- "stroke-dashoffset": finalOffset + 'px'
113
- }, {
114
- duration: 500,
115
- step: function (value) {
116
- var percentage = 1 + value / circumference;
117
- var x = center - insetRadius * Math.cos(Math.PI * 2 * (percentage - 0.25));
118
- var y = center + insetRadius * Math.sin(Math.PI * 2 * (percentage - 0.25));
119
- jQuery(terminator).attr('d', 'M ' + x + ',' + y + ' ' + terminatorSVG);
120
- text.html(Math.round(percentage * 100) + '%');
121
- },
122
- complete: function () {
123
- text.html(Math.round(opts.endPercent * 100) + '%');
124
- }
125
- });
126
- });
127
- };
128
-
129
- jQuery.fn.wfCircularProgress.defaults = {
130
- startPercent: 0,
131
- endPercent: 1,
132
- color: '#16bc9b',
133
- inactiveColor: '#ececec',
134
- strokeWidth: 3,
135
- diameter: 100,
136
- pendingOverlay: false,
137
- pendingMessage: 'Note: Status will update when changes are saved',
138
- css_display: 'block',
139
- };
1
+ /**
2
+ *
3
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
4
+ * @copyright (c) 04.02.2020, Webcraftic
5
+ * @version 1.0
6
+ */
7
+
8
+ //wfCircularProgress
9
+ jQuery.fn.wfCircularProgress = function (options) {
10
+ jQuery(this).each(function () {
11
+ var creationOptions;
12
+ try {
13
+ creationOptions = JSON.parse(jQuery(this).data('wfCircularProgressOptions'));
14
+ } catch (e) { /* Ignore */
15
+ }
16
+ if (typeof creationOptions !== 'object') {
17
+ creationOptions = {};
18
+ }
19
+ var opts = jQuery.extend({}, jQuery.fn.wfCircularProgress.defaults, creationOptions, options);
20
+
21
+ var center = Math.floor(opts.diameter / 2);
22
+ var insetRadius = center - opts.strokeWidth * 2;
23
+
24
+ var circumference = 2 * insetRadius * Math.PI;
25
+ var finalOffset = -(circumference * (1 - opts.endPercent));
26
+ var initialOffset = -(circumference);
27
+
28
+ var terminatorRadius = Math.floor(opts.strokeWidth * 1.5);
29
+ var terminatorDiameter = 2 * terminatorRadius;
30
+ var finalTerminatorX = center - insetRadius * Math.cos(Math.PI * 2 * (opts.endPercent - 0.25));
31
+ var finalTerminatorY = center + insetRadius * Math.sin(Math.PI * 2 * (opts.endPercent - 0.25));
32
+ var initialTerminatorX = center - insetRadius * Math.cos(Math.PI * 2 * (opts.startPercent - 0.25));
33
+ var initialTerminatorY = center + insetRadius * Math.sin(Math.PI * 2 * (opts.startPercent - 0.25));
34
+
35
+ var terminatorSVG = "m 0,-" + terminatorRadius + " a " + terminatorRadius + "," + terminatorRadius + " 0 1 1 0," + terminatorDiameter + " a " + terminatorRadius + "," + terminatorRadius + " 0 1 1 0,-" + terminatorDiameter;
36
+
37
+ jQuery(this).data('wfCircularProgressOptions', JSON.stringify(opts));
38
+
39
+ jQuery(this).css('width', opts.diameter + 'px');
40
+ jQuery(this).css('height', opts.diameter + 'px');
41
+
42
+ var svg = jQuery(this).find('svg');
43
+ if (svg.length === 0) {
44
+ svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
45
+ jQuery(this).append(svg);
46
+ }
47
+ var inactivePath = jQuery(this).find('.wtitan-status-circular-inactive-path');
48
+ if (inactivePath.length === 0) {
49
+ inactivePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
50
+ jQuery(inactivePath).addClass('wtitan-status-circular-inactive-path');
51
+ jQuery(svg).append(inactivePath);
52
+ }
53
+ var activePath = jQuery(this).find('.wtitan-status-circular-active-path');
54
+ if (activePath.length === 0) {
55
+ activePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
56
+ jQuery(activePath).addClass('wtitan-status-circular-active-path');
57
+ jQuery(svg).append(activePath);
58
+ }
59
+ var terminator = jQuery(this).find('.wtitan-status-circular-terminator');
60
+ if (terminator.length === 0) {
61
+ terminator = document.createElementNS("http://www.w3.org/2000/svg", "path");
62
+ jQuery(terminator).addClass('wtitan-status-circular-terminator');
63
+ jQuery(svg).append(terminator);
64
+ }
65
+ var text = jQuery(this).find('.wtitan-status-circular-text');
66
+ if (text.length === 0) {
67
+ text = jQuery('<div class="wtitan-status-circular-text"></div>');
68
+ jQuery(this).append(text);
69
+ }
70
+ var pendingOverlay = jQuery(this).find('.wf-status-overlay-text');
71
+ if (pendingOverlay.length === 0 && opts.pendingMessage.length !== 0) {
72
+ pendingOverlay = jQuery('<div class="wf-status-overlay-text"></div>');
73
+ jQuery(this).append(pendingOverlay);
74
+ }
75
+
76
+ jQuery(svg).attr('viewBox', '0 0 ' + opts.diameter + ' ' + opts.diameter);
77
+ jQuery(svg).css('display', opts.css_display);
78
+ jQuery(svg).css('width', opts.diameter + 'px');
79
+ jQuery(svg).css('height', opts.diameter + 'px');
80
+ jQuery(inactivePath).attr('d', 'M ' + center + ',' + center + ' m 0,-' + insetRadius + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,' + (2 * insetRadius) + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,-' + (2 * insetRadius));
81
+ jQuery(inactivePath).attr('stroke', opts.inactiveColor);
82
+ jQuery(inactivePath).attr('stroke-width', opts.strokeWidth);
83
+ jQuery(inactivePath).attr('fill-opacity', 0);
84
+ jQuery(activePath).attr('d', 'M ' + center + ',' + center + ' m 0,-' + insetRadius + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,' + (2 * insetRadius) + ' a ' + insetRadius + ',' + insetRadius + ' 0 1 1 0,-' + (2 * insetRadius));
85
+ jQuery(activePath).attr('stroke', opts.color);
86
+ jQuery(activePath).attr('stroke-width', opts.strokeWidth);
87
+ jQuery(activePath).attr('stroke-dasharray', circumference + ',' + circumference);
88
+ jQuery(activePath).attr('stroke-dashoffset', initialOffset);
89
+ jQuery(activePath).attr('fill-opacity', 0);
90
+ jQuery(terminator).attr('d', 'M ' + initialTerminatorX + ',' + initialTerminatorY + ' ' + terminatorSVG);
91
+ jQuery(terminator).attr('stroke', opts.color);
92
+ jQuery(terminator).attr('stroke-width', opts.strokeWidth);
93
+ jQuery(terminator).attr('fill', '#ffffff');
94
+ jQuery(pendingOverlay).html(opts.pendingMessage);
95
+
96
+ jQuery(pendingOverlay).animate({
97
+ opacity: opts.pendingOverlay ? 1.0 : 0.0,
98
+ }, {
99
+ duration: 500,
100
+ step: function (value) {
101
+ var opacity = 1.0 - (value * 0.8);
102
+ jQuery(svg).css('opacity', opacity);
103
+ jQuery(text).css('opacity', opacity);
104
+ },
105
+ complete: function () {
106
+ jQuery(svg).css('opacity', opts.pendingOverlay ? 0.2 : 1.0);
107
+ jQuery(text).css('opacity', opts.pendingOverlay ? 0.2 : 1.0);
108
+ }
109
+ });
110
+
111
+ jQuery(activePath).animate({
112
+ "stroke-dashoffset": finalOffset + 'px'
113
+ }, {
114
+ duration: 500,
115
+ step: function (value) {
116
+ var percentage = 1 + value / circumference;
117
+ var x = center - insetRadius * Math.cos(Math.PI * 2 * (percentage - 0.25));
118
+ var y = center + insetRadius * Math.sin(Math.PI * 2 * (percentage - 0.25));
119
+ jQuery(terminator).attr('d', 'M ' + x + ',' + y + ' ' + terminatorSVG);
120
+ text.html(Math.round(percentage * 100) + '%');
121
+ },
122
+ complete: function () {
123
+ text.html(Math.round(opts.endPercent * 100) + '%');
124
+ }
125
+ });
126
+ });
127
+ };
128
+
129
+ jQuery.fn.wfCircularProgress.defaults = {
130
+ startPercent: 0,
131
+ endPercent: 1,
132
+ color: '#16bc9b',
133
+ inactiveColor: '#ececec',
134
+ strokeWidth: 3,
135
+ diameter: 100,
136
+ pendingOverlay: false,
137
+ pendingMessage: 'Note: Status will update when changes are saved',
138
+ css_display: 'block',
139
+ };
admin/assets/js/libs/popover.min.js CHANGED
@@ -1 +1 @@
1
- !function(a){var b="fu_popover",c=7,d={arrowShow:!0,autoHide:!1,autoHideDelay:2500,content:"",delay:{show:0,hide:0},dismissable:!1,placement:"bottom",themeName:"default",title:"",trigger:"click",width:"150px"},e=function(e,f){return this.element=a(e),this.popoverId=b+"_"+c++,this.options=a.extend({},d,f),this.options.autoHideDelay=void 0===this.options.autoHideDelay?0:this.options.autoHideDelay,this.options.delay.show=void 0===this.options.delay.show?0:this.options.delay.show,this.options.delay.hide=void 0===this.options.delay.hide?0:this.options.delay.hide,this.setStyles(),this.init(),this.initTriggers(),this};e.prototype.setStyles=function(){if("default"===this.options.themeName)if(a("#fu_popover_styles_default").length);else{var b=".fu_popover_"+this.options.themeName+" {position: absolute;background: #fff;border: 1px solid rgba(0, 0, 0, 0.2);border-radius: 6px;z-index: 1060;-webkit-background-clip: padding-box;background-clip: padding-box;border: 1px solid #cccccc;border: 1px solid rgba(0, 0, 0, 0.2);border-radius: 6px;-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);}";b+=".fu_popover_header_"+this.options.themeName+"{margin: 0;padding: 8px 14px;font-size: 14px;text-align: center;background-color: #f7f7f7;border-bottom: 1px solid #ebebeb;border-radius: 5px 5px 0 0;}.fu_popover_content_"+this.options.themeName+"{padding: 9px 14px;}",b+=".fu_popover_"+this.options.themeName+":after, .fu_popover_"+this.options.themeName+':before {border: solid transparent;content: " ";height: 0;width: 0;position: absolute;pointer-events: none;}.fu_popover_'+this.options.themeName+":after {border-color: rgba(255, 255, 255, 0);border-width: 10px;}.fu_popover_"+this.options.themeName+":before {border-color: rgba(0, 0, 0, 0);border-width: 11px;}",b+=".arrow_top_"+this.options.themeName+":after{left: 50%;bottom: 100%;border-bottom-color: #fff;margin-left: -10px;}.arrow_top_"+this.options.themeName+":before{left: 50%;bottom: 100%;border-bottom-color: rgba(0, 0, 0, 0.2);margin-left: -11px;}",b+=".arrow_bottom_"+this.options.themeName+":after{left: 50%;top: 100%;border-top-color: #fff;margin-left: -10px;}.arrow_bottom_"+this.options.themeName+":before{left: 50%;top: 100%;border-top-color: rgba(0, 0, 0, 0.2);margin-left: -11px;}",b+=".arrow_left_"+this.options.themeName+":after{right: 100%;top: 50%;border-right-color: #fff;margin-top: -10px;}.arrow_left_"+this.options.themeName+":before{right: 100%;top: 50%;border-right-color: rgba(0, 0, 0, 0.2);margin-top: -11px;}",b+=".arrow_right_"+this.options.themeName+":after{left: 100%;top: 50%;border-left-color: #fff;margin-top: -10px;}.arrow_right_"+this.options.themeName+":before{left: 100%;top: 50%;border-left-color: rgba(0, 0, 0, 0.2);margin-top: -11px;}",a("<style type='text/css' id='fu_popover_styles_default'>"+b+"</style>").appendTo("head"),b=".fu_progress{overflow: hidden;height: 20px;margin-bottom: 10px;background-color: #f5f5f5;border-radius: 4px;-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);}",b+=".fu_progress_bar{float: left;width: 0%;height: 100%;font-size: 12px;line-height: 20px;color: #ffffff;text-align: center;background-color: #337ab7;-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-transition: width 0.6s ease;-o-transition: width 0.6s ease;transition: width 0.6s ease;}",a("<style type='text/css'>"+b+"</style>").appendTo("head")}},e.prototype.init=function(){var a="";this.options.title.length>0&&(a='<div class="fu_popover_header_'+this.options.themeName+'">'+this.options.title+"</div>");var c='<div class="fu_popover_'+this.options.themeName+" "+this.getArrowClass()+'" id="'+this.popoverId+'" style="display:none;">'+a+'<div class="fu_popover_content_'+this.options.themeName+'">'+this.options.content+"</div></div>";this.options.dismissable===!0?this.initDismissableEvent():"",this.htmlStr=c},e.prototype.getArrowClass=function(){return"top"===this.options.placement?"arrow_bottom_"+this.options.themeName:"bottom"===this.options.placement?"arrow_top_"+this.options.themeName:"left"===this.options.placement?"arrow_right_"+this.options.themeName:"right"===this.options.placement?"arrow_left_"+this.options.themeName:""},e.prototype.initDismissableEvent=function(){var b=this.popoverId,c=this.options.delay.hide,d=this.element;a(document).mouseup(function(e){var f=a(d),g=a("#"+b);f.is(e.target)||0!==f.has(e.target).length||g.is(e.target)||0!==g.has(e.target).length||a("#"+b).hide(c)})},e.prototype.initTriggers=function(){var a=this.options.trigger.split(" ");a=jQuery.unique(a);for(var b=0;b<a.length;b++)"click"===a[b]?this.initClickTrigger():"hover"===a[b]?this.initHoverTrigger():"focus"===a[b]?this.initFocusTrigger():""},e.prototype.initClickTrigger=function(){var b=this.element;a("body").on("click","#"+this.element[0].id,function(){a(b).fu_popover("show")})},e.prototype.initHoverTrigger=function(){var b=this.element;a("body").on("mouseenter","#"+this.element[0].id,function(){a(b).fu_popover("show")})},e.prototype.initFocusTrigger=function(){var b=this.element;a("body").on("focus","#"+this.element[0].id,function(){a(b).fu_popover("show")})},e.prototype.display=function(b){var c=this.popoverId;if("show"===b){var d=this.options.delay.show,e=this.options.arrowShow;if(a("#"+c).length||a("body").append(this.htmlStr),setTimeout(function(){e||(a("#"+c).attr("class",""),a("#"+c).addClass("fu_popover_"+this.options.themeName)),a("#"+c).show()},d),this.setPopupPosition(),this.options.autoHide===!0){var f=this.options.autoHideDelay;f=0==f?2500:f,setTimeout(function(){a("#"+c).hide()},f)}}else"hide"===b?a("#"+c).hide(this.options.delay.hide):"destroy"===b&&(a("#"+c).remove(),a(this.element).removeData("fu_popover"),this.destroyTriggers())},e.prototype.getOffsetSum=function(a){for(var b=0,c=0;a;)b+=parseInt(a.offsetTop),c+=parseInt(a.offsetLeft),a=a.offsetParent;return{top:b,left:c}},e.prototype.getOffsetRect=function(a){var b=a.getBoundingClientRect(),c=document.body,d=document.documentElement,e=window.pageYOffset||d.scrollTop||c.scrollTop,f=window.pageXOffset||d.scrollLeft||c.scrollLeft,g=d.clientTop||c.clientTop||0,h=d.clientLeft||c.clientLeft||0,i=b.top+e-g,j=b.left+f-h;return{top:Math.round(i),left:Math.round(j)}},e.prototype.getOffset=function(a){return a.getBoundingClientRect?this.getOffsetRect(a):this.getOffsetSum(a)},e.prototype.setPopupPosition=function(){a("#"+this.popoverId).css({width:this.options.width});var j,k,b=this.getOffset(this.element[0]),d=(a("#"+this.popoverId).position(),a(this.element).outerWidth()),e=a(this.element).outerHeight(),f=b.left,g=b.top,h=a("#"+this.popoverId).outerWidth(),i=a("#"+this.popoverId).outerHeight();if("bottom"===this.options.placement||"top"===this.options.placement){var l=d/2,m=h/2;k="bottom"===this.options.placement?g+e+14:g-i-10;var n=f+l;j=n-m}else if("left"===this.options.placement||"right"===this.options.placement){var l=e/2,m=i/2;j="left"===this.options.placement?f-h-10:f+d+14;var o=g+l;k=o-m}a("#"+this.popoverId).css({left:j+"px",top:k+"px"})},e.prototype.destroyTriggers=function(){var b=this.options.trigger.split(" ");b=jQuery.unique(b);for(var c=0;c<b.length;c++)a("body").off("click","#"+this.element[0].id,function(){}),a("body").off("mouseenter","#"+this.element[0].id,function(){}),a("body").off("focus","#"+this.element[0].id,function(){})},a.fn.fu_popover=function(c){if("string"==typeof c){var d=a(this).data(b);if(jQuery.isEmptyObject(d))return this;d.display(c)}else if(!a.data(this,b)){var f=new e(this,c);return a("#"+f.element[0].id).data(b,f),a.data(this,b,f),this}}}(jQuery);
1
+ !function(a){var b="fu_popover",c=7,d={arrowShow:!0,autoHide:!1,autoHideDelay:2500,content:"",delay:{show:0,hide:0},dismissable:!1,placement:"bottom",themeName:"default",title:"",trigger:"click",width:"150px"},e=function(e,f){return this.element=a(e),this.popoverId=b+"_"+c++,this.options=a.extend({},d,f),this.options.autoHideDelay=void 0===this.options.autoHideDelay?0:this.options.autoHideDelay,this.options.delay.show=void 0===this.options.delay.show?0:this.options.delay.show,this.options.delay.hide=void 0===this.options.delay.hide?0:this.options.delay.hide,this.setStyles(),this.init(),this.initTriggers(),this};e.prototype.setStyles=function(){if("default"===this.options.themeName)if(a("#fu_popover_styles_default").length);else{var b=".fu_popover_"+this.options.themeName+" {position: absolute;background: #fff;border: 1px solid rgba(0, 0, 0, 0.2);border-radius: 6px;z-index: 1060;-webkit-background-clip: padding-box;background-clip: padding-box;border: 1px solid #cccccc;border: 1px solid rgba(0, 0, 0, 0.2);border-radius: 6px;-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);}";b+=".fu_popover_header_"+this.options.themeName+"{margin: 0;padding: 8px 14px;font-size: 14px;text-align: center;background-color: #f7f7f7;border-bottom: 1px solid #ebebeb;border-radius: 5px 5px 0 0;}.fu_popover_content_"+this.options.themeName+"{padding: 9px 14px;}",b+=".fu_popover_"+this.options.themeName+":after, .fu_popover_"+this.options.themeName+':before {border: solid transparent;content: " ";height: 0;width: 0;position: absolute;pointer-events: none;}.fu_popover_'+this.options.themeName+":after {border-color: rgba(255, 255, 255, 0);border-width: 10px;}.fu_popover_"+this.options.themeName+":before {border-color: rgba(0, 0, 0, 0);border-width: 11px;}",b+=".arrow_top_"+this.options.themeName+":after{left: 50%;bottom: 100%;border-bottom-color: #fff;margin-left: -10px;}.arrow_top_"+this.options.themeName+":before{left: 50%;bottom: 100%;border-bottom-color: rgba(0, 0, 0, 0.2);margin-left: -11px;}",b+=".arrow_bottom_"+this.options.themeName+":after{left: 50%;top: 100%;border-top-color: #fff;margin-left: -10px;}.arrow_bottom_"+this.options.themeName+":before{left: 50%;top: 100%;border-top-color: rgba(0, 0, 0, 0.2);margin-left: -11px;}",b+=".arrow_left_"+this.options.themeName+":after{right: 100%;top: 50%;border-right-color: #fff;margin-top: -10px;}.arrow_left_"+this.options.themeName+":before{right: 100%;top: 50%;border-right-color: rgba(0, 0, 0, 0.2);margin-top: -11px;}",b+=".arrow_right_"+this.options.themeName+":after{left: 100%;top: 50%;border-left-color: #fff;margin-top: -10px;}.arrow_right_"+this.options.themeName+":before{left: 100%;top: 50%;border-left-color: rgba(0, 0, 0, 0.2);margin-top: -11px;}",a("<style type='text/css' id='fu_popover_styles_default'>"+b+"</style>").appendTo("head"),b=".fu_progress{overflow: hidden;height: 20px;margin-bottom: 10px;background-color: #f5f5f5;border-radius: 4px;-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);}",b+=".fu_progress_bar{float: left;width: 0%;height: 100%;font-size: 12px;line-height: 20px;color: #ffffff;text-align: center;background-color: #337ab7;-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-transition: width 0.6s ease;-o-transition: width 0.6s ease;transition: width 0.6s ease;}",a("<style type='text/css'>"+b+"</style>").appendTo("head")}},e.prototype.init=function(){var a="";this.options.title.length>0&&(a='<div class="fu_popover_header_'+this.options.themeName+'">'+this.options.title+"</div>");var c='<div class="fu_popover_'+this.options.themeName+" "+this.getArrowClass()+'" id="'+this.popoverId+'" style="display:none;">'+a+'<div class="fu_popover_content_'+this.options.themeName+'">'+this.options.content+"</div></div>";this.options.dismissable===!0?this.initDismissableEvent():"",this.htmlStr=c},e.prototype.getArrowClass=function(){return"top"===this.options.placement?"arrow_bottom_"+this.options.themeName:"bottom"===this.options.placement?"arrow_top_"+this.options.themeName:"left"===this.options.placement?"arrow_right_"+this.options.themeName:"right"===this.options.placement?"arrow_left_"+this.options.themeName:""},e.prototype.initDismissableEvent=function(){var b=this.popoverId,c=this.options.delay.hide,d=this.element;a(document).mouseup(function(e){var f=a(d),g=a("#"+b);f.is(e.target)||0!==f.has(e.target).length||g.is(e.target)||0!==g.has(e.target).length||a("#"+b).hide(c)})},e.prototype.initTriggers=function(){var a=this.options.trigger.split(" ");a=jQuery.unique(a);for(var b=0;b<a.length;b++)"click"===a[b]?this.initClickTrigger():"hover"===a[b]?this.initHoverTrigger():"focus"===a[b]?this.initFocusTrigger():""},e.prototype.initClickTrigger=function(){var b=this.element;a("body").on("click","#"+this.element[0].id,function(){a(b).fu_popover("show")})},e.prototype.initHoverTrigger=function(){var b=this.element;a("body").on("mouseenter","#"+this.element[0].id,function(){a(b).fu_popover("show")})},e.prototype.initFocusTrigger=function(){var b=this.element;a("body").on("focus","#"+this.element[0].id,function(){a(b).fu_popover("show")})},e.prototype.display=function(b){var c=this.popoverId;if("show"===b){var d=this.options.delay.show,e=this.options.arrowShow;if(a("#"+c).length||a("body").append(this.htmlStr),setTimeout(function(){e||(a("#"+c).attr("class",""),a("#"+c).addClass("fu_popover_"+this.options.themeName)),a("#"+c).show()},d),this.setPopupPosition(),this.options.autoHide===!0){var f=this.options.autoHideDelay;f=0==f?2500:f,setTimeout(function(){a("#"+c).hide()},f)}}else"hide"===b?a("#"+c).hide(this.options.delay.hide):"destroy"===b&&(a("#"+c).remove(),a(this.element).removeData("fu_popover"),this.destroyTriggers())},e.prototype.getOffsetSum=function(a){for(var b=0,c=0;a;)b+=parseInt(a.offsetTop),c+=parseInt(a.offsetLeft),a=a.offsetParent;return{top:b,left:c}},e.prototype.getOffsetRect=function(a){var b=a.getBoundingClientRect(),c=document.body,d=document.documentElement,e=window.pageYOffset||d.scrollTop||c.scrollTop,f=window.pageXOffset||d.scrollLeft||c.scrollLeft,g=d.clientTop||c.clientTop||0,h=d.clientLeft||c.clientLeft||0,i=b.top+e-g,j=b.left+f-h;return{top:Math.round(i),left:Math.round(j)}},e.prototype.getOffset=function(a){return a.getBoundingClientRect?this.getOffsetRect(a):this.getOffsetSum(a)},e.prototype.setPopupPosition=function(){a("#"+this.popoverId).css({width:this.options.width});var j,k,b=this.getOffset(this.element[0]),d=(a("#"+this.popoverId).position(),a(this.element).outerWidth()),e=a(this.element).outerHeight(),f=b.left,g=b.top,h=a("#"+this.popoverId).outerWidth(),i=a("#"+this.popoverId).outerHeight();if("bottom"===this.options.placement||"top"===this.options.placement){var l=d/2,m=h/2;k="bottom"===this.options.placement?g+e+14:g-i-10;var n=f+l;j=n-m}else if("left"===this.options.placement||"right"===this.options.placement){var l=e/2,m=i/2;j="left"===this.options.placement?f-h-10:f+d+14;var o=g+l;k=o-m}a("#"+this.popoverId).css({left:j+"px",top:k+"px"})},e.prototype.destroyTriggers=function(){var b=this.options.trigger.split(" ");b=jQuery.unique(b);for(var c=0;c<b.length;c++)a("body").off("click","#"+this.element[0].id,function(){}),a("body").off("mouseenter","#"+this.element[0].id,function(){}),a("body").off("focus","#"+this.element[0].id,function(){})},a.fn.fu_popover=function(c){if("string"==typeof c){var d=a(this).data(b);if(jQuery.isEmptyObject(d))return this;d.display(c)}else if(!a.data(this,b)){var f=new e(this,c);return a("#"+f.element[0].id).data(b,f),a.data(this,b,f),this}}}(jQuery);
admin/assets/js/libs/sweetalert3.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function a(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e,n){return(l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return n&&u(i,n.prototype),i}).apply(null,arguments)}function d(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t,e,n){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var o=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function f(e){return Object.keys(e).map(function(t){return e[t]})}function m(t){return Array.prototype.slice.call(t)}function h(t){console.error("".concat(N," ").concat(t))}function g(t,e){!function(t){-1===U.indexOf(t)&&(U.push(t),D(t))}('"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'))}function v(t){return t&&Promise.resolve(t)===t}function b(t){return t instanceof Element||function(t){return"object"===r(t)&&t.jquery}(t)}function t(t){var e={};for(var n in t)e[t[n]]="swal2-"+t[n];return e}function y(){return document.body.querySelector(".".concat(z.container))}function w(t){var e=y();return e?e.querySelector(t):null}function e(t){return w(".".concat(t))}function C(){return e(z.popup)}function n(){var t=C();return m(t.querySelectorAll(".".concat(z.icon)))}function k(){var t=n().filter(function(t){return dt(t)});return t.length?t[0]:null}function x(){return e(z.title)}function A(){return e(z.content)}function P(){return e(z.image)}function B(){return e(z["progress-steps"])}function E(){return e(z["validation-message"])}function S(){return w(".".concat(z.actions," .").concat(z.confirm))}function T(){return w(".".concat(z.actions," .").concat(z.cancel))}function L(){return e(z.actions)}function O(){return e(z.header)}function M(){return e(z.footer)}function H(){return e(z["timer-progress-bar"])}function j(){return e(z.close)}function V(){var t=m(C().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t,e){return t=parseInt(t.getAttribute("tabindex")),(e=parseInt(e.getAttribute("tabindex")))<t?1:t<e?-1:0}),e=m(C().querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n')).filter(function(t){return"-1"!==t.getAttribute("tabindex")});return function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(t.concat(e)).filter(function(t){return dt(t)})}function I(){return!K()&&!document.body.classList.contains(z["no-backdrop"])}function q(t,e){if(!e)return!1;for(var n=e.split(/\s+/),o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0}function R(t,e,n){if(!function(e,n){m(e.classList).forEach(function(t){-1===f(z).indexOf(t)&&-1===f(W).indexOf(t)&&-1===f(n.showClass).indexOf(t)&&e.classList.remove(t)})}(t,e),e.customClass&&e.customClass[n]){if("string"!=typeof e.customClass[n]&&!e.customClass[n].forEach)return D("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(r(e.customClass[n]),'"'));st(t,e.customClass[n])}}var N="SweetAlert2:",D=function(t){console.warn("".concat(N," ").concat(t))},U=[],F=function(t){return"function"==typeof t?t():t},_=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),z=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","toast","toast-shown","toast-column","show","hide","close","title","header","content","html-container","actions","confirm","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),W=t(["success","warning","info","question","error"]),K=function(){return document.body.classList.contains(z["toast-shown"])},Y={previousBodyPadding:null};function Z(t,e){if(!e)return null;switch(e){case"select":case"textarea":case"file":return lt(t,z[e]);case"checkbox":return t.querySelector(".".concat(z.checkbox," input"));case"radio":return t.querySelector(".".concat(z.radio," input:checked"))||t.querySelector(".".concat(z.radio," input:first-child"));case"range":return t.querySelector(".".concat(z.range," input"));default:return lt(t,z.input)}}function Q(t){if(t.focus(),"file"!==t.type){var e=t.value;t.value="",t.value=e}}function $(t,e,n){t&&e&&("string"==typeof e&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(function(e){t.forEach?t.forEach(function(t){n?t.classList.add(e):t.classList.remove(e)}):n?t.classList.add(e):t.classList.remove(e)}))}function J(t,e,n){n||0===parseInt(n)?t.style[e]="number"==typeof n?"".concat(n,"px"):n:t.style.removeProperty(e)}function X(t,e){var n=1<arguments.length&&void 0!==e?e:"flex";t.style.opacity="",t.style.display=n}function G(t){t.style.opacity="",t.style.display="none"}function tt(t,e,n){e?X(t,n):G(t)}function et(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return 0<n||0<o}function nt(t,e){var n=1<arguments.length&&void 0!==e&&e,o=H();dt(o)&&(n&&(o.style.transition="none",o.style.width="100%"),setTimeout(function(){o.style.transition="width ".concat(t/1e3,"s linear"),o.style.width="0%"},10))}function ot(){return"undefined"==typeof window||"undefined"==typeof document}function it(t){Je.isVisible()&&ct!==t.target.value&&Je.resetValidationMessage(),ct=t.target.value}function rt(t,e){t instanceof HTMLElement?e.appendChild(t):"object"===r(t)?mt(e,t):t&&(e.innerHTML=t)}function at(t,e){var n=L(),o=S(),i=T();e.showConfirmButton||e.showCancelButton||G(n),R(n,e,"actions"),gt(o,"confirm",e),gt(i,"cancel",e),e.buttonsStyling?function(t,e,n){st([t,e],z.styled),n.confirmButtonColor&&(t.style.backgroundColor=n.confirmButtonColor);n.cancelButtonColor&&(e.style.backgroundColor=n.cancelButtonColor);var o=window.getComputedStyle(t).getPropertyValue("background-color");t.style.borderLeftColor=o,t.style.borderRightColor=o}(o,i,e):(ut([o,i],z.styled),o.style.backgroundColor=o.style.borderLeftColor=o.style.borderRightColor="",i.style.backgroundColor=i.style.borderLeftColor=i.style.borderRightColor=""),e.reverseButtons&&o.parentNode.insertBefore(i,o)}var ct,st=function(t,e){$(t,e,!0)},ut=function(t,e){$(t,e,!1)},lt=function(t,e){for(var n=0;n<t.childNodes.length;n++)if(q(t.childNodes[n],e))return t.childNodes[n]},dt=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},pt='\n <div aria-labelledby="'.concat(z.title,'" aria-describedby="').concat(z.content,'" class="').concat(z.popup,'" tabindex="-1">\n <div class="').concat(z.header,'">\n <ul class="').concat(z["progress-steps"],'"></ul>\n <div class="').concat(z.icon," ").concat(W.error,'"></div>\n <div class="').concat(z.icon," ").concat(W.question,'"></div>\n <div class="').concat(z.icon," ").concat(W.warning,'"></div>\n <div class="').concat(z.icon," ").concat(W.info,'"></div>\n <div class="').concat(z.icon," ").concat(W.success,'"></div>\n <img class="').concat(z.image,'" />\n <h2 class="').concat(z.title,'" id="').concat(z.title,'"></h2>\n <button type="button" class="').concat(z.close,'"></button>\n </div>\n <div class="').concat(z.content,'">\n <div id="').concat(z.content,'" class="').concat(z["html-container"],'"></div>\n <input class="').concat(z.input,'" />\n <input type="file" class="').concat(z.file,'" />\n <div class="').concat(z.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat(z.select,'"></select>\n <div class="').concat(z.radio,'"></div>\n <label for="').concat(z.checkbox,'" class="').concat(z.checkbox,'">\n <input type="checkbox" />\n <span class="').concat(z.label,'"></span>\n </label>\n <textarea class="').concat(z.textarea,'"></textarea>\n <div class="').concat(z["validation-message"],'" id="').concat(z["validation-message"],'"></div>\n </div>\n <div class="').concat(z.actions,'">\n <button type="button" class="').concat(z.confirm,'">OK</button>\n <button type="button" class="').concat(z.cancel,'">Cancel</button>\n </div>\n <div class="').concat(z.footer,'"></div>\n <div class="').concat(z["timer-progress-bar"],'"></div>\n </div>\n').replace(/(^|\n)\s*/g,""),ft=function(t){if(!function(){var t=y();t&&(t.parentNode.removeChild(t),ut([document.documentElement,document.body],[z["no-backdrop"],z["toast-shown"],z["has-column"]]))}(),ot())h("SweetAlert2 requires document to initialize");else{var e=document.createElement("div");e.className=z.container,e.innerHTML=pt;var n=function(t){return"string"==typeof t?document.querySelector(t):t}(t.target);n.appendChild(e),function(t){var e=C();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")}(t),function(t){"rtl"===window.getComputedStyle(t).direction&&st(y(),z.rtl)}(n),function(){var t=A(),e=lt(t,z.input),n=lt(t,z.file),o=t.querySelector(".".concat(z.range," input")),i=t.querySelector(".".concat(z.range," output")),r=lt(t,z.select),a=t.querySelector(".".concat(z.checkbox," input")),c=lt(t,z.textarea);e.oninput=it,n.onchange=it,r.onchange=it,a.onchange=it,c.oninput=it,o.oninput=function(t){it(t),i.value=o.value},o.onchange=function(t){it(t),o.nextSibling.value=o.value}}()}},mt=function(t,e){if(t.innerHTML="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},ht=function(){if(ot())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}();function gt(t,e,n){tt(t,n["show".concat(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(e),"Button")],"inline-block"),t.innerHTML=n["".concat(e,"ButtonText")],t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=z[e],R(t,n,"".concat(e,"Button")),st(t,n["".concat(e,"ButtonClass")])}function vt(t,e){var n=y();if(n){!function(t,e){"string"==typeof e?t.style.background=e:e||st([document.documentElement,document.body],z["no-backdrop"])}(n,e.backdrop),!e.backdrop&&e.allowOutsideClick&&D('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),function(t,e){e in z?st(t,z[e]):(D('The "position" parameter is not valid, defaulting to "center"'),st(t,z.center))}(n,e.position),function(t,e){if(e&&"string"==typeof e){var n="grow-".concat(e);n in z&&st(t,z[n])}}(n,e.grow),R(n,e,"container");var o=document.body.getAttribute("data-swal2-queue-step");o&&(n.setAttribute("data-queue-step",o),document.body.removeAttribute("data-swal2-queue-step"))}}function bt(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var yt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},wt=["input","file","range","select","radio","checkbox","textarea"],Ct=function(t){if(!Pt[t.input])return h('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=At(t.input),n=Pt[t.input](e,t);X(n),setTimeout(function(){Q(n)})},kt=function(t,e){var n=Z(A(),t);if(n)for(var o in!function(t){for(var e=0;e<t.attributes.length;e++){var n=t.attributes[e].name;-1===["type","value","style"].indexOf(n)&&t.removeAttribute(n)}}(n),e)"range"===t&&"placeholder"===o||n.setAttribute(o,e[o])},xt=function(t){var e=At(t.input);t.customClass&&st(e,t.customClass.input)},At=function(t){var e=z[t]?z[t]:z.input;return lt(A(),e)},Pt={};Pt.text=Pt.email=Pt.password=Pt.number=Pt.tel=Pt.url=function(t,e){return"string"==typeof e.inputValue||"number"==typeof e.inputValue?t.value=e.inputValue:v(e.inputValue)||D('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(r(e.inputValue),'"')),bt(t,e),t.type=e.input,t},Pt.file=function(t,e){return bt(t,e),t},Pt.range=function(t,e){var n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,t},Pt.select=function(t,e){if(t.innerHTML="",e.inputPlaceholder){var n=document.createElement("option");n.innerHTML=e.inputPlaceholder,n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return t},Pt.radio=function(t){return t.innerHTML="",t},Pt.checkbox=function(t,e){var n=Z(A(),"checkbox");return n.value=1,n.id=z.checkbox,n.checked=Boolean(e.inputValue),t.querySelector("span").innerHTML=e.inputPlaceholder,t},Pt.textarea=function(e,t){if(e.value=t.inputValue,bt(e,t),"MutationObserver"in window){var n=parseInt(window.getComputedStyle(C()).width),o=parseInt(window.getComputedStyle(C()).paddingLeft)+parseInt(window.getComputedStyle(C()).paddingRight);new MutationObserver(function(){var t=e.offsetWidth+o;C().style.width=n<t?"".concat(t,"px"):null}).observe(e,{attributes:!0,attributeFilter:["style"]})}return e};function Bt(t,e){var n=A().querySelector("#".concat(z.content));e.html?(rt(e.html,n),X(n,"block")):e.text?(n.textContent=e.text,X(n,"block")):G(n),function(t,o){var i=A(),e=yt.innerParams.get(t),r=!e||o.input!==e.input;wt.forEach(function(t){var e=z[t],n=lt(i,e);kt(t,o.inputAttributes),n.className=e,r&&G(n)}),o.input&&(r&&Ct(o),xt(o))}(t,e),R(A(),e,"content")}function Et(){return y().getAttribute("data-queue-step")}function St(t,i){var r=B();if(!i.progressSteps||0===i.progressSteps.length)return G(r);X(r),r.innerHTML="";var a=parseInt(void 0===i.currentProgressStep?Et():i.currentProgressStep);a>=i.progressSteps.length&&D("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),i.progressSteps.forEach(function(t,e){var n=function(t){var e=document.createElement("li");return st(e,z["progress-step"]),e.innerHTML=t,e}(t);if(r.appendChild(n),e===a&&st(n,z["active-progress-step"]),e!==i.progressSteps.length-1){var o=function(t){var e=document.createElement("li");return st(e,z["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e}(t);r.appendChild(o)}})}function Tt(t,e){var n=O();R(n,e,"header"),St(0,e),function(t,e){var n=yt.innerParams.get(t);if(n&&e.icon===n.icon&&k())R(k(),e,"icon");else if(Mt(),e.icon)if(-1!==Object.keys(W).indexOf(e.icon)){var o=w(".".concat(z.icon,".").concat(W[e.icon]));X(o),jt(o,e),Ht(),R(o,e,"icon"),st(o,e.showClass.icon)}else h('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"'))}(t,e),function(t,e){var n=P();if(!e.imageUrl)return G(n);X(n),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),J(n,"width",e.imageWidth),J(n,"height",e.imageHeight),n.className=z.image,R(n,e,"image")}(0,e),function(t,e){var n=x();tt(n,e.title||e.titleText),e.title&&rt(e.title,n),e.titleText&&(n.innerText=e.titleText),R(n,e,"title")}(0,e),function(t,e){var n=j();n.innerHTML=e.closeButtonHtml,R(n,e,"closeButton"),tt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)}(0,e)}function Lt(t,e){!function(t,e){var n=C();J(n,"width",e.width),J(n,"padding",e.padding),e.background&&(n.style.background=e.background),qt(n,e)}(0,e),vt(0,e),Tt(t,e),Bt(t,e),at(0,e),function(t,e){var n=M();tt(n,e.footer),e.footer&&rt(e.footer,n),R(n,e,"footer")}(0,e),"function"==typeof e.onRender&&e.onRender(C())}function Ot(){return S()&&S().click()}var Mt=function(){for(var t=n(),e=0;e<t.length;e++)G(t[e])},Ht=function(){for(var t=C(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),o=0;o<n.length;o++)n[o].style.backgroundColor=e},jt=function(t,e){if(t.innerHTML="",e.iconHtml)t.innerHTML=Vt(e.iconHtml);else if("success"===e.icon)t.innerHTML='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n ';else if("error"===e.icon)t.innerHTML='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n ';else{t.innerHTML=Vt({question:"?",warning:"!",info:"i"}[e.icon])}},Vt=function(t){return'<div class="'.concat(z["icon-content"],'">').concat(t,"</div>")},It=[],qt=function(t,e){t.className="".concat(z.popup," ").concat(dt(t)?e.showClass.popup:""),e.toast?(st([document.documentElement,document.body],z["toast-shown"]),st(t,z.toast)):st(t,z.modal),R(t,e,"popup"),"string"==typeof e.customClass&&st(t,e.customClass),e.icon&&st(t,z["icon-".concat(e.icon)])};function Rt(){var t=C();t||Je.fire(),t=C();var e=L(),n=S();X(e),X(n,"inline-block"),st([t,e],z.loading),n.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function Nt(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;zt.restoreFocusTimeout=setTimeout(function(){zt.previousActiveElement&&zt.previousActiveElement.focus?(zt.previousActiveElement.focus(),zt.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function Dt(){if(zt.timeout)return function(){var t=H(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var n=parseInt(window.getComputedStyle(t).width),o=parseInt(e/n*100);t.style.removeProperty("transition"),t.style.width="".concat(o,"%")}(),zt.timeout.stop()}function Ut(){if(zt.timeout){var t=zt.timeout.start();return nt(t),t}}function Ft(t){return Object.prototype.hasOwnProperty.call(Wt,t)}function _t(t){return Yt[t]}var zt={},Wt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,scrollbarPadding:!0},Kt=["title","titleText","text","html","icon","customClass","showConfirmButton","showCancelButton","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","imageUrl","imageWidth","imageHeight","imageAlt","progressSteps","currentProgressStep"],Yt={animation:'showClass" and "hideClass'},Zt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],Qt=Object.freeze({isValidParameter:Ft,isUpdatableParameter:function(t){return-1!==Kt.indexOf(t)},isDeprecatedParameter:_t,argsToParams:function(o){var i={};return"object"!==r(o[0])||b(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||b(n)?i[t]=n:void 0!==n&&h("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):c(i,o[0]),i},isVisible:function(){return dt(C())},clickConfirm:Ot,clickCancel:function(){return T()&&T().click()},getContainer:y,getPopup:C,getTitle:x,getContent:A,getHtmlContainer:function(){return e(z["html-container"])},getImage:P,getIcon:k,getIcons:n,getCloseButton:j,getActions:L,getConfirmButton:S,getCancelButton:T,getHeader:O,getFooter:M,getFocusableElements:V,getValidationMessage:E,isLoading:function(){return C().hasAttribute("data-loading")},fire:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l(this,e)},mixin:function(n){return function(t){function e(){return o(this,e),d(this,s(e).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,t),a(e,[{key:"_main",value:function(t){return p(s(e.prototype),"_main",this).call(this,c({},n,t))}}]),e}(this)},queue:function(t){var r=this;It=t;function a(t,e){It=[],t(e)}var c=[];return new Promise(function(i){!function e(n,o){n<It.length?(document.body.setAttribute("data-swal2-queue-step",n),r.fire(It[n]).then(function(t){void 0!==t.value?(c.push(t.value),e(n+1,o)):a(i,{dismiss:t.dismiss})})):a(i,{value:c})}(0)})},getQueueStep:Et,insertQueueStep:function(t,e){return e&&e<It.length?It.splice(e,0,t):It.push(t)},deleteQueueStep:function(t){void 0!==It[t]&&It.splice(t,1)},showLoading:Rt,enableLoading:Rt,getTimerLeft:function(){return zt.timeout&&zt.timeout.getTimerLeft()},stopTimer:Dt,resumeTimer:Ut,toggleTimer:function(){var t=zt.timeout;return t&&(t.running?Dt():Ut())},increaseTimer:function(t){if(zt.timeout){var e=zt.timeout.increase(t);return nt(e,!0),e}},isTimerRunning:function(){return zt.timeout&&zt.timeout.isRunning()}});function $t(){var t=yt.innerParams.get(this);if(t){var e=yt.domCache.get(this);t.showConfirmButton||(G(e.confirmButton),t.showCancelButton||G(e.actions)),ut([e.popup,e.actions],z.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.cancelButton.disabled=!1}}function Jt(){null===Y.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(Y.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(Y.previousBodyPadding+function(){var t=document.createElement("div");t.className=z["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function Xt(){return!!window.MSInputMethodContext&&!!document.documentMode}function Gt(){var t=y(),e=C();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var te=function(){var e,n=y();n.ontouchstart=function(t){e=t.target===n||!function(t){return!!(t.scrollHeight>t.clientHeight)}(n)&&"INPUT"!==t.target.tagName},n.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},ee={swalPromiseResolve:new WeakMap};function ne(t,e,n,o){n?ae(t,o):(Nt().then(function(){return ae(t,o)}),zt.keydownTarget.removeEventListener("keydown",zt.keydownHandler,{capture:zt.keydownListenerCapture}),zt.keydownHandlerAdded=!1),e.parentNode&&e.parentNode.removeChild(e),I()&&(null!==Y.previousBodyPadding&&(document.body.style.paddingRight="".concat(Y.previousBodyPadding,"px"),Y.previousBodyPadding=null),function(){if(q(document.body,z.iosfix)){var t=parseInt(document.body.style.top,10);ut(document.body,z.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}}(),"undefined"!=typeof window&&Xt()&&window.removeEventListener("resize",Gt),m(document.body.children).forEach(function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")})),ut([document.documentElement,document.body],[z.shown,z["height-auto"],z["no-backdrop"],z["toast-shown"],z["toast-column"]])}function oe(t){var e=C();if(e){var n=yt.innerParams.get(this);if(n&&!q(e,n.hideClass.popup)){var o=ee.swalPromiseResolve.get(this);ut(e,n.showClass.popup),st(e,n.hideClass.popup);var i=y();ut(i,n.showClass.backdrop),st(i,n.hideClass.backdrop),function(t,e,n){var o=y(),i=ht&&et(e),r=n.onClose,a=n.onAfterClose;if(r!==null&&typeof r==="function"){r(e)}if(i){re(t,e,o,a)}else{ne(t,o,K(),a)}}(this,e,n),o(t||{})}}}function ie(t){for(var e in t)t[e]=new WeakMap}var re=function(t,e,n,o){zt.swalCloseEventFinishedCallback=ne.bind(null,t,n,K(),o),e.addEventListener(ht,function(t){t.target===e&&(zt.swalCloseEventFinishedCallback(),delete zt.swalCloseEventFinishedCallback)})},ae=function(t,e){setTimeout(function(){null!==e&&"function"==typeof e&&e(),C()||function(t){delete t.params,delete zt.keydownHandler,delete zt.keydownTarget,ie(yt),ie(ee)}(t)})};function ce(t,e,n){var o=yt.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function se(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o<n.length;o++)n[o].disabled=e;else t.disabled=e}var ue=function(){function n(t,e){o(this,n),this.callback=t,this.remaining=e,this.running=!1,this.start()}return a(n,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}},{key:"increase",value:function(t){var e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),n}(),le={email:function(t,e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}};function de(t){!function(e){e.inputValidator||Object.keys(le).forEach(function(t){e.input===t&&(e.inputValidator=le[t])})}(t),t.showLoaderOnConfirm&&!t.preConfirm&&D("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),t.animation=F(t.animation),function(t){t.target&&("string"!=typeof t.target||document.querySelector(t.target))&&("string"==typeof t.target||t.target.appendChild)||(D('Target parameter is not valid, defaulting to "body"'),t.target="body")}(t),"string"==typeof t.title&&(t.title=t.title.split("\n").join("<br />")),ft(t)}function pe(t,e){t.removeEventListener(ht,pe),e.style.overflowY="auto"}function fe(t){var e=y(),n=C();"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n),xe(e,n,t),Ce(e,n),I()&&ke(e,t.scrollbarPadding),K()||zt.previousActiveElement||(zt.previousActiveElement=document.activeElement),"function"==typeof t.onOpen&&setTimeout(function(){return t.onOpen(n)})}function me(t,e){"select"===e.input||"radio"===e.input?Ee(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&v(e.inputValue)&&Se(t,e)}function he(t,e){t.disableButtons(),e.input?Oe(t,e):Me(t,e,!0)}function ge(t,e){t.disableButtons(),e(_.cancel)}function ve(t,e){t.closePopup({value:e})}function be(e,t,n,o){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1),n.toast||(t.keydownHandler=function(t){return Ve(e,t,n,o)},t.keydownTarget=n.keydownListenerCapture?window:C(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function ye(t,e,n){for(var o=V(),i=0;i<o.length;i++)return(e+=n)===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus();C().focus()}function we(t,e,n){e.toast?De(t,e,n):(Fe(t),_e(t),ze(t,e,n))}var Ce=function(e,n){ht&&et(n)?(e.style.overflowY="hidden",n.addEventListener(ht,function(t){t.target===n&&pe.bind(null,n,e)})):e.style.overflowY="auto"},ke=function(t,e){!function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints)&&!q(document.body,z.iosfix)){var t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),st(document.body,z.iosfix),te()}}(),"undefined"!=typeof window&&Xt()&&(Gt(),window.addEventListener("resize",Gt)),m(document.body.children).forEach(function(t){t===y()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,y())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}),e&&Jt(),setTimeout(function(){t.scrollTop=0})},xe=function(t,e,n){st(t,n.showClass.backdrop),X(e),st(e,n.showClass.popup),st([document.documentElement,document.body],z.shown),n.heightAuto&&n.backdrop&&!n.toast&&st([document.documentElement,document.body],z["height-auto"])},Ae=function(t){return t.checked?1:0},Pe=function(t){return t.checked?t.value:null},Be=function(t){return t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null},Ee=function(e,n){function o(t){return Te[n.input](i,Le(t),n)}var i=A();v(n.inputOptions)?(Rt(),n.inputOptions.then(function(t){e.hideLoading(),o(t)})):"object"===r(n.inputOptions)?o(n.inputOptions):h("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(r(n.inputOptions)))},Se=function(e,n){var o=e.getInput();G(o),n.inputValue.then(function(t){o.value="number"===n.input?parseFloat(t)||0:"".concat(t),X(o),o.focus(),e.hideLoading()}).catch(function(t){h("Error in inputValue promise: ".concat(t)),o.value="",X(o),o.focus(),e.hideLoading()})},Te={select:function(t,e,i){var r=lt(t,z.select);e.forEach(function(t){var e=t[0],n=t[1],o=document.createElement("option");o.value=e,o.innerHTML=n,i.inputValue.toString()===e.toString()&&(o.selected=!0),r.appendChild(o)}),r.focus()},radio:function(t,e,a){var c=lt(t,z.radio);e.forEach(function(t){var e=t[0],n=t[1],o=document.createElement("input"),i=document.createElement("label");o.type="radio",o.name=z.radio,o.value=e,a.inputValue.toString()===e.toString()&&(o.checked=!0);var r=document.createElement("span");r.innerHTML=n,r.className=z.label,i.appendChild(o),i.appendChild(r),c.appendChild(i)});var n=c.querySelectorAll("input");n.length&&n[0].focus()}},Le=function(e){var n=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(function(t,e){n.push([e,t])}):Object.keys(e).forEach(function(t){n.push([t,e[t]])}),n},Oe=function(e,n){var o=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Ae(n);case"radio":return Pe(n);case"file":return Be(n);default:return e.inputAutoTrim?n.value.trim():n.value}}(e,n);n.inputValidator?(e.disableInput(),Promise.resolve().then(function(){return n.inputValidator(o,n.validationMessage)}).then(function(t){e.enableButtons(),e.enableInput(),t?e.showValidationMessage(t):Me(e,n,o)})):e.getInput().checkValidity()?Me(e,n,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Me=function(e,t,n){(t.showLoaderOnConfirm&&Rt(),t.preConfirm)?(e.resetValidationMessage(),Promise.resolve().then(function(){return t.preConfirm(n,t.validationMessage)}).then(function(t){dt(E())||!1===t?e.hideLoading():ve(e,void 0===t?n:t)})):ve(e,n)},He=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"],je=["Escape","Esc"],Ve=function(t,e,n,o){n.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?Ie(t,e,n):"Tab"===e.key?qe(e,n):-1!==He.indexOf(e.key)?Re():-1!==je.indexOf(e.key)&&Ne(e,n,o)},Ie=function(t,e,n){if(!e.isComposing&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(n.input))return;Ot(),e.preventDefault()}},qe=function(t){for(var e=t.target,n=V(),o=-1,i=0;i<n.length;i++)if(e===n[i]){o=i;break}t.shiftKey?ye(0,o,-1):ye(0,o,1),t.stopPropagation(),t.preventDefault()},Re=function(){var t=S(),e=T();document.activeElement===t&&dt(e)?e.focus():document.activeElement===e&&dt(t)&&t.focus()},Ne=function(t,e,n){F(e.allowEscapeKey)&&(t.preventDefault(),n(_.esc))},De=function(t,e,n){t.popup.onclick=function(){e.showConfirmButton||e.showCancelButton||e.showCloseButton||e.input||n(_.close)}},Ue=!1,Fe=function(e){e.popup.onmousedown=function(){e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Ue=!0)}}},_e=function(e){e.container.onmousedown=function(){e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,t.target!==e.popup&&!e.popup.contains(t.target)||(Ue=!0)}}},ze=function(e,n,o){e.container.onclick=function(t){Ue?Ue=!1:t.target===e.container&&F(n.allowOutsideClick)&&o(_.backdrop)}};var We=function(t,e,n){var o=H();G(o),e.timer&&(t.timeout=new ue(function(){n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(X(o),setTimeout(function(){nt(e.timer)})))},Ke=function(t,e){if(!e.toast)return F(e.allowEnterKey)?e.focusCancel&&dt(t.cancelButton)?t.cancelButton.focus():e.focusConfirm&&dt(t.confirmButton)?t.confirmButton.focus():void ye(0,-1,1):Ye()},Ye=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};var Ze,Qe=Object.freeze({hideLoading:$t,disableLoading:$t,getInput:function(t){var e=yt.innerParams.get(t||this),n=yt.domCache.get(t||this);return n?Z(n.content,e.input):null},close:oe,closePopup:oe,closeModal:oe,closeToast:oe,enableButtons:function(){ce(this,["confirmButton","cancelButton"],!1)},disableButtons:function(){ce(this,["confirmButton","cancelButton"],!0)},enableInput:function(){return se(this.getInput(),!1)},disableInput:function(){return se(this.getInput(),!0)},showValidationMessage:function(t){var e=yt.domCache.get(this);e.validationMessage.innerHTML=t;var n=window.getComputedStyle(e.popup);e.validationMessage.style.marginLeft="-".concat(n.getPropertyValue("padding-left")),e.validationMessage.style.marginRight="-".concat(n.getPropertyValue("padding-right")),X(e.validationMessage);var o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedBy",z["validation-message"]),Q(o),st(o,z.inputerror))},resetValidationMessage:function(){var t=yt.domCache.get(this);t.validationMessage&&G(t.validationMessage);var e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedBy"),ut(e,z.inputerror))},getProgressSteps:function(){return yt.domCache.get(this).progressSteps},_main:function(t){!function(t){for(var e in t)Ft(i=e)||D('Unknown parameter "'.concat(i,'"')),t.toast&&(o=e,-1!==Zt.indexOf(o)&&D('The parameter "'.concat(o,'" is incompatible with toasts'))),_t(n=e)&&g(n,_t(n));var n,o,i}(t),C()&&zt.swalCloseEventFinishedCallback&&(zt.swalCloseEventFinishedCallback(),delete zt.swalCloseEventFinishedCallback),zt.deferDisposalTimer&&(clearTimeout(zt.deferDisposalTimer),delete zt.deferDisposalTimer);var e=function(t){var e=c({},Wt.showClass,t.showClass),n=c({},Wt.hideClass,t.hideClass),o=c({},Wt,t);if(o.showClass=e,o.hideClass=n,t.animation===false){o.showClass={popup:"",backdrop:"swal2-backdrop-show swal2-noanimation"};o.hideClass={}}return o}(t);de(e),Object.freeze(e),zt.timeout&&(zt.timeout.stop(),delete zt.timeout),clearTimeout(zt.restoreFocusTimeout);var n=function(t){var e={popup:C(),container:y(),content:A(),actions:L(),confirmButton:S(),cancelButton:T(),closeButton:j(),validationMessage:E(),progressSteps:B()};return yt.domCache.set(t,e),e}(this);return Lt(this,e),yt.innerParams.set(this,e),function(n,o,i){return new Promise(function(t){var e=function t(e){n.closePopup({dismiss:e})};ee.swalPromiseResolve.set(n,t);We(zt,i,e);o.confirmButton.onclick=function(){return he(n,i)};o.cancelButton.onclick=function(){return ge(n,e)};o.closeButton.onclick=function(){return e(_.close)};we(o,i,e);be(n,zt,i,e);if(i.toast&&(i.input||i.footer||i.showCloseButton)){st(document.body,z["toast-column"])}else{ut(document.body,z["toast-column"])}me(n,i);fe(i);Ke(o,i);o.container.scrollTop=0})}(this,n,e)},update:function(e){var t=C(),n=yt.innerParams.get(this);if(!t||q(t,n.hideClass.popup))return D("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var o={};Object.keys(e).forEach(function(t){Je.isUpdatableParameter(t)?o[t]=e[t]:D('Invalid parameter to update: "'.concat(t,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js'))});var i=c({},n,o);Lt(this,i),yt.innerParams.set(this,i),Object.defineProperties(this,{params:{value:c({},this.params,e),writable:!1,enumerable:!0}})}});function $e(){if("undefined"!=typeof window){"undefined"==typeof Promise&&h("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),Ze=this;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});var i=this._main(this.params);yt.promise.set(this,i)}}$e.prototype.then=function(t){return yt.promise.get(this).then(t)},$e.prototype.finally=function(t){return yt.promise.get(this).finally(t)},c($e.prototype,Qe),c($e,Qt),Object.keys(Qe).forEach(function(e){$e[e]=function(){var t;if(Ze)return(t=Ze)[e].apply(t,arguments)}}),$e.DismissReason=_,$e.version="9.5.3";var Je=$e;return Je.default=Je}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
2
- "undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;width:auto;padding:.625em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.swal2-popup.swal2-toast .swal2-header{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.swal2-popup.swal2-toast .swal2-title{-webkit-box-flex:1;flex-grow:1;-webkit-box-pack:start;justify-content:flex-start;margin:0 .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{position:static;width:.8em;height:.8em;line-height:.8}.swal2-popup.swal2-toast .swal2-content{-webkit-box-pack:start;justify-content:flex-start;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;font-size:1.8em;font-weight:700}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{font-size:.25em}}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{flex-basis:auto!important;width:auto;height:auto;margin:0 .3125em}.swal2-popup.swal2-toast .swal2-styled{margin:0 .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:2em 2em;transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;-webkit-transform-origin:0 1.5em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:-webkit-box;display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;padding:.625em;overflow-x:hidden;-webkit-transition:background-color .1s;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-top{-webkit-box-align:start;align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{-webkit-box-align:start;align-items:flex-start;-webkit-box-pack:start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{-webkit-box-align:start;align-items:flex-start;-webkit-box-pack:end;justify-content:flex-end}.swal2-container.swal2-center{-webkit-box-align:center;align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{-webkit-box-align:center;align-items:center;-webkit-box-pack:start;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end}.swal2-container.swal2-bottom{-webkit-box-align:end;align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{-webkit-box-align:end;align-items:flex-end;-webkit-box-pack:start;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{-webkit-box-align:end;align-items:flex-end;-webkit-box-pack:end;justify-content:flex-end}.swal2-container.swal2-bottom-end>:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:-webkit-box!important;display:flex!important;-webkit-box-flex:1;flex:1;align-self:stretch;-webkit-box-pack:center;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:-webkit-box!important;display:flex!important;-webkit-box-flex:1;flex:1;align-content:center;-webkit-box-pack:center;justify-content:center}.swal2-container.swal2-grow-column{-webkit-box-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{-webkit-box-align:center;align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{-webkit-box-align:start;align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{-webkit-box-align:end;align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:-webkit-box!important;display:flex!important;-webkit-box-flex:1;flex:1;align-content:center;-webkit-box-pack:center;justify-content:center}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:-webkit-box;display:flex;z-index:1;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;width:100%;margin:1.25em auto 0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.1)),to(rgba(0,0,0,.1)));background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.2)),to(rgba(0,0,0,.2)));background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-actions.swal2-loading .swal2-styled.swal2-confirm{box-sizing:border-box;width:2.5em;height:2.5em;margin:.46875em;padding:0;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{content:\"\";display:inline-block;width:15px;height:15px;margin-left:5px;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff}.swal2-styled{margin:.3125em;padding:.625em 2em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{-webkit-box-pack:center;justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar{position:absolute;bottom:0;left:0;width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;-webkit-box-pack:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;-webkit-transition:color .1s ease-out;transition:color .1s ease-out;border:none;border-radius:0;outline:initial;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{-webkit-transform:none;transform:none;background:0 0;color:#f27474}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;-webkit-box-pack:center;justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;-webkit-transition:border-color .3s,box-shadow .3s;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-file::-webkit-input-placeholder,.swal2-input::-webkit-input-placeholder,.swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::-ms-input-placeholder,.swal2-input::-ms-input-placeholder,.swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-validation-message{display:none;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;-webkit-box-pack:center;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;-webkit-box-flex:1;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:3.75em 3.75em;transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 3.75em;transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.875em;width:1.5625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{-webkit-box-align:center;align-items:center;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#3085d6}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;width:2.5em;height:.4em;margin:0 -1px;background:#3085d6}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{-webkit-transition:none;transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}@-webkit-keyframes swal2-toast-show{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg)}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg)}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg)}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg)}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg)}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg)}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:stretch;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{-webkit-box-flex:1;flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{-webkit-box-pack:center;justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}");
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function a(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e,n){return(l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return n&&u(i,n.prototype),i}).apply(null,arguments)}function d(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t,e,n){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var o=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function f(e){return Object.keys(e).map(function(t){return e[t]})}function m(t){return Array.prototype.slice.call(t)}function h(t){console.error("".concat(N," ").concat(t))}function g(t,e){!function(t){-1===U.indexOf(t)&&(U.push(t),D(t))}('"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'))}function v(t){return t&&Promise.resolve(t)===t}function b(t){return t instanceof Element||function(t){return"object"===r(t)&&t.jquery}(t)}function t(t){var e={};for(var n in t)e[t[n]]="swal2-"+t[n];return e}function y(){return document.body.querySelector(".".concat(z.container))}function w(t){var e=y();return e?e.querySelector(t):null}function e(t){return w(".".concat(t))}function C(){return e(z.popup)}function n(){var t=C();return m(t.querySelectorAll(".".concat(z.icon)))}function k(){var t=n().filter(function(t){return dt(t)});return t.length?t[0]:null}function x(){return e(z.title)}function A(){return e(z.content)}function P(){return e(z.image)}function B(){return e(z["progress-steps"])}function E(){return e(z["validation-message"])}function S(){return w(".".concat(z.actions," .").concat(z.confirm))}function T(){return w(".".concat(z.actions," .").concat(z.cancel))}function L(){return e(z.actions)}function O(){return e(z.header)}function M(){return e(z.footer)}function H(){return e(z["timer-progress-bar"])}function j(){return e(z.close)}function V(){var t=m(C().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t,e){return t=parseInt(t.getAttribute("tabindex")),(e=parseInt(e.getAttribute("tabindex")))<t?1:t<e?-1:0}),e=m(C().querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n')).filter(function(t){return"-1"!==t.getAttribute("tabindex")});return function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(t.concat(e)).filter(function(t){return dt(t)})}function I(){return!K()&&!document.body.classList.contains(z["no-backdrop"])}function q(t,e){if(!e)return!1;for(var n=e.split(/\s+/),o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0}function R(t,e,n){if(!function(e,n){m(e.classList).forEach(function(t){-1===f(z).indexOf(t)&&-1===f(W).indexOf(t)&&-1===f(n.showClass).indexOf(t)&&e.classList.remove(t)})}(t,e),e.customClass&&e.customClass[n]){if("string"!=typeof e.customClass[n]&&!e.customClass[n].forEach)return D("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(r(e.customClass[n]),'"'));st(t,e.customClass[n])}}var N="SweetAlert2:",D=function(t){console.warn("".concat(N," ").concat(t))},U=[],F=function(t){return"function"==typeof t?t():t},_=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),z=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","toast","toast-shown","toast-column","show","hide","close","title","header","content","html-container","actions","confirm","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),W=t(["success","warning","info","question","error"]),K=function(){return document.body.classList.contains(z["toast-shown"])},Y={previousBodyPadding:null};function Z(t,e){if(!e)return null;switch(e){case"select":case"textarea":case"file":return lt(t,z[e]);case"checkbox":return t.querySelector(".".concat(z.checkbox," input"));case"radio":return t.querySelector(".".concat(z.radio," input:checked"))||t.querySelector(".".concat(z.radio," input:first-child"));case"range":return t.querySelector(".".concat(z.range," input"));default:return lt(t,z.input)}}function Q(t){if(t.focus(),"file"!==t.type){var e=t.value;t.value="",t.value=e}}function $(t,e,n){t&&e&&("string"==typeof e&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(function(e){t.forEach?t.forEach(function(t){n?t.classList.add(e):t.classList.remove(e)}):n?t.classList.add(e):t.classList.remove(e)}))}function J(t,e,n){n||0===parseInt(n)?t.style[e]="number"==typeof n?"".concat(n,"px"):n:t.style.removeProperty(e)}function X(t,e){var n=1<arguments.length&&void 0!==e?e:"flex";t.style.opacity="",t.style.display=n}function G(t){t.style.opacity="",t.style.display="none"}function tt(t,e,n){e?X(t,n):G(t)}function et(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return 0<n||0<o}function nt(t,e){var n=1<arguments.length&&void 0!==e&&e,o=H();dt(o)&&(n&&(o.style.transition="none",o.style.width="100%"),setTimeout(function(){o.style.transition="width ".concat(t/1e3,"s linear"),o.style.width="0%"},10))}function ot(){return"undefined"==typeof window||"undefined"==typeof document}function it(t){Je.isVisible()&&ct!==t.target.value&&Je.resetValidationMessage(),ct=t.target.value}function rt(t,e){t instanceof HTMLElement?e.appendChild(t):"object"===r(t)?mt(e,t):t&&(e.innerHTML=t)}function at(t,e){var n=L(),o=S(),i=T();e.showConfirmButton||e.showCancelButton||G(n),R(n,e,"actions"),gt(o,"confirm",e),gt(i,"cancel",e),e.buttonsStyling?function(t,e,n){st([t,e],z.styled),n.confirmButtonColor&&(t.style.backgroundColor=n.confirmButtonColor);n.cancelButtonColor&&(e.style.backgroundColor=n.cancelButtonColor);var o=window.getComputedStyle(t).getPropertyValue("background-color");t.style.borderLeftColor=o,t.style.borderRightColor=o}(o,i,e):(ut([o,i],z.styled),o.style.backgroundColor=o.style.borderLeftColor=o.style.borderRightColor="",i.style.backgroundColor=i.style.borderLeftColor=i.style.borderRightColor=""),e.reverseButtons&&o.parentNode.insertBefore(i,o)}var ct,st=function(t,e){$(t,e,!0)},ut=function(t,e){$(t,e,!1)},lt=function(t,e){for(var n=0;n<t.childNodes.length;n++)if(q(t.childNodes[n],e))return t.childNodes[n]},dt=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},pt='\n <div aria-labelledby="'.concat(z.title,'" aria-describedby="').concat(z.content,'" class="').concat(z.popup,'" tabindex="-1">\n <div class="').concat(z.header,'">\n <ul class="').concat(z["progress-steps"],'"></ul>\n <div class="').concat(z.icon," ").concat(W.error,'"></div>\n <div class="').concat(z.icon," ").concat(W.question,'"></div>\n <div class="').concat(z.icon," ").concat(W.warning,'"></div>\n <div class="').concat(z.icon," ").concat(W.info,'"></div>\n <div class="').concat(z.icon," ").concat(W.success,'"></div>\n <img class="').concat(z.image,'" />\n <h2 class="').concat(z.title,'" id="').concat(z.title,'"></h2>\n <button type="button" class="').concat(z.close,'"></button>\n </div>\n <div class="').concat(z.content,'">\n <div id="').concat(z.content,'" class="').concat(z["html-container"],'"></div>\n <input class="').concat(z.input,'" />\n <input type="file" class="').concat(z.file,'" />\n <div class="').concat(z.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat(z.select,'"></select>\n <div class="').concat(z.radio,'"></div>\n <label for="').concat(z.checkbox,'" class="').concat(z.checkbox,'">\n <input type="checkbox" />\n <span class="').concat(z.label,'"></span>\n </label>\n <textarea class="').concat(z.textarea,'"></textarea>\n <div class="').concat(z["validation-message"],'" id="').concat(z["validation-message"],'"></div>\n </div>\n <div class="').concat(z.actions,'">\n <button type="button" class="').concat(z.confirm,'">OK</button>\n <button type="button" class="').concat(z.cancel,'">Cancel</button>\n </div>\n <div class="').concat(z.footer,'"></div>\n <div class="').concat(z["timer-progress-bar"],'"></div>\n </div>\n').replace(/(^|\n)\s*/g,""),ft=function(t){if(!function(){var t=y();t&&(t.parentNode.removeChild(t),ut([document.documentElement,document.body],[z["no-backdrop"],z["toast-shown"],z["has-column"]]))}(),ot())h("SweetAlert2 requires document to initialize");else{var e=document.createElement("div");e.className=z.container,e.innerHTML=pt;var n=function(t){return"string"==typeof t?document.querySelector(t):t}(t.target);n.appendChild(e),function(t){var e=C();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")}(t),function(t){"rtl"===window.getComputedStyle(t).direction&&st(y(),z.rtl)}(n),function(){var t=A(),e=lt(t,z.input),n=lt(t,z.file),o=t.querySelector(".".concat(z.range," input")),i=t.querySelector(".".concat(z.range," output")),r=lt(t,z.select),a=t.querySelector(".".concat(z.checkbox," input")),c=lt(t,z.textarea);e.oninput=it,n.onchange=it,r.onchange=it,a.onchange=it,c.oninput=it,o.oninput=function(t){it(t),i.value=o.value},o.onchange=function(t){it(t),o.nextSibling.value=o.value}}()}},mt=function(t,e){if(t.innerHTML="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},ht=function(){if(ot())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}();function gt(t,e,n){tt(t,n["show".concat(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(e),"Button")],"inline-block"),t.innerHTML=n["".concat(e,"ButtonText")],t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=z[e],R(t,n,"".concat(e,"Button")),st(t,n["".concat(e,"ButtonClass")])}function vt(t,e){var n=y();if(n){!function(t,e){"string"==typeof e?t.style.background=e:e||st([document.documentElement,document.body],z["no-backdrop"])}(n,e.backdrop),!e.backdrop&&e.allowOutsideClick&&D('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),function(t,e){e in z?st(t,z[e]):(D('The "position" parameter is not valid, defaulting to "center"'),st(t,z.center))}(n,e.position),function(t,e){if(e&&"string"==typeof e){var n="grow-".concat(e);n in z&&st(t,z[n])}}(n,e.grow),R(n,e,"container");var o=document.body.getAttribute("data-swal2-queue-step");o&&(n.setAttribute("data-queue-step",o),document.body.removeAttribute("data-swal2-queue-step"))}}function bt(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var yt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},wt=["input","file","range","select","radio","checkbox","textarea"],Ct=function(t){if(!Pt[t.input])return h('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=At(t.input),n=Pt[t.input](e,t);X(n),setTimeout(function(){Q(n)})},kt=function(t,e){var n=Z(A(),t);if(n)for(var o in!function(t){for(var e=0;e<t.attributes.length;e++){var n=t.attributes[e].name;-1===["type","value","style"].indexOf(n)&&t.removeAttribute(n)}}(n),e)"range"===t&&"placeholder"===o||n.setAttribute(o,e[o])},xt=function(t){var e=At(t.input);t.customClass&&st(e,t.customClass.input)},At=function(t){var e=z[t]?z[t]:z.input;return lt(A(),e)},Pt={};Pt.text=Pt.email=Pt.password=Pt.number=Pt.tel=Pt.url=function(t,e){return"string"==typeof e.inputValue||"number"==typeof e.inputValue?t.value=e.inputValue:v(e.inputValue)||D('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(r(e.inputValue),'"')),bt(t,e),t.type=e.input,t},Pt.file=function(t,e){return bt(t,e),t},Pt.range=function(t,e){var n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,t},Pt.select=function(t,e){if(t.innerHTML="",e.inputPlaceholder){var n=document.createElement("option");n.innerHTML=e.inputPlaceholder,n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return t},Pt.radio=function(t){return t.innerHTML="",t},Pt.checkbox=function(t,e){var n=Z(A(),"checkbox");return n.value=1,n.id=z.checkbox,n.checked=Boolean(e.inputValue),t.querySelector("span").innerHTML=e.inputPlaceholder,t},Pt.textarea=function(e,t){if(e.value=t.inputValue,bt(e,t),"MutationObserver"in window){var n=parseInt(window.getComputedStyle(C()).width),o=parseInt(window.getComputedStyle(C()).paddingLeft)+parseInt(window.getComputedStyle(C()).paddingRight);new MutationObserver(function(){var t=e.offsetWidth+o;C().style.width=n<t?"".concat(t,"px"):null}).observe(e,{attributes:!0,attributeFilter:["style"]})}return e};function Bt(t,e){var n=A().querySelector("#".concat(z.content));e.html?(rt(e.html,n),X(n,"block")):e.text?(n.textContent=e.text,X(n,"block")):G(n),function(t,o){var i=A(),e=yt.innerParams.get(t),r=!e||o.input!==e.input;wt.forEach(function(t){var e=z[t],n=lt(i,e);kt(t,o.inputAttributes),n.className=e,r&&G(n)}),o.input&&(r&&Ct(o),xt(o))}(t,e),R(A(),e,"content")}function Et(){return y().getAttribute("data-queue-step")}function St(t,i){var r=B();if(!i.progressSteps||0===i.progressSteps.length)return G(r);X(r),r.innerHTML="";var a=parseInt(void 0===i.currentProgressStep?Et():i.currentProgressStep);a>=i.progressSteps.length&&D("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),i.progressSteps.forEach(function(t,e){var n=function(t){var e=document.createElement("li");return st(e,z["progress-step"]),e.innerHTML=t,e}(t);if(r.appendChild(n),e===a&&st(n,z["active-progress-step"]),e!==i.progressSteps.length-1){var o=function(t){var e=document.createElement("li");return st(e,z["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e}(t);r.appendChild(o)}})}function Tt(t,e){var n=O();R(n,e,"header"),St(0,e),function(t,e){var n=yt.innerParams.get(t);if(n&&e.icon===n.icon&&k())R(k(),e,"icon");else if(Mt(),e.icon)if(-1!==Object.keys(W).indexOf(e.icon)){var o=w(".".concat(z.icon,".").concat(W[e.icon]));X(o),jt(o,e),Ht(),R(o,e,"icon"),st(o,e.showClass.icon)}else h('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"'))}(t,e),function(t,e){var n=P();if(!e.imageUrl)return G(n);X(n),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),J(n,"width",e.imageWidth),J(n,"height",e.imageHeight),n.className=z.image,R(n,e,"image")}(0,e),function(t,e){var n=x();tt(n,e.title||e.titleText),e.title&&rt(e.title,n),e.titleText&&(n.innerText=e.titleText),R(n,e,"title")}(0,e),function(t,e){var n=j();n.innerHTML=e.closeButtonHtml,R(n,e,"closeButton"),tt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)}(0,e)}function Lt(t,e){!function(t,e){var n=C();J(n,"width",e.width),J(n,"padding",e.padding),e.background&&(n.style.background=e.background),qt(n,e)}(0,e),vt(0,e),Tt(t,e),Bt(t,e),at(0,e),function(t,e){var n=M();tt(n,e.footer),e.footer&&rt(e.footer,n),R(n,e,"footer")}(0,e),"function"==typeof e.onRender&&e.onRender(C())}function Ot(){return S()&&S().click()}var Mt=function(){for(var t=n(),e=0;e<t.length;e++)G(t[e])},Ht=function(){for(var t=C(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),o=0;o<n.length;o++)n[o].style.backgroundColor=e},jt=function(t,e){if(t.innerHTML="",e.iconHtml)t.innerHTML=Vt(e.iconHtml);else if("success"===e.icon)t.innerHTML='\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n ';else if("error"===e.icon)t.innerHTML='\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n ';else{t.innerHTML=Vt({question:"?",warning:"!",info:"i"}[e.icon])}},Vt=function(t){return'<div class="'.concat(z["icon-content"],'">').concat(t,"</div>")},It=[],qt=function(t,e){t.className="".concat(z.popup," ").concat(dt(t)?e.showClass.popup:""),e.toast?(st([document.documentElement,document.body],z["toast-shown"]),st(t,z.toast)):st(t,z.modal),R(t,e,"popup"),"string"==typeof e.customClass&&st(t,e.customClass),e.icon&&st(t,z["icon-".concat(e.icon)])};function Rt(){var t=C();t||Je.fire(),t=C();var e=L(),n=S();X(e),X(n,"inline-block"),st([t,e],z.loading),n.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function Nt(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;zt.restoreFocusTimeout=setTimeout(function(){zt.previousActiveElement&&zt.previousActiveElement.focus?(zt.previousActiveElement.focus(),zt.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function Dt(){if(zt.timeout)return function(){var t=H(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var n=parseInt(window.getComputedStyle(t).width),o=parseInt(e/n*100);t.style.removeProperty("transition"),t.style.width="".concat(o,"%")}(),zt.timeout.stop()}function Ut(){if(zt.timeout){var t=zt.timeout.start();return nt(t),t}}function Ft(t){return Object.prototype.hasOwnProperty.call(Wt,t)}function _t(t){return Yt[t]}var zt={},Wt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,scrollbarPadding:!0},Kt=["title","titleText","text","html","icon","customClass","showConfirmButton","showCancelButton","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","imageUrl","imageWidth","imageHeight","imageAlt","progressSteps","currentProgressStep"],Yt={animation:'showClass" and "hideClass'},Zt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],Qt=Object.freeze({isValidParameter:Ft,isUpdatableParameter:function(t){return-1!==Kt.indexOf(t)},isDeprecatedParameter:_t,argsToParams:function(o){var i={};return"object"!==r(o[0])||b(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||b(n)?i[t]=n:void 0!==n&&h("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):c(i,o[0]),i},isVisible:function(){return dt(C())},clickConfirm:Ot,clickCancel:function(){return T()&&T().click()},getContainer:y,getPopup:C,getTitle:x,getContent:A,getHtmlContainer:function(){return e(z["html-container"])},getImage:P,getIcon:k,getIcons:n,getCloseButton:j,getActions:L,getConfirmButton:S,getCancelButton:T,getHeader:O,getFooter:M,getFocusableElements:V,getValidationMessage:E,isLoading:function(){return C().hasAttribute("data-loading")},fire:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return l(this,e)},mixin:function(n){return function(t){function e(){return o(this,e),d(this,s(e).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(e,t),a(e,[{key:"_main",value:function(t){return p(s(e.prototype),"_main",this).call(this,c({},n,t))}}]),e}(this)},queue:function(t){var r=this;It=t;function a(t,e){It=[],t(e)}var c=[];return new Promise(function(i){!function e(n,o){n<It.length?(document.body.setAttribute("data-swal2-queue-step",n),r.fire(It[n]).then(function(t){void 0!==t.value?(c.push(t.value),e(n+1,o)):a(i,{dismiss:t.dismiss})})):a(i,{value:c})}(0)})},getQueueStep:Et,insertQueueStep:function(t,e){return e&&e<It.length?It.splice(e,0,t):It.push(t)},deleteQueueStep:function(t){void 0!==It[t]&&It.splice(t,1)},showLoading:Rt,enableLoading:Rt,getTimerLeft:function(){return zt.timeout&&zt.timeout.getTimerLeft()},stopTimer:Dt,resumeTimer:Ut,toggleTimer:function(){var t=zt.timeout;return t&&(t.running?Dt():Ut())},increaseTimer:function(t){if(zt.timeout){var e=zt.timeout.increase(t);return nt(e,!0),e}},isTimerRunning:function(){return zt.timeout&&zt.timeout.isRunning()}});function $t(){var t=yt.innerParams.get(this);if(t){var e=yt.domCache.get(this);t.showConfirmButton||(G(e.confirmButton),t.showCancelButton||G(e.actions)),ut([e.popup,e.actions],z.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.cancelButton.disabled=!1}}function Jt(){null===Y.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(Y.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(Y.previousBodyPadding+function(){var t=document.createElement("div");t.className=z["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function Xt(){return!!window.MSInputMethodContext&&!!document.documentMode}function Gt(){var t=y(),e=C();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var te=function(){var e,n=y();n.ontouchstart=function(t){e=t.target===n||!function(t){return!!(t.scrollHeight>t.clientHeight)}(n)&&"INPUT"!==t.target.tagName},n.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},ee={swalPromiseResolve:new WeakMap};function ne(t,e,n,o){n?ae(t,o):(Nt().then(function(){return ae(t,o)}),zt.keydownTarget.removeEventListener("keydown",zt.keydownHandler,{capture:zt.keydownListenerCapture}),zt.keydownHandlerAdded=!1),e.parentNode&&e.parentNode.removeChild(e),I()&&(null!==Y.previousBodyPadding&&(document.body.style.paddingRight="".concat(Y.previousBodyPadding,"px"),Y.previousBodyPadding=null),function(){if(q(document.body,z.iosfix)){var t=parseInt(document.body.style.top,10);ut(document.body,z.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}}(),"undefined"!=typeof window&&Xt()&&window.removeEventListener("resize",Gt),m(document.body.children).forEach(function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")})),ut([document.documentElement,document.body],[z.shown,z["height-auto"],z["no-backdrop"],z["toast-shown"],z["toast-column"]])}function oe(t){var e=C();if(e){var n=yt.innerParams.get(this);if(n&&!q(e,n.hideClass.popup)){var o=ee.swalPromiseResolve.get(this);ut(e,n.showClass.popup),st(e,n.hideClass.popup);var i=y();ut(i,n.showClass.backdrop),st(i,n.hideClass.backdrop),function(t,e,n){var o=y(),i=ht&&et(e),r=n.onClose,a=n.onAfterClose;if(r!==null&&typeof r==="function"){r(e)}if(i){re(t,e,o,a)}else{ne(t,o,K(),a)}}(this,e,n),o(t||{})}}}function ie(t){for(var e in t)t[e]=new WeakMap}var re=function(t,e,n,o){zt.swalCloseEventFinishedCallback=ne.bind(null,t,n,K(),o),e.addEventListener(ht,function(t){t.target===e&&(zt.swalCloseEventFinishedCallback(),delete zt.swalCloseEventFinishedCallback)})},ae=function(t,e){setTimeout(function(){null!==e&&"function"==typeof e&&e(),C()||function(t){delete t.params,delete zt.keydownHandler,delete zt.keydownTarget,ie(yt),ie(ee)}(t)})};function ce(t,e,n){var o=yt.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function se(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o<n.length;o++)n[o].disabled=e;else t.disabled=e}var ue=function(){function n(t,e){o(this,n),this.callback=t,this.remaining=e,this.running=!1,this.start()}return a(n,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}},{key:"increase",value:function(t){var e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),n}(),le={email:function(t,e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}};function de(t){!function(e){e.inputValidator||Object.keys(le).forEach(function(t){e.input===t&&(e.inputValidator=le[t])})}(t),t.showLoaderOnConfirm&&!t.preConfirm&&D("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),t.animation=F(t.animation),function(t){t.target&&("string"!=typeof t.target||document.querySelector(t.target))&&("string"==typeof t.target||t.target.appendChild)||(D('Target parameter is not valid, defaulting to "body"'),t.target="body")}(t),"string"==typeof t.title&&(t.title=t.title.split("\n").join("<br />")),ft(t)}function pe(t,e){t.removeEventListener(ht,pe),e.style.overflowY="auto"}function fe(t){var e=y(),n=C();"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n),xe(e,n,t),Ce(e,n),I()&&ke(e,t.scrollbarPadding),K()||zt.previousActiveElement||(zt.previousActiveElement=document.activeElement),"function"==typeof t.onOpen&&setTimeout(function(){return t.onOpen(n)})}function me(t,e){"select"===e.input||"radio"===e.input?Ee(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&v(e.inputValue)&&Se(t,e)}function he(t,e){t.disableButtons(),e.input?Oe(t,e):Me(t,e,!0)}function ge(t,e){t.disableButtons(),e(_.cancel)}function ve(t,e){t.closePopup({value:e})}function be(e,t,n,o){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1),n.toast||(t.keydownHandler=function(t){return Ve(e,t,n,o)},t.keydownTarget=n.keydownListenerCapture?window:C(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function ye(t,e,n){for(var o=V(),i=0;i<o.length;i++)return(e+=n)===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus();C().focus()}function we(t,e,n){e.toast?De(t,e,n):(Fe(t),_e(t),ze(t,e,n))}var Ce=function(e,n){ht&&et(n)?(e.style.overflowY="hidden",n.addEventListener(ht,function(t){t.target===n&&pe.bind(null,n,e)})):e.style.overflowY="auto"},ke=function(t,e){!function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints)&&!q(document.body,z.iosfix)){var t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),st(document.body,z.iosfix),te()}}(),"undefined"!=typeof window&&Xt()&&(Gt(),window.addEventListener("resize",Gt)),m(document.body.children).forEach(function(t){t===y()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,y())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}),e&&Jt(),setTimeout(function(){t.scrollTop=0})},xe=function(t,e,n){st(t,n.showClass.backdrop),X(e),st(e,n.showClass.popup),st([document.documentElement,document.body],z.shown),n.heightAuto&&n.backdrop&&!n.toast&&st([document.documentElement,document.body],z["height-auto"])},Ae=function(t){return t.checked?1:0},Pe=function(t){return t.checked?t.value:null},Be=function(t){return t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null},Ee=function(e,n){function o(t){return Te[n.input](i,Le(t),n)}var i=A();v(n.inputOptions)?(Rt(),n.inputOptions.then(function(t){e.hideLoading(),o(t)})):"object"===r(n.inputOptions)?o(n.inputOptions):h("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(r(n.inputOptions)))},Se=function(e,n){var o=e.getInput();G(o),n.inputValue.then(function(t){o.value="number"===n.input?parseFloat(t)||0:"".concat(t),X(o),o.focus(),e.hideLoading()}).catch(function(t){h("Error in inputValue promise: ".concat(t)),o.value="",X(o),o.focus(),e.hideLoading()})},Te={select:function(t,e,i){var r=lt(t,z.select);e.forEach(function(t){var e=t[0],n=t[1],o=document.createElement("option");o.value=e,o.innerHTML=n,i.inputValue.toString()===e.toString()&&(o.selected=!0),r.appendChild(o)}),r.focus()},radio:function(t,e,a){var c=lt(t,z.radio);e.forEach(function(t){var e=t[0],n=t[1],o=document.createElement("input"),i=document.createElement("label");o.type="radio",o.name=z.radio,o.value=e,a.inputValue.toString()===e.toString()&&(o.checked=!0);var r=document.createElement("span");r.innerHTML=n,r.className=z.label,i.appendChild(o),i.appendChild(r),c.appendChild(i)});var n=c.querySelectorAll("input");n.length&&n[0].focus()}},Le=function(e){var n=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(function(t,e){n.push([e,t])}):Object.keys(e).forEach(function(t){n.push([t,e[t]])}),n},Oe=function(e,n){var o=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Ae(n);case"radio":return Pe(n);case"file":return Be(n);default:return e.inputAutoTrim?n.value.trim():n.value}}(e,n);n.inputValidator?(e.disableInput(),Promise.resolve().then(function(){return n.inputValidator(o,n.validationMessage)}).then(function(t){e.enableButtons(),e.enableInput(),t?e.showValidationMessage(t):Me(e,n,o)})):e.getInput().checkValidity()?Me(e,n,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Me=function(e,t,n){(t.showLoaderOnConfirm&&Rt(),t.preConfirm)?(e.resetValidationMessage(),Promise.resolve().then(function(){return t.preConfirm(n,t.validationMessage)}).then(function(t){dt(E())||!1===t?e.hideLoading():ve(e,void 0===t?n:t)})):ve(e,n)},He=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"],je=["Escape","Esc"],Ve=function(t,e,n,o){n.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?Ie(t,e,n):"Tab"===e.key?qe(e,n):-1!==He.indexOf(e.key)?Re():-1!==je.indexOf(e.key)&&Ne(e,n,o)},Ie=function(t,e,n){if(!e.isComposing&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(n.input))return;Ot(),e.preventDefault()}},qe=function(t){for(var e=t.target,n=V(),o=-1,i=0;i<n.length;i++)if(e===n[i]){o=i;break}t.shiftKey?ye(0,o,-1):ye(0,o,1),t.stopPropagation(),t.preventDefault()},Re=function(){var t=S(),e=T();document.activeElement===t&&dt(e)?e.focus():document.activeElement===e&&dt(t)&&t.focus()},Ne=function(t,e,n){F(e.allowEscapeKey)&&(t.preventDefault(),n(_.esc))},De=function(t,e,n){t.popup.onclick=function(){e.showConfirmButton||e.showCancelButton||e.showCloseButton||e.input||n(_.close)}},Ue=!1,Fe=function(e){e.popup.onmousedown=function(){e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Ue=!0)}}},_e=function(e){e.container.onmousedown=function(){e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,t.target!==e.popup&&!e.popup.contains(t.target)||(Ue=!0)}}},ze=function(e,n,o){e.container.onclick=function(t){Ue?Ue=!1:t.target===e.container&&F(n.allowOutsideClick)&&o(_.backdrop)}};var We=function(t,e,n){var o=H();G(o),e.timer&&(t.timeout=new ue(function(){n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(X(o),setTimeout(function(){nt(e.timer)})))},Ke=function(t,e){if(!e.toast)return F(e.allowEnterKey)?e.focusCancel&&dt(t.cancelButton)?t.cancelButton.focus():e.focusConfirm&&dt(t.confirmButton)?t.confirmButton.focus():void ye(0,-1,1):Ye()},Ye=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};var Ze,Qe=Object.freeze({hideLoading:$t,disableLoading:$t,getInput:function(t){var e=yt.innerParams.get(t||this),n=yt.domCache.get(t||this);return n?Z(n.content,e.input):null},close:oe,closePopup:oe,closeModal:oe,closeToast:oe,enableButtons:function(){ce(this,["confirmButton","cancelButton"],!1)},disableButtons:function(){ce(this,["confirmButton","cancelButton"],!0)},enableInput:function(){return se(this.getInput(),!1)},disableInput:function(){return se(this.getInput(),!0)},showValidationMessage:function(t){var e=yt.domCache.get(this);e.validationMessage.innerHTML=t;var n=window.getComputedStyle(e.popup);e.validationMessage.style.marginLeft="-".concat(n.getPropertyValue("padding-left")),e.validationMessage.style.marginRight="-".concat(n.getPropertyValue("padding-right")),X(e.validationMessage);var o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedBy",z["validation-message"]),Q(o),st(o,z.inputerror))},resetValidationMessage:function(){var t=yt.domCache.get(this);t.validationMessage&&G(t.validationMessage);var e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedBy"),ut(e,z.inputerror))},getProgressSteps:function(){return yt.domCache.get(this).progressSteps},_main:function(t){!function(t){for(var e in t)Ft(i=e)||D('Unknown parameter "'.concat(i,'"')),t.toast&&(o=e,-1!==Zt.indexOf(o)&&D('The parameter "'.concat(o,'" is incompatible with toasts'))),_t(n=e)&&g(n,_t(n));var n,o,i}(t),C()&&zt.swalCloseEventFinishedCallback&&(zt.swalCloseEventFinishedCallback(),delete zt.swalCloseEventFinishedCallback),zt.deferDisposalTimer&&(clearTimeout(zt.deferDisposalTimer),delete zt.deferDisposalTimer);var e=function(t){var e=c({},Wt.showClass,t.showClass),n=c({},Wt.hideClass,t.hideClass),o=c({},Wt,t);if(o.showClass=e,o.hideClass=n,t.animation===false){o.showClass={popup:"",backdrop:"swal2-backdrop-show swal2-noanimation"};o.hideClass={}}return o}(t);de(e),Object.freeze(e),zt.timeout&&(zt.timeout.stop(),delete zt.timeout),clearTimeout(zt.restoreFocusTimeout);var n=function(t){var e={popup:C(),container:y(),content:A(),actions:L(),confirmButton:S(),cancelButton:T(),closeButton:j(),validationMessage:E(),progressSteps:B()};return yt.domCache.set(t,e),e}(this);return Lt(this,e),yt.innerParams.set(this,e),function(n,o,i){return new Promise(function(t){var e=function t(e){n.closePopup({dismiss:e})};ee.swalPromiseResolve.set(n,t);We(zt,i,e);o.confirmButton.onclick=function(){return he(n,i)};o.cancelButton.onclick=function(){return ge(n,e)};o.closeButton.onclick=function(){return e(_.close)};we(o,i,e);be(n,zt,i,e);if(i.toast&&(i.input||i.footer||i.showCloseButton)){st(document.body,z["toast-column"])}else{ut(document.body,z["toast-column"])}me(n,i);fe(i);Ke(o,i);o.container.scrollTop=0})}(this,n,e)},update:function(e){var t=C(),n=yt.innerParams.get(this);if(!t||q(t,n.hideClass.popup))return D("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var o={};Object.keys(e).forEach(function(t){Je.isUpdatableParameter(t)?o[t]=e[t]:D('Invalid parameter to update: "'.concat(t,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js'))});var i=c({},n,o);Lt(this,i),yt.innerParams.set(this,i),Object.defineProperties(this,{params:{value:c({},this.params,e),writable:!1,enumerable:!0}})}});function $e(){if("undefined"!=typeof window){"undefined"==typeof Promise&&h("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),Ze=this;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});var i=this._main(this.params);yt.promise.set(this,i)}}$e.prototype.then=function(t){return yt.promise.get(this).then(t)},$e.prototype.finally=function(t){return yt.promise.get(this).finally(t)},c($e.prototype,Qe),c($e,Qt),Object.keys(Qe).forEach(function(e){$e[e]=function(){var t;if(Ze)return(t=Ze)[e].apply(t,arguments)}}),$e.DismissReason=_,$e.version="9.5.3";var Je=$e;return Je.default=Je}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
2
+ "undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;width:auto;padding:.625em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9}.swal2-popup.swal2-toast .swal2-header{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.swal2-popup.swal2-toast .swal2-title{-webkit-box-flex:1;flex-grow:1;-webkit-box-pack:start;justify-content:flex-start;margin:0 .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{position:static;width:.8em;height:.8em;line-height:.8}.swal2-popup.swal2-toast .swal2-content{-webkit-box-pack:start;justify-content:flex-start;font-size:1em}.swal2-popup.swal2-toast .swal2-icon{width:2em;min-width:2em;height:2em;margin:0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;font-size:1.8em;font-weight:700}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{font-size:.25em}}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{flex-basis:auto!important;width:auto;height:auto;margin:0 .3125em}.swal2-popup.swal2-toast .swal2-styled{margin:0 .3125em;padding:.3125em .625em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:2em 2em;transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;-webkit-transform-origin:0 1.5em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:-webkit-box;display:flex;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;padding:.625em;overflow-x:hidden;-webkit-transition:background-color .1s;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-top{-webkit-box-align:start;align-items:flex-start}.swal2-container.swal2-top-left,.swal2-container.swal2-top-start{-webkit-box-align:start;align-items:flex-start;-webkit-box-pack:start;justify-content:flex-start}.swal2-container.swal2-top-end,.swal2-container.swal2-top-right{-webkit-box-align:start;align-items:flex-start;-webkit-box-pack:end;justify-content:flex-end}.swal2-container.swal2-center{-webkit-box-align:center;align-items:center}.swal2-container.swal2-center-left,.swal2-container.swal2-center-start{-webkit-box-align:center;align-items:center;-webkit-box-pack:start;justify-content:flex-start}.swal2-container.swal2-center-end,.swal2-container.swal2-center-right{-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end}.swal2-container.swal2-bottom{-webkit-box-align:end;align-items:flex-end}.swal2-container.swal2-bottom-left,.swal2-container.swal2-bottom-start{-webkit-box-align:end;align-items:flex-end;-webkit-box-pack:start;justify-content:flex-start}.swal2-container.swal2-bottom-end,.swal2-container.swal2-bottom-right{-webkit-box-align:end;align-items:flex-end;-webkit-box-pack:end;justify-content:flex-end}.swal2-container.swal2-bottom-end>:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:-webkit-box!important;display:flex!important;-webkit-box-flex:1;flex:1;align-self:stretch;-webkit-box-pack:center;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:-webkit-box!important;display:flex!important;-webkit-box-flex:1;flex:1;align-content:center;-webkit-box-pack:center;justify-content:center}.swal2-container.swal2-grow-column{-webkit-box-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{-webkit-box-align:center;align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{-webkit-box-align:start;align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{-webkit-box-align:end;align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:-webkit-box!important;display:flex!important;-webkit-box-flex:1;flex:1;align-content:center;-webkit-box-pack:center;justify-content:center}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:.3125em;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:center;align-items:center}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:-webkit-box;display:flex;z-index:1;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;width:100%;margin:1.25em auto 0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.1)),to(rgba(0,0,0,.1)));background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.2)),to(rgba(0,0,0,.2)));background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-actions.swal2-loading .swal2-styled.swal2-confirm{box-sizing:border-box;width:2.5em;height:2.5em;margin:.46875em;padding:0;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:.25em solid transparent;border-radius:100%;border-color:transparent;background-color:transparent!important;color:transparent;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-actions.swal2-loading .swal2-styled.swal2-cancel{margin-right:30px;margin-left:30px}.swal2-actions.swal2-loading :not(.swal2-styled).swal2-confirm::after{content:\"\";display:inline-block;width:15px;height:15px;margin-left:5px;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border:3px solid #999;border-radius:50%;border-right-color:transparent;box-shadow:1px 1px 1px #fff}.swal2-styled{margin:.3125em;padding:.625em 2em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#3085d6;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#aaa;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(50,100,150,.4)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{-webkit-box-pack:center;justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar{position:absolute;bottom:0;left:0;width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;-webkit-box-pack:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;-webkit-transition:color .1s ease-out;transition:color .1s ease-out;border:none;border-radius:0;outline:initial;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{-webkit-transform:none;transform:none;background:0 0;color:#f27474}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;-webkit-box-pack:center;justify-content:center;margin:0;padding:0;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;-webkit-transition:border-color .3s,box-shadow .3s;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 3px #c4e6f5}.swal2-file::-webkit-input-placeholder,.swal2-input::-webkit-input-placeholder,.swal2-textarea::-webkit-input-placeholder{color:#ccc}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::-ms-input-placeholder,.swal2-input::-ms-input-placeholder,.swal2-textarea::-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-validation-message{display:none;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;-webkit-box-pack:center;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;-webkit-box-flex:1;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:3.75em 3.75em;transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 3.75em;transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.875em;width:1.5625em;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{-webkit-box-align:center;align-items:center;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;width:2em;height:2em;border-radius:2em;background:#3085d6;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#3085d6}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;width:2.5em;height:.4em;margin:0 -1px;background:#3085d6}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{-webkit-transition:none;transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-moz-document url-prefix(){.swal2-close:focus{outline:2px solid rgba(50,100,150,.4)}}@-webkit-keyframes swal2-toast-show{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg)}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg)}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg)}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{-webkit-transform:translateY(-.625em) rotateZ(2deg);transform:translateY(-.625em) rotateZ(2deg)}33%{-webkit-transform:translateY(0) rotateZ(-2deg);transform:translateY(0) rotateZ(-2deg)}66%{-webkit-transform:translateY(.3125em) rotateZ(2deg);transform:translateY(.3125em) rotateZ(2deg)}100%{-webkit-transform:translateY(0) rotateZ(0);transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{-webkit-transform:rotateZ(1deg);transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes swal2-show{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.875em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}100%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}50%{margin-top:1.625em;-webkit-transform:scale(.4);transform:scale(.4);opacity:0}80%{margin-top:-.375em;-webkit-transform:scale(1.15);transform:scale(1.15)}100%{margin-top:0;-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;-webkit-transform:translateY(-50%);transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:stretch;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{-webkit-box-flex:1;flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{-webkit-box-pack:center;justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}");
admin/assets/js/settings.js CHANGED
@@ -1,32 +1,32 @@
1
- jQuery(document).ready(function ($) {
2
- jQuery('#titan_scanner_schedule_daily').datetimepicker({
3
- datepicker: false,
4
- mask: true,
5
- format: 'H:i'
6
- });
7
- jQuery('#titan_scanner_schedule_weekly_time').datetimepicker({
8
- datepicker: false,
9
- mask: true,
10
- format: 'H:i'
11
- });
12
- jQuery('#titan_scanner_schedule_custom').datetimepicker({
13
- dayOfWeekStart: 1,
14
- timepicker: true,
15
- mask: true,
16
- format: 'Y/m/d H:i'
17
- });
18
-
19
- var schedule = jQuery('#titan_scanner_schedule').val();
20
- jQuery('.wt-schedule-controls-' + schedule).show();
21
- jQuery('#titan_scanner_schedule').on('change', function ($) {
22
- var schedule = jQuery(this).val();
23
- jQuery('.wt-schedule-controls').hide();
24
- jQuery('.wt-schedule-controls-' + schedule).show();
25
- });
26
-
27
- $('.factory-checkbox--disabled.wtitan-control-premium-label').click(function (e) {
28
- e.stopPropagation();
29
- window.location.href = 'https://titansitescanner.com/pricing/';
30
- });
31
-
32
  });
1
+ jQuery(document).ready(function ($) {
2
+ jQuery('#titan_scanner_schedule_daily').datetimepicker({
3
+ datepicker: false,
4
+ mask: true,
5
+ format: 'H:i'
6
+ });
7
+ jQuery('#titan_scanner_schedule_weekly_time').datetimepicker({
8
+ datepicker: false,
9
+ mask: true,
10
+ format: 'H:i'
11
+ });
12
+ jQuery('#titan_scanner_schedule_custom').datetimepicker({
13
+ dayOfWeekStart: 1,
14
+ timepicker: true,
15
+ mask: true,
16
+ format: 'Y/m/d H:i'
17
+ });
18
+
19
+ var schedule = jQuery('#titan_scanner_schedule').val();
20
+ jQuery('.wt-schedule-controls-' + schedule).show();
21
+ jQuery('#titan_scanner_schedule').on('change', function ($) {
22
+ var schedule = jQuery(this).val();
23
+ jQuery('.wt-schedule-controls').hide();
24
+ jQuery('.wt-schedule-controls-' + schedule).show();
25
+ });
26
+
27
+ $('.factory-checkbox--disabled.wtitan-control-premium-label').click(function (e) {
28
+ e.stopPropagation();
29
+ window.location.href = 'https://titansitescanner.com/pricing/';
30
+ });
31
+
32
  });
admin/assets/js/titan-security.js CHANGED
@@ -1,30 +1,22 @@
1
- jQuery(document).ready(function($) {
2
-
3
- jQuery('#wt-notice-hide-link').on('click', function(e) {
4
- e.preventDefault();
5
- var btn = jQuery(this);
6
- jQuery.ajax({
7
- method: 'POST',
8
- url: ajaxurl,
9
- data: {
10
- action: 'wtitan_hide_trial_notice',
11
- _ajax_nonce: wtitan_trial.nonce
12
- },
13
- beforeSend: function() {
14
- btn.parent().parent('.wbcr-factory-warning-notice').animate({
15
- opacity: 'hide',
16
- height: 'hide'
17
- }, 300);
18
- },
19
- success: function(result) {
20
- if( !result.success ) {
21
- btn.parent().parent('.wbcr-factory-warning-notice').animate({
22
- opacity: 'show',
23
- height: 'show'
24
- }, 300);
25
- }
26
- }
27
- });
28
- });
29
-
30
  });
1
+ jQuery(document).ready(function ($) {
2
+
3
+ jQuery('#wt-notice-hide-link').on('click', function (e) {
4
+ e.preventDefault();
5
+ var btn = jQuery(this);
6
+ jQuery.ajax({
7
+ method: 'POST', url: ajaxurl, data: {
8
+ action: 'wtitan_hide_trial_notice',
9
+ _ajax_nonce: wtitan_trial.nonce
10
+ },
11
+ beforeSend: function () {
12
+ btn.parent().parent('.wbcr-factory-warning-notice').animate({opacity: 'hide', height: 'hide'}, 300);
13
+ },
14
+ success: function (result) {
15
+ if (!result.success) {
16
+ btn.parent().parent('.wbcr-factory-warning-notice').animate({opacity: 'show', height: 'show'}, 300);
17
+ }
18
+ }
19
+ });
20
+ });
21
+
 
 
 
 
 
 
 
 
22
  });
admin/assets/js/trial-popup.js CHANGED
@@ -1,51 +1,51 @@
1
- jQuery(document).ready(function ($) {
2
-
3
- jQuery('#wtitan-activate-trial-button').click(function (e) {
4
- e.preventDefault();
5
- var infosModal = $('#wtitan-tmpl-confirmation-modal');
6
- var btn = jQuery(this);
7
-
8
- if (!infosModal.length) {
9
- console.log('[Error]: Html template for modal not found.');
10
- return;
11
- }
12
-
13
- Swal.fire({
14
- html: infosModal.html(),
15
- customClass: 'wtitan-modal wtitan-modal-confirm',
16
- width: 500,
17
- showCancelButton: true,
18
- showCloseButton: true,
19
- confirmButtonText: 'Agree',
20
- }).then(function (result) {
21
- if (result.value) {
22
-
23
- jQuery.ajax({
24
- method: 'POST',
25
- url: ajaxurl,
26
- data: {
27
- action: 'wtitan_activate_trial',
28
- email: jQuery('#wtitan-trial-email').val(),
29
- _ajax_nonce: wtitan.trial_nonce
30
- },
31
- beforeSend: function () {
32
- btn.attr('disabled', 'disabled');
33
- var loader = document.createElement('img');
34
- loader.src = jQuery('#wcl-license-wrapper').data('loader');
35
- loader.height = '32';
36
- btn.after(loader);
37
- },
38
- success: function (result) {
39
- console.log(result);
40
- window.location.href = result.data.url;
41
- },
42
- complete: function () {
43
- }
44
- });
45
-
46
- }
47
- console.log(result);
48
- });
49
- });
50
-
51
  });
1
+ jQuery(document).ready(function ($) {
2
+
3
+ jQuery('#wtitan-activate-trial-button').click(function (e) {
4
+ e.preventDefault();
5
+ var infosModal = $('#wtitan-tmpl-confirmation-modal');
6
+ var btn = jQuery(this);
7
+
8
+ if (!infosModal.length) {
9
+ console.log('[Error]: Html template for modal not found.');
10
+ return;
11
+ }
12
+
13
+ Swal.fire({
14
+ html: infosModal.html(),
15
+ customClass: 'wtitan-modal wtitan-modal-confirm',
16
+ width: 500,
17
+ showCancelButton: true,
18
+ showCloseButton: true,
19
+ confirmButtonText: 'Agree',
20
+ }).then(function (result) {
21
+ if (result.value) {
22
+
23
+ jQuery.ajax({
24
+ method: 'POST',
25
+ url: ajaxurl,
26
+ data: {
27
+ action: 'wtitan_activate_trial',
28
+ email: jQuery('#wtitan-trial-email').val(),
29
+ _ajax_nonce: wtitan.trial_nonce
30
+ },
31
+ beforeSend: function () {
32
+ btn.attr('disabled', 'disabled');
33
+ var loader = document.createElement('img');
34
+ loader.src = jQuery('#wcl-license-wrapper').data('loader');
35
+ loader.height = '32';
36
+ btn.after(loader);
37
+ },
38
+ success: function (result) {
39
+ console.log(result);
40
+ window.location.href = result.data.url;
41
+ },
42
+ complete: function () {
43
+ }
44
+ });
45
+
46
+ }
47
+ console.log(result);
48
+ });
49
+ });
50
+
51
  });
admin/boot.php CHANGED
@@ -1,198 +1,198 @@
1
- <?php
2
- /**
3
- * Usually in this file places the code that is responsible for the notification, compatibility with other plugins,
4
- * minor functions that must be performed on all pages of the admin panel.
5
- *
6
- * This file should contain code that applies only to the administration area.
7
- *
8
- * @author Webcraftic <wordpress.webraftic@gmail.com>
9
- * @copyright Webcraftic 20.11.2019
10
- * @version 1.0
11
- */
12
-
13
- // Exit if accessed directly
14
- if( !defined('ABSPATH') ) {
15
- exit;
16
- }
17
-
18
- /**
19
- * Widget with the offer to buy Clearfy Business
20
- *
21
- * @param array $widgets
22
- * @param string $position
23
- * @param Wbcr_Factory439_Plugin $plugin
24
- */
25
-
26
- add_filter('wbcr/factory/pages/impressive/widgets', function ($widgets, $position, $plugin) {
27
-
28
- if( $plugin->getPluginName() == \WBCR\Titan\Plugin::app()->getPluginName() ) {
29
-
30
- if( \WBCR\Titan\Plugin::app()->premium->is_activate() ) {
31
- unset($widgets['donate_widget']);
32
-
33
- if( $position == 'right' ) {
34
- unset($widgets['adverts_widget']);
35
- unset($widgets['business_suggetion']);
36
- unset($widgets['rating_widget']);
37
- unset($widgets['info_widget']);
38
- }
39
-
40
- return $widgets;
41
- } else {
42
- if( $position == 'right' ) {
43
- unset($widgets['business_suggetion']);
44
- unset($widgets['info_widget']);
45
- unset($widgets['rating_widget']);
46
- $widgets['adverts_widget'] = wtitan_get_sidebar_adverts_widget();
47
- }
48
- }
49
- }
50
-
51
- return $widgets;
52
- }, 9999, 3);
53
-
54
- /**
55
- * Этот хук реализует условную логику перенаправления на страницу мастера настроек,
56
- * сразу после активации плагина.
57
- */
58
- add_action('admin_init', function () {
59
-
60
- $plugin = \WBCR\Titan\Plugin::app();
61
-
62
- // If the user has updated the plugin or activated it for the first time,
63
- // you need to show the page "What's new?"
64
- if( !$plugin->isNetworkAdmin() ) {
65
- $setup_page_viewed = $plugin->request->get('wtitan_setup_page_viewed', null);
66
- if( is_null($setup_page_viewed) ) {
67
- if( \WBCR\Titan\Plugin\Helper::is_need_show_setup_page() ) {
68
- try {
69
- $redirect_url = '';
70
- if( class_exists('Wbcr_FactoryPages453') ) {
71
- $redirect_url = $plugin->getPluginPageUrl('setup', ['wtitan_setup_page_viewed' => 1]);
72
- }
73
- if( $redirect_url ) {
74
- wp_safe_redirect($redirect_url);
75
- die();
76
- }
77
- } catch( Exception $e ) {
78
- }
79
- }
80
- } else {
81
- if( \WBCR\Titan\Plugin\Helper::is_need_show_setup_page() ) {
82
- delete_option($plugin->getOptionName('setup_wizard'));
83
- }
84
- }
85
- }
86
- });
87
-
88
- /**
89
- * Выводит кнопку настроек в шапке интерфейса плагина
90
- */
91
- /*
92
- add_action( 'wbcr/factory/pages/impressive/header', function ( $plugin_name ) {
93
- if ( $plugin_name != WBCR\Titan\Plugin::app()->getPluginName() ) {
94
- return;
95
- }
96
- ?>
97
- <a href="<?php echo WBCR\Titan\Plugin::app()->getPluginPageUrl( 'plugin_settings' ) ?>" class="wbcr-factory-button wbcr-factory-type-settings">
98
- <?php echo apply_filters( 'wbcr/clearfy/settings_button_title', __( 'Titan settings', 'titan-security' ) ); ?>
99
- </a>
100
- <?php
101
- } );
102
- */
103
-
104
- /**
105
- * Print admin notice: "Would you like to send them for spam checking?"
106
- *
107
- * If user clicked button "Yes, do it", plugin will exec action,
108
- * that put all unapproved comments to spam check queue.
109
- */
110
- add_action('wbcr/factory/admin_notices', function ($notices, $plugin_name) {
111
- if( $plugin_name != \WBCR\Titan\Plugin::app()->getPluginName() ) {
112
- return $notices;
113
- }
114
-
115
- $notice_text = sprintf(__('Maintenance, Security, Backups & Support for your WordPress Install. <a href="%s" target="_blank" rel="noopener">Now 49$/month!</a>', "titan-security"), 'https://cm-wp.com/wp-support/');
116
-
117
- $notices[] = [
118
- 'id' => 'wtitan_creativemotion_support_suggestion',
119
- 'type' => 'success',
120
- 'where' => [
121
- 'edit-comments',
122
- 'plugins',
123
- 'themes',
124
- 'dashboard',
125
- 'edit',
126
- 'settings'
127
- ],
128
- 'dismissible' => true,
129
- 'dismiss_expires' => 0,
130
- 'text' => '<p><strong>Titan:</strong><br>' . $notice_text . '</p>'
131
- ];
132
-
133
- return $notices;
134
- }, 10, 2);
135
-
136
- //if ( ! \WBCR\Titan\Plugin::app()->getOption( 'trial_notice_dismissed', false ) ) {
137
- /**
138
- * Trial notice on plugin pages
139
- */
140
- //add_action('wbcr/factory/pages/impressive/print_all_notices', function ($plugin, $obj) {
141
- /* if( is_plugin_active('plugins-scanner-premium/plugins-scanner-premium.php') || ($plugin->getPluginName() != \WBCR\Titan\Plugin::app()->getPluginName()) ) {
142
- return;
143
- }
144
-
145
- $notice_text = __('Plugins scanner - detect vulnerabilities in any of your plugins before activation', 'titan-security');
146
- $notice_text .= '&nbsp;<a href="https://titansitescanner.com/plugin-scanner/" target="_blank" rel="noopener" class="wtitan-get-plugins-scanner__btn">' . __('Sign Up for $9.99', 'titan-security') . '</a>';
147
-
148
- echo '<div class="alert alert-warning wbcr-factory-warning-notice wtitan-get-plugins-scanner__notice"><p><span class="dashicons dashicons-plugins-checked"></span> ' . $notice_text . '</p></div>';
149
- *///$obj->printWarningNotice($notice_text);
150
-
151
- /** @var \Wbcr_Factory454_Plugin $plugin */
152
- /** @var \Wbcr_FactoryPages453_ImpressiveThemplate $obj */
153
- /*if ( ( \WBCR\Titan\Plugin::app()->premium->is_activate() ) || ( $plugin->getPluginName() != \WBCR\Titan\Plugin::app()->getPluginName() ) || $obj->id == 'license' ) {
154
- return;
155
- }
156
-
157
- $notice_text = __( 'Get the free trial edition (no credit card) contains all of the features included in the paid-for version of the product.', 'titan-security' );
158
- $notice_text .= '&nbsp;<a href="' . add_query_arg( [ 'trial' => 1 ], \WBCR\Titan\Plugin::app()->getPluginPageUrl( 'license' ) ) . '" class="btn btn-gold btn-sm wt-notice-trial-button">' . __( 'Activate 30 days trial', 'titan-security' ) . '</a>';
159
- $notice_text .= "<span id='wt-notice-hide-link' class='wt-notice-hide-link dashicons dashicons-no'></span>";
160
- $obj->printWarningNotice( $notice_text );*/
161
- //}, 10, 2);
162
-
163
- /**
164
- * Trial notice on all WP admin pages
165
- */
166
- /* add_action( "wbcr/factory/admin_notices", function ( $notices, $plugin_name )
167
- {
168
- if ( ( \WBCR\Titan\Plugin::app()->premium->is_activate() ) || ( $plugin_name != \WBCR\Titan\Plugin::app()->getPluginName() ) || ! current_user_can( 'manage_options' ) ) {
169
- return $notices;
170
- }
171
-
172
- $notice_text = __( 'Get the free trial edition (no credit card) contains all of the features included in the paid-for version of the product.', 'titan-security' );
173
- $notice_text .= '&nbsp;<a href="' . add_query_arg( [ 'trial' => 1 ], \WBCR\Titan\Plugin::app()->getPluginPageUrl( 'license' ) ) . '" class="button button-primary">' . __( 'Activate 30 days trial', 'titan-security' ) . '</a>';
174
- $notices[] = [
175
- 'id' => 'get_trial_for_' . \WBCR\Titan\Plugin::app()->getPluginName(),
176
- 'type' => 'info',
177
- 'dismissible' => true,
178
- 'dismiss_expires' => 0,
179
- 'text' => "<p><b>" . \WBCR\Titan\Plugin::app()->getPluginTitle() . ":</b> " . $notice_text . '</p>'
180
- ];
181
-
182
- return $notices;
183
- }, 10, 2 ); */
184
- //}
185
-
186
- // Vulner class
187
- require_once WTITAN_PLUGIN_DIR . "/includes/vulnerabilities/boot.php";
188
- // Audit class
189
- require_once WTITAN_PLUGIN_DIR . "/includes/audit/boot.php";
190
- // SiteChecker class
191
- require_once WTITAN_PLUGIN_DIR . "/includes/sitechecker/boot.php";
192
- // Scanner class
193
- require_once WTITAN_PLUGIN_DIR . "/includes/scanner/boot.php";
194
- // Anti-spam class
195
- require_once WTITAN_PLUGIN_DIR . "/includes/antispam/boot.php";
196
- // Audit class
197
- require_once WTITAN_PLUGIN_DIR . "/includes/check/boot.php";
198
-
1
+ <?php
2
+ /**
3
+ * Usually in this file places the code that is responsible for the notification, compatibility with other plugins,
4
+ * minor functions that must be performed on all pages of the admin panel.
5
+ *
6
+ * This file should contain code that applies only to the administration area.
7
+ *
8
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
9
+ * @copyright Webcraftic 20.11.2019
10
+ * @version 1.0
11
+ */
12
+
13
+ // Exit if accessed directly
14
+ if( !defined('ABSPATH') ) {
15
+ exit;
16
+ }
17
+
18
+ /**
19
+ * Widget with the offer to buy Clearfy Business
20
+ *
21
+ * @param array $widgets
22
+ * @param string $position
23
+ * @param Wbcr_Factory439_Plugin $plugin
24
+ */
25
+
26
+ add_filter('wbcr/factory/pages/impressive/widgets', function ($widgets, $position, $plugin) {
27
+
28
+ if( $plugin->getPluginName() == \WBCR\Titan\Plugin::app()->getPluginName() ) {
29
+
30
+ if( \WBCR\Titan\Plugin::app()->premium->is_activate() ) {
31
+ unset($widgets['donate_widget']);
32
+
33
+ if( $position == 'right' ) {
34
+ unset($widgets['adverts_widget']);
35
+ unset($widgets['business_suggetion']);
36
+ unset($widgets['rating_widget']);
37
+ unset($widgets['info_widget']);
38
+ }
39
+
40
+ return $widgets;
41
+ } else {
42
+ if( $position == 'right' ) {
43
+ unset($widgets['business_suggetion']);
44
+ unset($widgets['info_widget']);
45
+ unset($widgets['rating_widget']);
46
+ $widgets['adverts_widget'] = wtitan_get_sidebar_adverts_widget();
47
+ }
48
+ }
49
+ }
50
+
51
+ return $widgets;
52
+ }, 9999, 3);
53
+
54
+ /**
55
+ * Этот хук реализует условную логику перенаправления на страницу мастера настроек,
56
+ * сразу после активации плагина.
57
+ */
58
+ add_action('admin_init', function () {
59
+
60
+ $plugin = \WBCR\Titan\Plugin::app();
61
+
62
+ // If the user has updated the plugin or activated it for the first time,
63
+ // you need to show the page "What's new?"
64
+ if( !$plugin->isNetworkAdmin() ) {
65
+ $setup_page_viewed = $plugin->request->get('wtitan_setup_page_viewed', null);
66
+ if( is_null($setup_page_viewed) ) {
67
+ if( \WBCR\Titan\Plugin\Helper::is_need_show_setup_page() ) {
68
+ try {
69
+ $redirect_url = '';
70
+ if( class_exists('Wbcr_FactoryPages457') ) {
71
+ $redirect_url = $plugin->getPluginPageUrl('setup', ['wtitan_setup_page_viewed' => 1]);
72
+ }
73
+ if( $redirect_url ) {
74
+ wp_safe_redirect($redirect_url);
75
+ die();
76
+ }
77
+ } catch( Exception $e ) {
78
+ }
79
+ }
80
+ } else {
81
+ if( \WBCR\Titan\Plugin\Helper::is_need_show_setup_page() ) {
82
+ delete_option($plugin->getOptionName('setup_wizard'));
83
+ }
84
+ }
85
+ }
86
+ });
87
+
88
+ /**
89
+ * Выводит кнопку настроек в шапке интерфейса плагина
90
+ */
91
+ /*
92
+ add_action( 'wbcr/factory/pages/impressive/header', function ( $plugin_name ) {
93
+ if ( $plugin_name != WBCR\Titan\Plugin::app()->getPluginName() ) {
94
+ return;
95
+ }
96
+ ?>
97
+ <a href="<?php echo WBCR\Titan\Plugin::app()->getPluginPageUrl( 'plugin_settings' ) ?>" class="wbcr-factory-button wbcr-factory-type-settings">
98
+ <?php echo apply_filters( 'wbcr/clearfy/settings_button_title', __( 'Titan settings', 'titan-security' ) ); ?>
99
+ </a>
100
+ <?php
101
+ } );
102
+ */
103
+
104
+ /**
105
+ * Print admin notice: "Would you like to send them for spam checking?"
106
+ *
107
+ * If user clicked button "Yes, do it", plugin will exec action,
108
+ * that put all unapproved comments to spam check queue.
109
+ */
110
+ add_action('wbcr/factory/admin_notices', function ($notices, $plugin_name) {
111
+ if( $plugin_name != \WBCR\Titan\Plugin::app()->getPluginName() ) {
112
+ return $notices;
113
+ }
114
+
115
+ $notice_text = sprintf(__('Maintenance, Security, Backups & Support for your WordPress Install. <a href="%s" target="_blank" rel="noopener">Now 49$/month!</a>', "titan-security"), 'https://cm-wp.com/wp-support/');
116
+
117
+ $notices[] = [
118
+ 'id' => 'wtitan_creativemotion_support_suggestion',
119
+ 'type' => 'success',
120
+ 'where' => [
121
+ 'edit-comments',
122
+ 'plugins',
123
+ 'themes',
124
+ 'dashboard',
125
+ 'edit',
126
+ 'settings'
127
+ ],
128
+ 'dismissible' => true,
129
+ 'dismiss_expires' => 0,
130
+ 'text' => '<p><strong>Titan:</strong><br>' . $notice_text . '</p>'
131
+ ];
132
+
133
+ return $notices;
134
+ }, 10, 2);
135
+
136
+ //if ( ! \WBCR\Titan\Plugin::app()->getOption( 'trial_notice_dismissed', false ) ) {
137
+ /**
138
+ * Trial notice on plugin pages
139
+ */
140
+ //add_action('wbcr/factory/pages/impressive/print_all_notices', function ($plugin, $obj) {
141
+ /* if( is_plugin_active('plugins-scanner-premium/plugins-scanner-premium.php') || ($plugin->getPluginName() != \WBCR\Titan\Plugin::app()->getPluginName()) ) {
142
+ return;
143
+ }
144
+
145
+ $notice_text = __('Plugins scanner - detect vulnerabilities in any of your plugins before activation', 'titan-security');
146
+ $notice_text .= '&nbsp;<a href="https://titansitescanner.com/plugin-scanner/" target="_blank" rel="noopener" class="wtitan-get-plugins-scanner__btn">' . __('Sign Up for $9.99', 'titan-security') . '</a>';
147
+
148
+ echo '<div class="alert alert-warning wbcr-factory-warning-notice wtitan-get-plugins-scanner__notice"><p><span class="dashicons dashicons-plugins-checked"></span> ' . $notice_text . '</p></div>';
149
+ *///$obj->printWarningNotice($notice_text);
150
+
151
+ /** @var \Wbcr_Factory458_Plugin $plugin */
152
+ /** @var \Wbcr_FactoryPages457_ImpressiveThemplate $obj */
153
+ /*if ( ( \WBCR\Titan\Plugin::app()->premium->is_activate() ) || ( $plugin->getPluginName() != \WBCR\Titan\Plugin::app()->getPluginName() ) || $obj->id == 'license' ) {
154
+ return;
155
+ }
156
+
157
+ $notice_text = __( 'Get the free trial edition (no credit card) contains all of the features included in the paid-for version of the product.', 'titan-security' );
158
+ $notice_text .= '&nbsp;<a href="' . add_query_arg( [ 'trial' => 1 ], \WBCR\Titan\Plugin::app()->getPluginPageUrl( 'license' ) ) . '" class="btn btn-gold btn-sm wt-notice-trial-button">' . __( 'Activate 30 days trial', 'titan-security' ) . '</a>';
159
+ $notice_text .= "<span id='wt-notice-hide-link' class='wt-notice-hide-link dashicons dashicons-no'></span>";
160
+ $obj->printWarningNotice( $notice_text );*/
161
+ //}, 10, 2);
162
+
163
+ /**
164
+ * Trial notice on all WP admin pages
165
+ */
166
+ /* add_action( "wbcr/factory/admin_notices", function ( $notices, $plugin_name )
167
+ {
168
+ if ( ( \WBCR\Titan\Plugin::app()->premium->is_activate() ) || ( $plugin_name != \WBCR\Titan\Plugin::app()->getPluginName() ) || ! current_user_can( 'manage_options' ) ) {
169
+ return $notices;
170
+ }
171
+
172
+ $notice_text = __( 'Get the free trial edition (no credit card) contains all of the features included in the paid-for version of the product.', 'titan-security' );
173
+ $notice_text .= '&nbsp;<a href="' . add_query_arg( [ 'trial' => 1 ], \WBCR\Titan\Plugin::app()->getPluginPageUrl( 'license' ) ) . '" class="button button-primary">' . __( 'Activate 30 days trial', 'titan-security' ) . '</a>';
174
+ $notices[] = [
175
+ 'id' => 'get_trial_for_' . \WBCR\Titan\Plugin::app()->getPluginName(),
176
+ 'type' => 'info',
177
+ 'dismissible' => true,
178
+ 'dismiss_expires' => 0,
179
+ 'text' => "<p><b>" . \WBCR\Titan\Plugin::app()->getPluginTitle() . ":</b> " . $notice_text . '</p>'
180
+ ];
181
+
182
+ return $notices;
183
+ }, 10, 2 ); */
184
+ //}
185
+
186
+ // Vulner class
187
+ require_once WTITAN_PLUGIN_DIR . "/includes/vulnerabilities/boot.php";
188
+ // Audit class
189
+ require_once WTITAN_PLUGIN_DIR . "/includes/audit/boot.php";
190
+ // SiteChecker class
191
+ require_once WTITAN_PLUGIN_DIR . "/includes/sitechecker/boot.php";
192
+ // Scanner class
193
+ require_once WTITAN_PLUGIN_DIR . "/includes/scanner/boot.php";
194
+ // Anti-spam class
195
+ require_once WTITAN_PLUGIN_DIR . "/includes/antispam/boot.php";
196
+ // Audit class
197
+ require_once WTITAN_PLUGIN_DIR . "/includes/check/boot.php";
198
+
admin/class-activation.php CHANGED
@@ -1,71 +1,71 @@
1
- <?php
2
-
3
- namespace WBCR\Titan;
4
-
5
- /**
6
- * Activator for the Antispam
7
- *
8
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
9
- * @copyright (c) 26.10.2019, Webcraftic
10
- * @see Wbcr_Factory454_Activator
11
- * @version 1.0
12
- */
13
-
14
- // Exit if accessed directly
15
- if( !defined('ABSPATH') ) {
16
- exit;
17
- }
18
-
19
- class Activation extends \Wbcr_Factory454_Activator {
20
-
21
- /**
22
- * Runs activation actions.
23
- *
24
- * @since 6.0
25
- */
26
- public function activate()
27
- {
28
- $plugin_version_in_db = $this->get_plugin_version_in_db();
29
- $current_plugin_version = $this->plugin->getPluginVersion();
30
-
31
- $tab = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
32
- $log_message = "Plugin starts activation [START].\r\n";
33
- $log_message .= "{$tab}-Plugin Version in DB: {$plugin_version_in_db}\r\n";
34
- $log_message .= "{$tab}-Current Plugin Version: {$current_plugin_version}";
35
-
36
- require_once WTITAN_PLUGIN_DIR . '/includes/bruteforce/do_activate.php';
37
-
38
- update_option($this->plugin->getOptionName('setup_wizard'), 1);
39
-
40
- \WBCR\Titan\Logger\Writter::info($log_message);
41
- }
42
-
43
- /**
44
- * Get previous plugin version
45
- *
46
- * @return number
47
- * @since 6.0
48
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
49
- */
50
- public function get_plugin_version_in_db()
51
- {
52
- if( \WBCR\Titan\Plugin::app()->isNetworkActive() ) {
53
- return get_site_option(\WBCR\Titan\Plugin::app()->getOptionName('plugin_version'), 0);
54
- }
55
-
56
- return get_option(\WBCR\Titan\Plugin::app()->getOptionName('plugin_version'), 0);
57
- }
58
-
59
-
60
- /**
61
- * Run deactivation actions.
62
- *
63
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
64
- * @since 6.0
65
- */
66
- public function deactivate()
67
- {
68
- \WBCR\Titan\Logger\Writter::info("Plugin starts deactivate [START].");
69
- \WBCR\Titan\Logger\Writter::info("Plugin has been deactivated [END]!");
70
- }
71
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan;
4
+
5
+ /**
6
+ * Activator for the Antispam
7
+ *
8
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
9
+ * @copyright (c) 26.10.2019, Webcraftic
10
+ * @see Wbcr_Factory458_Activator
11
+ * @version 1.0
12
+ */
13
+
14
+ // Exit if accessed directly
15
+ if( !defined('ABSPATH') ) {
16
+ exit;
17
+ }
18
+
19
+ class Activation extends \Wbcr_Factory458_Activator {
20
+
21
+ /**
22
+ * Runs activation actions.
23
+ *
24
+ * @since 6.0
25
+ */
26
+ public function activate()
27
+ {
28
+ $plugin_version_in_db = $this->get_plugin_version_in_db();
29
+ $current_plugin_version = $this->plugin->getPluginVersion();
30
+
31
+ $tab = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
32
+ $log_message = "Plugin starts activation [START].\r\n";
33
+ $log_message .= "{$tab}-Plugin Version in DB: {$plugin_version_in_db}\r\n";
34
+ $log_message .= "{$tab}-Current Plugin Version: {$current_plugin_version}";
35
+
36
+ require_once WTITAN_PLUGIN_DIR . '/includes/bruteforce/do_activate.php';
37
+
38
+ update_option($this->plugin->getOptionName('setup_wizard'), 1);
39
+
40
+ \WBCR\Titan\Logger\Writter::info($log_message);
41
+ }
42
+
43
+ /**
44
+ * Get previous plugin version
45
+ *
46
+ * @return number
47
+ * @since 6.0
48
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
49
+ */
50
+ public function get_plugin_version_in_db()
51
+ {
52
+ if( \WBCR\Titan\Plugin::app()->isNetworkActive() ) {
53
+ return get_site_option(\WBCR\Titan\Plugin::app()->getOptionName('plugin_version'), 0);
54
+ }
55
+
56
+ return get_option(\WBCR\Titan\Plugin::app()->getOptionName('plugin_version'), 0);
57
+ }
58
+
59
+
60
+ /**
61
+ * Run deactivation actions.
62
+ *
63
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
64
+ * @since 6.0
65
+ */
66
+ public function deactivate()
67
+ {
68
+ \WBCR\Titan\Logger\Writter::info("Plugin starts deactivate [START].");
69
+ \WBCR\Titan\Logger\Writter::info("Plugin has been deactivated [END]!");
70
+ }
71
+ }
admin/class-page-titan-basic.php CHANGED
@@ -1,124 +1,124 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * Base class for Titan pages
12
- *
13
- * @author Artem Prihodko <webtemyk@ya.ru>
14
- * @copyright (c) 2020 Creative Motion
15
- * @version 1.0
16
- */
17
- class Base extends \WBCR\Factory_Templates_106\Pages\PageBase {
18
-
19
- /**
20
- * Scanner page constructor.
21
- *
22
- * @param \Wbcr_Factory454_Plugin $plugin
23
- *
24
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
25
- *
26
- */
27
- public function __construct( \Wbcr_Factory454_Plugin $plugin ) {
28
- parent::__construct( $plugin );
29
- $this->menuIcon = WTITAN_PLUGIN_URL . '/admin/assets/img/titan-icon.png';
30
- }
31
-
32
- /**
33
- * Add assets
34
- *
35
- * @return void
36
- * @since 1.0.0
37
- */
38
- public function assets( $scripts, $styles ) {
39
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/titan-security.css' );
40
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/titan-security.js' );
41
- $this->scripts->localize( 'wtitan_trial', ["nonce" => wp_create_nonce( "wtitan_hide_trial_notice" )] );
42
-
43
- /* Install addons styles and scripts */
44
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/install-addons.css' );
45
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/install-addons.js' );
46
-
47
- parent::assets( $scripts, $styles );
48
- }
49
-
50
- public function getPluginTitle() {
51
- return "<span class='wt-plugin-header-logo'>&nbsp;</span>" . __( 'Titan Anti-spam & Security', 'titan-security' );
52
- }
53
-
54
- /**
55
- * Создает html разметку виджета поддержки
56
- *
57
- * @since 7.0.6
58
- */
59
- public function showSupportWidget() {
60
- $free_support_url = $this->plugin->get_support()->get_contacts_url();
61
- $hot_support_url = $this->plugin->get_support()->get_site_url() . '/support';
62
-
63
- ?>
64
- <div id="wtitan-support-widget" class="wbcr-factory-sidebar-widget">
65
- <p><strong><?php _e( 'Having Issues?', 'titan-security' ); ?></strong></p>
66
- <div class="wtitan-support-widget-body">
67
- <p>
68
- <?php _e( 'We provide free support for this plugin. If you are pushed with a problem, just create a new ticket. We will definitely help you!', 'titan-security' ); ?>
69
- </p>
70
- <ul>
71
- <li><span class="dashicons dashicons-sos"></span>
72
- <a href="<?= $free_support_url ?>" target="_blank"
73
- rel="noopener"><?php _e( 'Get starting free support', 'titan-security' ); ?></a>
74
- </li>
75
- <li style="margin-top: 15px;background: #fff4f1;padding: 10px;color: #a58074;">
76
- <span class="dashicons dashicons-warning"></span>
77
- <?php printf( __( 'If you find a php error or a vulnerability in plugin, you can <a href="%s" target="_blank" rel="noopener">create ticket</a> in hot support that we responded instantly.', 'titan-security' ), $hot_support_url ); ?>
78
- </li>
79
- </ul>
80
- </div>
81
- </div>
82
- <?php
83
- }
84
-
85
- /**
86
- * Создает html разметку виджета рейтинга
87
- *
88
- * @param array $args
89
- *
90
- * @since 7.0.6
91
- */
92
- public function showRatingWidget( array $args ) {
93
- if ( ! isset( $args[0] ) || empty( $args[0] ) ) {
94
- $page_url = "https://wordpress.org/support/plugin/anti-spam/reviews/#new-post";
95
- } else {
96
- $page_url = $args[0];
97
- }
98
-
99
- $page_url = apply_filters( 'wbcr_factory_pages_453_imppage_rating_widget_url', $page_url, $this->plugin->getPluginName(), $this->getResultId() );
100
-
101
- ?>
102
- <div class="wbcr-factory-sidebar-widget">
103
- <p>
104
- <strong><?php _e( 'Do you want the plugin to improved and update?', 'titan-security' ); ?></strong>
105
- </p>
106
- <p><?php _e( 'Help the author, leave a review on wordpress.org. Thanks to feedback, we will know that the plugin is really useful to you and is needed.', 'titan-security' ); ?></p>
107
- <p><?php _e( 'And also write your ideas on how to extend or improve the plugin.', 'titan-security' ); ?></p>
108
- <p>
109
- <span class="wporg-ratings" title="5 out of 5 stars" style="color:#ffb900;">
110
- <span class="dashicons dashicons-star-filled"></span>
111
- <span class="dashicons dashicons-star-filled"></span>
112
- <span class="dashicons dashicons-star-filled"></span>
113
- <span class="dashicons dashicons-star-filled"></span>
114
- <span class="dashicons dashicons-star-filled"></span>
115
- </span>
116
- <a href="<?= $page_url ?>" title="Go rate us" target="_blank">
117
- <strong><?php _e( 'Go rate us and push ideas', 'titan-security' ); ?></strong>
118
- </a>
119
- </p>
120
- </div>
121
- <?php
122
- }
123
-
124
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * Base class for Titan pages
12
+ *
13
+ * @author Artem Prihodko <webtemyk@ya.ru>
14
+ * @copyright (c) 2020 Creative Motion
15
+ * @version 1.0
16
+ */
17
+ class Base extends \WBCR\Factory_Templates_110\Pages\PageBase {
18
+
19
+ /**
20
+ * Scanner page constructor.
21
+ *
22
+ * @param \Wbcr_Factory458_Plugin $plugin
23
+ *
24
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
25
+ *
26
+ */
27
+ public function __construct( \Wbcr_Factory458_Plugin $plugin ) {
28
+ parent::__construct( $plugin );
29
+ $this->menuIcon = WTITAN_PLUGIN_URL . '/admin/assets/img/titan-icon.png';
30
+ }
31
+
32
+ /**
33
+ * Add assets
34
+ *
35
+ * @return void
36
+ * @since 1.0.0
37
+ */
38
+ public function assets( $scripts, $styles ) {
39
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/titan-security.css' );
40
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/titan-security.js' );
41
+ $this->scripts->localize( 'wtitan_trial', ["nonce" => wp_create_nonce( "wtitan_hide_trial_notice" )] );
42
+
43
+ /* Install addons styles and scripts */
44
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/install-addons.css' );
45
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/install-addons.js' );
46
+
47
+ parent::assets( $scripts, $styles );
48
+ }
49
+
50
+ public function getPluginTitle() {
51
+ return "<span class='wt-plugin-header-logo'>&nbsp;</span>" . __( 'Titan Anti-spam & Security', 'titan-security' );
52
+ }
53
+
54
+ /**
55
+ * Создает html разметку виджета поддержки
56
+ *
57
+ * @since 7.0.6
58
+ */
59
+ public function showSupportWidget() {
60
+ $free_support_url = $this->plugin->get_support()->get_contacts_url();
61
+ $hot_support_url = $this->plugin->get_support()->get_site_url() . '/support';
62
+
63
+ ?>
64
+ <div id="wtitan-support-widget" class="wbcr-factory-sidebar-widget">
65
+ <p><strong><?php _e( 'Having Issues?', 'titan-security' ); ?></strong></p>
66
+ <div class="wtitan-support-widget-body">
67
+ <p>
68
+ <?php _e( 'We provide free support for this plugin. If you are pushed with a problem, just create a new ticket. We will definitely help you!', 'titan-security' ); ?>
69
+ </p>
70
+ <ul>
71
+ <li><span class="dashicons dashicons-sos"></span>
72
+ <a href="<?= $free_support_url ?>" target="_blank"
73
+ rel="noopener"><?php _e( 'Get starting free support', 'titan-security' ); ?></a>
74
+ </li>
75
+ <li style="margin-top: 15px;background: #fff4f1;padding: 10px;color: #a58074;">
76
+ <span class="dashicons dashicons-warning"></span>
77
+ <?php printf( __( 'If you find a php error or a vulnerability in plugin, you can <a href="%s" target="_blank" rel="noopener">create ticket</a> in hot support that we responded instantly.', 'titan-security' ), $hot_support_url ); ?>
78
+ </li>
79
+ </ul>
80
+ </div>
81
+ </div>
82
+ <?php
83
+ }
84
+
85
+ /**
86
+ * Создает html разметку виджета рейтинга
87
+ *
88
+ * @param array $args
89
+ *
90
+ * @since 7.0.6
91
+ */
92
+ public function showRatingWidget( array $args ) {
93
+ if ( ! isset( $args[0] ) || empty( $args[0] ) ) {
94
+ $page_url = "https://wordpress.org/support/plugin/anti-spam/reviews/#new-post";
95
+ } else {
96
+ $page_url = $args[0];
97
+ }
98
+
99
+ $page_url = apply_filters( 'wbcr_factory_pages_457_imppage_rating_widget_url', $page_url, $this->plugin->getPluginName(), $this->getResultId() );
100
+
101
+ ?>
102
+ <div class="wbcr-factory-sidebar-widget">
103
+ <p>
104
+ <strong><?php _e( 'Do you want the plugin to improved and update?', 'titan-security' ); ?></strong>
105
+ </p>
106
+ <p><?php _e( 'Help the author, leave a review on wordpress.org. Thanks to feedback, we will know that the plugin is really useful to you and is needed.', 'titan-security' ); ?></p>
107
+ <p><?php _e( 'And also write your ideas on how to extend or improve the plugin.', 'titan-security' ); ?></p>
108
+ <p>
109
+ <span class="wporg-ratings" title="5 out of 5 stars" style="color:#ffb900;">
110
+ <span class="dashicons dashicons-star-filled"></span>
111
+ <span class="dashicons dashicons-star-filled"></span>
112
+ <span class="dashicons dashicons-star-filled"></span>
113
+ <span class="dashicons dashicons-star-filled"></span>
114
+ <span class="dashicons dashicons-star-filled"></span>
115
+ </span>
116
+ <a href="<?= $page_url ?>" title="Go rate us" target="_blank">
117
+ <strong><?php _e( 'Go rate us and push ideas', 'titan-security' ); ?></strong>
118
+ </a>
119
+ </p>
120
+ </div>
121
+ <?php
122
+ }
123
+
124
+ }
admin/includes/classes/class.delete-plugins-button.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
- /**
3
- * Uninstall addon button
4
- *
5
- * @author Artem Prihodko <webtemyk@yandex.ru>
6
- * @since 7.0.3
7
- * @copyright (c) 2020, Creative Motion
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( ! defined( 'ABSPATH' ) ) {
12
- exit;
13
- }
14
-
15
- class WTITAN_DeletePluginsButton extends WTITAN_InstallPluginsButton {
16
-
17
- /**
18
- * @throws \Exception
19
- */
20
- protected function build_wordpress() {
21
- parent::build_wordpress();
22
-
23
- $this->action = 'delete';
24
- $this->addData( 'plugin-action', $this->action );
25
- $this->removeClass( 'button-primary' );
26
- }
27
-
28
- protected function build_internal() {
29
- // nothing
30
- }
31
-
32
- /**
33
- * @param bool $echo
34
- *
35
- * @return string|void
36
- */
37
- public function getButton() {
38
- $button = '<a href="#" class="' . implode( ' ', $this->get_classes() ) . '" ' . implode( ' ', $this->get_data() ) . '><span class="dashicons dashicons-trash"></span></a>';
39
-
40
- if ( $this->type == 'internal' || ! $this->isPluginInstall() || $this->isPluginActivate() ) {
41
- $button = '';
42
- }
43
-
44
- return $button;
45
- }
46
- }
47
-
1
+ <?php
2
+ /**
3
+ * Uninstall addon button
4
+ *
5
+ * @author Artem Prihodko <webtemyk@yandex.ru>
6
+ * @since 7.0.3
7
+ * @copyright (c) 2020, Creative Motion
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
+ class WTITAN_DeletePluginsButton extends WTITAN_InstallPluginsButton {
16
+
17
+ /**
18
+ * @throws \Exception
19
+ */
20
+ protected function build_wordpress() {
21
+ parent::build_wordpress();
22
+
23
+ $this->action = 'delete';
24
+ $this->addData( 'plugin-action', $this->action );
25
+ $this->removeClass( 'button-primary' );
26
+ }
27
+
28
+ protected function build_internal() {
29
+ // nothing
30
+ }
31
+
32
+ /**
33
+ * @param bool $echo
34
+ *
35
+ * @return string|void
36
+ */
37
+ public function getButton() {
38
+ $button = '<a href="#" class="' . implode( ' ', $this->get_classes() ) . '" ' . implode( ' ', $this->get_data() ) . '><span class="dashicons dashicons-trash"></span></a>';
39
+
40
+ if ( $this->type == 'internal' || ! $this->isPluginInstall() || $this->isPluginActivate() ) {
41
+ $button = '';
42
+ }
43
+
44
+ return $button;
45
+ }
46
+ }
47
+
admin/includes/classes/class.install-plugins-button.php CHANGED
@@ -1,353 +1,353 @@
1
- <?php
2
- /**
3
- * Install addon button
4
- *
5
- * @author Artem Prihodko <webtemyk@yandex.ru>
6
- * @since 7.0.3
7
- * @copyright (c) 2020, Creative Motion
8
- */
9
-
10
- // Exit if accessed directly
11
- if ( ! defined( 'ABSPATH' ) ) {
12
- exit;
13
- }
14
-
15
- class WTITAN_InstallPluginsButton {
16
-
17
- protected $type;
18
- protected $plugin_slug;
19
-
20
- protected $classes = [
21
- 'button',
22
- 'wtitan-proccess-button',
23
- 'wtitan-update-component-button'
24
- ];
25
- protected $data = [];
26
- protected $base_path;
27
-
28
- protected $action;
29
-
30
- protected $url;
31
-
32
- /**
33
- * @param string $group_name
34
- *
35
- * @throws \Exception
36
- */
37
- public function __construct( $type, $plugin_slug ) {
38
- if ( empty( $type ) || ! is_string( $plugin_slug ) ) {
39
- throw new \Exception( 'Empty type or plugin_slug attribute.' );
40
- }
41
- $this->type = $type;
42
- $this->plugin_slug = $plugin_slug;
43
-
44
- if ( $this->type == 'wordpress' ) {
45
- if ( strpos( rtrim( trim( $this->plugin_slug ) ), '/' ) !== false ) {
46
- $this->base_path = $this->plugin_slug;
47
- $base_path_parts = explode( '/', $this->base_path );
48
- if ( sizeof( $base_path_parts ) === 2 ) {
49
- $this->plugin_slug = $base_path_parts[0];
50
- }
51
- } else {
52
- $this->base_path = $this->get_plugin_base_path_by_slug( $this->plugin_slug );
53
- }
54
-
55
- $this->build_wordpress();
56
- } else if ( $this->type == 'internal' ) {
57
- $this->build_internal();
58
- } else {
59
- throw new \Exception( 'Invalid button type.' );
60
- }
61
-
62
- // Set default data
63
- $this->addData( 'storage', $this->type );
64
- $this->addData( 'i18n', WBCR\Titan\Plugin\Helper::getEscapeJson( $this->get_i18n() ) );
65
- $this->addData( 'wpnonce', wp_create_nonce( 'updates' ) );
66
- }
67
-
68
- /**
69
- * @return bool
70
- */
71
- public function isPluginActivate() {
72
- if ( $this->type == 'wordpress' && $this->isPluginInstall() ) {
73
- require_once ABSPATH . '/wp-admin/includes/plugin.php';
74
-
75
- return is_plugin_active( $this->base_path );
76
- } else if ( $this->type == 'internal' ) {
77
- $preinsatall_components = WBCR\Titan\Plugin::app()->getPopulateOption( 'deactive_preinstall_components', [] );
78
-
79
- return ! in_array( $this->plugin_slug, $preinsatall_components );
80
- }
81
-
82
- return false;
83
- }
84
-
85
- /**
86
- * @return bool
87
- */
88
- public function isPluginInstall() {
89
- if ( $this->type == 'wordpress' ) {
90
- if ( empty( $this->base_path ) ) {
91
- return false;
92
- }
93
-
94
- // Check if the function get_plugins() is registered. It is necessary for the front-end
95
- // usually get_plugins() only works in the admin panel.
96
- if ( ! function_exists( 'get_plugins' ) ) {
97
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
98
- }
99
-
100
- $plugins = get_plugins();
101
-
102
- if ( isset( $plugins[ $this->base_path ] ) ) {
103
- return true;
104
- }
105
- } else if ( $this->type == 'internal' ) {
106
- return true;
107
- }
108
-
109
- return false;
110
- }
111
-
112
- /**
113
- * @param $class
114
- *
115
- * @throws \Exception
116
- */
117
- public function addClass( $class ) {
118
- if ( ! is_string( $class ) ) {
119
- throw new \Exception( 'Attribute class must be a string.' );
120
- }
121
- $this->classes[] = $class;
122
- }
123
-
124
- /**
125
- * @param $class
126
- *
127
- * @return bool
128
- * @throws \Exception
129
- */
130
- public function removeClass( $class ) {
131
- if ( ! is_string( $class ) ) {
132
- throw new \Exception( 'Attribute class must be a string.' );
133
- }
134
- $key = array_search( $class, $this->classes );
135
- if ( isset( $this->classes[ $key ] ) ) {
136
- unset( $this->classes[ $key ] );
137
-
138
- return true;
139
- }
140
-
141
- return false;
142
- }
143
-
144
- /**
145
- * @param $name
146
- * @param $value
147
- *
148
- * @throws \Exception
149
- */
150
- public function addData( $name, $value ) {
151
- if ( ! is_string( $name ) || ! is_string( $value ) ) {
152
- throw new \Exception( 'Attributes name and value must be a string.' );
153
- }
154
-
155
- $this->data[ $name ] = $value;
156
- }
157
-
158
- /**
159
- * @param $name
160
- *
161
- * @return bool
162
- * @throws \Exception
163
- */
164
- public function removeData( $name ) {
165
- if ( ! is_string( $name ) ) {
166
- throw new \Exception( 'Attribute name must be a string.' );
167
- }
168
-
169
- if ( isset( $this->data[ $name ] ) ) {
170
- unset( $this->data[ $name ] );
171
-
172
- return true;
173
- }
174
-
175
- return false;
176
- }
177
-
178
- /**
179
- * Print an install button
180
- *
181
- * @throws \Exception
182
- * @since 1.5.0
183
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
184
- */
185
- public function renderButton() {
186
- echo $this->getButton();
187
- }
188
-
189
- /**
190
- * @return string
191
- */
192
- public function getButton() {
193
- $i18n = $this->get_i18n();
194
-
195
- $button = '<a href="#" class="' . implode( ' ', $this->get_classes() ) . '" ' . implode( ' ', $this->get_data() ) . '>' . $i18n[ $this->action ] . '</a>';
196
-
197
- return $button;
198
- }
199
-
200
- /**
201
- * @return string
202
- * @throws \Exception
203
- */
204
- public function getLink() {
205
- $this->removeClass( 'button' );
206
- $this->removeClass( 'button-default' );
207
- $this->removeClass( 'button-primary' );
208
-
209
- //$this->addClass('link');
210
- $this->addClass( 'button-link' );
211
-
212
- return $this->getButton();
213
- }
214
-
215
- /**
216
- * Print an install a link
217
- *
218
- * @throws \Exception
219
- * @since 1.5.0
220
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
221
- */
222
- public function renderLink() {
223
- echo $this->getLink();
224
- }
225
-
226
- /**
227
- * @return array
228
- * @since 1.5.0
229
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
230
- */
231
- protected function get_data() {
232
- $data_to_print = [];
233
-
234
- foreach ( (array) $this->data as $key => $value ) {
235
- $data_to_print[ $key ] = 'data-' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"';
236
- }
237
-
238
- return $data_to_print;
239
- }
240
-
241
- /**
242
- * @return array
243
- * @since 1.5.0
244
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
245
- */
246
- protected function get_classes() {
247
- return array_map( 'esc_attr', $this->classes );
248
- }
249
-
250
- /**
251
- * @throws \Exception
252
- * @since 1.5.0
253
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
254
- */
255
- protected function build_wordpress() {
256
- if ( $this->type != 'wordpress' || empty( $this->base_path ) ) {
257
- return;
258
- }
259
-
260
- $this->action = 'install';
261
-
262
- if ( $this->isPluginInstall() ) {
263
- $this->action = 'deactivate';
264
- if ( ! $this->isPluginActivate() ) {
265
- $this->action = 'activate';
266
- }
267
- }
268
-
269
- $this->addData( 'plugin-action', $this->action );
270
- $this->addData( 'slug', $this->plugin_slug );
271
- $this->addData( 'plugin', $this->base_path );
272
-
273
- if ( $this->action == 'activate' ) {
274
- $this->addClass( 'button-primary' );
275
- } else {
276
- $this->addClass( 'button-default' );
277
- }
278
- }
279
-
280
- /**
281
- * Configurate button of internal components
282
- *
283
- * @throws \Exception
284
- * @since 1.5.0
285
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
286
- */
287
- protected function build_internal() {
288
- if ( $this->type != 'internal' ) {
289
- return;
290
- }
291
-
292
- $this->action = 'activate';
293
-
294
- if ( $this->isPluginActivate() ) {
295
- $this->action = 'deactivate';
296
- }
297
-
298
- $this->addData( 'plugin-action', $this->action );
299
- $this->addData( 'plugin', $this->plugin_slug );
300
-
301
- if ( $this->action == 'activate' ) {
302
- $this->addClass( 'button-primary' );
303
- } else {
304
- $this->addClass( 'button-default' );
305
- }
306
- }
307
-
308
- /**
309
- * Internalization for action buttons
310
- *
311
- * @return array
312
- * @since 1.5.0
313
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
314
- */
315
- protected function get_i18n() {
316
- return [
317
- 'activate' => __( 'Activate', 'titan-security' ),
318
- 'install' => __( 'Install', 'titan-security' ),
319
- 'deactivate' => __( 'Deactivate', 'titan-security' ),
320
- 'delete' => __( 'Delete', 'titan-security' ),
321
- 'loading' => __( 'Please wait...', 'titan-security' ),
322
- 'preparation' => __( 'Preparation...', 'titan-security' ),
323
- 'read' => __( 'Read more', 'titan-security' )
324
- ];
325
- }
326
-
327
-
328
- /**
329
- * Allows you to get the base path to the plugin in the directory wp-content/plugins/
330
- *
331
- * @param $slug - slug for example "clearfy", "hide-login-page"
332
- *
333
- * @return int|null|string - "clearfy/clearfy.php"
334
- */
335
- protected function get_plugin_base_path_by_slug( $slug ) {
336
- // Check if the function get_plugins() is registered. It is necessary for the front-end
337
- // usually get_plugins() only works in the admin panel.
338
- if ( ! function_exists( 'get_plugins' ) ) {
339
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
340
- }
341
-
342
- $plugins = get_plugins();
343
-
344
- foreach ( $plugins as $base_path => $plugin ) {
345
- if ( strpos( $base_path, rtrim( trim( $slug ) ) ) !== false ) {
346
- return $base_path;
347
- }
348
- }
349
-
350
- return null;
351
- }
352
- }
353
-
1
+ <?php
2
+ /**
3
+ * Install addon button
4
+ *
5
+ * @author Artem Prihodko <webtemyk@yandex.ru>
6
+ * @since 7.0.3
7
+ * @copyright (c) 2020, Creative Motion
8
+ */
9
+
10
+ // Exit if accessed directly
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
+ class WTITAN_InstallPluginsButton {
16
+
17
+ protected $type;
18
+ protected $plugin_slug;
19
+
20
+ protected $classes = [
21
+ 'button',
22
+ 'wtitan-proccess-button',
23
+ 'wtitan-update-component-button'
24
+ ];
25
+ protected $data = [];
26
+ protected $base_path;
27
+
28
+ protected $action;
29
+
30
+ protected $url;
31
+
32
+ /**
33
+ * @param string $group_name
34
+ *
35
+ * @throws \Exception
36
+ */
37
+ public function __construct( $type, $plugin_slug ) {
38
+ if ( empty( $type ) || ! is_string( $plugin_slug ) ) {
39
+ throw new \Exception( 'Empty type or plugin_slug attribute.' );
40
+ }
41
+ $this->type = $type;
42
+ $this->plugin_slug = $plugin_slug;
43
+
44
+ if ( $this->type == 'wordpress' ) {
45
+ if ( strpos( rtrim( trim( $this->plugin_slug ) ), '/' ) !== false ) {
46
+ $this->base_path = $this->plugin_slug;
47
+ $base_path_parts = explode( '/', $this->base_path );
48
+ if ( sizeof( $base_path_parts ) === 2 ) {
49
+ $this->plugin_slug = $base_path_parts[0];
50
+ }
51
+ } else {
52
+ $this->base_path = $this->get_plugin_base_path_by_slug( $this->plugin_slug );
53
+ }
54
+
55
+ $this->build_wordpress();
56
+ } else if ( $this->type == 'internal' ) {
57
+ $this->build_internal();
58
+ } else {
59
+ throw new \Exception( 'Invalid button type.' );
60
+ }
61
+
62
+ // Set default data
63
+ $this->addData( 'storage', $this->type );
64
+ $this->addData( 'i18n', WBCR\Titan\Plugin\Helper::getEscapeJson( $this->get_i18n() ) );
65
+ $this->addData( 'wpnonce', wp_create_nonce( 'updates' ) );
66
+ }
67
+
68
+ /**
69
+ * @return bool
70
+ */
71
+ public function isPluginActivate() {
72
+ if ( $this->type == 'wordpress' && $this->isPluginInstall() ) {
73
+ require_once ABSPATH . '/wp-admin/includes/plugin.php';
74
+
75
+ return is_plugin_active( $this->base_path );
76
+ } else if ( $this->type == 'internal' ) {
77
+ $preinsatall_components = WBCR\Titan\Plugin::app()->getPopulateOption( 'deactive_preinstall_components', [] );
78
+
79
+ return ! in_array( $this->plugin_slug, $preinsatall_components );
80
+ }
81
+
82
+ return false;
83
+ }
84
+
85
+ /**
86
+ * @return bool
87
+ */
88
+ public function isPluginInstall() {
89
+ if ( $this->type == 'wordpress' ) {
90
+ if ( empty( $this->base_path ) ) {
91
+ return false;
92
+ }
93
+
94
+ // Check if the function get_plugins() is registered. It is necessary for the front-end
95
+ // usually get_plugins() only works in the admin panel.
96
+ if ( ! function_exists( 'get_plugins' ) ) {
97
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
98
+ }
99
+
100
+ $plugins = get_plugins();
101
+
102
+ if ( isset( $plugins[ $this->base_path ] ) ) {
103
+ return true;
104
+ }
105
+ } else if ( $this->type == 'internal' ) {
106
+ return true;
107
+ }
108
+
109
+ return false;
110
+ }
111
+
112
+ /**
113
+ * @param $class
114
+ *
115
+ * @throws \Exception
116
+ */
117
+ public function addClass( $class ) {
118
+ if ( ! is_string( $class ) ) {
119
+ throw new \Exception( 'Attribute class must be a string.' );
120
+ }
121
+ $this->classes[] = $class;
122
+ }
123
+
124
+ /**
125
+ * @param $class
126
+ *
127
+ * @return bool
128
+ * @throws \Exception
129
+ */
130
+ public function removeClass( $class ) {
131
+ if ( ! is_string( $class ) ) {
132
+ throw new \Exception( 'Attribute class must be a string.' );
133
+ }
134
+ $key = array_search( $class, $this->classes );
135
+ if ( isset( $this->classes[ $key ] ) ) {
136
+ unset( $this->classes[ $key ] );
137
+
138
+ return true;
139
+ }
140
+
141
+ return false;
142
+ }
143
+
144
+ /**
145
+ * @param $name
146
+ * @param $value
147
+ *
148
+ * @throws \Exception
149
+ */
150
+ public function addData( $name, $value ) {
151
+ if ( ! is_string( $name ) || ! is_string( $value ) ) {
152
+ throw new \Exception( 'Attributes name and value must be a string.' );
153
+ }
154
+
155
+ $this->data[ $name ] = $value;
156
+ }
157
+
158
+ /**
159
+ * @param $name
160
+ *
161
+ * @return bool
162
+ * @throws \Exception
163
+ */
164
+ public function removeData( $name ) {
165
+ if ( ! is_string( $name ) ) {
166
+ throw new \Exception( 'Attribute name must be a string.' );
167
+ }
168
+
169
+ if ( isset( $this->data[ $name ] ) ) {
170
+ unset( $this->data[ $name ] );
171
+
172
+ return true;
173
+ }
174
+
175
+ return false;
176
+ }
177
+
178
+ /**
179
+ * Print an install button
180
+ *
181
+ * @throws \Exception
182
+ * @since 1.5.0
183
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
184
+ */
185
+ public function renderButton() {
186
+ echo $this->getButton();
187
+ }
188
+
189
+ /**
190
+ * @return string
191
+ */
192
+ public function getButton() {
193
+ $i18n = $this->get_i18n();
194
+
195
+ $button = '<a href="#" class="' . implode( ' ', $this->get_classes() ) . '" ' . implode( ' ', $this->get_data() ) . '>' . $i18n[ $this->action ] . '</a>';
196
+
197
+ return $button;
198
+ }
199
+
200
+ /**
201
+ * @return string
202
+ * @throws \Exception
203
+ */
204
+ public function getLink() {
205
+ $this->removeClass( 'button' );
206
+ $this->removeClass( 'button-default' );
207
+ $this->removeClass( 'button-primary' );
208
+
209
+ //$this->addClass('link');
210
+ $this->addClass( 'button-link' );
211
+
212
+ return $this->getButton();
213
+ }
214
+
215
+ /**
216
+ * Print an install a link
217
+ *
218
+ * @throws \Exception
219
+ * @since 1.5.0
220
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
221
+ */
222
+ public function renderLink() {
223
+ echo $this->getLink();
224
+ }
225
+
226
+ /**
227
+ * @return array
228
+ * @since 1.5.0
229
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
230
+ */
231
+ protected function get_data() {
232
+ $data_to_print = [];
233
+
234
+ foreach ( (array) $this->data as $key => $value ) {
235
+ $data_to_print[ $key ] = 'data-' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"';
236
+ }
237
+
238
+ return $data_to_print;
239
+ }
240
+
241
+ /**
242
+ * @return array
243
+ * @since 1.5.0
244
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
245
+ */
246
+ protected function get_classes() {
247
+ return array_map( 'esc_attr', $this->classes );
248
+ }
249
+
250
+ /**
251
+ * @throws \Exception
252
+ * @since 1.5.0
253
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
254
+ */
255
+ protected function build_wordpress() {
256
+ if ( $this->type != 'wordpress' || empty( $this->base_path ) ) {
257
+ return;
258
+ }
259
+
260
+ $this->action = 'install';
261
+
262
+ if ( $this->isPluginInstall() ) {
263
+ $this->action = 'deactivate';
264
+ if ( ! $this->isPluginActivate() ) {
265
+ $this->action = 'activate';
266
+ }
267
+ }
268
+
269
+ $this->addData( 'plugin-action', $this->action );
270
+ $this->addData( 'slug', $this->plugin_slug );
271
+ $this->addData( 'plugin', $this->base_path );
272
+
273
+ if ( $this->action == 'activate' ) {
274
+ $this->addClass( 'button-primary' );
275
+ } else {
276
+ $this->addClass( 'button-default' );
277
+ }
278
+ }
279
+
280
+ /**
281
+ * Configurate button of internal components
282
+ *
283
+ * @throws \Exception
284
+ * @since 1.5.0
285
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
286
+ */
287
+ protected function build_internal() {
288
+ if ( $this->type != 'internal' ) {
289
+ return;
290
+ }
291
+
292
+ $this->action = 'activate';
293
+
294
+ if ( $this->isPluginActivate() ) {
295
+ $this->action = 'deactivate';
296
+ }
297
+
298
+ $this->addData( 'plugin-action', $this->action );
299
+ $this->addData( 'plugin', $this->plugin_slug );
300
+
301
+ if ( $this->action == 'activate' ) {
302
+ $this->addClass( 'button-primary' );
303
+ } else {
304
+ $this->addClass( 'button-default' );
305
+ }
306
+ }
307
+
308
+ /**
309
+ * Internalization for action buttons
310
+ *
311
+ * @return array
312
+ * @since 1.5.0
313
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
314
+ */
315
+ protected function get_i18n() {
316
+ return [
317
+ 'activate' => __( 'Activate', 'titan-security' ),
318
+ 'install' => __( 'Install', 'titan-security' ),
319
+ 'deactivate' => __( 'Deactivate', 'titan-security' ),
320
+ 'delete' => __( 'Delete', 'titan-security' ),
321
+ 'loading' => __( 'Please wait...', 'titan-security' ),
322
+ 'preparation' => __( 'Preparation...', 'titan-security' ),
323
+ 'read' => __( 'Read more', 'titan-security' )
324
+ ];
325
+ }
326
+
327
+
328
+ /**
329
+ * Allows you to get the base path to the plugin in the directory wp-content/plugins/
330
+ *
331
+ * @param $slug - slug for example "clearfy", "hide-login-page"
332
+ *
333
+ * @return int|null|string - "clearfy/clearfy.php"
334
+ */
335
+ protected function get_plugin_base_path_by_slug( $slug ) {
336
+ // Check if the function get_plugins() is registered. It is necessary for the front-end
337
+ // usually get_plugins() only works in the admin panel.
338
+ if ( ! function_exists( 'get_plugins' ) ) {
339
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
340
+ }
341
+
342
+ $plugins = get_plugins();
343
+
344
+ foreach ( $plugins as $base_path => $plugin ) {
345
+ if ( strpos( $base_path, rtrim( trim( $slug ) ) ) !== false ) {
346
+ return $base_path;
347
+ }
348
+ }
349
+
350
+ return null;
351
+ }
352
+ }
353
+
admin/pages/class-page-backup.php CHANGED
@@ -1,82 +1,82 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- use WBCR\Titan\Plugin;
6
-
7
- class Backup extends Base
8
- {
9
-
10
- /**
11
- * The id of the page in the admin menu.
12
- *
13
- * Mainly used to navigate between pages.
14
- * @see FactoryPages453_AdminPage
15
- *
16
- * @since 1.0.0
17
- * @var string
18
- */
19
- public $id = "bm_settings";
20
-
21
- public $type = 'page';
22
-
23
- /**
24
- * @var string
25
- */
26
- public $page_menu_dashicon = 'dashicons-backup';
27
-
28
- /**
29
- * @var bool
30
- */
31
- public $available_for_multisite = true;
32
-
33
- /**
34
- * @var bool
35
- */
36
- public $clearfy_collaboration = false;
37
-
38
- /**
39
- * @var bool
40
- */
41
- public $show_right_sidebar_in_options = false;
42
-
43
- /**
44
- * @var object|\WBCR\Titan\Views
45
- */
46
- public $view;
47
-
48
- /**
49
- * @param Plugin $plugin
50
- */
51
- public function __construct( $plugin )
52
- {
53
- $this->menu_title = __( 'Backup', 'wbcr-backup-master' );
54
- $this->page_menu_short_description = __( 'Manage backups', 'wbcr-backup-master' );
55
-
56
- $this->view = Plugin::app()->view();
57
-
58
- parent::__construct( $plugin );
59
- }
60
-
61
- /**
62
- * Requests assets (js and css) for the page.
63
- *
64
- * @return void
65
- * @since 1.0.0
66
- * @see Wbcr_FactoryPages453_AdminPage
67
- *
68
- */
69
- public function assets( $scripts, $styles )
70
- {
71
- parent::assets( $scripts, $styles );
72
-
73
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/titan-security.css' );
74
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-dashboard.css' );
75
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/backup.css' );
76
- }
77
-
78
- public function showPageContent()
79
- {
80
- $this->view->print_template( 'backup' );
81
- }
82
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ use WBCR\Titan\Plugin;
6
+
7
+ class Backup extends Base
8
+ {
9
+
10
+ /**
11
+ * The id of the page in the admin menu.
12
+ *
13
+ * Mainly used to navigate between pages.
14
+ * @see FactoryPages457_AdminPage
15
+ *
16
+ * @since 1.0.0
17
+ * @var string
18
+ */
19
+ public $id = "bm_settings";
20
+
21
+ public $type = 'page';
22
+
23
+ /**
24
+ * @var string
25
+ */
26
+ public $page_menu_dashicon = 'dashicons-backup';
27
+
28
+ /**
29
+ * @var bool
30
+ */
31
+ public $available_for_multisite = true;
32
+
33
+ /**
34
+ * @var bool
35
+ */
36
+ public $clearfy_collaboration = false;
37
+
38
+ /**
39
+ * @var bool
40
+ */
41
+ public $show_right_sidebar_in_options = false;
42
+
43
+ /**
44
+ * @var object|\WBCR\Titan\Views
45
+ */
46
+ public $view;
47
+
48
+ /**
49
+ * @param Plugin $plugin
50
+ */
51
+ public function __construct( $plugin )
52
+ {
53
+ $this->menu_title = __( 'Backup', 'wbcr-backup-master' );
54
+ $this->page_menu_short_description = __( 'Manage backups', 'wbcr-backup-master' );
55
+
56
+ $this->view = Plugin::app()->view();
57
+
58
+ parent::__construct( $plugin );
59
+ }
60
+
61
+ /**
62
+ * Requests assets (js and css) for the page.
63
+ *
64
+ * @return void
65
+ * @since 1.0.0
66
+ * @see Wbcr_FactoryPages457_AdminPage
67
+ *
68
+ */
69
+ public function assets( $scripts, $styles )
70
+ {
71
+ parent::assets( $scripts, $styles );
72
+
73
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/titan-security.css' );
74
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-dashboard.css' );
75
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/backup.css' );
76
+ }
77
+
78
+ public function showPageContent()
79
+ {
80
+ $this->view->print_template( 'backup' );
81
+ }
82
+ }
admin/pages/class-page-two-factor.php CHANGED
@@ -1,102 +1,102 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- use WBCR\Titan\Plugin;
6
-
7
- if ( ! defined('ABSPATH')) {
8
- exit;
9
- }
10
-
11
- class TwoFactor extends Base
12
- {
13
- /**
14
- * The id of the page in the admin menu.
15
- *
16
- * Mainly used to navigate between pages.
17
- * @see FactoryPages453_AdminPage
18
- *
19
- * @since 1.0.0
20
- * @var string
21
- */
22
- public $id = "tfa_settings";
23
-
24
- public $type = 'page';
25
-
26
- /**
27
- * @var string
28
- */
29
- public $page_menu_dashicon = 'dashicons-admin-network';
30
-
31
- /**
32
- * @var bool
33
- */
34
- public $show_right_sidebar_in_options = true;
35
-
36
- /**
37
- * @var object|\WBCR\Titan\Views
38
- */
39
- public $view;
40
-
41
- /**
42
- * @param Plugin $plugin
43
- */
44
- public function __construct($plugin)
45
- {
46
- $this->menu_title = __('Two-factor', 'two-factor-auth');
47
- $this->page_menu_short_description = __('Two-factor authentication', 'two-factor-auth');
48
-
49
- $this->view = \WBCR\Titan\Plugin::app()->view();
50
-
51
- parent::__construct($plugin);
52
- }
53
-
54
- public function getMenuTitle() {
55
- return parent::getMenuTitle(); // TODO: Change the autogenerated stub
56
- }
57
-
58
- /**
59
- * Requests assets (js and css) for the page.
60
- *
61
- * @return void
62
- * @since 1.0.0
63
- * @see Wbcr_FactoryPages453_AdminPage
64
- *
65
- */
66
- public function assets($scripts, $styles)
67
- {
68
- parent::assets($scripts, $styles);
69
-
70
- if (defined('WBCR_CLEARFY_PLUGIN_ACTIVE')) {
71
- /** @noinspection PhpUndefinedConstantInspection */
72
- $this->styles->add(WCL_PLUGIN_URL.'/admin/assets/css/general.css');
73
- }
74
-
75
- if(defined('WTITAN_PLUGIN_URL')) {
76
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/titan-security.css' );
77
- }
78
-
79
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-dashboard.css');
80
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/dashboard-dashboard.css');
81
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/2fa.css');
82
-
83
- // $this->scripts->add(WTFA_PLUGIN_URL.'/admin/assets/2fa.js', ['jquery']);
84
- $this->scripts->localize('wtitan', [
85
- 'registerApp' => wp_create_nonce('wtfa-register-2fa-app'),
86
- 'remove2fa' => wp_create_nonce('wtfa-remove-2fa-app'),
87
- 'generateRestore' => wp_create_nonce('wtfa-generate-restore-codes'),
88
- 'updateIpWhitelist' => wp_create_nonce('wtfa-update-ip-whitelist'),
89
- 'change2faState' => wp_create_nonce('wtfa-change-2fa-state'),
90
- 'refreshQrCode' => wp_create_nonce('wtfa-reload-qr-code'),
91
- ]);
92
-
93
-
94
- // add_filter('wbcr/factory/pages/impressive/actions_notice', array($this, 'actionNotices'));
95
- }
96
-
97
- public function showPageContent()
98
- {
99
- $user_list = get_users();
100
- $this->view->print_template( 'two-factor', compact('this', 'user_list'));
101
- }
102
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ use WBCR\Titan\Plugin;
6
+
7
+ if ( ! defined('ABSPATH')) {
8
+ exit;
9
+ }
10
+
11
+ class TwoFactor extends Base
12
+ {
13
+ /**
14
+ * The id of the page in the admin menu.
15
+ *
16
+ * Mainly used to navigate between pages.
17
+ * @see FactoryPages457_AdminPage
18
+ *
19
+ * @since 1.0.0
20
+ * @var string
21
+ */
22
+ public $id = "tfa_settings";
23
+
24
+ public $type = 'page';
25
+
26
+ /**
27
+ * @var string
28
+ */
29
+ public $page_menu_dashicon = 'dashicons-admin-network';
30
+
31
+ /**
32
+ * @var bool
33
+ */
34
+ public $show_right_sidebar_in_options = true;
35
+
36
+ /**
37
+ * @var object|\WBCR\Titan\Views
38
+ */
39
+ public $view;
40
+
41
+ /**
42
+ * @param Plugin $plugin
43
+ */
44
+ public function __construct($plugin)
45
+ {
46
+ $this->menu_title = __('Two-factor', 'two-factor-auth');
47
+ $this->page_menu_short_description = __('Two-factor authentication', 'two-factor-auth');
48
+
49
+ $this->view = \WBCR\Titan\Plugin::app()->view();
50
+
51
+ parent::__construct($plugin);
52
+ }
53
+
54
+ public function getMenuTitle() {
55
+ return parent::getMenuTitle(); // TODO: Change the autogenerated stub
56
+ }
57
+
58
+ /**
59
+ * Requests assets (js and css) for the page.
60
+ *
61
+ * @return void
62
+ * @since 1.0.0
63
+ * @see Wbcr_FactoryPages457_AdminPage
64
+ *
65
+ */
66
+ public function assets($scripts, $styles)
67
+ {
68
+ parent::assets($scripts, $styles);
69
+
70
+ if (defined('WBCR_CLEARFY_PLUGIN_ACTIVE')) {
71
+ /** @noinspection PhpUndefinedConstantInspection */
72
+ $this->styles->add(WCL_PLUGIN_URL.'/admin/assets/css/general.css');
73
+ }
74
+
75
+ if(defined('WTITAN_PLUGIN_URL')) {
76
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/titan-security.css' );
77
+ }
78
+
79
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-dashboard.css');
80
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/dashboard-dashboard.css');
81
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/2fa.css');
82
+
83
+ // $this->scripts->add(WTFA_PLUGIN_URL.'/admin/assets/2fa.js', ['jquery']);
84
+ $this->scripts->localize('wtitan', [
85
+ 'registerApp' => wp_create_nonce('wtfa-register-2fa-app'),
86
+ 'remove2fa' => wp_create_nonce('wtfa-remove-2fa-app'),
87
+ 'generateRestore' => wp_create_nonce('wtfa-generate-restore-codes'),
88
+ 'updateIpWhitelist' => wp_create_nonce('wtfa-update-ip-whitelist'),
89
+ 'change2faState' => wp_create_nonce('wtfa-change-2fa-state'),
90
+ 'refreshQrCode' => wp_create_nonce('wtfa-reload-qr-code'),
91
+ ]);
92
+
93
+
94
+ // add_filter('wbcr/factory/pages/impressive/actions_notice', array($this, 'actionNotices'));
95
+ }
96
+
97
+ public function showPageContent()
98
+ {
99
+ $user_list = get_users();
100
+ $this->view->print_template( 'two-factor', compact('this', 'user_list'));
101
+ }
102
+ }
admin/pages/class-pages-antispam.php CHANGED
@@ -1,271 +1,271 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * Страница общих настроек для этого плагина.
12
- *
13
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
14
- * @author Artem Prihodko <webtemyk@yandex.ru>
15
- * @copyright (c) 2020 Creative Motion
16
- * @version 1.0
17
- */
18
- class Antispam extends Base {
19
-
20
- /**
21
- * {@inheritDoc}
22
- *
23
- * @since 6.0
24
- * @var string
25
- */
26
- public $id = "antispam";
27
-
28
- /**
29
- * {@inheritDoc}
30
- *
31
- * @since 6.0
32
- * @var string
33
- */
34
- public $page_menu_dashicon = 'dashicons-testimonial';
35
-
36
- /**
37
- * {@inheritDoc}
38
- *
39
- * @since 6.0
40
- * @var bool
41
- */
42
- public $show_right_sidebar_in_options = true;
43
-
44
- /**
45
- *
46
- */
47
- public $page_menu_position = 100;
48
-
49
- /**
50
- * @var string
51
- */
52
- public $menu_target = 'options-general.php';
53
-
54
- /**
55
- * @var bool
56
- */
57
- public $internal = false;
58
-
59
- /**
60
- * Module URL
61
- *
62
- * @since 7.0
63
- * @var string
64
- */
65
- public $MODULE_URL = WTITAN_PLUGIN_URL . "/includes/antispam";
66
-
67
- /**
68
- * Module path
69
- *
70
- * @since 7.0
71
- * @var string
72
- */
73
- public $MODULE_PATH = WTITAN_PLUGIN_DIR . "/includes/antispam";
74
-
75
- /**
76
- * Module object
77
- *
78
- * @since 7.0
79
- * @var object
80
- */
81
- public $module;
82
-
83
-
84
- /**
85
- * Antispam page constructor.
86
- *
87
- * @param \Wbcr_Factory454_Plugin $plugin
88
- *
89
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
90
- *
91
- */
92
- public function __construct( \Wbcr_Factory454_Plugin $plugin ) {
93
- $this->menu_title = __( 'Anti-spam', 'titan-security' );
94
- $this->page_menu_short_description = __( 'Detected and stoped spam', 'titan-security' );
95
-
96
- $this->plugin = $plugin;
97
- parent::__construct( $plugin );
98
- }
99
-
100
- /**
101
- * Enqueue page assets
102
- *
103
- * @return void
104
- * @since 6.2
105
- * @see Wbcr_FactoryPages453_AdminPage
106
- *
107
- */
108
- public function assets( $scripts, $styles ) {
109
- parent::assets( $scripts, $styles );
110
-
111
- $this->styles->add( $this->MODULE_URL . '/assets/css/settings.css' );
112
- $this->scripts->add( $this->MODULE_URL . '/assets/js/settings.js', [
113
- 'jquery',
114
- 'wbcr-factory-clearfy-000-global'
115
- ], 'wantispam-settings' );
116
- }
117
-
118
- /**
119
- * Permalinks options.
120
- *
121
- * @return mixed[]
122
- * @since 6.2
123
- */
124
- public function getPageOptions() {
125
- $is_premium = wantispam_is_license_activate();
126
- //$upgrade_premium_url = $this->plugin->get_support()->get_pricing_url();
127
-
128
- $blocked_total = 0; // show 0 by default
129
- $antispam_stats = get_option( 'antispam_stats', [] );
130
-
131
- if ( isset( $antispam_stats['blocked_total'] ) ) {
132
- $blocked_total = $antispam_stats['blocked_total'];
133
- }
134
-
135
- $options[] = [
136
- 'type' => 'html',
137
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Base options.', 'titan-security' ) . '</strong>' . '<p>' . sprintf( __( '%s spam comments were blocked by Anti-spam plugin so far.', 'titan-security' ), $blocked_total ) . '</p>' . '</div>'
138
- ];
139
-
140
- $options[] = [
141
- 'type' => 'checkbox',
142
- 'way' => 'buttons',
143
- 'name' => 'antispam_mode',
144
- 'title' => __( 'Anti-spam mode', 'titan-security' ),
145
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
146
- 'hint' => __( 'Enable or disable anti-spam for all site.', 'titan-security' ),
147
- 'default' => true,
148
- ];
149
-
150
- $options[] = [
151
- 'type' => 'checkbox',
152
- 'way' => 'buttons',
153
- 'name' => 'save_spam_comments',
154
- 'title' => __( 'Save spam comments', 'titan-security' ),
155
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
156
- 'hint' => __( 'Save spam comments into spam section. Useful for testing how the plugin works.', 'titan-security' ),
157
- 'default' => true
158
- ];
159
-
160
- if ( $is_premium ) {
161
- $options[] = [
162
- 'type' => 'checkbox',
163
- 'way' => 'buttons',
164
- 'name' => 'comment_form_privacy_notice',
165
- 'title' => __( 'Display a privacy notice under your comment forms.', 'titan-security' ),
166
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
167
- 'hint' => __( 'To help your site with transparency under privacy laws like the GDPR, Antispam can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on above.', 'titan-security' ),
168
- 'default' => false
169
- ];
170
- }
171
-
172
- $options[] = [
173
- 'type' => 'html',
174
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Modules.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
175
- ];
176
-
177
- $options[] = [
178
- 'type' => 'checkbox',
179
- 'way' => 'buttons',
180
- 'name' => 'protect_register_form',
181
- 'title' => __( 'Protect Register Form', 'titan-security' ),
182
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
183
- 'hint' => __( 'Registration form can be protected in a matter of minutes with a few new fields and limits imposed.', 'titan-security' ),
184
- 'default' => false,
185
- 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
186
- ];
187
- $options[] = [
188
- 'type' => 'checkbox',
189
- 'way' => 'buttons',
190
- 'name' => 'protect_comments_form',
191
- 'title' => __( 'Advanced protection of comment forms', 'titan-security' ),
192
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
193
- 'hint' => __( 'In order to protect your comment forms, you need to make it difficult or impossible for an automated tool to fill in or submit the form while keeping it as easy as possible for your customers to fill out the form.', 'titan-security' ),
194
- 'default' => false,
195
- 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
196
- ];
197
- if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
198
- $options[] = [
199
- 'type' => 'checkbox',
200
- 'way' => 'buttons',
201
- 'name' => 'protect_contacts_form7',
202
- 'title' => __( 'Protect Contact Forms 7', 'titan-security' ),
203
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
204
- 'hint' => __( 'Job Spam-Free for WordPress Contact Forms.', 'titan-security' ),
205
- 'default' => false,
206
- 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
207
- ];
208
- }
209
- if ( is_plugin_active( 'ninja-forms/ninja-forms.php' ) ) {
210
- $options[] = [
211
- 'type' => 'checkbox',
212
- 'way' => 'buttons',
213
- 'name' => 'protect_ninja_forms',
214
- 'title' => __( 'Protect Ninja Forms', 'titan-security' ),
215
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
216
- 'hint' => __( 'Protects contact forms of the Ninja Forms plugin from spam.', 'titan-security' ),
217
- 'default' => false,
218
- 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
219
- ];
220
- }
221
- if ( is_plugin_active( 'caldera-forms/caldera-core.php' ) ) {
222
- $options[] = [
223
- 'type' => 'checkbox',
224
- 'way' => 'buttons',
225
- 'name' => 'protect_caldera_forms',
226
- 'title' => __( 'Protect Caldera Forms', 'titan-security' ),
227
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
228
- 'hint' => __( 'Caldera Forms has powerful anti-spam by default. The Anti-spam plugin provides additional anti-spam protection for your Caldera Forms.', 'titan-security' ),
229
- 'default' => false,
230
- 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
231
- 'eventsOn' => [
232
- 'show' => '#wantispam-protect-caldera-forms-message'
233
- ],
234
- 'eventsOff' => [
235
- 'hide' => '#wantispam-protect-caldera-forms-message'
236
- ]
237
- ];
238
-
239
- $options[] = [
240
- 'type' => 'html',
241
- 'html' => [ $this, 'protect_caldera_forms_warning' ]
242
- ];
243
- }
244
-
245
- $form_options = [];
246
-
247
- $form_options[] = [
248
- 'type' => 'form-group',
249
- 'items' => $options,
250
- //'cssClass' => 'postbox'
251
- ];
252
-
253
- return apply_filters( 'wantispam/settings_form/options', $form_options, $this );
254
- }
255
-
256
- /**
257
- * Adds an html warning notification html markup.
258
- */
259
- public function protect_caldera_forms_warning() {
260
- ?>
261
- <div class="form-group">
262
- <label class="col-sm-4 control-label"></label>
263
- <div class="control-group col-sm-8">
264
- <div id="wantispam-protect-caldera-forms-message" class="wantispam-checkbox-warning-message">
265
- <?php printf( __( '<b>You have to make additional settings in the Caldera Forms plugin!</b><br> Please create an Anti-spam processor for each of your forms that you want to protect. You can read this <a href="%s" target="_blank" rel="noopener">manual</a> to learn more about how to create an Anti-spam processor in the Caldera Forms plugin.', 'titan-security' ), 'https://anti-spam.space/docs/anti-spam-processor-for-caldera-forms/' ) ?>
266
- </div>
267
- </div>
268
- </div>
269
- <?php
270
- }
271
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * Страница общих настроек для этого плагина.
12
+ *
13
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
14
+ * @author Artem Prihodko <webtemyk@yandex.ru>
15
+ * @copyright (c) 2020 Creative Motion
16
+ * @version 1.0
17
+ */
18
+ class Antispam extends Base {
19
+
20
+ /**
21
+ * {@inheritDoc}
22
+ *
23
+ * @since 6.0
24
+ * @var string
25
+ */
26
+ public $id = "antispam";
27
+
28
+ /**
29
+ * {@inheritDoc}
30
+ *
31
+ * @since 6.0
32
+ * @var string
33
+ */
34
+ public $page_menu_dashicon = 'dashicons-testimonial';
35
+
36
+ /**
37
+ * {@inheritDoc}
38
+ *
39
+ * @since 6.0
40
+ * @var bool
41
+ */
42
+ public $show_right_sidebar_in_options = true;
43
+
44
+ /**
45
+ *
46
+ */
47
+ public $page_menu_position = 100;
48
+
49
+ /**
50
+ * @var string
51
+ */
52
+ public $menu_target = 'options-general.php';
53
+
54
+ /**
55
+ * @var bool
56
+ */
57
+ public $internal = false;
58
+
59
+ /**
60
+ * Module URL
61
+ *
62
+ * @since 7.0
63
+ * @var string
64
+ */
65
+ public $MODULE_URL = WTITAN_PLUGIN_URL . "/includes/antispam";
66
+
67
+ /**
68
+ * Module path
69
+ *
70
+ * @since 7.0
71
+ * @var string
72
+ */
73
+ public $MODULE_PATH = WTITAN_PLUGIN_DIR . "/includes/antispam";
74
+
75
+ /**
76
+ * Module object
77
+ *
78
+ * @since 7.0
79
+ * @var object
80
+ */
81
+ public $module;
82
+
83
+
84
+ /**
85
+ * Antispam page constructor.
86
+ *
87
+ * @param \Wbcr_Factory458_Plugin $plugin
88
+ *
89
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
90
+ *
91
+ */
92
+ public function __construct( \Wbcr_Factory458_Plugin $plugin ) {
93
+ $this->menu_title = __( 'Anti-spam', 'titan-security' );
94
+ $this->page_menu_short_description = __( 'Detected and stoped spam', 'titan-security' );
95
+
96
+ $this->plugin = $plugin;
97
+ parent::__construct( $plugin );
98
+ }
99
+
100
+ /**
101
+ * Enqueue page assets
102
+ *
103
+ * @return void
104
+ * @since 6.2
105
+ * @see Wbcr_FactoryPages457_AdminPage
106
+ *
107
+ */
108
+ public function assets( $scripts, $styles ) {
109
+ parent::assets( $scripts, $styles );
110
+
111
+ $this->styles->add( $this->MODULE_URL . '/assets/css/settings.css' );
112
+ $this->scripts->add( $this->MODULE_URL . '/assets/js/settings.js', [
113
+ 'jquery',
114
+ 'wbcr-factory-clearfy-000-global'
115
+ ], 'wantispam-settings' );
116
+ }
117
+
118
+ /**
119
+ * Permalinks options.
120
+ *
121
+ * @return mixed[]
122
+ * @since 6.2
123
+ */
124
+ public function getPageOptions() {
125
+ $is_premium = wantispam_is_license_activate();
126
+ //$upgrade_premium_url = $this->plugin->get_support()->get_pricing_url();
127
+
128
+ $blocked_total = 0; // show 0 by default
129
+ $antispam_stats = get_option( 'antispam_stats', [] );
130
+
131
+ if ( isset( $antispam_stats['blocked_total'] ) ) {
132
+ $blocked_total = $antispam_stats['blocked_total'];
133
+ }
134
+
135
+ $options[] = [
136
+ 'type' => 'html',
137
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Base options.', 'titan-security' ) . '</strong>' . '<p>' . sprintf( __( '%s spam comments were blocked by Anti-spam plugin so far.', 'titan-security' ), $blocked_total ) . '</p>' . '</div>'
138
+ ];
139
+
140
+ $options[] = [
141
+ 'type' => 'checkbox',
142
+ 'way' => 'buttons',
143
+ 'name' => 'antispam_mode',
144
+ 'title' => __( 'Anti-spam mode', 'titan-security' ),
145
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
146
+ 'hint' => __( 'Enable or disable anti-spam for all site.', 'titan-security' ),
147
+ 'default' => true,
148
+ ];
149
+
150
+ $options[] = [
151
+ 'type' => 'checkbox',
152
+ 'way' => 'buttons',
153
+ 'name' => 'save_spam_comments',
154
+ 'title' => __( 'Save spam comments', 'titan-security' ),
155
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
156
+ 'hint' => __( 'Save spam comments into spam section. Useful for testing how the plugin works.', 'titan-security' ),
157
+ 'default' => true
158
+ ];
159
+
160
+ if ( $is_premium ) {
161
+ $options[] = [
162
+ 'type' => 'checkbox',
163
+ 'way' => 'buttons',
164
+ 'name' => 'comment_form_privacy_notice',
165
+ 'title' => __( 'Display a privacy notice under your comment forms.', 'titan-security' ),
166
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
167
+ 'hint' => __( 'To help your site with transparency under privacy laws like the GDPR, Antispam can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on above.', 'titan-security' ),
168
+ 'default' => false
169
+ ];
170
+ }
171
+
172
+ $options[] = [
173
+ 'type' => 'html',
174
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Modules.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
175
+ ];
176
+
177
+ $options[] = [
178
+ 'type' => 'checkbox',
179
+ 'way' => 'buttons',
180
+ 'name' => 'protect_register_form',
181
+ 'title' => __( 'Protect Register Form', 'titan-security' ),
182
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
183
+ 'hint' => __( 'Registration form can be protected in a matter of minutes with a few new fields and limits imposed.', 'titan-security' ),
184
+ 'default' => false,
185
+ 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
186
+ ];
187
+ $options[] = [
188
+ 'type' => 'checkbox',
189
+ 'way' => 'buttons',
190
+ 'name' => 'protect_comments_form',
191
+ 'title' => __( 'Advanced protection of comment forms', 'titan-security' ),
192
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
193
+ 'hint' => __( 'In order to protect your comment forms, you need to make it difficult or impossible for an automated tool to fill in or submit the form while keeping it as easy as possible for your customers to fill out the form.', 'titan-security' ),
194
+ 'default' => false,
195
+ 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
196
+ ];
197
+ if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
198
+ $options[] = [
199
+ 'type' => 'checkbox',
200
+ 'way' => 'buttons',
201
+ 'name' => 'protect_contacts_form7',
202
+ 'title' => __( 'Protect Contact Forms 7', 'titan-security' ),
203
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
204
+ 'hint' => __( 'Job Spam-Free for WordPress Contact Forms.', 'titan-security' ),
205
+ 'default' => false,
206
+ 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
207
+ ];
208
+ }
209
+ if ( is_plugin_active( 'ninja-forms/ninja-forms.php' ) ) {
210
+ $options[] = [
211
+ 'type' => 'checkbox',
212
+ 'way' => 'buttons',
213
+ 'name' => 'protect_ninja_forms',
214
+ 'title' => __( 'Protect Ninja Forms', 'titan-security' ),
215
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
216
+ 'hint' => __( 'Protects contact forms of the Ninja Forms plugin from spam.', 'titan-security' ),
217
+ 'default' => false,
218
+ 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
219
+ ];
220
+ }
221
+ if ( is_plugin_active( 'caldera-forms/caldera-core.php' ) ) {
222
+ $options[] = [
223
+ 'type' => 'checkbox',
224
+ 'way' => 'buttons',
225
+ 'name' => 'protect_caldera_forms',
226
+ 'title' => __( 'Protect Caldera Forms', 'titan-security' ),
227
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
228
+ 'hint' => __( 'Caldera Forms has powerful anti-spam by default. The Anti-spam plugin provides additional anti-spam protection for your Caldera Forms.', 'titan-security' ),
229
+ 'default' => false,
230
+ 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wantispam-checkbox-premium-label' ] : [],
231
+ 'eventsOn' => [
232
+ 'show' => '#wantispam-protect-caldera-forms-message'
233
+ ],
234
+ 'eventsOff' => [
235
+ 'hide' => '#wantispam-protect-caldera-forms-message'
236
+ ]
237
+ ];
238
+
239
+ $options[] = [
240
+ 'type' => 'html',
241
+ 'html' => [ $this, 'protect_caldera_forms_warning' ]
242
+ ];
243
+ }
244
+
245
+ $form_options = [];
246
+
247
+ $form_options[] = [
248
+ 'type' => 'form-group',
249
+ 'items' => $options,
250
+ //'cssClass' => 'postbox'
251
+ ];
252
+
253
+ return apply_filters( 'wantispam/settings_form/options', $form_options, $this );
254
+ }
255
+
256
+ /**
257
+ * Adds an html warning notification html markup.
258
+ */
259
+ public function protect_caldera_forms_warning() {
260
+ ?>
261
+ <div class="form-group">
262
+ <label class="col-sm-4 control-label"></label>
263
+ <div class="control-group col-sm-8">
264
+ <div id="wantispam-protect-caldera-forms-message" class="wantispam-checkbox-warning-message">
265
+ <?php printf( __( '<b>You have to make additional settings in the Caldera Forms plugin!</b><br> Please create an Anti-spam processor for each of your forms that you want to protect. You can read this <a href="%s" target="_blank" rel="noopener">manual</a> to learn more about how to create an Anti-spam processor in the Caldera Forms plugin.', 'titan-security' ), 'https://anti-spam.space/docs/anti-spam-processor-for-caldera-forms/' ) ?>
266
+ </div>
267
+ </div>
268
+ </div>
269
+ <?php
270
+ }
271
+ }
admin/pages/class-pages-check.php CHANGED
@@ -1,381 +1,381 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- use WBCR\Titan;
6
-
7
- // Exit if accessed directly
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- /**
13
- * Scanner page class
14
- *
15
- * @author Artem Prihodko <webtemyk@ya.ru>
16
- * @copyright (c) 2020 Creative Motion
17
- * @version 1.0
18
- */
19
- class Check extends Base {
20
-
21
- /**
22
- * {@inheritdoc}
23
- */
24
- public $id = 'check';
25
-
26
- /**
27
- * {@inheritdoc}
28
- */
29
- public $page_parent_page = 'none';
30
-
31
- /**
32
- * {@inheritdoc}
33
- */
34
- public $page_menu_dashicon = 'dashicons-plugins-checked';
35
-
36
- /**
37
- * {@inheritdoc}
38
- */
39
- public $type = 'page';
40
-
41
- /**
42
- * {@inheritdoc}
43
- */
44
- public $show_right_sidebar_in_options = false;
45
-
46
-
47
- /**
48
- * Module URL
49
- *
50
- * @since 7.0
51
- * @var string
52
- */
53
- public $MODULE_URL = WTITAN_PLUGIN_URL . "/includes/check";
54
-
55
- /**
56
- * Module path
57
- *
58
- * @since 7.0
59
- * @var string
60
- */
61
- public $MODULE_PATH = WTITAN_PLUGIN_DIR . "/includes/check";
62
-
63
- /**
64
- * Module object
65
- *
66
- * @since 7.0
67
- * @var object
68
- */
69
- public $module;
70
-
71
- /**
72
- * Scanner page constructor.
73
- *
74
- * @param \Wbcr_Factory454_Plugin $plugin
75
- *
76
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
77
- *
78
- */
79
- public function __construct( \Wbcr_Factory454_Plugin $plugin ) {
80
- $this->plugin = $plugin;
81
-
82
- $this->menu_title = __( 'Audit', 'titan-security' );
83
- $this->page_menu_short_description = __( 'Security audit and vulnerability detection', 'titan-security' );
84
-
85
- if ( $this->plugin->is_premium() ) {
86
- require_once $this->MODULE_PATH . "/boot.php";
87
- $this->module = new Titan\Check();
88
- }
89
-
90
- parent::__construct( $plugin );
91
- }
92
-
93
- /**
94
- * {@inheritDoc}
95
- * @param $notices
96
- * @param \Wbcr_Factory454_Plugin $plugin
97
- *
98
- * @return array
99
- * @since 6.5.2
100
- *
101
- * @see \FactoryPages453_ImpressiveThemplate
102
- */
103
- public function getActionNotices( $notices ) {
104
-
105
- $notices[] = [
106
- 'conditions' => [
107
- 'wtitan_prefix_changed' => 1
108
- ],
109
- 'type' => 'success',
110
- 'message' => __( 'Database prefix has been changed!', 'titan-security' )
111
-
112
- ];
113
-
114
- $notices[] = [
115
- 'conditions' => [
116
- 'wtitan_prefix_save_error' => 1,
117
- 'wtitan_error_code' => 'empty_prefix'
118
- ],
119
- 'type' => 'danger',
120
- 'message' => __( 'Prefix cannot be empty!', 'titan-security' )
121
-
122
- ];
123
-
124
- $notices[] = [
125
- 'conditions' => [
126
- 'wtitan_prefix_save_error' => 1,
127
- 'wtitan_error_code' => 'permission_error'
128
- ],
129
- 'type' => 'danger',
130
- 'message' => sprintf( __( 'The database prefix cannot be changed because the wp-config.php file is not writable.', 'titan-security' ), 'https://users.freemius.com/login', 'https://users.freemius.com/login' )
131
- ];
132
-
133
- return $notices;
134
- }
135
-
136
- /**
137
- * Add assets
138
- *
139
- * @return void
140
- * @since 1.0.0
141
- */
142
- public function assets( $scripts, $styles ) {
143
- parent::assets( $scripts, $styles );
144
-
145
- $this->scripts->request( [
146
- 'bootstrap.tab',
147
- ], 'bootstrap' );
148
-
149
- $this->styles->request( [
150
- 'bootstrap.tab',
151
- ], 'bootstrap' );
152
-
153
- $this->styles->add( $this->MODULE_URL . '/assets/css/check-dashboard.css' );
154
- $this->scripts->add( $this->MODULE_URL . '/assets/js/check.js', [ 'jquery' ] );
155
- $this->scripts->localize( 'update_nonce', wp_create_nonce( "updates" ) );
156
- $this->scripts->localize( 'wtscanner', [
157
- 'update_nonce' => wp_create_nonce( "updates" ),
158
- 'hide_nonce' => wp_create_nonce( "hide" ),
159
- ] );
160
-
161
- $this->styles->add( WTITAN_PLUGIN_URL . '/includes/vulnerabilities/assets/css/vulnerabilities-dashboard.css' );
162
- $this->styles->add( WTITAN_PLUGIN_URL . '/includes/audit/assets/css/audit-dashboard.css' );
163
- }
164
-
165
- /**
166
- * Show page content
167
- */
168
- public function showPageContent() {
169
- if ( ! $this->plugin->is_premium() ) {
170
- $this->plugin->view->print_template( 'require-license-activate' );
171
-
172
- return;
173
- }
174
-
175
- $this->module->showPageContent();
176
- }
177
-
178
- public function fixDatabasePrefixAction() {
179
- if ( ! current_user_can( 'manage_options' ) ) {
180
- wp_die( __( 'You are not have permission for this action!', 'titan-security' ) );
181
- }
182
-
183
- if ( isset( $_POST['wtitan_save_prefix'] ) ) {
184
- $prefix = $this->request->post( 'wtitan_new_prefix', '', true );
185
- $fixing_issue_id = $this->request->post( 'wtitan_fixing_issue_id', '', 'intval' );
186
-
187
- $this->confirmPageTemplate( [
188
- 'title' => __( 'Are you sure you want to change the database prefix?', 'titan-security' ),
189
- 'description' => __( 'Attention! The prefix for the names of all tables in your database will be changed. Please backup the database and wp-config.php file. If an error occurs when changing the database prefix, you can restore data from backup by replacing the wp-config.php file and restoring the database backup manually.', 'titan-security' ),
190
- 'actions' => [
191
- [
192
- 'url' => wp_nonce_url( $this->getActionUrl( 'fix-database-prefix-confirm', [
193
- 'wtitan_prefix' => base64_encode( $prefix ),
194
- 'wtitan_fixing_issue_id' => $fixing_issue_id
195
- ] ), 'wtitan_save_prefix_confirm' ),
196
- 'title' => __( 'Yes, confirm', 'titan-security' ),
197
- 'class' => 'button button-primary'
198
- ],
199
- [
200
- 'url' => $this->getActionUrl( 'fix-database-prefix-cancel' ),
201
- 'title' => __( 'Cancel' ),
202
- 'class' => 'button button-default'
203
- ]
204
-
205
- ]
206
- ] );
207
-
208
- return;
209
- }
210
-
211
- global $table_prefix;
212
-
213
- $template = \WBCR\Titan\Plugin::app()->view()->get_template( 'audit/fix-database-prefix', [
214
- 'current_prefix' => $table_prefix,
215
- 'random_prefix' => strtolower( wp_generate_password( '4', false ) ) . '_',
216
- 'fixing_issue_id' => $this->request->get( 'wtitan_fixing_issue_id', null, 'intval' )
217
- ] );
218
- $this->showPage( $template );
219
- }
220
-
221
- public function fixDatabasePrefixConfirmAction() {
222
- if ( ! current_user_can( 'manage_options' ) ) {
223
- wp_die( __( 'You are not have permission for this action!', 'titan-security' ) );
224
- }
225
-
226
- check_admin_referer( 'wtitan_save_prefix_confirm' );
227
-
228
- global $table_prefix;
229
- $fixing_issue_id = $this->request->request( 'wtitan_fixing_issue_id', '', 'intval' );
230
- $table_old_prefix = $table_prefix;
231
- $table_new_prefix = base64_decode( $this->request->get( 'wtitan_prefix', '', true ) );
232
-
233
- if ( empty( $table_new_prefix ) ) {
234
- $this->redirectToAction( 'fix-database-prefix', [
235
- 'wtitan_prefix_save_error' => 1,
236
- 'wtitan_error_code' => 'empty_prefix',
237
- 'wtitan_fixing_issue_id' => $fixing_issue_id
238
- ] );
239
- }
240
-
241
- if ( ! $this->edit_wp_config( $table_new_prefix ) ) {
242
- $this->redirectToAction( 'fix-database-prefix', [
243
- 'wtitan_prefix_save_error' => 1,
244
- 'wtitan_error_code' => 'permission_error',
245
- 'wtitan_fixing_issue_id' => $fixing_issue_id
246
- ] );
247
- }
248
- $this->rename_table_names( $table_old_prefix, $table_new_prefix );
249
-
250
- $table_name = $table_new_prefix . 'options';
251
- $this->update_table_values( $table_name, 'option_name', $table_old_prefix, $table_new_prefix );
252
-
253
- $table_name = $table_new_prefix . 'usermeta';
254
- $this->update_table_values( $table_name, 'meta_key', $table_old_prefix, $table_new_prefix );
255
-
256
- if ( ! empty( $_GET['wtitan_fixing_issue_id'] ) && is_numeric( $_GET['wtitan_fixing_issue_id'] ) ) {
257
- $fixing_issue_id = $this->request->get( 'wtitan_fixing_issue_id', '', 'intval' );
258
- $issues = get_option( $this->plugin->getPrefix() . "audit_results", [] );
259
-
260
- if ( isset( $issues[ $fixing_issue_id ] ) ) {
261
- unset( $issues[ $fixing_issue_id ] );
262
- update_option( $this->plugin->getPrefix() . "audit_results", $issues, 'no' );
263
- }
264
- }
265
-
266
- $url = $this->getBaseUrl( 'dashboard', [
267
- 'wtitan_prefix_changed' => 1
268
- ] );
269
-
270
- $url = add_query_arg( 'action', 'index', $url );
271
-
272
- wp_safe_redirect( $url );
273
-
274
- die();
275
- }
276
-
277
- public function fixDatabasePrefixCancelAction() {
278
- if ( ! current_user_can( 'manage_options' ) ) {
279
- wp_die( __( 'You are not have permission for this action!', 'titan-security' ) );
280
- }
281
-
282
- $this->redirectToAction( 'index' );
283
- }
284
-
285
- /**
286
- * Edit the wp-config.php file
287
- *
288
- * @param String $table_new_prefix The name of the new prefix
289
- *
290
- * @return bool
291
- */
292
- private function edit_wp_config( $table_new_prefix ) {
293
- $path = ABSPATH . 'wp-config.php';
294
-
295
- if ( ! file_exists( $path ) || ! is_writeable( $path ) ) {
296
- return false;
297
- }
298
-
299
- @chmod( $path, 0777 );
300
- $content = file_get_contents( $path );
301
-
302
- if ( ! $content || empty( $content ) ) {
303
- return false;
304
- }
305
-
306
- $content = preg_replace( '/\$table_prefix\s?=\s?\'[A-z0-9_-]+\'[\s\t]?;/i', "\$table_prefix = '{$table_new_prefix}';", $content );
307
-
308
- if ( empty( $content ) ) {
309
- return false;
310
- }
311
-
312
- $handle = fopen( $path, 'w+' );
313
-
314
- fwrite( $handle, $content );
315
- rewind( $handle );
316
-
317
- $changed_file_content = fread( $handle, filesize( $path ) );
318
-
319
- fclose( $handle );
320
- @chmod( $path, 0644 );
321
-
322
- if ( false === strpos( $changed_file_content, "'$table_new_prefix'" ) ) {
323
- return false;
324
- }
325
-
326
- return true;
327
- }
328
-
329
- /**
330
- * Rename all the table names
331
- *
332
- * @param String $table_old_prefix The old prefix of the database table names
333
- * @param String $table_new_prefix The new database prefix name
334
- *
335
- * @return void
336
- */
337
- private function rename_table_names( $table_old_prefix, $table_new_prefix ) {
338
- global $wpdb;
339
-
340
- $sql = "SHOW TABLES LIKE '%'";
341
- $results = $wpdb->get_results( $sql, ARRAY_N );
342
- $queries = array();
343
- foreach ( $results as $result ) {
344
-
345
- $table_old_name = $result[0];
346
- $table_new_name = $table_old_name;
347
-
348
- if ( strpos( $table_old_name, $table_old_prefix ) === 0 ) {
349
- $table_new_name = $table_new_prefix . substr( $table_old_name, strlen( $table_old_prefix ) );
350
- }
351
-
352
- $sql = "RENAME TABLE $table_old_name TO $table_new_name";
353
- $queries[] = false === $wpdb->query( $sql );
354
- }
355
- }
356
-
357
- /**
358
- * Update a table column with the new prefix
359
- *
360
- * @param string $table_name the table that is going to be update
361
- * @param string $field the table column that is going to be updated
362
- * @param string $table_old_prefix The previous table prefix name
363
- * @param string $table_new_prefix The new table prefix name
364
- */
365
- private function update_table_values( $table_name, $field, $table_old_prefix, $table_new_prefix ) {
366
- global $wpdb;
367
-
368
- $sql = "SELECT $field FROM $table_name WHERE $field LIKE '%$table_old_prefix%'";
369
- $results = $wpdb->get_results( $sql, ARRAY_N );
370
-
371
- foreach ( $results as $result ) {
372
- $old_value = $result[0];
373
-
374
- if ( strpos( $old_value, $table_old_prefix ) === 0 ) {
375
- $new_value = $table_new_prefix . substr( $old_value, strlen( $table_old_prefix ) );
376
- $sql = "UPDATE $table_name SET $field='$new_value' WHERE $field='$old_value'";
377
- $wpdb->query( $sql );
378
- }
379
- }
380
- }
381
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ use WBCR\Titan;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * Scanner page class
14
+ *
15
+ * @author Artem Prihodko <webtemyk@ya.ru>
16
+ * @copyright (c) 2020 Creative Motion
17
+ * @version 1.0
18
+ */
19
+ class Check extends Base {
20
+
21
+ /**
22
+ * {@inheritdoc}
23
+ */
24
+ public $id = 'check';
25
+
26
+ /**
27
+ * {@inheritdoc}
28
+ */
29
+ public $page_parent_page = 'none';
30
+
31
+ /**
32
+ * {@inheritdoc}
33
+ */
34
+ public $page_menu_dashicon = 'dashicons-plugins-checked';
35
+
36
+ /**
37
+ * {@inheritdoc}
38
+ */
39
+ public $type = 'page';
40
+
41
+ /**
42
+ * {@inheritdoc}
43
+ */
44
+ public $show_right_sidebar_in_options = false;
45
+
46
+
47
+ /**
48
+ * Module URL
49
+ *
50
+ * @since 7.0
51
+ * @var string
52
+ */
53
+ public $MODULE_URL = WTITAN_PLUGIN_URL . "/includes/check";
54
+
55
+ /**
56
+ * Module path
57
+ *
58
+ * @since 7.0
59
+ * @var string
60
+ */
61
+ public $MODULE_PATH = WTITAN_PLUGIN_DIR . "/includes/check";
62
+
63
+ /**
64
+ * Module object
65
+ *
66
+ * @since 7.0
67
+ * @var object
68
+ */
69
+ public $module;
70
+
71
+ /**
72
+ * Scanner page constructor.
73
+ *
74
+ * @param \Wbcr_Factory458_Plugin $plugin
75
+ *
76
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
77
+ *
78
+ */
79
+ public function __construct( \Wbcr_Factory458_Plugin $plugin ) {
80
+ $this->plugin = $plugin;
81
+
82
+ $this->menu_title = __( 'Audit', 'titan-security' );
83
+ $this->page_menu_short_description = __( 'Security audit and vulnerability detection', 'titan-security' );
84
+
85
+ if ( $this->plugin->is_premium() ) {
86
+ require_once $this->MODULE_PATH . "/boot.php";
87
+ $this->module = new Titan\Check();
88
+ }
89
+
90
+ parent::__construct( $plugin );
91
+ }
92
+
93
+ /**
94
+ * {@inheritDoc}
95
+ * @param $notices
96
+ * @param \Wbcr_Factory458_Plugin $plugin
97
+ *
98
+ * @return array
99
+ * @since 6.5.2
100
+ *
101
+ * @see \FactoryPages457_ImpressiveThemplate
102
+ */
103
+ public function getActionNotices( $notices ) {
104
+
105
+ $notices[] = [
106
+ 'conditions' => [
107
+ 'wtitan_prefix_changed' => 1
108
+ ],
109
+ 'type' => 'success',
110
+ 'message' => __( 'Database prefix has been changed!', 'titan-security' )
111
+
112
+ ];
113
+
114
+ $notices[] = [
115
+ 'conditions' => [
116
+ 'wtitan_prefix_save_error' => 1,
117
+ 'wtitan_error_code' => 'empty_prefix'
118
+ ],
119
+ 'type' => 'danger',
120
+ 'message' => __( 'Prefix cannot be empty!', 'titan-security' )
121
+
122
+ ];
123
+
124
+ $notices[] = [
125
+ 'conditions' => [
126
+ 'wtitan_prefix_save_error' => 1,
127
+ 'wtitan_error_code' => 'permission_error'
128
+ ],
129
+ 'type' => 'danger',
130
+ 'message' => sprintf( __( 'The database prefix cannot be changed because the wp-config.php file is not writable.', 'titan-security' ), 'https://users.freemius.com/login', 'https://users.freemius.com/login' )
131
+ ];
132
+
133
+ return $notices;
134
+ }
135
+
136
+ /**
137
+ * Add assets
138
+ *
139
+ * @return void
140
+ * @since 1.0.0
141
+ */
142
+ public function assets( $scripts, $styles ) {
143
+ parent::assets( $scripts, $styles );
144
+
145
+ $this->scripts->request( [
146
+ 'bootstrap.tab',
147
+ ], 'bootstrap' );
148
+
149
+ $this->styles->request( [
150
+ 'bootstrap.tab',
151
+ ], 'bootstrap' );
152
+
153
+ $this->styles->add( $this->MODULE_URL . '/assets/css/check-dashboard.css' );
154
+ $this->scripts->add( $this->MODULE_URL . '/assets/js/check.js', [ 'jquery' ] );
155
+ //$this->scripts->localize( 'update_nonce', wp_create_nonce( "updates" ) );
156
+ $this->scripts->localize( 'wtscanner', [
157
+ 'update_nonce' => wp_create_nonce( "updates" ),
158
+ 'hide_nonce' => wp_create_nonce( "hide" ),
159
+ ] );
160
+
161
+ $this->styles->add( WTITAN_PLUGIN_URL . '/includes/vulnerabilities/assets/css/vulnerabilities-dashboard.css' );
162
+ $this->styles->add( WTITAN_PLUGIN_URL . '/includes/audit/assets/css/audit-dashboard.css' );
163
+ }
164
+
165
+ /**
166
+ * Show page content
167
+ */
168
+ public function showPageContent() {
169
+ if ( ! $this->plugin->is_premium() ) {
170
+ $this->plugin->view->print_template( 'require-license-activate' );
171
+
172
+ return;
173
+ }
174
+
175
+ $this->module->showPageContent();
176
+ }
177
+
178
+ public function fixDatabasePrefixAction() {
179
+ if ( ! current_user_can( 'manage_options' ) ) {
180
+ wp_die( __( 'You are not have permission for this action!', 'titan-security' ) );
181
+ }
182
+
183
+ if ( isset( $_POST['wtitan_save_prefix'] ) ) {
184
+ $prefix = $this->request->post( 'wtitan_new_prefix', '', true );
185
+ $fixing_issue_id = $this->request->post( 'wtitan_fixing_issue_id', '', 'intval' );
186
+
187
+ $this->confirmPageTemplate( [
188
+ 'title' => __( 'Are you sure you want to change the database prefix?', 'titan-security' ),
189
+ 'description' => __( 'Attention! The prefix for the names of all tables in your database will be changed. Please backup the database and wp-config.php file. If an error occurs when changing the database prefix, you can restore data from backup by replacing the wp-config.php file and restoring the database backup manually.', 'titan-security' ),
190
+ 'actions' => [
191
+ [
192
+ 'url' => wp_nonce_url( $this->getActionUrl( 'fix-database-prefix-confirm', [
193
+ 'wtitan_prefix' => base64_encode( $prefix ),
194
+ 'wtitan_fixing_issue_id' => $fixing_issue_id
195
+ ] ), 'wtitan_save_prefix_confirm' ),
196
+ 'title' => __( 'Yes, confirm', 'titan-security' ),
197
+ 'class' => 'button button-primary'
198
+ ],
199
+ [
200
+ 'url' => $this->getActionUrl( 'fix-database-prefix-cancel' ),
201
+ 'title' => __( 'Cancel' ),
202
+ 'class' => 'button button-default'
203
+ ]
204
+
205
+ ]
206
+ ] );
207
+
208
+ return;
209
+ }
210
+
211
+ global $table_prefix;
212
+
213
+ $template = \WBCR\Titan\Plugin::app()->view()->get_template( 'audit/fix-database-prefix', [
214
+ 'current_prefix' => $table_prefix,
215
+ 'random_prefix' => strtolower( wp_generate_password( '4', false ) ) . '_',
216
+ 'fixing_issue_id' => $this->request->get( 'wtitan_fixing_issue_id', null, 'intval' )
217
+ ] );
218
+ $this->showPage( $template );
219
+ }
220
+
221
+ public function fixDatabasePrefixConfirmAction() {
222
+ if ( ! current_user_can( 'manage_options' ) ) {
223
+ wp_die( __( 'You are not have permission for this action!', 'titan-security' ) );
224
+ }
225
+
226
+ check_admin_referer( 'wtitan_save_prefix_confirm' );
227
+
228
+ global $table_prefix;
229
+ $fixing_issue_id = $this->request->request( 'wtitan_fixing_issue_id', '', 'intval' );
230
+ $table_old_prefix = $table_prefix;
231
+ $table_new_prefix = base64_decode( $this->request->get( 'wtitan_prefix', '', true ) );
232
+
233
+ if ( empty( $table_new_prefix ) ) {
234
+ $this->redirectToAction( 'fix-database-prefix', [
235
+ 'wtitan_prefix_save_error' => 1,
236
+ 'wtitan_error_code' => 'empty_prefix',
237
+ 'wtitan_fixing_issue_id' => $fixing_issue_id
238
+ ] );
239
+ }
240
+
241
+ if ( ! $this->edit_wp_config( $table_new_prefix ) ) {
242
+ $this->redirectToAction( 'fix-database-prefix', [
243
+ 'wtitan_prefix_save_error' => 1,
244
+ 'wtitan_error_code' => 'permission_error',
245
+ 'wtitan_fixing_issue_id' => $fixing_issue_id
246
+ ] );
247
+ }
248
+ $this->rename_table_names( $table_old_prefix, $table_new_prefix );
249
+
250
+ $table_name = $table_new_prefix . 'options';
251
+ $this->update_table_values( $table_name, 'option_name', $table_old_prefix, $table_new_prefix );
252
+
253
+ $table_name = $table_new_prefix . 'usermeta';
254
+ $this->update_table_values( $table_name, 'meta_key', $table_old_prefix, $table_new_prefix );
255
+
256
+ if ( ! empty( $_GET['wtitan_fixing_issue_id'] ) && is_numeric( $_GET['wtitan_fixing_issue_id'] ) ) {
257
+ $fixing_issue_id = $this->request->get( 'wtitan_fixing_issue_id', '', 'intval' );
258
+ $issues = get_option( $this->plugin->getPrefix() . "audit_results", [] );
259
+
260
+ if ( isset( $issues[ $fixing_issue_id ] ) ) {
261
+ unset( $issues[ $fixing_issue_id ] );
262
+ update_option( $this->plugin->getPrefix() . "audit_results", $issues, 'no' );
263
+ }
264
+ }
265
+
266
+ $url = $this->getBaseUrl( 'dashboard', [
267
+ 'wtitan_prefix_changed' => 1
268
+ ] );
269
+
270
+ $url = add_query_arg( 'action', 'index', $url );
271
+
272
+ wp_safe_redirect( $url );
273
+
274
+ die();
275
+ }
276
+
277
+ public function fixDatabasePrefixCancelAction() {
278
+ if ( ! current_user_can( 'manage_options' ) ) {
279
+ wp_die( __( 'You are not have permission for this action!', 'titan-security' ) );
280
+ }
281
+
282
+ $this->redirectToAction( 'index' );
283
+ }
284
+
285
+ /**
286
+ * Edit the wp-config.php file
287
+ *
288
+ * @param String $table_new_prefix The name of the new prefix
289
+ *
290
+ * @return bool
291
+ */
292
+ private function edit_wp_config( $table_new_prefix ) {
293
+ $path = ABSPATH . 'wp-config.php';
294
+
295
+ if ( ! file_exists( $path ) || ! is_writeable( $path ) ) {
296
+ return false;
297
+ }
298
+
299
+ @chmod( $path, 0777 );
300
+ $content = file_get_contents( $path );
301
+
302
+ if ( ! $content || empty( $content ) ) {
303
+ return false;
304
+ }
305
+
306
+ $content = preg_replace( '/\$table_prefix\s?=\s?\'[A-z0-9_-]+\'[\s\t]?;/i', "\$table_prefix = '{$table_new_prefix}';", $content );
307
+
308
+ if ( empty( $content ) ) {
309
+ return false;
310
+ }
311
+
312
+ $handle = fopen( $path, 'w+' );
313
+
314
+ fwrite( $handle, $content );
315
+ rewind( $handle );
316
+
317
+ $changed_file_content = fread( $handle, filesize( $path ) );
318
+
319
+ fclose( $handle );
320
+ @chmod( $path, 0644 );
321
+
322
+ if ( false === strpos( $changed_file_content, "'$table_new_prefix'" ) ) {
323
+ return false;
324
+ }
325
+
326
+ return true;
327
+ }
328
+
329
+ /**
330
+ * Rename all the table names
331
+ *
332
+ * @param String $table_old_prefix The old prefix of the database table names
333
+ * @param String $table_new_prefix The new database prefix name
334
+ *
335
+ * @return void
336
+ */
337
+ private function rename_table_names( $table_old_prefix, $table_new_prefix ) {
338
+ global $wpdb;
339
+
340
+ $sql = "SHOW TABLES LIKE '%'";
341
+ $results = $wpdb->get_results( $sql, ARRAY_N );
342
+ $queries = array();
343
+ foreach ( $results as $result ) {
344
+
345
+ $table_old_name = $result[0];
346
+ $table_new_name = $table_old_name;
347
+
348
+ if ( strpos( $table_old_name, $table_old_prefix ) === 0 ) {
349
+ $table_new_name = $table_new_prefix . substr( $table_old_name, strlen( $table_old_prefix ) );
350
+ }
351
+
352
+ $sql = "RENAME TABLE $table_old_name TO $table_new_name";
353
+ $queries[] = false === $wpdb->query( $sql );
354
+ }
355
+ }
356
+
357
+ /**
358
+ * Update a table column with the new prefix
359
+ *
360
+ * @param string $table_name the table that is going to be update
361
+ * @param string $field the table column that is going to be updated
362
+ * @param string $table_old_prefix The previous table prefix name
363
+ * @param string $table_new_prefix The new table prefix name
364
+ */
365
+ private function update_table_values( $table_name, $field, $table_old_prefix, $table_new_prefix ) {
366
+ global $wpdb;
367
+
368
+ $sql = "SELECT $field FROM $table_name WHERE $field LIKE '%$table_old_prefix%'";
369
+ $results = $wpdb->get_results( $sql, ARRAY_N );
370
+
371
+ foreach ( $results as $result ) {
372
+ $old_value = $result[0];
373
+
374
+ if ( strpos( $old_value, $table_old_prefix ) === 0 ) {
375
+ $new_value = $table_new_prefix . substr( $old_value, strlen( $table_old_prefix ) );
376
+ $sql = "UPDATE $table_name SET $field='$new_value' WHERE $field='$old_value'";
377
+ $wpdb->query( $sql );
378
+ }
379
+ }
380
+ }
381
+ }
admin/pages/class-pages-components-license.php CHANGED
@@ -1,193 +1,193 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if( !defined('ABSPATH') ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * Страница лицензирования плагина.
12
- *
13
- * Поддерживает режим работы с мультисаймами. Вы можете увидеть эту страницу в панели настройки сети.
14
- *
15
- * @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
- *
17
- * @copyright (c) 2018 Webraftic Ltd
18
- */
19
- class Components_License extends Base {
20
-
21
- /**
22
- * {@inheritdoc}
23
- *
24
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
25
- * @since 7.0.2
26
- * @var string
27
- */
28
- public $id = 'titan_components_license';
29
-
30
- /**
31
- * {@inheritdoc}
32
- * @since 7.0.2
33
- * @var string
34
- */
35
- public $type = 'page';
36
-
37
- /**
38
- * {@inheritdoc}
39
- *
40
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
41
- * @since 7.0.2
42
- * @var string
43
- */
44
- public $page_parent_page;
45
-
46
- /**
47
- * @since 7.0.2
48
- * @var int
49
- */
50
- public $page_menu_position = 0;
51
-
52
- /**
53
- * {@inheritdoc}
54
- * @since 7.0.2
55
- * @var bool
56
- */
57
- public $show_right_sidebar_in_options = false;
58
-
59
- /**
60
- * WCL_LicensePage constructor.
61
- * @param \Wbcr_Factory454_Plugin $plugin
62
- *
63
- * @since 7.0.2
64
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
65
- *
66
- */
67
- public function __construct(\Wbcr_Factory454_Plugin $plugin)
68
- {
69
- $this->menu_title = __('License', 'titan-security');
70
- $this->page_menu_short_description = __('Product activation', 'titan-security');
71
- $this->plan_name = __('Titan Premium Components', 'titan-security');
72
-
73
- parent::__construct($plugin);
74
- }
75
-
76
- /**
77
- * Requests assets (js and css) for the page.
78
- *
79
- * @return void
80
- * @since 7.0.2
81
- * @see FactoryPages453_AdminPage
82
- *
83
- */
84
- public function assets($scripts, $styles)
85
- {
86
- parent::assets($scripts, $styles);
87
-
88
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/components.css');
89
-
90
- /**
91
- * @param \Wbcr_Factory454_StyleList $styles
92
- * @param \Wbcr_Factory454_ScriptList $scripts
93
- *
94
- * @since 7.0.2
95
- *
96
- */
97
- do_action('wbcr/clearfy/components/page_assets', $scripts, $styles);
98
- }
99
-
100
- /**
101
- * This method simply show contents of the component page.
102
- * @throws \Exception
103
- * @since 7.0.2
104
- */
105
- public function showPageContent()
106
- {
107
-
108
- /**
109
- * @since 7.0.2
110
- *
111
- */
112
- $components = apply_filters('wbcr/titan/license/list_components', []);
113
-
114
- ?>
115
- <div class="wbcr-factory-page-group-header"><?php _e('<strong>Products activation</strong>.', 'clearfy') ?>
116
- <p>
117
- <?php _e('These are components of the plugin bundle. When you activate the plugin, all the components turned on by default. If you don’t need some function, you can easily turn it off on this page.', 'clearfy') ?>
118
- </p>
119
- </div>
120
- <div class="wbcr-clearfy-components">
121
- <?php
122
- /**
123
- * @param array $components
124
- *
125
- * @since 7.0.2
126
- */
127
- do_action('wbcr/titan/license/custom_plugins_card', $components);
128
- ?>
129
-
130
- <?php foreach((array)$components as $component): ?>
131
- <div class="plugin-card">
132
- <div class="plugin-card-top">
133
- <div class="name column-name">
134
- <h3>
135
- <a href="<?php echo esc_url($component['url']) ?>"
136
- class="thickbox open-plugin-details-modal">
137
- You use <?php echo esc_html($component['title']) ?>
138
- <img src="<?php echo esc_attr($component['icon']) ?>" class="plugin-icon"
139
- alt="<?php echo esc_attr($component['title']) ?>">
140
- </a>
141
- </h3>
142
- </div>
143
- <div class="desc column-description">
144
- <?php if( 'premium' === $component['build'] ): ?>
145
- <ul>
146
- <?php if( !empty($component['key']) ): ?>
147
- <li>
148
- <strong><?php _e('License key', 'clearfy') ?>:
149
- </strong> <?php echo esc_html($component['key']) ?>
150
- </li>
151
- <?php endif; ?>
152
- <?php if( !empty($component['plan']) ): ?>
153
- <li>
154
- <strong><?php _e('Plan', 'clearfy') ?>:</strong>
155
- <?php echo esc_html($component['plan']) ?>
156
- </li>
157
- <?php endif; ?>
158
- <?php if( !empty($component['subscription']) ): ?>
159
- <li>
160
- <strong><?php _e('Type', 'clearfy') ?>:</strong>
161
- <?php echo esc_html($component['subscription']) ?>
162
- </li>
163
- <?php endif; ?>
164
- <?php if( !empty($component['plan']) ): ?>
165
- <li>
166
- <strong><?php _e('Expired', 'clearfy') ?>:
167
- </strong> <?php echo esc_html($component['expiration_days']) ?> <?php _e('days remained', 'clearfy') ?>
168
- </li>
169
- <?php endif; ?>
170
- </ul>
171
- <?php else: ?>
172
- <p><?php echo esc_html($component['description']); ?></p>
173
- <?php endif; ?>
174
- </div>
175
- </div>
176
- <div class="plugin-card-bottom">
177
- <a href="<?php echo $this->getBaseUrl($component['license_page_id']); ?>"
178
- class="button">
179
- <?php if( 'premium' === $component['build'] ): ?>
180
- <?php _e('License details') ?>
181
- <?php else: ?>
182
- <?php _e('Activate Premium License') ?>
183
- <?php endif; ?>
184
- </a>
185
- </div>
186
- </div>
187
- <?php endforeach; ?>
188
- <div class="clearfix"></div>
189
- </div>
190
- <?php
191
- }
192
-
193
  }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if( !defined('ABSPATH') ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * Страница лицензирования плагина.
12
+ *
13
+ * Поддерживает режим работы с мультисаймами. Вы можете увидеть эту страницу в панели настройки сети.
14
+ *
15
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
+ *
17
+ * @copyright (c) 2018 Webraftic Ltd
18
+ */
19
+ class Components_License extends Base {
20
+
21
+ /**
22
+ * {@inheritdoc}
23
+ *
24
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
25
+ * @since 7.0.2
26
+ * @var string
27
+ */
28
+ public $id = 'titan_components_license';
29
+
30
+ /**
31
+ * {@inheritdoc}
32
+ * @since 7.0.2
33
+ * @var string
34
+ */
35
+ public $type = 'page';
36
+
37
+ /**
38
+ * {@inheritdoc}
39
+ *
40
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
41
+ * @since 7.0.2
42
+ * @var string
43
+ */
44
+ public $page_parent_page;
45
+
46
+ /**
47
+ * @since 7.0.2
48
+ * @var int
49
+ */
50
+ public $page_menu_position = 0;
51
+
52
+ /**
53
+ * {@inheritdoc}
54
+ * @since 7.0.2
55
+ * @var bool
56
+ */
57
+ public $show_right_sidebar_in_options = false;
58
+
59
+ /**
60
+ * WCL_LicensePage constructor.
61
+ * @param \Wbcr_Factory458_Plugin $plugin
62
+ *
63
+ * @since 7.0.2
64
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
65
+ *
66
+ */
67
+ public function __construct(\Wbcr_Factory458_Plugin $plugin)
68
+ {
69
+ $this->menu_title = __('License', 'titan-security');
70
+ $this->page_menu_short_description = __('Product activation', 'titan-security');
71
+ $this->plan_name = __('Titan Premium Components', 'titan-security');
72
+
73
+ parent::__construct($plugin);
74
+ }
75
+
76
+ /**
77
+ * Requests assets (js and css) for the page.
78
+ *
79
+ * @return void
80
+ * @since 7.0.2
81
+ * @see FactoryPages457_AdminPage
82
+ *
83
+ */
84
+ public function assets($scripts, $styles)
85
+ {
86
+ parent::assets($scripts, $styles);
87
+
88
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/components.css');
89
+
90
+ /**
91
+ * @param \Wbcr_Factory458_StyleList $styles
92
+ * @param \Wbcr_Factory458_ScriptList $scripts
93
+ *
94
+ * @since 7.0.2
95
+ *
96
+ */
97
+ do_action('wbcr/clearfy/components/page_assets', $scripts, $styles);
98
+ }
99
+
100
+ /**
101
+ * This method simply show contents of the component page.
102
+ * @throws \Exception
103
+ * @since 7.0.2
104
+ */
105
+ public function showPageContent()
106
+ {
107
+
108
+ /**
109
+ * @since 7.0.2
110
+ *
111
+ */
112
+ $components = apply_filters('wbcr/titan/license/list_components', []);
113
+
114
+ ?>
115
+ <div class="wbcr-factory-page-group-header"><?php _e('<strong>Products activation</strong>.', 'clearfy') ?>
116
+ <p>
117
+ <?php _e('These are components of the plugin bundle. When you activate the plugin, all the components turned on by default. If you don’t need some function, you can easily turn it off on this page.', 'clearfy') ?>
118
+ </p>
119
+ </div>
120
+ <div class="wbcr-clearfy-components">
121
+ <?php
122
+ /**
123
+ * @param array $components
124
+ *
125
+ * @since 7.0.2
126
+ */
127
+ do_action('wbcr/titan/license/custom_plugins_card', $components);
128
+ ?>
129
+
130
+ <?php foreach((array)$components as $component): ?>
131
+ <div class="plugin-card">
132
+ <div class="plugin-card-top">
133
+ <div class="name column-name">
134
+ <h3>
135
+ <a href="<?php echo esc_url($component['url']) ?>"
136
+ class="thickbox open-plugin-details-modal">
137
+ You use <?php echo esc_html($component['title']) ?>
138
+ <img src="<?php echo esc_attr($component['icon']) ?>" class="plugin-icon"
139
+ alt="<?php echo esc_attr($component['title']) ?>">
140
+ </a>
141
+ </h3>
142
+ </div>
143
+ <div class="desc column-description">
144
+ <?php if( 'premium' === $component['build'] ): ?>
145
+ <ul>
146
+ <?php if( !empty($component['key']) ): ?>
147
+ <li>
148
+ <strong><?php _e('License key', 'clearfy') ?>:
149
+ </strong> <?php echo esc_html($component['key']) ?>
150
+ </li>
151
+ <?php endif; ?>
152
+ <?php if( !empty($component['plan']) ): ?>
153
+ <li>
154
+ <strong><?php _e('Plan', 'clearfy') ?>:</strong>
155
+ <?php echo esc_html($component['plan']) ?>
156
+ </li>
157
+ <?php endif; ?>
158
+ <?php if( !empty($component['subscription']) ): ?>
159
+ <li>
160
+ <strong><?php _e('Type', 'clearfy') ?>:</strong>
161
+ <?php echo esc_html($component['subscription']) ?>
162
+ </li>
163
+ <?php endif; ?>
164
+ <?php if( !empty($component['plan']) ): ?>
165
+ <li>
166
+ <strong><?php _e('Expired', 'clearfy') ?>:
167
+ </strong> <?php echo esc_html($component['expiration_days']) ?> <?php _e('days remained', 'clearfy') ?>
168
+ </li>
169
+ <?php endif; ?>
170
+ </ul>
171
+ <?php else: ?>
172
+ <p><?php echo esc_html($component['description']); ?></p>
173
+ <?php endif; ?>
174
+ </div>
175
+ </div>
176
+ <div class="plugin-card-bottom">
177
+ <a href="<?php echo $this->getBaseUrl($component['license_page_id']); ?>"
178
+ class="button">
179
+ <?php if( 'premium' === $component['build'] ): ?>
180
+ <?php _e('License details') ?>
181
+ <?php else: ?>
182
+ <?php _e('Activate Premium License') ?>
183
+ <?php endif; ?>
184
+ </a>
185
+ </div>
186
+ </div>
187
+ <?php endforeach; ?>
188
+ <div class="clearfix"></div>
189
+ </div>
190
+ <?php
191
+ }
192
+
193
  }
admin/pages/class-pages-components.php CHANGED
@@ -1,238 +1,238 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- /**
6
- * This file is the add-ons page.
7
- *
8
- * @author Artem Prihodko <webtemyk@yandex.ru>
9
- * @since 7.0.3
10
- * @copyright (c) 2020, Creative Motion
11
- *
12
- */
13
-
14
- // Exit if accessed directly
15
- if( !defined('ABSPATH') ) {
16
- exit;
17
- }
18
-
19
- use WBCR\Titan\Plugin;
20
- use WBCR\Titan\Views;
21
-
22
- class Components extends Base {
23
-
24
- /**
25
- * The id of the page in the admin menu.
26
- *
27
- * Mainly used to navigate between pages.
28
- *
29
- * @since 7.0.3
30
- * @see FactoryPages453_AdminPage
31
- *
32
- * @var string
33
- */
34
- public $id = "components";
35
-
36
- public $page_menu_dashicon = 'dashicons-admin-plugins';
37
-
38
- public $type = 'page';
39
-
40
- public $show_right_sidebar_in_options = false;
41
-
42
- public $page_menu_position = 1;
43
-
44
- /**
45
- * Заголовок страницы, также использует в меню, как название закладки
46
- *
47
- * @var bool
48
- */
49
- public $show_page_title = true;
50
-
51
- /**
52
- * @var object|\WBCR\Titan\Views
53
- */
54
- public $view;
55
-
56
- /**
57
- * @param Plugin $plugin
58
- */
59
- public function __construct(Plugin $plugin)
60
- {
61
- $this->plugin = $plugin;
62
-
63
- $this->menu_title = __('Components', 'titan-security');
64
- $this->page_menu_short_description = __('More features for plugin', 'titan-security');
65
-
66
- $this->view = $this->plugin->view();
67
-
68
- parent::__construct($plugin);
69
- }
70
-
71
- /**
72
- * Requests assets (js and css) for the page.
73
- *
74
- * @return void
75
- * @since 7.0.2
76
- * @see FactoryPages453_AdminPage
77
- *
78
- */
79
- public function assets($scripts, $styles)
80
- {
81
- parent::assets($scripts, $styles);
82
-
83
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/components.css');
84
-
85
- /**
86
- * @param \Wbcr_Factory454_StyleList $styles
87
- * @param \Wbcr_Factory454_ScriptList $scripts
88
- *
89
- * @since 7.0.3
90
- *
91
- */
92
- do_action('wtitan/components/page_assets', $scripts, $styles);
93
- }
94
-
95
- /**
96
- * We register notifications for some actions
97
- *
98
- * @param $notices
99
- * @param Plugin $plugin
100
- *
101
- * @return array
102
- * @see 'libs\factory\pages\templates\FactoryPages453_ImpressiveThemplate'
103
- */
104
- public function getActionNotices($notices)
105
- {
106
- $notices[] = [
107
- 'conditions' => [
108
- 'wbcr-force-update-components-success' => 1
109
- ],
110
- 'type' => 'success',
111
- 'message' => __('Components have been successfully updated to the latest version.', 'titan-security')
112
- ];
113
-
114
- $notices[] = [
115
- 'conditions' => [
116
- 'wbcr-force-update-components-error' => 'inactive_licence'
117
- ],
118
- 'type' => 'danger',
119
- 'message' => __('To use premium components, you need activate a license!', 'titan-security') . '<a href="' . $this->plugin->getPluginPageUrl('license') . '" class="btn btn-gold">' . __('Activate license', 'titan-security') . '</a>'
120
- ];
121
-
122
- $notices[] = [
123
- 'conditions' => [
124
- 'wbcr-force-update-components-error' => 'unknown_error'
125
- ],
126
- 'type' => 'danger',
127
- 'message' => __('An unknown error occurred while updating plugin components. Please contact the plugin support team to resolve this issue.', 'hide_my_wp')
128
- ];
129
-
130
- return $notices;
131
- }
132
-
133
- /**
134
- * This method simply sorts the list of components.
135
- *
136
- * @param $components
137
- *
138
- * @return array
139
- */
140
- public function order($components)
141
- {
142
- $deactivate_components = Plugin::app()->getPopulateOption('deactive_preinstall_components', []);
143
-
144
- $ordered_components = [
145
- 'premium_active' => [],
146
- 'premium_deactive' => [],
147
- 'other' => []
148
- ];
149
-
150
- foreach((array)$components as $component) {
151
-
152
- if( ('premium' === $component['build'] || 'freemium' === $component['build']) && 'internal' === $component['type'] ) {
153
- if( in_array($component['name'], $deactivate_components) ) {
154
- // free component is deactivated
155
- $order_key = 'premium_deactive';
156
- } else {
157
- // free component activated
158
- $order_key = 'premium_active';
159
- }
160
- } else {
161
- $order_key = 'other';
162
- }
163
-
164
- $ordered_components[$order_key][] = $component;
165
- }
166
-
167
- return array_merge($ordered_components['premium_active'], $ordered_components['premium_deactive'], $ordered_components['other']);
168
- }
169
-
170
- /**
171
- * This method simply show contents of the component page.
172
- *
173
- * @throws \Exception
174
- */
175
- public function showPageContent()
176
- {
177
- $default_image = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzNjAiIGhlaWdodD0iMzYwIiB2aWV3Ym94PSIwIDAgMzYwIDM2MCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0icmdiKDcwLCA4MSwgOTMpIiAvPjxwb2x5bGluZSBwb2ludHM9IjE5LjgsMCw0MC4yLDAsNjAsMTkuOCw2MCw0MC4yLDQwLjIsNjAsMTkuOCw2MCwwLDQwLjIsMCwxOS44LDE5LjgsMCIgZmlsbD0iIzIyMiIgZmlsbC1vcGFjaXR5PSIwLjE1IiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIwLjAyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSIgLz48cG9seWxpbmUgcG9pbnRzPSIxOS44LDAsNDAuMiwwLDYwLDE5LjgsNjAsNDAuMiw0MC4yLDYwLDE5LjgsNjAsMCw0MC4yLDAsMTkuOCwxOS44LDAiIGZpbGw9IiNkZGQi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LDQwLjIsNDAuMiw2MCwxOS44LDYwLDAsNDAuMiwwLDE5LjgsMTkuOCwwIiBmaWxsPSIjMjIyIiBmaWxsLW9wYWNpdHk9IjAuMDI4NjY2NjY2NjY2NjY3IiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIwLjAyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxODAsIDMwMCkiIC8+PHBvbHlsaW5lIHBvaW50cz0iMTkuOCwwLDQwLjIsMCw2MCwxOS44LDYwLDQwLjIsNDAuMiw2MCwxOS44LDYwLDAsNDAuMiwwLDE5LjgsMTkuOCwwIiBmaWxsPSIjZGRkIiBmaWxsLW9wYWNpdHk9IjAuMDcyIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIwLjAyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNDAsIDMwMCkiIC8+PHBvbHlsaW5lIHBvaW50cz0iMTkuOCwwLDQwLjIsMCw2MCwxOS44LDYwLDQwLjIsNDAuMiw2MCwxOS44LDYwLDAsNDAuMiwwLDE5LjgsMTkuOCwwIiBmaWxsPSIjMjIyIiBmaWxsLW9wYWNpdHk9IjAuMDI4NjY2NjY2NjY2NjY3IiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIwLjAyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzMDAsIDMwMCkiIC8+PC9zdmc+';
178
- $response = [];
179
-
180
- $response = array_merge($response, [
181
- [
182
- 'name' => 'hide_login_page',
183
- 'title' => __('Hide login page', 'titan-security'),
184
- 'url' => 'https://wordpress.org/plugins/hide-login-page/',
185
- 'type' => 'wordpress',
186
- 'build' => 'free',
187
- 'base_path' => 'hide-login-page/hide-login-page.php',
188
- 'icon' => 'https://ps.w.org/hide-login-page/assets/icon-256x256.png',
189
- 'description' => __('Hide Login Page is a very light plugin that lets you easily and safely change the url of the login form page to anything you want. The settings are located in the Tweaks tab.', 'titan-security'),
190
- 'settings_url' => admin_url('admin.php?page=hlp_hide_login-' . $this->plugin->getPluginName())
191
- ]
192
-
193
- ]);
194
-
195
- /*if( is_plugin_active('plugins-scanner-premium/plugins-scanner-premium.php') || is_plugin_active('wp-plugin-plugins-scanner-premium/plugins-scanner-premium.php') ) {
196
- $response[] = [
197
- 'name' => 'titan_plugin_scanner',
198
- 'title' => __('Titan Plugins Scanner', 'titan-security'),
199
- 'url' => 'https://titansitescanner.com/plugin-scanner/',
200
- 'type' => 'wordpress',
201
- 'build' => 'freemium',
202
- 'base_path' => 'plugins-scanner-premium/plugins-scanner-premium.php',
203
- 'icon' => WTITAN_PLUGIN_URL . '/admin/assets/img/titan-plugin-scanner-icon-256x256-pro.png',
204
- 'description' => __('Preventively prevents infection of the site when activated by the plugin.', 'titan-security'),
205
- //'settings_url' => admin_url( 'admin.php?page=hlp_hide_login-' . $this->plugin->getPluginName() )
206
- ];
207
- } else {
208
- $response[] = [
209
- 'name' => 'titan_plugin_scanner',
210
- 'title' => __('Titan Plugins Scanner', 'titan-security'),
211
- 'url' => 'https://titansitescanner.com/plugin-scanner/',
212
- 'type' => 'internal',
213
- 'build' => 'premium',
214
- //'base_path' => 'hide-login-page/hide-login-page.php',
215
- 'icon' => WTITAN_PLUGIN_URL . '/admin/assets/img/titan-plugin-scanner-icon-256x256-pro.png',
216
- 'description' => __('Preventively prevents infection of the site when activated by the plugin.', 'titan-security'),
217
- //'settings_url' => admin_url( 'admin.php?page=hlp_hide_login-' . $this->plugin->getPluginName() )
218
- ];
219
- }*/
220
-
221
- /**
222
- * @param array $response
223
- *
224
- * @since 7.0.3
225
- *
226
- */
227
- $response = apply_filters('wtitan/components/items_list', $response);
228
-
229
- $components = $this->order($response);
230
-
231
- $data = [
232
- 'components' => $components
233
- ];
234
- $this->plugin->view->print_template('components', $data);
235
- }
236
- }
237
-
238
-
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ /**
6
+ * This file is the add-ons page.
7
+ *
8
+ * @author Artem Prihodko <webtemyk@yandex.ru>
9
+ * @since 7.0.3
10
+ * @copyright (c) 2020, Creative Motion
11
+ *
12
+ */
13
+
14
+ // Exit if accessed directly
15
+ if( !defined('ABSPATH') ) {
16
+ exit;
17
+ }
18
+
19
+ use WBCR\Titan\Plugin;
20
+ use WBCR\Titan\Views;
21
+
22
+ class Components extends Base {
23
+
24
+ /**
25
+ * The id of the page in the admin menu.
26
+ *
27
+ * Mainly used to navigate between pages.
28
+ *
29
+ * @since 7.0.3
30
+ * @see FactoryPages457_AdminPage
31
+ *
32
+ * @var string
33
+ */
34
+ public $id = "components";
35
+
36
+ public $page_menu_dashicon = 'dashicons-admin-plugins';
37
+
38
+ public $type = 'page';
39
+
40
+ public $show_right_sidebar_in_options = false;
41
+
42
+ public $page_menu_position = 1;
43
+
44
+ /**
45
+ * Заголовок страницы, также использует в меню, как название закладки
46
+ *
47
+ * @var bool
48
+ */
49
+ public $show_page_title = true;
50
+
51
+ /**
52
+ * @var object|\WBCR\Titan\Views
53
+ */
54
+ public $view;
55
+
56
+ /**
57
+ * @param Plugin $plugin
58
+ */
59
+ public function __construct(Plugin $plugin)
60
+ {
61
+ $this->plugin = $plugin;
62
+
63
+ $this->menu_title = __('Components', 'titan-security');
64
+ $this->page_menu_short_description = __('More features for plugin', 'titan-security');
65
+
66
+ $this->view = $this->plugin->view();
67
+
68
+ parent::__construct($plugin);
69
+ }
70
+
71
+ /**
72
+ * Requests assets (js and css) for the page.
73
+ *
74
+ * @return void
75
+ * @since 7.0.2
76
+ * @see FactoryPages457_AdminPage
77
+ *
78
+ */
79
+ public function assets($scripts, $styles)
80
+ {
81
+ parent::assets($scripts, $styles);
82
+
83
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/components.css');
84
+
85
+ /**
86
+ * @param \Wbcr_Factory458_StyleList $styles
87
+ * @param \Wbcr_Factory458_ScriptList $scripts
88
+ *
89
+ * @since 7.0.3
90
+ *
91
+ */
92
+ do_action('wtitan/components/page_assets', $scripts, $styles);
93
+ }
94
+
95
+ /**
96
+ * We register notifications for some actions
97
+ *
98
+ * @param $notices
99
+ * @param Plugin $plugin
100
+ *
101
+ * @return array
102
+ * @see 'libs\factory\pages\templates\FactoryPages457_ImpressiveThemplate'
103
+ */
104
+ public function getActionNotices($notices)
105
+ {
106
+ $notices[] = [
107
+ 'conditions' => [
108
+ 'wbcr-force-update-components-success' => 1
109
+ ],
110
+ 'type' => 'success',
111
+ 'message' => __('Components have been successfully updated to the latest version.', 'titan-security')
112
+ ];
113
+
114
+ $notices[] = [
115
+ 'conditions' => [
116
+ 'wbcr-force-update-components-error' => 'inactive_licence'
117
+ ],
118
+ 'type' => 'danger',
119
+ 'message' => __('To use premium components, you need activate a license!', 'titan-security') . '<a href="' . $this->plugin->getPluginPageUrl('license') . '" class="btn btn-gold">' . __('Activate license', 'titan-security') . '</a>'
120
+ ];
121
+
122
+ $notices[] = [
123
+ 'conditions' => [
124
+ 'wbcr-force-update-components-error' => 'unknown_error'
125
+ ],
126
+ 'type' => 'danger',
127
+ 'message' => __('An unknown error occurred while updating plugin components. Please contact the plugin support team to resolve this issue.', 'hide_my_wp')
128
+ ];
129
+
130
+ return $notices;
131
+ }
132
+
133
+ /**
134
+ * This method simply sorts the list of components.
135
+ *
136
+ * @param $components
137
+ *
138
+ * @return array
139
+ */
140
+ public function order($components)
141
+ {
142
+ $deactivate_components = Plugin::app()->getPopulateOption('deactive_preinstall_components', []);
143
+
144
+ $ordered_components = [
145
+ 'premium_active' => [],
146
+ 'premium_deactive' => [],
147
+ 'other' => []
148
+ ];
149
+
150
+ foreach((array)$components as $component) {
151
+
152
+ if( ('premium' === $component['build'] || 'freemium' === $component['build']) && 'internal' === $component['type'] ) {
153
+ if( in_array($component['name'], $deactivate_components) ) {
154
+ // free component is deactivated
155
+ $order_key = 'premium_deactive';
156
+ } else {
157
+ // free component activated
158
+ $order_key = 'premium_active';
159
+ }
160
+ } else {
161
+ $order_key = 'other';
162
+ }
163
+
164
+ $ordered_components[$order_key][] = $component;
165
+ }
166
+
167
+ return array_merge($ordered_components['premium_active'], $ordered_components['premium_deactive'], $ordered_components['other']);
168
+ }
169
+
170
+ /**
171
+ * This method simply show contents of the component page.
172
+ *
173
+ * @throws \Exception
174
+ */
175
+ public function showPageContent()
176
+ {
177
+ $default_image = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzNjAiIGhlaWdodD0iMzYwIiB2aWV3Ym94PSIwIDAgMzYwIDM2MCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0icmdiKDcwLCA4MSwgOTMpIiAvPjxwb2x5bGluZSBwb2ludHM9IjE5LjgsMCw0MC4yLDAsNjAsMTkuOCw2MCw0MC4yLDQwLjIsNjAsMTkuOCw2MCwwLDQwLjIsMCwxOS44LDE5LjgsMCIgZmlsbD0iIzIyMiIgZmlsbC1vcGFjaXR5PSIwLjE1IiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIwLjAyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLCAwKSIgLz48cG9seWxpbmUgcG9pbnRzPSIxOS44LDAsNDAuMiwwLDYwLDE5LjgsNjAsNDAuMiw0MC4yLDYwLDE5LjgsNjAsMCw0MC4yLDAsMTkuOCwxOS44LDAiIGZpbGw9IiNkZGQiIGZpbGwtb3BhY2l0eT0iMC4wNTQ2NjY2NjY2NjY2NjciIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLW9wYWNpdHk9IjAuMDIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYwLCAwKSIgLz48cG9seWxpbmUgcG9pbnRzPSIxOS44LDAsNDAuMiwwLDYwLDE5LjgsNjAsNDAuMiw0MC4yLDYwLDE5LjgsNjAsMCw0MC4yLDAsMTkuOCwxOS44LDAiIGZpbGw9IiMy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OS44LDYwLDQwLjIsNDAuMiw2MCwxOS44LDYwLDAsNDAuMiwwLDE5LjgsMTkuOCwwIiBmaWxsPSIjZGRkIiBmaWxsLW9wYWNpdHk9IjAuMDcyIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIwLjAyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNDAsIDMwMCkiIC8+PHBvbHlsaW5lIHBvaW50cz0iMTkuOCwwLDQwLjIsMCw2MCwxOS44LDYwLDQwLjIsNDAuMiw2MCwxOS44LDYwLDAsNDAuMiwwLDE5LjgsMTkuOCwwIiBmaWxsPSIjMjIyIiBmaWxsLW9wYWNpdHk9IjAuMDI4NjY2NjY2NjY2NjY3IiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIwLjAyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzMDAsIDMwMCkiIC8+PC9zdmc+';
178
+ $response = [];
179
+
180
+ $response = array_merge($response, [
181
+ [
182
+ 'name' => 'hide_login_page',
183
+ 'title' => __('Hide login page', 'titan-security'),
184
+ 'url' => 'https://wordpress.org/plugins/hide-login-page/',
185
+ 'type' => 'wordpress',
186
+ 'build' => 'free',
187
+ 'base_path' => 'hide-login-page/hide-login-page.php',
188
+ 'icon' => 'https://ps.w.org/hide-login-page/assets/icon-256x256.png',
189
+ 'description' => __('Hide Login Page is a very light plugin that lets you easily and safely change the url of the login form page to anything you want. The settings are located in the Tweaks tab.', 'titan-security'),
190
+ 'settings_url' => admin_url('admin.php?page=hlp_hide_login-' . $this->plugin->getPluginName())
191
+ ]
192
+
193
+ ]);
194
+
195
+ /*if( is_plugin_active('plugins-scanner-premium/plugins-scanner-premium.php') || is_plugin_active('wp-plugin-plugins-scanner-premium/plugins-scanner-premium.php') ) {
196
+ $response[] = [
197
+ 'name' => 'titan_plugin_scanner',
198
+ 'title' => __('Titan Plugins Scanner', 'titan-security'),
199
+ 'url' => 'https://titansitescanner.com/plugin-scanner/',
200
+ 'type' => 'wordpress',
201
+ 'build' => 'freemium',
202
+ 'base_path' => 'plugins-scanner-premium/plugins-scanner-premium.php',
203
+ 'icon' => WTITAN_PLUGIN_URL . '/admin/assets/img/titan-plugin-scanner-icon-256x256-pro.png',
204
+ 'description' => __('Preventively prevents infection of the site when activated by the plugin.', 'titan-security'),
205
+ //'settings_url' => admin_url( 'admin.php?page=hlp_hide_login-' . $this->plugin->getPluginName() )
206
+ ];
207
+ } else {
208
+ $response[] = [
209
+ 'name' => 'titan_plugin_scanner',
210
+ 'title' => __('Titan Plugins Scanner', 'titan-security'),
211
+ 'url' => 'https://titansitescanner.com/plugin-scanner/',
212
+ 'type' => 'internal',
213
+ 'build' => 'premium',
214
+ //'base_path' => 'hide-login-page/hide-login-page.php',
215
+ 'icon' => WTITAN_PLUGIN_URL . '/admin/assets/img/titan-plugin-scanner-icon-256x256-pro.png',
216
+ 'description' => __('Preventively prevents infection of the site when activated by the plugin.', 'titan-security'),
217
+ //'settings_url' => admin_url( 'admin.php?page=hlp_hide_login-' . $this->plugin->getPluginName() )
218
+ ];
219
+ }*/
220
+
221
+ /**
222
+ * @param array $response
223
+ *
224
+ * @since 7.0.3
225
+ *
226
+ */
227
+ $response = apply_filters('wtitan/components/items_list', $response);
228
+
229
+ $components = $this->order($response);
230
+
231
+ $data = [
232
+ 'components' => $components
233
+ ];
234
+ $this->plugin->view->print_template('components', $data);
235
+ }
236
+ }
237
+
238
+
admin/pages/class-pages-dashboard.php CHANGED
@@ -1,407 +1,407 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- use WBCR\Titan\Audit;
7
- use WBCR\Titan\Plugin;
8
- use WBCR\Titan\Views;
9
- use WBCR\Titan\Vulnerabilities;
10
- use WBCR\Titan\SiteChecker;
11
-
12
- if ( ! defined( 'ABSPATH' ) ) {
13
- exit;
14
- }
15
-
16
- /**
17
- * The file contains a short help info.
18
- *
19
- * @author Artem Prihodko <webtemyk@yandex.ru>
20
- * @copyright (c) 2020 Creative Motion
21
- * @version 1.0
22
- */
23
- class Dashboard extends Base {
24
-
25
- /**
26
- * {@inheritdoc}
27
- */
28
- public $id = 'dashboard';
29
-
30
- /**
31
- * {@inheritdoc}
32
- */
33
- public $page_menu_dashicon = 'dashicons-dashboard';
34
-
35
- /**
36
- * Menu icon (only if a page is placed as a main menu).
37
- * For example: '~/assets/img/menu-icon.png'
38
- * For example dashicons: '\f321'
39
- * @var string
40
- */
41
- public $menu_icon;
42
-
43
- /**
44
- * {@inheritdoc}
45
- */
46
- public $type = 'page';
47
-
48
- /**
49
- * {@inheritdoc}
50
- */
51
- public $show_right_sidebar_in_options = false;
52
-
53
- /**
54
- * {@inheritdoc}
55
- */
56
- public $page_menu_position = 90;
57
-
58
- /**
59
- * {@inheritDoc}
60
- *
61
- * @since 6.0
62
- * @var bool
63
- */
64
- public $add_link_to_plugin_actions = true;
65
-
66
- /**
67
- * {@inheritDoc}
68
- *
69
- * @since 6.0
70
- * @var bool
71
- */
72
- public $internal = false;
73
-
74
- /**
75
- * {@inheritDoc}
76
- *
77
- * @since 6.0
78
- * @var bool
79
- */
80
- //public $add_link_to_plugin_actions = true;
81
-
82
- /**
83
- * Заголовок страницы, также использует в меню, как название закладки
84
- *
85
- * @var bool
86
- */
87
- public $show_page_title = true;
88
-
89
- /**
90
- * @var object|\WBCR\Titan\Views
91
- */
92
- public $view;
93
-
94
- /**
95
- * @var object|\WBCR\Titan\Model\Firewall
96
- */
97
- //public $firewall;
98
-
99
- /**
100
- * @var object|\WBCR\Titan\Vulnerabilities
101
- */
102
- public $vulnerabilities;
103
-
104
- /**
105
- * @var object|\WBCR\Titan\Audit
106
- */
107
- public $audit;
108
-
109
- /**
110
- * @var \WBCR\Titan\SiteChecker
111
- */
112
- public $sites;
113
-
114
- /**
115
- * @var \WBCR\Titan\Scanner
116
- */
117
- public $scanner;
118
-
119
- /**
120
- * @var \WBCR\Titan\Antispam
121
- */
122
- public $antispam;
123
-
124
- /**
125
- * @var \WBCR\Titan\Check
126
- */
127
- public $check;
128
-
129
- /**
130
- * Logs constructor.
131
- *
132
- * @param \Wbcr_Factory454_Plugin $plugin
133
- *
134
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
135
- *
136
- */
137
- public function __construct( \Wbcr_Factory454_Plugin $plugin ) {
138
- $this->plugin = $plugin;
139
-
140
- $this->menu_title = __( 'Titan Anti-spam', 'titan-security' );
141
- $this->page_title = __( 'Dashboard', 'titan-security' );
142
- $this->title_plugin_action_link = $this->page_title;
143
- $this->menu_sub_title = $this->page_title;
144
- $this->page_menu_short_description = __( 'Start scanning and information about problems', 'titan-security' );
145
- $this->menu_icon = '~/admin/assets/img/icon.png';
146
-
147
- $this->view = $this->plugin->view();
148
-
149
- $this->vulnerabilities = new Vulnerabilities();
150
- $this->audit = new Audit();
151
- $this->check = new \WBCR\Titan\Check();
152
- $this->antispam = new \WBCR\Titan\Antispam();
153
-
154
- if ( $this->plugin->is_premium() ) {
155
- $this->sites = new SiteChecker();
156
- }
157
-
158
- add_action( 'wp_ajax_wtitan_change_scanner_speed', [ $this, 'change_scanner_speed' ] );
159
- add_action( 'wp_ajax_wtitan_change_scanner_schedule', [ $this, 'change_scanner_schedule' ] );
160
- add_action( 'wp_ajax_wtitan_change_digest_state', [ $this, 'change_digest_state' ] );
161
-
162
- parent::__construct( $plugin );
163
- }
164
-
165
- /**
166
- * @return string
167
- */
168
- public function getMenuTitle() {
169
- $this->check = new \WBCR\Titan\Check();
170
-
171
- return apply_filters( 'wbcr/titan/admin_menu_title', $this->menu_title );
172
- }
173
-
174
- /**
175
- * {@inheritdoc}
176
- *
177
- * @return void
178
- * @since 1.0.0
179
- */
180
- public function assets( $scripts, $styles ) {
181
- parent::assets( $scripts, $styles );
182
-
183
- $this->scripts->request( [
184
- 'bootstrap.core',
185
- 'bootstrap.tab',
186
- ], 'bootstrap' );
187
-
188
- $this->styles->request( [
189
- 'bootstrap.core',
190
- 'bootstrap.tab',
191
- ], 'bootstrap' );
192
-
193
- $this->styles->add( WTITAN_PLUGIN_URL . '/includes/vulnerabilities/assets/css/vulnerabilities-dashboard.css' );
194
- $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/vulnerabilities/assets/js/vulnerability_ajax.js', [ 'jquery' ] );
195
- $this->scripts->localize( 'wtvulner', [ 'nonce' => wp_create_nonce( 'get_vulners' ) ] );
196
-
197
- $this->styles->add( WTITAN_PLUGIN_URL . '/includes/audit/assets/css/audit-dashboard.css' );
198
- $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/audit/assets/js/audit_ajax.js', [ 'jquery' ] );
199
- $this->scripts->localize( 'wtaudit', [ 'nonce' => wp_create_nonce( 'get_audits' ) ] );
200
-
201
- //$this->scripts->add(WTITAN_PLUGIN_URL . '/includes/scanner/assets/js/Chart.min.js', ['jquery']);
202
- //$this->scripts->add(WTITAN_PLUGIN_URL . '/includes/scanner/assets/js/statistic.js', ['jquery']);
203
- $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/scanner/assets/js/scanner.js', [ 'jquery' ] );
204
- $this->scripts->localize( 'wpnonce', [
205
- 'start' => wp_create_nonce( 'titan-start-scan' ),
206
- 'stop' => wp_create_nonce( 'titan-stop-scan' ),
207
- 'status' => wp_create_nonce( 'titan-status-scan' ),
208
- ] );
209
-
210
- $this->styles->add( WTITAN_PLUGIN_URL . '/includes/check/assets/css/check-dashboard.css' );
211
- $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/check/assets/js/check.js', [ 'jquery' ] );
212
- $this->scripts->localize( 'update_nonce', wp_create_nonce( "updates" ) );
213
- $this->scripts->localize( 'wtscanner', [
214
- 'update_nonce' => wp_create_nonce( "updates" ),
215
- 'hide_nonce' => wp_create_nonce( "hide" ),
216
- ] );
217
-
218
- $this->styles->add( WTITAN_PLUGIN_URL . '/includes/vulnerabilities/assets/css/vulnerabilities-dashboard.css' );
219
- $this->styles->add( WTITAN_PLUGIN_URL . '/includes/audit/assets/css/audit-dashboard.css' );
220
-
221
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/dashboard-dashboard.css' );
222
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/dashboard.js' );
223
-
224
- $this->scripts->localize( 'wtdashboard', [
225
- 'nonce' => wp_create_nonce( "wtitan_change_scanner" ),
226
- 'digest_nonce' => wp_create_nonce( 'wtitan_change_digest_state' ),
227
- ] );
228
- //$this->scripts->add('https://www.gstatic.com/charts/loader.js', [],'', WANTISPAMP_PLUGIN_VERSION);
229
- }
230
-
231
-
232
- /**
233
- * {@inheritdoc}
234
- */
235
- public function showPageContent() {
236
- //FIREWALL
237
- $firewall = array();
238
-
239
- $firewall['firewall_mode'] = $this->plugin->getPopulateOption( 'firewall_mode' );
240
- $firewall['firewall_pro_activated'] = defined( 'WTITANP_PLUGIN_ACTIVE' ) && WTITANP_PLUGIN_ACTIVE;
241
- //end FIREWALL
242
-
243
- //AUDIT
244
- $check_content = $this->check->getPageContent( 'check' );
245
- //---
246
- $scanner_started = $this->plugin->getOption( 'scanner_status' ) == 'started';
247
-
248
- $scanner_speed = $this->plugin->getOption( 'scanner_speed', 'none' );
249
- if ( $scanner_speed == 'none' ) {
250
- if ( $this->plugin->is_premium() ) {
251
- $scanner_speed = 'slow';
252
- } else {
253
- $scanner_speed = 'free';
254
- }
255
- }
256
- $scanner_speeds = [
257
- [
258
- \WBCR\Titan\MalwareScanner\Scanner::SPEED_FREE,
259
- __( 'Free', 'titan-security' ),
260
- __( 'Free speed is slow', 'titan-security' )
261
- ],
262
- [
263
- \WBCR\Titan\MalwareScanner\Scanner::SPEED_SLOW,
264
- __( 'Slow', 'titan-security' ),
265
- __( 'Suitable for the most budget hosting services', 'titan-security' )
266
- ],
267
- [
268
- \WBCR\Titan\MalwareScanner\Scanner::SPEED_MEDIUM,
269
- __( 'Medium', 'titan-security' ),
270
- __( 'The best option for almost any capacity', 'titan-security' )
271
- ],
272
- [
273
- \WBCR\Titan\MalwareScanner\Scanner::SPEED_FAST,
274
- __( 'Fast', 'titan-security' ),
275
- __( 'Checks the maximum number of files per minute. We recommend that you have more than 100 MB of RAM', 'titan-security' )
276
- ],
277
- ];
278
-
279
- $schedule = $this->plugin->getOption( 'scanner_schedule', 'none' );
280
- if ( $schedule == 'none' ) {
281
- $schedule = 'disabled';
282
- }
283
- $schedules = [
284
- [
285
- \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DISABLED,
286
- __( 'Disabled', 'titan-security' ),
287
- __( 'Disable scheduled scanning', 'titan-security' )
288
- ],
289
- [
290
- \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DAILY,
291
- __( 'Daily', 'titan-security' ),
292
- __( 'Scan every day', 'titan-security' )
293
- ],
294
- [
295
- \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_WEEKLY,
296
- __( 'Weekly', 'titan-security' ),
297
- __( 'Scan every week', 'titan-security' )
298
- ],
299
- [
300
- \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_CUSTOM,
301
- __( 'Custom', 'titan-security' ),
302
- __( 'Select the date and time of the next scan', 'titan-security' )
303
- ],
304
- ];
305
-
306
- $isDigestEnabled = $this->plugin->getOption( 'digest', 'disable' ) === 'enable';
307
-
308
- $this->view->print_template( 'dashboard', [
309
- 'is_premium' => $this->plugin->is_premium(),
310
- 'scanner_started' => $scanner_started,
311
- 'this_plugin' => $this->plugin,
312
- 'firewall' => $firewall,
313
- 'vulnerabilities' => $this->vulnerabilities,
314
- 'audit' => $this->audit,
315
- 'sites' => $this->sites,
316
- 'scanner' => $this->check->scanner->get_current_results(),
317
- 'antispam' => $this->antispam,
318
- 'check_content' => $check_content,
319
- 'scanner_speed' => $scanner_speed,
320
- 'scanner_speeds' => $scanner_speeds,
321
- 'schedule' => $schedule,
322
- 'schedules' => $schedules,
323
- 'isDigestEnabled' => $isDigestEnabled,
324
- ] );
325
- }
326
-
327
- /**
328
- * AJAX change scanner speed
329
- */
330
- public function change_scanner_speed() {
331
- check_ajax_referer( 'wtitan_change_scanner' );
332
-
333
- if ( ! current_user_can( 'manage_options' ) ) {
334
- wp_send_json( array( 'error_message' => __( 'You don\'t have enough capability to edit this information.', 'titan-security' ) ) );
335
- }
336
-
337
- if ( isset( $_POST['speed'] ) ) {
338
-
339
- $speed = $_POST['speed'];
340
-
341
- \WBCR\Titan\Plugin::app()->updatePopulateOption( 'scanner_speed', $speed );
342
-
343
- wp_send_json( [
344
- 'message' => __( "Scanner speed successfully changed", "titan-security" ),
345
- 'speed' => $speed
346
- ] );
347
- } else {
348
- wp_send_json( array( 'error_message' => __( 'Scanner speed is not selected', 'titan-security' ) ) );
349
- }
350
- }
351
-
352
- /**
353
- * AJAX Changing digest state
354
- */
355
- public function change_digest_state() {
356
- check_ajax_referer( 'wtitan_change_digest_state' );
357
-
358
- $value = $_POST['value'];
359
- if ( ! in_array( $value, [ 'disable', 'enable' ] ) ) {
360
- wp_send_json( [
361
- 'error_message' => __( 'Reload the page and try again', 'titan-security' ),
362
- ] );
363
- }
364
-
365
- $this->plugin->updateOption( 'digest', $value );
366
-
367
- if ( $value == 'enable' ) {
368
- $msg = 'You have enabled receiving the digest';
369
- wp_schedule_event( time(), 'weekly', 'titan_malware_weekly_digest' );
370
- } else {
371
- $msg = 'You have disabled receiving the digest';
372
- wp_unschedule_hook( 'titan_malware_weekly_digest' );
373
- }
374
-
375
-
376
- wp_send_json( [
377
- 'message' => __( $msg, 'titan-security' ),
378
- ] );
379
- }
380
-
381
- /**
382
- * AJAX change scanner speed
383
- */
384
- public function change_scanner_schedule() {
385
- check_ajax_referer( 'wtitan_change_scanner' );
386
-
387
- if ( ! current_user_can( 'manage_options' ) ) {
388
- wp_send_json( array( 'error_message' => __( 'You don\'t have enough capability to edit this information.', 'titan-security' ) ) );
389
- }
390
-
391
- if ( isset( $_POST['schedule'] ) ) {
392
-
393
- $schedule = $_POST['schedule'];
394
-
395
- \WBCR\Titan\Plugin::app()->updatePopulateOption( 'scanner_schedule', $schedule );
396
-
397
- wp_send_json( [
398
- 'message' => __( "Scanner schedule successfully changed", "titan-security" ),
399
- 'schedule' => $schedule
400
- ] );
401
- } else {
402
- wp_send_json( array( 'error_message' => __( 'Scanner schedule is not selected', 'titan-security' ) ) );
403
- }
404
- }
405
-
406
-
407
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ use WBCR\Titan\Audit;
7
+ use WBCR\Titan\Plugin;
8
+ use WBCR\Titan\Views;
9
+ use WBCR\Titan\Vulnerabilities;
10
+ use WBCR\Titan\SiteChecker;
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit;
14
+ }
15
+
16
+ /**
17
+ * The file contains a short help info.
18
+ *
19
+ * @author Artem Prihodko <webtemyk@yandex.ru>
20
+ * @copyright (c) 2020 Creative Motion
21
+ * @version 1.0
22
+ */
23
+ class Dashboard extends Base {
24
+
25
+ /**
26
+ * {@inheritdoc}
27
+ */
28
+ public $id = 'dashboard';
29
+
30
+ /**
31
+ * {@inheritdoc}
32
+ */
33
+ public $page_menu_dashicon = 'dashicons-dashboard';
34
+
35
+ /**
36
+ * Menu icon (only if a page is placed as a main menu).
37
+ * For example: '~/assets/img/menu-icon.png'
38
+ * For example dashicons: '\f321'
39
+ * @var string
40
+ */
41
+ public $menu_icon;
42
+
43
+ /**
44
+ * {@inheritdoc}
45
+ */
46
+ public $type = 'page';
47
+
48
+ /**
49
+ * {@inheritdoc}
50
+ */
51
+ public $show_right_sidebar_in_options = false;
52
+
53
+ /**
54
+ * {@inheritdoc}
55
+ */
56
+ public $page_menu_position = 90;
57
+
58
+ /**
59
+ * {@inheritDoc}
60
+ *
61
+ * @since 6.0
62
+ * @var bool
63
+ */
64
+ public $add_link_to_plugin_actions = true;
65
+
66
+ /**
67
+ * {@inheritDoc}
68
+ *
69
+ * @since 6.0
70
+ * @var bool
71
+ */
72
+ public $internal = false;
73
+
74
+ /**
75
+ * {@inheritDoc}
76
+ *
77
+ * @since 6.0
78
+ * @var bool
79
+ */
80
+ //public $add_link_to_plugin_actions = true;
81
+
82
+ /**
83
+ * Заголовок страницы, также использует в меню, как название закладки
84
+ *
85
+ * @var bool
86
+ */
87
+ public $show_page_title = true;
88
+
89
+ /**
90
+ * @var object|\WBCR\Titan\Views
91
+ */
92
+ public $view;
93
+
94
+ /**
95
+ * @var object|\WBCR\Titan\Model\Firewall
96
+ */
97
+ //public $firewall;
98
+
99
+ /**
100
+ * @var object|\WBCR\Titan\Vulnerabilities
101
+ */
102
+ public $vulnerabilities;
103
+
104
+ /**
105
+ * @var object|\WBCR\Titan\Audit
106
+ */
107
+ public $audit;
108
+
109
+ /**
110
+ * @var \WBCR\Titan\SiteChecker
111
+ */
112
+ public $sites;
113
+
114
+ /**
115
+ * @var \WBCR\Titan\Scanner
116
+ */
117
+ public $scanner;
118
+
119
+ /**
120
+ * @var \WBCR\Titan\Antispam
121
+ */
122
+ public $antispam;
123
+
124
+ /**
125
+ * @var \WBCR\Titan\Check
126
+ */
127
+ public $check;
128
+
129
+ /**
130
+ * Logs constructor.
131
+ *
132
+ * @param \Wbcr_Factory458_Plugin $plugin
133
+ *
134
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
135
+ *
136
+ */
137
+ public function __construct( \Wbcr_Factory458_Plugin $plugin ) {
138
+ $this->plugin = $plugin;
139
+
140
+ $this->menu_title = __( 'Titan Anti-spam', 'titan-security' );
141
+ $this->page_title = __( 'Dashboard', 'titan-security' );
142
+ $this->title_plugin_action_link = $this->page_title;
143
+ $this->menu_sub_title = $this->page_title;
144
+ $this->page_menu_short_description = __( 'Start scanning and information about problems', 'titan-security' );
145
+ $this->menu_icon = '~/admin/assets/img/icon.png';
146
+
147
+ $this->view = $this->plugin->view();
148
+
149
+ $this->vulnerabilities = new Vulnerabilities();
150
+ $this->audit = new Audit();
151
+ $this->check = new \WBCR\Titan\Check();
152
+ $this->antispam = new \WBCR\Titan\Antispam();
153
+
154
+ if ( $this->plugin->is_premium() ) {
155
+ $this->sites = new SiteChecker();
156
+ }
157
+
158
+ add_action( 'wp_ajax_wtitan_change_scanner_speed', [ $this, 'change_scanner_speed' ] );
159
+ add_action( 'wp_ajax_wtitan_change_scanner_schedule', [ $this, 'change_scanner_schedule' ] );
160
+ add_action( 'wp_ajax_wtitan_change_digest_state', [ $this, 'change_digest_state' ] );
161
+
162
+ parent::__construct( $plugin );
163
+ }
164
+
165
+ /**
166
+ * @return string
167
+ */
168
+ public function getMenuTitle() {
169
+ $this->check = new \WBCR\Titan\Check();
170
+
171
+ return apply_filters( 'wbcr/titan/admin_menu_title', $this->menu_title );
172
+ }
173
+
174
+ /**
175
+ * {@inheritdoc}
176
+ *
177
+ * @return void
178
+ * @since 1.0.0
179
+ */
180
+ public function assets( $scripts, $styles ) {
181
+ parent::assets( $scripts, $styles );
182
+
183
+ $this->scripts->request( [
184
+ 'bootstrap.core',
185
+ 'bootstrap.tab',
186
+ ], 'bootstrap' );
187
+
188
+ $this->styles->request( [
189
+ 'bootstrap.core',
190
+ 'bootstrap.tab',
191
+ ], 'bootstrap' );
192
+
193
+ $this->styles->add( WTITAN_PLUGIN_URL . '/includes/vulnerabilities/assets/css/vulnerabilities-dashboard.css' );
194
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/vulnerabilities/assets/js/vulnerability_ajax.js', [ 'jquery' ] );
195
+ $this->scripts->localize( 'wtvulner', [ 'nonce' => wp_create_nonce( 'get_vulners' ) ] );
196
+
197
+ $this->styles->add( WTITAN_PLUGIN_URL . '/includes/audit/assets/css/audit-dashboard.css' );
198
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/audit/assets/js/audit_ajax.js', [ 'jquery' ] );
199
+ $this->scripts->localize( 'wtaudit', [ 'nonce' => wp_create_nonce( 'get_audits' ) ] );
200
+
201
+ //$this->scripts->add(WTITAN_PLUGIN_URL . '/includes/scanner/assets/js/Chart.min.js', ['jquery']);
202
+ //$this->scripts->add(WTITAN_PLUGIN_URL . '/includes/scanner/assets/js/statistic.js', ['jquery']);
203
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/scanner/assets/js/scanner.js', [ 'jquery' ] );
204
+ $this->scripts->localize( 'wpnonce', [
205
+ 'start' => wp_create_nonce( 'titan-start-scan' ),
206
+ 'stop' => wp_create_nonce( 'titan-stop-scan' ),
207
+ 'status' => wp_create_nonce( 'titan-status-scan' ),
208
+ ] );
209
+
210
+ $this->styles->add( WTITAN_PLUGIN_URL . '/includes/check/assets/css/check-dashboard.css' );
211
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/check/assets/js/check.js', [ 'jquery' ] );
212
+ //$this->scripts->localize( 'update_nonce', wp_create_nonce( "updates" ) );
213
+ $this->scripts->localize( 'wtscanner', [
214
+ 'update_nonce' => wp_create_nonce( "updates" ),
215
+ 'hide_nonce' => wp_create_nonce( "hide" ),
216
+ ] );
217
+
218
+ $this->styles->add( WTITAN_PLUGIN_URL . '/includes/vulnerabilities/assets/css/vulnerabilities-dashboard.css' );
219
+ $this->styles->add( WTITAN_PLUGIN_URL . '/includes/audit/assets/css/audit-dashboard.css' );
220
+
221
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/dashboard-dashboard.css' );
222
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/dashboard.js' );
223
+
224
+ $this->scripts->localize( 'wtdashboard', [
225
+ 'nonce' => wp_create_nonce( "wtitan_change_scanner" ),
226
+ 'digest_nonce' => wp_create_nonce( 'wtitan_change_digest_state' ),
227
+ ] );
228
+ //$this->scripts->add('https://www.gstatic.com/charts/loader.js', [],'', WANTISPAMP_PLUGIN_VERSION);
229
+ }
230
+
231
+
232
+ /**
233
+ * {@inheritdoc}
234
+ */
235
+ public function showPageContent() {
236
+ //FIREWALL
237
+ $firewall = array();
238
+
239
+ $firewall['firewall_mode'] = $this->plugin->getPopulateOption( 'firewall_mode' );
240
+ $firewall['firewall_pro_activated'] = defined( 'WTITANP_PLUGIN_ACTIVE' ) && WTITANP_PLUGIN_ACTIVE;
241
+ //end FIREWALL
242
+
243
+ //AUDIT
244
+ $check_content = $this->check->getPageContent( 'check' );
245
+ //---
246
+ $scanner_started = $this->plugin->getOption( 'scanner_status' ) == 'started';
247
+
248
+ $scanner_speed = $this->plugin->getOption( 'scanner_speed', 'none' );
249
+ if ( $scanner_speed == 'none' ) {
250
+ if ( $this->plugin->is_premium() ) {
251
+ $scanner_speed = 'slow';
252
+ } else {
253
+ $scanner_speed = 'free';
254
+ }
255
+ }
256
+ $scanner_speeds = [
257
+ [
258
+ \WBCR\Titan\MalwareScanner\Scanner::SPEED_FREE,
259
+ __( 'Free', 'titan-security' ),
260
+ __( 'Free speed is slow', 'titan-security' )
261
+ ],
262
+ [
263
+ \WBCR\Titan\MalwareScanner\Scanner::SPEED_SLOW,
264
+ __( 'Slow', 'titan-security' ),
265
+ __( 'Suitable for the most budget hosting services', 'titan-security' )
266
+ ],
267
+ [
268
+ \WBCR\Titan\MalwareScanner\Scanner::SPEED_MEDIUM,
269
+ __( 'Medium', 'titan-security' ),
270
+ __( 'The best option for almost any capacity', 'titan-security' )
271
+ ],
272
+ [
273
+ \WBCR\Titan\MalwareScanner\Scanner::SPEED_FAST,
274
+ __( 'Fast', 'titan-security' ),
275
+ __( 'Checks the maximum number of files per minute. We recommend that you have more than 100 MB of RAM', 'titan-security' )
276
+ ],
277
+ ];
278
+
279
+ $schedule = $this->plugin->getOption( 'scanner_schedule', 'none' );
280
+ if ( $schedule == 'none' ) {
281
+ $schedule = 'disabled';
282
+ }
283
+ $schedules = [
284
+ [
285
+ \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DISABLED,
286
+ __( 'Disabled', 'titan-security' ),
287
+ __( 'Disable scheduled scanning', 'titan-security' )
288
+ ],
289
+ [
290
+ \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DAILY,
291
+ __( 'Daily', 'titan-security' ),
292
+ __( 'Scan every day', 'titan-security' )
293
+ ],
294
+ [
295
+ \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_WEEKLY,
296
+ __( 'Weekly', 'titan-security' ),
297
+ __( 'Scan every week', 'titan-security' )
298
+ ],
299
+ [
300
+ \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_CUSTOM,
301
+ __( 'Custom', 'titan-security' ),
302
+ __( 'Select the date and time of the next scan', 'titan-security' )
303
+ ],
304
+ ];
305
+
306
+ $isDigestEnabled = $this->plugin->getOption( 'digest', 'disable' ) === 'enable';
307
+
308
+ $this->view->print_template( 'dashboard', [
309
+ 'is_premium' => $this->plugin->is_premium(),
310
+ 'scanner_started' => $scanner_started,
311
+ 'this_plugin' => $this->plugin,
312
+ 'firewall' => $firewall,
313
+ 'vulnerabilities' => $this->vulnerabilities,
314
+ 'audit' => $this->audit,
315
+ 'sites' => $this->sites,
316
+ 'scanner' => $this->check->scanner->get_current_results(),
317
+ 'antispam' => $this->antispam,
318
+ 'check_content' => $check_content,
319
+ 'scanner_speed' => $scanner_speed,
320
+ 'scanner_speeds' => $scanner_speeds,
321
+ 'schedule' => $schedule,
322
+ 'schedules' => $schedules,
323
+ 'isDigestEnabled' => $isDigestEnabled,
324
+ ] );
325
+ }
326
+
327
+ /**
328
+ * AJAX change scanner speed
329
+ */
330
+ public function change_scanner_speed() {
331
+ check_ajax_referer( 'wtitan_change_scanner' );
332
+
333
+ if ( ! current_user_can( 'manage_options' ) ) {
334
+ wp_send_json( array( 'error_message' => __( 'You don\'t have enough capability to edit this information.', 'titan-security' ) ) );
335
+ }
336
+
337
+ if ( isset( $_POST['speed'] ) ) {
338
+
339
+ $speed = $_POST['speed'];
340
+
341
+ \WBCR\Titan\Plugin::app()->updatePopulateOption( 'scanner_speed', $speed );
342
+
343
+ wp_send_json( [
344
+ 'message' => __( "Scanner speed successfully changed", "titan-security" ),
345
+ 'speed' => $speed
346
+ ] );
347
+ } else {
348
+ wp_send_json( array( 'error_message' => __( 'Scanner speed is not selected', 'titan-security' ) ) );
349
+ }
350
+ }
351
+
352
+ /**
353
+ * AJAX Changing digest state
354
+ */
355
+ public function change_digest_state() {
356
+ check_ajax_referer( 'wtitan_change_digest_state' );
357
+
358
+ $value = $_POST['value'];
359
+ if ( ! in_array( $value, [ 'disable', 'enable' ] ) ) {
360
+ wp_send_json( [
361
+ 'error_message' => __( 'Reload the page and try again', 'titan-security' ),
362
+ ] );
363
+ }
364
+
365
+ $this->plugin->updateOption( 'digest', $value );
366
+
367
+ if ( $value == 'enable' ) {
368
+ $msg = 'You have enabled receiving the digest';
369
+ wp_schedule_event( time(), 'weekly', 'titan_malware_weekly_digest' );
370
+ } else {
371
+ $msg = 'You have disabled receiving the digest';
372
+ wp_unschedule_hook( 'titan_malware_weekly_digest' );
373
+ }
374
+
375
+
376
+ wp_send_json( [
377
+ 'message' => __( $msg, 'titan-security' ),
378
+ ] );
379
+ }
380
+
381
+ /**
382
+ * AJAX change scanner speed
383
+ */
384
+ public function change_scanner_schedule() {
385
+ check_ajax_referer( 'wtitan_change_scanner' );
386
+
387
+ if ( ! current_user_can( 'manage_options' ) ) {
388
+ wp_send_json( array( 'error_message' => __( 'You don\'t have enough capability to edit this information.', 'titan-security' ) ) );
389
+ }
390
+
391
+ if ( isset( $_POST['schedule'] ) ) {
392
+
393
+ $schedule = $_POST['schedule'];
394
+
395
+ \WBCR\Titan\Plugin::app()->updatePopulateOption( 'scanner_schedule', $schedule );
396
+
397
+ wp_send_json( [
398
+ 'message' => __( "Scanner schedule successfully changed", "titan-security" ),
399
+ 'schedule' => $schedule
400
+ ] );
401
+ } else {
402
+ wp_send_json( array( 'error_message' => __( 'Scanner schedule is not selected', 'titan-security' ) ) );
403
+ }
404
+ }
405
+
406
+
407
+ }
admin/pages/class-pages-license.php CHANGED
@@ -1,396 +1,396 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if( !defined('ABSPATH') ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * Страница лицензирования плагина.
12
- *
13
- * Поддерживает режим работы с мультисаймами. Вы можете увидеть эту страницу в панели настройки сети.
14
- *
15
- * @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
- *
17
- * @copyright (c) 2018 Webraftic Ltd
18
- */
19
- class License extends \WBCR\Factory_Templates_106\Pages\License {
20
-
21
- /**
22
- * {@inheritdoc}
23
- *
24
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
25
- * @since 6.0
26
- * @var string
27
- */
28
- public $id = 'license';
29
-
30
- /**
31
- * {@inheritdoc}
32
- */
33
- public $type = "page";
34
-
35
- /**
36
- * {@inheritdoc}
37
- *
38
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
39
- * @since 6.0
40
- * @var string
41
- */
42
- public $page_parent_page;
43
-
44
- /**
45
- * {@inheritdoc}
46
- *
47
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
48
- * @since 2.1.2
49
- * @var int
50
- */
51
- public $page_menu_position = 0;
52
-
53
- /**
54
- * {@inheritdoc}
55
- */
56
- public $page_menu_dashicon = 'dashicons-admin-network';
57
-
58
- /**
59
- * WCL_LicensePage constructor.
60
- *
61
- * @param \Wbcr_Factory454_Plugin $plugin
62
- *
63
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
64
- *
65
- */
66
- public function __construct(\Wbcr_Factory454_Plugin $plugin)
67
- {
68
- $this->menu_title = __('License', 'titan-security');
69
- $this->page_menu_short_description = __('Product activation', 'titan-security');
70
- $this->plan_name = __('Titan security Pro', 'titan-security');
71
- $this->menuIcon = WTITAN_PLUGIN_URL . '/admin/assets/img/titan-icon.png';
72
-
73
- if( defined('WPSCANNER_PLUGIN_ACTIVE') ) {
74
- $this->page_parent_page = 'none';
75
- }
76
-
77
- if( $plugin->is_premium() ) {
78
- $this->page_menu_dashicon = 'dashicons-yes-alt';
79
- }
80
-
81
- parent::__construct($plugin);
82
-
83
- //add_action('admin_footer', [$this, 'print_confirmation_modal_tpl']);
84
- //add_action('wp_ajax_wtitan_activate_trial', array($this, 'activate_trial'));
85
-
86
- /**
87
- * Adds a new plugin card to license components page
88
- *
89
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
90
- * @since 1.6.2
91
- */
92
- add_filter('wbcr/titan/license/list_components', function ($components) {
93
- $title = 'Free';
94
- $icon = 'titan-plugin-256x256-lock.png';
95
-
96
- if( $this->is_premium ) {
97
- $title = 'Premium';
98
- $icon = 'titan-plugin-256x256.png';
99
- }
100
-
101
- $components[] = [
102
- 'name' => 'titan-security',
103
- 'title' => sprintf(__('Titan Anti-spam & Security [%s]', 'titan-security'), $title),
104
- 'type' => 'internal',
105
- 'build' => $this->is_premium ? 'premium' : 'free',
106
- 'key' => $this->get_hidden_license_key(),
107
- 'plan' => $this->get_plan(),
108
- 'expiration_days' => $this->get_expiration_days(),
109
- 'quota' => $this->is_premium ? $this->premium_license->get_count_active_sites() . ' ' . __('of', 'titan-security') . ' ' . $this->premium_license->get_sites_quota() : null,
110
- 'subscription' => $this->is_premium && $this->premium_has_subscription ? sprintf(__('Automatic renewal, every %s', ''), esc_attr($this->get_billing_cycle_readable())) : null,
111
- 'url' => 'https://clearfy.pro/',
112
- 'icon' => WTITAN_PLUGIN_URL . '/admin/assets/img/' . $icon,
113
- 'description' => __('Public License is a GPLv3 compatible license allowing you to change and use this version of the plugin for free. Please keep in mind this license covers only free edition of the plugin. Premium versions are distributed with other type of a license.', 'titan-security'),
114
- 'license_page_id' => $this->id
115
- ];
116
-
117
- return $components;
118
- });
119
- }
120
-
121
- public function getPluginTitle()
122
- {
123
- return "<span class='wt-plugin-header-logo'>&nbsp;</span>" . __('Titan Anti-spam & Security', 'titan-security');
124
- }
125
-
126
- /**
127
- * {@inheritDoc}
128
- * @param $notices
129
- * @param \Wbcr_Factory454_Plugin $plugin
130
- *
131
- * @return array
132
- * @since 6.5.2
133
- *
134
- * @see \FactoryPages453_ImpressiveThemplate
135
- */
136
- /*public function getActionNotices($notices)
137
- {
138
-
139
- $notices[] = [
140
- 'conditions' => [
141
- 'wtitan_trial_activated' => 1
142
- ],
143
- 'type' => 'success',
144
- 'message' => __('Trial is activated successfully!', 'titan-security')
145
-
146
- ];
147
-
148
- $notices[] = [
149
- 'conditions' => [
150
- 'wtitan_trial_activated_error' => 1,
151
- 'wtitan_error_code' => 'interal_error'
152
- ],
153
- 'type' => 'danger',
154
- 'message' => __('An unknown error occurred during trial activation. Details of the error are wrote in error log.', 'titan-security')
155
-
156
- ];
157
-
158
- $notices[] = [
159
- 'conditions' => [
160
- 'wtitan_trial_activated_error' => 1,
161
- 'wtitan_error_code' => 'trial_already_activated'
162
- ],
163
- 'type' => 'danger',
164
- 'message' => sprintf(__('You have already activated the trial earlier, you cannot activate the trial more than once. However, if your key has not expired yet, you can find it in your account (<a href="%s" target="_blank" rel="noopener noreferrer">%s</a>), and then insert the key in the license form to activate the premium plugin. To restore access to your account, use your admin email.', 'titan-security'), 'https://users.freemius.com/login', 'https://users.freemius.com/login')
165
- ];
166
-
167
- return $notices;
168
- }*/
169
-
170
- /**
171
- * {@inheritdoc}
172
- *
173
- * @return void
174
- * @since 6.5.2
175
- */
176
- public function assets($scripts, $styles)
177
- {
178
- parent::assets($scripts, $styles);
179
-
180
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/titan-security.css');
181
- if( !$this->plugin->premium->is_activate() ) {
182
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/libs/sweetalert2.css');
183
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/sweetalert-custom.css');
184
-
185
- $this->scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/libs/sweetalert3.min.js');
186
- $this->scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/trial-popup.js', ['jquery'], '', $this->plugin->getPluginVersion(), 'header');
187
- /*$this->scripts->localize('wtitan', [
188
- 'trial_nonce' => wp_create_nonce("activate_trial"),
189
- ]);*/
190
- }
191
- }
192
-
193
- /**
194
- * {@inheritdoc}
195
- *
196
- * @return void
197
- * @since 6.5.2
198
- */
199
-
200
- /*public function print_confirmation_modal_tpl()
201
- {
202
- if( isset($_GET['page']) && $this->getResultId() === $_GET['page'] ) {
203
- $terms_url = "https://titansitescanner.com/terms-of-use/";
204
- $privacy_url = "https://titansitescanner.com/privacy/";
205
-
206
- ?>
207
- <script type="text/html" id="wtitan-tmpl-confirmation-modal">
208
- <h2 class="swal2-title">
209
- <?php _e('Confirmation to the trial', 'titan-security') ?>
210
- </h2>
211
- <div class="wtitan-swal-content">
212
- <ul class="wtitan-list-infos" style="padding: 5px 20px;">
213
- <li>
214
- <?php _e('We are using some personal data, like your\'s e-mail.', 'titan-security') ?>
215
- </li>
216
- <li>
217
- <?php printf(__('By agreeing to the trial, you confirm that you have read <a href="%s" target="_blank" rel="noreferrer noopener">Terms of Service</a> and the
218
- <a href="%s" target="_blank" rel="noreferrer noopener">Privacy Policy (GDPR compilant)</a>', 'titan-security'), $terms_url, $privacy_url) ?>
219
- </li>
220
- <li>
221
- <label for="wtitan-trial-email">Enter your E-mail:</label>
222
- <input type="text" style="margin-top: 15px; padding: 5px;"
223
- value="<?php echo get_option('admin_email'); ?>" id="wtitan-trial-email">
224
- <?php
225
- //_e( 'We are using some personal data, like your\'s e-mail.', 'titan-security' );
226
- ?>
227
- </li>
228
- </ul>
229
- </div>
230
- </script>
231
-
232
- <?php
233
- }
234
- }*/
235
-
236
- /**
237
- * {@inheritdoc}
238
- *
239
- * @return string
240
- * @since 6.5
241
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
242
- */
243
- /*public function get_plan_description()
244
- {
245
- $activate_trial_url = wp_nonce_url($this->getActionUrl('activate-trial'), 'activate_trial');
246
-
247
- $description = "";
248
- if( !$this->plugin->premium->is_activate() ) {
249
- $description .= '<p>The free trial edition (no credit card) contains all of the features included in the paid-for version
250
- of the product.</p>';
251
- $description .= '<button id="wtitan-activate-trial-button" class="btn btn-primary">' . __('Activate 30 days trial', 'titan-security') . '</button>';
252
- $description .= "<span class='wt-spinner'></span>";
253
- }
254
-
255
- return $description;
256
- }*/
257
-
258
- public function showPageContent()
259
- {
260
- //$is_trial = $this->request->get('trial', false, true);
261
- //if( $is_trial ) {
262
- ?>
263
- <script>
264
- //jQuery(document).ready(function($) {
265
- //jQuery('#wtitan-activate-trial-button').trigger('click');
266
- //});
267
- </script>
268
- <?php
269
- //}
270
-
271
- parent::showPageContent();
272
- }
273
-
274
- /**
275
- * @author Egor Semenkov <highskil395472@gmail.ru>
276
- * @since 7.0.8
277
- */
278
- public function render_learnmore_section()
279
- {
280
- if( $this->is_premium ):
281
- ?>
282
- <p style="margin-top: 10px;">
283
- <?php printf(__('<a href="%s" target="_blank" rel="noopener">Lean more</a> about the premium version and get the license key to activate it now!', 'wbcr_factory_templates_106'), $this->plugin->get_support()->get_pricing_url(true, 'license_page')); ?>
284
- </p>
285
- <?php else: ?>
286
- <p style="margin-top: 10px;">
287
- <?php printf(__('Can’t find your key? Go to <a href="%s" target="_blank" rel="noopener">this page</a> and login using the e-mail address associated with your purchase.', 'wbcr_factory_templates_106'), "https://users.freemius.com/") ?>
288
- </p>
289
- <p style="margin-top: 10px;">
290
- <?php printf(__('We use certain personal data, such as your email address. By activating the license, you confirm that you have read the <a href="https://titansitescanner.com/terms-of-use/">Terms of Service</a> and <a href="https://titansitescanner.com/privacy/">Privacy Policy (in accordance with GDPR)</a>', 'wbcr_factory_templates_106'), $this->plugin->get_support()->get_contacts_url(true, 'license_page')) ?>
291
- </p>
292
- <?php endif;
293
- }
294
-
295
- /**
296
- * @author Artem Prihodko <webtemyk@yandex.ru>
297
- * @since 7.0
298
- */
299
-
300
- /*public function activate_trial()
301
- {
302
- if( !current_user_can('manage_options') ) {
303
- return;
304
- }
305
-
306
- if( !isset($_POST['email']) || empty($_POST['email']) ) {
307
- return;
308
- }
309
-
310
- check_ajax_referer('activate_trial');
311
-
312
- \WBCR\Titan\Logger\Writter::info('Start trial activation [PROCESS START]!');
313
-
314
- $admin_email = $_POST['email'];
315
- $domain = site_url();
316
-
317
- //$url = 'https://dev.anti-spam.space/api/v1.0/trial/register';
318
- $url = 'https://api.anti-spam.space/api/v1.0/trial/register';
319
-
320
- $options = [
321
- 'body' => [
322
- 'email' => $admin_email,
323
- 'domain' => site_url(),
324
- ]
325
- ];
326
-
327
- // Get license key from remote server
328
-
329
- $request = wp_remote_post($url, $options);
330
-
331
- if( is_wp_error($request) ) {
332
- \WBCR\Titan\Logger\Writter::error('Http request error: ' . $request->get_error_message());
333
- \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
334
-
335
- wp_send_json_error([
336
- 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=interal_error",
337
- ]);
338
- }
339
-
340
- $data = json_decode($request['body'], true);
341
-
342
- if( $data['status'] == 'fail' ) {
343
- if( !empty($data['error']) ) {
344
- $message = $data['error']['message'];
345
-
346
- \WBCR\Titan\Logger\Writter::error(sprintf('Trial activation failed for domain: %s, e-mail: %s with message: %s', $domain, $admin_email, $message));
347
- \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
348
-
349
- if( !empty($data['error']['code']) && 1001 === $data['error']['code'] ) {
350
- wp_send_json_error([
351
- 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=trial_already_activated",
352
- ]);
353
- } else {
354
- wp_send_json_error([
355
- 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=interal_error",
356
- ]);
357
- }
358
- }
359
- }
360
-
361
- $license_key = $data['response']['license_key'];
362
-
363
- if( empty($license_key) || 32 !== strlen($license_key) ) {
364
- \WBCR\Titan\Logger\Writter::error('License key format is not valid');
365
- \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
366
- wp_send_json_error([
367
- 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=interal_error",
368
- ]);
369
- }
370
-
371
- try {
372
- $this->plugin->premium->activate($license_key);
373
-
374
- \WBCR\Titan\Logger\Writter::info(sprintf('Trial activation success for domain: %s, e-mail: %s', $domain, $admin_email));
375
- \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
376
-
377
- wp_send_json_error([
378
- 'url' => $this->getPageUrl() . "&wtitan_trial_activated=1",
379
- ]);
380
- } catch( \Exception $e ) {
381
- \WBCR\Titan\Logger\Writter::error($e->getMessage());
382
- \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
383
-
384
- wp_send_json_error([
385
- 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=interal_error",
386
- ]);
387
- }
388
-
389
- \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
390
-
391
- // Redirect to index
392
- wp_send_json_error([
393
- 'url' => $this->getPageUrl(),
394
- ]);
395
- }*/
396
  }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if( !defined('ABSPATH') ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * Страница лицензирования плагина.
12
+ *
13
+ * Поддерживает режим работы с мультисаймами. Вы можете увидеть эту страницу в панели настройки сети.
14
+ *
15
+ * @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
+ *
17
+ * @copyright (c) 2018 Webraftic Ltd
18
+ */
19
+ class License extends \WBCR\Factory_Templates_110\Pages\License {
20
+
21
+ /**
22
+ * {@inheritdoc}
23
+ *
24
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
25
+ * @since 6.0
26
+ * @var string
27
+ */
28
+ public $id = 'license';
29
+
30
+ /**
31
+ * {@inheritdoc}
32
+ */
33
+ public $type = "page";
34
+
35
+ /**
36
+ * {@inheritdoc}
37
+ *
38
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
39
+ * @since 6.0
40
+ * @var string
41
+ */
42
+ public $page_parent_page;
43
+
44
+ /**
45
+ * {@inheritdoc}
46
+ *
47
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
48
+ * @since 2.1.2
49
+ * @var int
50
+ */
51
+ public $page_menu_position = 0;
52
+
53
+ /**
54
+ * {@inheritdoc}
55
+ */
56
+ public $page_menu_dashicon = 'dashicons-admin-network';
57
+
58
+ /**
59
+ * WCL_LicensePage constructor.
60
+ *
61
+ * @param \Wbcr_Factory458_Plugin $plugin
62
+ *
63
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
64
+ *
65
+ */
66
+ public function __construct(\Wbcr_Factory458_Plugin $plugin)
67
+ {
68
+ $this->menu_title = __('License', 'titan-security');
69
+ $this->page_menu_short_description = __('Product activation', 'titan-security');
70
+ $this->plan_name = __('Titan security Pro', 'titan-security');
71
+ $this->menuIcon = WTITAN_PLUGIN_URL . '/admin/assets/img/titan-icon.png';
72
+
73
+ if( defined('WPSCANNER_PLUGIN_ACTIVE') ) {
74
+ $this->page_parent_page = 'none';
75
+ }
76
+
77
+ if( $plugin->is_premium() ) {
78
+ $this->page_menu_dashicon = 'dashicons-yes-alt';
79
+ }
80
+
81
+ parent::__construct($plugin);
82
+
83
+ //add_action('admin_footer', [$this, 'print_confirmation_modal_tpl']);
84
+ //add_action('wp_ajax_wtitan_activate_trial', array($this, 'activate_trial'));
85
+
86
+ /**
87
+ * Adds a new plugin card to license components page
88
+ *
89
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
90
+ * @since 1.6.2
91
+ */
92
+ add_filter('wbcr/titan/license/list_components', function ($components) {
93
+ $title = 'Free';
94
+ $icon = 'titan-plugin-256x256-lock.png';
95
+
96
+ if( $this->is_premium ) {
97
+ $title = 'Premium';
98
+ $icon = 'titan-plugin-256x256.png';
99
+ }
100
+
101
+ $components[] = [
102
+ 'name' => 'titan-security',
103
+ 'title' => sprintf(__('Titan Anti-spam & Security [%s]', 'titan-security'), $title),
104
+ 'type' => 'internal',
105
+ 'build' => $this->is_premium ? 'premium' : 'free',
106
+ 'key' => $this->get_hidden_license_key(),
107
+ 'plan' => $this->get_plan(),
108
+ 'expiration_days' => $this->get_expiration_days(),
109
+ 'quota' => $this->is_premium ? $this->premium_license->get_count_active_sites() . ' ' . __('of', 'titan-security') . ' ' . $this->premium_license->get_sites_quota() : null,
110
+ 'subscription' => $this->is_premium && $this->premium_has_subscription ? sprintf(__('Automatic renewal, every %s', ''), esc_attr($this->get_billing_cycle_readable())) : null,
111
+ 'url' => 'https://clearfy.pro/',
112
+ 'icon' => WTITAN_PLUGIN_URL . '/admin/assets/img/' . $icon,
113
+ 'description' => __('Public License is a GPLv3 compatible license allowing you to change and use this version of the plugin for free. Please keep in mind this license covers only free edition of the plugin. Premium versions are distributed with other type of a license.', 'titan-security'),
114
+ 'license_page_id' => $this->id
115
+ ];
116
+
117
+ return $components;
118
+ });
119
+ }
120
+
121
+ public function getPluginTitle()
122
+ {
123
+ return "<span class='wt-plugin-header-logo'>&nbsp;</span>" . __('Titan Anti-spam & Security', 'titan-security');
124
+ }
125
+
126
+ /**
127
+ * {@inheritDoc}
128
+ * @param $notices
129
+ * @param \Wbcr_Factory458_Plugin $plugin
130
+ *
131
+ * @return array
132
+ * @since 6.5.2
133
+ *
134
+ * @see \FactoryPages457_ImpressiveThemplate
135
+ */
136
+ /*public function getActionNotices($notices)
137
+ {
138
+
139
+ $notices[] = [
140
+ 'conditions' => [
141
+ 'wtitan_trial_activated' => 1
142
+ ],
143
+ 'type' => 'success',
144
+ 'message' => __('Trial is activated successfully!', 'titan-security')
145
+
146
+ ];
147
+
148
+ $notices[] = [
149
+ 'conditions' => [
150
+ 'wtitan_trial_activated_error' => 1,
151
+ 'wtitan_error_code' => 'interal_error'
152
+ ],
153
+ 'type' => 'danger',
154
+ 'message' => __('An unknown error occurred during trial activation. Details of the error are wrote in error log.', 'titan-security')
155
+
156
+ ];
157
+
158
+ $notices[] = [
159
+ 'conditions' => [
160
+ 'wtitan_trial_activated_error' => 1,
161
+ 'wtitan_error_code' => 'trial_already_activated'
162
+ ],
163
+ 'type' => 'danger',
164
+ 'message' => sprintf(__('You have already activated the trial earlier, you cannot activate the trial more than once. However, if your key has not expired yet, you can find it in your account (<a href="%s" target="_blank" rel="noopener noreferrer">%s</a>), and then insert the key in the license form to activate the premium plugin. To restore access to your account, use your admin email.', 'titan-security'), 'https://users.freemius.com/login', 'https://users.freemius.com/login')
165
+ ];
166
+
167
+ return $notices;
168
+ }*/
169
+
170
+ /**
171
+ * {@inheritdoc}
172
+ *
173
+ * @return void
174
+ * @since 6.5.2
175
+ */
176
+ public function assets($scripts, $styles)
177
+ {
178
+ parent::assets($scripts, $styles);
179
+
180
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/titan-security.css');
181
+ if( !$this->plugin->premium->is_activate() ) {
182
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/libs/sweetalert2.css');
183
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/sweetalert-custom.css');
184
+
185
+ $this->scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/libs/sweetalert3.min.js');
186
+ $this->scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/trial-popup.js', ['jquery'], '', $this->plugin->getPluginVersion(), 'header');
187
+ /*$this->scripts->localize('wtitan', [
188
+ 'trial_nonce' => wp_create_nonce("activate_trial"),
189
+ ]);*/
190
+ }
191
+ }
192
+
193
+ /**
194
+ * {@inheritdoc}
195
+ *
196
+ * @return void
197
+ * @since 6.5.2
198
+ */
199
+
200
+ /*public function print_confirmation_modal_tpl()
201
+ {
202
+ if( isset($_GET['page']) && $this->getResultId() === $_GET['page'] ) {
203
+ $terms_url = "https://titansitescanner.com/terms-of-use/";
204
+ $privacy_url = "https://titansitescanner.com/privacy/";
205
+
206
+ ?>
207
+ <script type="text/html" id="wtitan-tmpl-confirmation-modal">
208
+ <h2 class="swal2-title">
209
+ <?php _e('Confirmation to the trial', 'titan-security') ?>
210
+ </h2>
211
+ <div class="wtitan-swal-content">
212
+ <ul class="wtitan-list-infos" style="padding: 5px 20px;">
213
+ <li>
214
+ <?php _e('We are using some personal data, like your\'s e-mail.', 'titan-security') ?>
215
+ </li>
216
+ <li>
217
+ <?php printf(__('By agreeing to the trial, you confirm that you have read <a href="%s" target="_blank" rel="noreferrer noopener">Terms of Service</a> and the
218
+ <a href="%s" target="_blank" rel="noreferrer noopener">Privacy Policy (GDPR compilant)</a>', 'titan-security'), $terms_url, $privacy_url) ?>
219
+ </li>
220
+ <li>
221
+ <label for="wtitan-trial-email">Enter your E-mail:</label>
222
+ <input type="text" style="margin-top: 15px; padding: 5px;"
223
+ value="<?php echo get_option('admin_email'); ?>" id="wtitan-trial-email">
224
+ <?php
225
+ //_e( 'We are using some personal data, like your\'s e-mail.', 'titan-security' );
226
+ ?>
227
+ </li>
228
+ </ul>
229
+ </div>
230
+ </script>
231
+
232
+ <?php
233
+ }
234
+ }*/
235
+
236
+ /**
237
+ * {@inheritdoc}
238
+ *
239
+ * @return string
240
+ * @since 6.5
241
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
242
+ */
243
+ /*public function get_plan_description()
244
+ {
245
+ $activate_trial_url = wp_nonce_url($this->getActionUrl('activate-trial'), 'activate_trial');
246
+
247
+ $description = "";
248
+ if( !$this->plugin->premium->is_activate() ) {
249
+ $description .= '<p>The free trial edition (no credit card) contains all of the features included in the paid-for version
250
+ of the product.</p>';
251
+ $description .= '<button id="wtitan-activate-trial-button" class="btn btn-primary">' . __('Activate 30 days trial', 'titan-security') . '</button>';
252
+ $description .= "<span class='wt-spinner'></span>";
253
+ }
254
+
255
+ return $description;
256
+ }*/
257
+
258
+ public function showPageContent()
259
+ {
260
+ //$is_trial = $this->request->get('trial', false, true);
261
+ //if( $is_trial ) {
262
+ ?>
263
+ <script>
264
+ //jQuery(document).ready(function($) {
265
+ //jQuery('#wtitan-activate-trial-button').trigger('click');
266
+ //});
267
+ </script>
268
+ <?php
269
+ //}
270
+
271
+ parent::showPageContent();
272
+ }
273
+
274
+ /**
275
+ * @author Egor Semenkov <highskil395472@gmail.ru>
276
+ * @since 7.0.8
277
+ */
278
+ public function render_learnmore_section()
279
+ {
280
+ if( $this->is_premium ):
281
+ ?>
282
+ <p style="margin-top: 10px;">
283
+ <?php printf(__('<a href="%s" target="_blank" rel="noopener">Lean more</a> about the premium version and get the license key to activate it now!', 'wbcr_factory_templates_110'), $this->plugin->get_support()->get_pricing_url(true, 'license_page')); ?>
284
+ </p>
285
+ <?php else: ?>
286
+ <p style="margin-top: 10px;">
287
+ <?php printf(__('Can’t find your key? Go to <a href="%s" target="_blank" rel="noopener">this page</a> and login using the e-mail address associated with your purchase.', 'wbcr_factory_templates_110'), "https://users.freemius.com/") ?>
288
+ </p>
289
+ <p style="margin-top: 10px;">
290
+ <?php printf(__('We use certain personal data, such as your email address. By activating the license, you confirm that you have read the <a href="https://titansitescanner.com/terms-of-use/">Terms of Service</a> and <a href="https://titansitescanner.com/privacy/">Privacy Policy (in accordance with GDPR)</a>', 'wbcr_factory_templates_110'), $this->plugin->get_support()->get_contacts_url(true, 'license_page')) ?>
291
+ </p>
292
+ <?php endif;
293
+ }
294
+
295
+ /**
296
+ * @author Artem Prihodko <webtemyk@yandex.ru>
297
+ * @since 7.0
298
+ */
299
+
300
+ /*public function activate_trial()
301
+ {
302
+ if( !current_user_can('manage_options') ) {
303
+ return;
304
+ }
305
+
306
+ if( !isset($_POST['email']) || empty($_POST['email']) ) {
307
+ return;
308
+ }
309
+
310
+ check_ajax_referer('activate_trial');
311
+
312
+ \WBCR\Titan\Logger\Writter::info('Start trial activation [PROCESS START]!');
313
+
314
+ $admin_email = $_POST['email'];
315
+ $domain = site_url();
316
+
317
+ //$url = 'https://dev.anti-spam.space/api/v1.0/trial/register';
318
+ $url = 'https://api.anti-spam.space/api/v1.0/trial/register';
319
+
320
+ $options = [
321
+ 'body' => [
322
+ 'email' => $admin_email,
323
+ 'domain' => site_url(),
324
+ ]
325
+ ];
326
+
327
+ // Get license key from remote server
328
+
329
+ $request = wp_remote_post($url, $options);
330
+
331
+ if( is_wp_error($request) ) {
332
+ \WBCR\Titan\Logger\Writter::error('Http request error: ' . $request->get_error_message());
333
+ \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
334
+
335
+ wp_send_json_error([
336
+ 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=interal_error",
337
+ ]);
338
+ }
339
+
340
+ $data = json_decode($request['body'], true);
341
+
342
+ if( $data['status'] == 'fail' ) {
343
+ if( !empty($data['error']) ) {
344
+ $message = $data['error']['message'];
345
+
346
+ \WBCR\Titan\Logger\Writter::error(sprintf('Trial activation failed for domain: %s, e-mail: %s with message: %s', $domain, $admin_email, $message));
347
+ \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
348
+
349
+ if( !empty($data['error']['code']) && 1001 === $data['error']['code'] ) {
350
+ wp_send_json_error([
351
+ 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=trial_already_activated",
352
+ ]);
353
+ } else {
354
+ wp_send_json_error([
355
+ 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=interal_error",
356
+ ]);
357
+ }
358
+ }
359
+ }
360
+
361
+ $license_key = $data['response']['license_key'];
362
+
363
+ if( empty($license_key) || 32 !== strlen($license_key) ) {
364
+ \WBCR\Titan\Logger\Writter::error('License key format is not valid');
365
+ \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
366
+ wp_send_json_error([
367
+ 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=interal_error",
368
+ ]);
369
+ }
370
+
371
+ try {
372
+ $this->plugin->premium->activate($license_key);
373
+
374
+ \WBCR\Titan\Logger\Writter::info(sprintf('Trial activation success for domain: %s, e-mail: %s', $domain, $admin_email));
375
+ \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
376
+
377
+ wp_send_json_error([
378
+ 'url' => $this->getPageUrl() . "&wtitan_trial_activated=1",
379
+ ]);
380
+ } catch( \Exception $e ) {
381
+ \WBCR\Titan\Logger\Writter::error($e->getMessage());
382
+ \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
383
+
384
+ wp_send_json_error([
385
+ 'url' => $this->getPageUrl() . "&wtitan_trial_activated_error=1&wtitan_error_code=interal_error",
386
+ ]);
387
+ }
388
+
389
+ \WBCR\Titan\Logger\Writter::info('End trial activation [PROCESS END]!');
390
+
391
+ // Redirect to index
392
+ wp_send_json_error([
393
+ 'url' => $this->getPageUrl(),
394
+ ]);
395
+ }*/
396
  }
admin/pages/class-pages-logs.php CHANGED
@@ -1,137 +1,137 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * Страница журнала ошибок
12
- *
13
- * Не поддерживает режим работы с мультисаймами.
14
- *
15
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
- * @copyright (c) 2019 Webraftic Ltd
17
- * @version 1.0
18
- */
19
- class Logs extends Base {
20
-
21
- /**
22
- * {@inheritdoc}
23
- */
24
- public $id = 'logs';
25
-
26
- /**
27
- * {@inheritdoc}
28
- */
29
- public $page_menu_dashicon = 'dashicons-list-view';
30
-
31
- /**
32
- * {@inheritdoc}
33
- */
34
- public $type = 'page';
35
-
36
- /**
37
- * {@inheritdoc}
38
- */
39
- public $page_menu_position = 2;
40
-
41
-
42
- /**
43
- * {@inheritDoc}
44
- *
45
- * @since 6.0
46
- * @var bool
47
- */
48
- public $show_right_sidebar_in_options = true;
49
-
50
- /**
51
- * Logs constructor.
52
- *
53
- * @param \Wbcr_Factory454_Plugin $plugin
54
- *
55
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
56
- *
57
- */
58
- public function __construct( \Wbcr_Factory454_Plugin $plugin ) {
59
-
60
- $this->menu_title = __( 'Error Log', 'titan-security' );
61
- $this->page_menu_short_description = __( 'Plugin debug report', 'titan-security' );
62
-
63
- parent::__construct( $plugin );
64
- }
65
-
66
- /**
67
- * {@inheritdoc}
68
- *
69
- * @return void
70
- * @since 1.0.0
71
- */
72
- public function assets( $scripts, $styles ) {
73
- parent::assets( $scripts, $styles );
74
-
75
- $this->styles->add( WTITAN_PLUGIN_URL . '/includes/logger/assets/css/base.css' );
76
- $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/logger/assets/js/base.js', [ 'jquery' ] );
77
- }
78
-
79
- /**
80
- * {@inheritdoc}
81
- */
82
- public function showPageContent() {
83
- require_once( WTITAN_PLUGIN_DIR . '/includes/logger/class-logger-reader.php' );
84
- ?>
85
- <div class="wbcr-factory-page-group-header">
86
- <strong><?php _e( 'Error Log', 'titan-security' ) ?></strong>
87
- <p>
88
- <?php _e( 'In this section, you can track errors. Sending this log to us, will help in solving possible issues.', 'titan-security' ) ?>
89
- </p>
90
- </div>
91
- <div class="wbcr-factory-page-group-body">
92
- <div class="btn-group">
93
- <a href="<?php echo wp_nonce_url( $this->getPageUrl() . 'action=export' ) ?>"
94
- class="btn btn-default"><?php _e( 'Export Debug Information', 'titan-security' ) ?></a>
95
- <a href="#"
96
- data-working="<?php echo esc_attr__( 'Working...', 'titan-security' ) ?>"
97
- data-nonce="<?php echo wp_create_nonce( 'wlogger_clean_logs' ) ?>"
98
- class="btn btn-default js-wlogger-export-debug-report"><?php echo sprintf( __( 'Clean-up Logs (<span id="js-wlogger-size">%s</span>)', 'titan-security' ), $this->get_log_size_formatted() ) ?></a>
99
- </div>
100
- <div class="wlogger-viewer" id="js-wlogger-viewer">
101
- <?php echo \WBCR\Titan\Logger\Reader::prettify() ?>
102
- </div>
103
- </div>
104
- <?php
105
- }
106
-
107
- /**
108
- * Processing log export action in form of ZIP archive.
109
- *
110
- * @since 6.0
111
- */
112
- public function exportAction() {
113
- require_once( WTITAN_PLUGIN_DIR . '/includes/logger/class-logger-export.php' );
114
- $export = new \WBCR\Titan\Logger\Export();
115
-
116
- if ( $export->prepare() ) {
117
- $export->download( true );
118
- }
119
- }
120
-
121
- /**
122
- * Get log size formatted.
123
- *
124
- * @return false|string
125
- * @since 6.0
126
- */
127
- private function get_log_size_formatted() {
128
-
129
- try {
130
- return size_format( \WBCR\Titan\Logger\Writter::get_total_size() );
131
- } catch ( \Exception $exception ) {
132
- \WBCR\Titan\Logger\Writter::error( sprintf( 'Failed to get total log size as exception was thrown: %s', $exception->getMessage() ) );
133
- }
134
-
135
- return '';
136
- }
137
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * Страница журнала ошибок
12
+ *
13
+ * Не поддерживает режим работы с мультисаймами.
14
+ *
15
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
+ * @copyright (c) 2019 Webraftic Ltd
17
+ * @version 1.0
18
+ */
19
+ class Logs extends Base {
20
+
21
+ /**
22
+ * {@inheritdoc}
23
+ */
24
+ public $id = 'logs';
25
+
26
+ /**
27
+ * {@inheritdoc}
28
+ */
29
+ public $page_menu_dashicon = 'dashicons-list-view';
30
+
31
+ /**
32
+ * {@inheritdoc}
33
+ */
34
+ public $type = 'page';
35
+
36
+ /**
37
+ * {@inheritdoc}
38
+ */
39
+ public $page_menu_position = 2;
40
+
41
+
42
+ /**
43
+ * {@inheritDoc}
44
+ *
45
+ * @since 6.0
46
+ * @var bool
47
+ */
48
+ public $show_right_sidebar_in_options = true;
49
+
50
+ /**
51
+ * Logs constructor.
52
+ *
53
+ * @param \Wbcr_Factory458_Plugin $plugin
54
+ *
55
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
56
+ *
57
+ */
58
+ public function __construct( \Wbcr_Factory458_Plugin $plugin ) {
59
+
60
+ $this->menu_title = __( 'Error Log', 'titan-security' );
61
+ $this->page_menu_short_description = __( 'Plugin debug report', 'titan-security' );
62
+
63
+ parent::__construct( $plugin );
64
+ }
65
+
66
+ /**
67
+ * {@inheritdoc}
68
+ *
69
+ * @return void
70
+ * @since 1.0.0
71
+ */
72
+ public function assets( $scripts, $styles ) {
73
+ parent::assets( $scripts, $styles );
74
+
75
+ $this->styles->add( WTITAN_PLUGIN_URL . '/includes/logger/assets/css/base.css' );
76
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/includes/logger/assets/js/base.js', [ 'jquery' ] );
77
+ }
78
+
79
+ /**
80
+ * {@inheritdoc}
81
+ */
82
+ public function showPageContent() {
83
+ require_once( WTITAN_PLUGIN_DIR . '/includes/logger/class-logger-reader.php' );
84
+ ?>
85
+ <div class="wbcr-factory-page-group-header">
86
+ <strong><?php _e( 'Error Log', 'titan-security' ) ?></strong>
87
+ <p>
88
+ <?php _e( 'In this section, you can track errors. Sending this log to us, will help in solving possible issues.', 'titan-security' ) ?>
89
+ </p>
90
+ </div>
91
+ <div class="wbcr-factory-page-group-body">
92
+ <div class="btn-group">
93
+ <a href="<?php echo wp_nonce_url( $this->getPageUrl() . 'action=export' ) ?>"
94
+ class="btn btn-default"><?php _e( 'Export Debug Information', 'titan-security' ) ?></a>
95
+ <a href="#"
96
+ data-working="<?php echo esc_attr__( 'Working...', 'titan-security' ) ?>"
97
+ data-nonce="<?php echo wp_create_nonce( 'wlogger_clean_logs' ) ?>"
98
+ class="btn btn-default js-wlogger-export-debug-report"><?php echo sprintf( __( 'Clean-up Logs (<span id="js-wlogger-size">%s</span>)', 'titan-security' ), $this->get_log_size_formatted() ) ?></a>
99
+ </div>
100
+ <div class="wlogger-viewer" id="js-wlogger-viewer">
101
+ <?php echo \WBCR\Titan\Logger\Reader::prettify() ?>
102
+ </div>
103
+ </div>
104
+ <?php
105
+ }
106
+
107
+ /**
108
+ * Processing log export action in form of ZIP archive.
109
+ *
110
+ * @since 6.0
111
+ */
112
+ public function exportAction() {
113
+ require_once( WTITAN_PLUGIN_DIR . '/includes/logger/class-logger-export.php' );
114
+ $export = new \WBCR\Titan\Logger\Export();
115
+
116
+ if ( $export->prepare() ) {
117
+ $export->download( true );
118
+ }
119
+ }
120
+
121
+ /**
122
+ * Get log size formatted.
123
+ *
124
+ * @return false|string
125
+ * @since 6.0
126
+ */
127
+ private function get_log_size_formatted() {
128
+
129
+ try {
130
+ return size_format( \WBCR\Titan\Logger\Writter::get_total_size() );
131
+ } catch ( \Exception $exception ) {
132
+ \WBCR\Titan\Logger\Writter::error( sprintf( 'Failed to get total log size as exception was thrown: %s', $exception->getMessage() ) );
133
+ }
134
+
135
+ return '';
136
+ }
137
+ }
admin/pages/class-pages-plugin-settings.php CHANGED
@@ -1,521 +1,587 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- use WBCR\Titan\Plugin;
6
- use WBCR\Titan\Plugin\Helper;
7
- use Wbcr_Factory454_Plugin;
8
-
9
- /**
10
- * The plugin Settings.
11
- *
12
- * @since 7.0.0
13
- */
14
-
15
- // Exit if accessed directly
16
- if ( ! defined( 'ABSPATH' ) ) {
17
- exit;
18
- }
19
-
20
- class PluginSettings extends Base {
21
-
22
- /**
23
- * The id of the page in the admin menu.
24
- *
25
- * Mainly used to navigate between pages.
26
- *
27
- * @since 7.0.0
28
- *
29
- * @var string
30
- */
31
- public $id = "plugin_settings";
32
-
33
- /**
34
- * @var string
35
- */
36
- public $page_menu_dashicon = 'dashicons-admin-generic';
37
-
38
- /**
39
- * {@inheritdoc}
40
- */
41
- public $show_right_sidebar_in_options = true;
42
-
43
- /**
44
- * {@inheritdoc}
45
- */
46
- public $page_menu_position = 2;
47
-
48
- /**
49
- * @param Wbcr_Factory454_Plugin $plugin
50
- */
51
- public function __construct( Wbcr_Factory454_Plugin $plugin ) {
52
- $this->menu_title = __( 'Settings', 'titan-security' );
53
- $this->page_menu_short_description = __( 'Global plugin settings', 'titan-security' );
54
-
55
- parent::__construct( $plugin );
56
-
57
- $this->plugin = $plugin;
58
-
59
- add_action( 'wp_ajax_wtitan_import_settings', [ $this, 'import_settings' ] );
60
- }
61
-
62
-
63
- /**
64
- * Requests assets (js and css) for the page.
65
- *
66
- * @return void
67
- *
68
- * @since 7.0.0
69
- */
70
- public function assets( $scripts, $styles ) {
71
- parent::assets( $scripts, $styles );
72
-
73
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/libs/jquery.datetimepicker.full.min.js' );
74
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/libs/jquery.datetimepicker.min.css' );
75
-
76
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/import.js' );
77
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/settings.js' );
78
- wp_enqueue_script( 'winp_page_settings_js', WTITAN_PLUGIN_URL . '/admin/assets/js/settings.js');
79
-
80
- $params = [
81
- 'import_options_nonce' => wp_create_nonce( 'wtitan_import_options' ),
82
- 'i18n' => [
83
- 'success_update_settings' => __( 'Settings successfully updated!', 'titan-security' ),
84
- 'unknown_error' => __( 'During the setup, an unknown error occurred, please try again or contact the plugin support.', 'titan-security' ),
85
- ]
86
- ];
87
- wp_localize_script( 'winp_page_settings_js', 'wtitan_ajax', $params );
88
-
89
- }
90
-
91
- /**
92
- * Permalinks options.
93
- *
94
- * @return mixed[]
95
- * @since 7.0.0
96
- */
97
- public function getPageOptions() {
98
- $is_premium = $this->plugin->is_premium();
99
- $options = [];
100
-
101
- $options[] = [
102
- 'type' => 'html',
103
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Advanced settings', 'titan-security' ) . '</strong>' . '<p>' . __( 'This group of settings allows you to configure the work of the plugin.', 'titan-security' ) . '</p>' . '</div>'
104
- ];
105
-
106
- $options[] = [
107
- 'type' => 'checkbox',
108
- 'way' => 'buttons',
109
- 'name' => 'extra_menu',
110
- 'title' => __( 'Plugin menu in adminbar', 'titan-security' ),
111
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
112
- 'hint' => __( 'This setting allows you to enable/disable the additional menu of the plugin, in the admin bar.', 'titan-security' ),
113
- 'default' => false
114
- ];
115
-
116
- $options[] = [
117
- 'type' => 'checkbox',
118
- 'way' => 'buttons',
119
- 'name' => 'complete_uninstall',
120
- 'title' => __( 'Complete Uninstall', 'titan-security' ),
121
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
122
- 'hint' => __( "When the plugin is deleted from the Plugins menu, also delete all plugin settings.", 'titan-security' ),
123
- 'default' => false
124
- ];
125
-
126
- $options[] = [
127
- 'type' => 'html',
128
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Antivirus settings', 'titan-security' ) . '</strong>' . '<p>' . __( 'This group of settings allows you to configure the work of the plugin.', 'titan-security' ) . '</p>' . '</div>'
129
- ];
130
-
131
- $data = [
132
- [ \WBCR\Titan\MalwareScanner\Scanner::SPEED_FREE, __( 'Free', 'titan-security' ) ],
133
- [ \WBCR\Titan\MalwareScanner\Scanner::SPEED_SLOW, __( 'Slow', 'titan-security' ) ],
134
- [ \WBCR\Titan\MalwareScanner\Scanner::SPEED_MEDIUM, __( 'Medium', 'titan-security' ) ],
135
- [ \WBCR\Titan\MalwareScanner\Scanner::SPEED_FAST, __( 'Fast', 'titan-security' ) ],
136
- ];
137
-
138
- $options[] = [
139
- 'type' => 'dropdown',
140
- 'way' => 'buttons',
141
- 'name' => 'scanner_type',
142
- 'title' => __( 'Scanning type', 'titan-security' ),
143
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
144
- 'hint' => __( "The basic scan includes fewer signatures", 'titan-security' ) . "<br>" . __( "Advanced scanning includes a full set of signatures", 'titan-security' ),
145
- 'data' => [
146
- [ 'basic', __( 'Basic scan', 'titan-security' ) ],
147
- [ 'advanced', __( 'Advanced scan', 'titan-security' ) ],
148
- ],
149
- 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wtitan-control-premium-label' ] : [],
150
- 'default' => $this->plugin->is_premium() ? 'advanced' : 'basic',
151
- ];
152
-
153
- $options[] = [
154
- 'type' => 'dropdown',
155
- 'way' => 'buttons',
156
- 'name' => 'scanner_speed',
157
- 'title' => __( 'Scanning speed', 'titan-security' ),
158
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
159
- 'hint' => __( "The speed of scanning affects the resources consumed", 'titan-security' ) . "<br>" . __( "Recommended speed: ", 'titan-security' ) . get_recommended_scanner_speed(),
160
- 'data' => $data,
161
- 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wtitan-control-premium-label' ] : [],
162
- 'default' => $this->plugin->is_premium() ? \WBCR\Titan\MalwareScanner\Scanner::SPEED_SLOW : \WBCR\Titan\MalwareScanner\Scanner::SPEED_FREE,
163
- ];
164
-
165
- $data_schedule = [
166
- [
167
- \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DISABLED,
168
- __( 'Disabled', 'titan-security' ),
169
- __( 'Disable scheduled scanning', 'titan-security' )
170
- ],
171
- [
172
- \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DAILY,
173
- __( 'Daily', 'titan-security' ),
174
- __( 'Scan every day', 'titan-security' )
175
- ],
176
- [
177
- \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_WEEKLY,
178
- __( 'Weekly', 'titan-security' ),
179
- __( 'Scan every week', 'titan-security' )
180
- ],
181
- [
182
- \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_CUSTOM,
183
- __( 'Custom', 'titan-security' ),
184
- __( 'Select the date and time of the next scan', 'titan-security' )
185
- ],
186
- ];
187
-
188
- $options[] = [
189
- 'type' => 'dropdown',
190
- 'way' => 'buttons',
191
- 'name' => 'scanner_schedule',
192
- 'title' => __( 'Schedule scan', 'titan-security' ),
193
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
194
- 'hint' => __( "The speed of scanning affects the resources consumed", 'titan-security' ),
195
- 'data' => $data_schedule,
196
- 'cssClass' => ! $is_premium ? [ 'factory-checkbox--disabled wtitan-control-premium-label' ] : [],
197
- 'default' => \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DISABLED,
198
- ];
199
-
200
- if ( Plugin::app()->is_premium() ) {
201
- /*
202
- * Schedule settings
203
- * */
204
- $options[] = [
205
- 'type' => 'html',
206
- 'html' => '<div class="wt-schedule-controls wt-schedule-controls-daily">'
207
- ];
208
- $options[] = [
209
- 'type' => 'textbox',
210
- 'name' => 'scanner_schedule_daily',
211
- 'title' => __( 'Time for the daily scan', 'titan-security' ),
212
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
213
- 'hint' => __( "What time should start scanning", 'titan-security' ),
214
- ];
215
- $options[] = [ 'type' => 'html', 'html' => '</div>' ];
216
-
217
- //------------------------------------------------------------------
218
-
219
- $options[] = [
220
- 'type' => 'html',
221
- 'html' => '<div class="wt-schedule-controls wt-schedule-controls-weekly">'
222
- ];
223
- $data_schedule_week = [
224
- [ 1, 'Monday' ],
225
- [ 2, 'Tuesday' ],
226
- [ 3, 'Wednesday' ],
227
- [ 4, 'Thursday' ],
228
- [ 5, 'Friday' ],
229
- [ 6, 'Saturday' ],
230
- [ 7, 'Sunday' ],
231
- ];
232
- $options[] = [
233
- 'type' => 'dropdown',
234
- 'way' => 'default',
235
- 'name' => 'scanner_schedule_weekly_day',
236
- 'title' => __( 'Day for the weekly scan', 'titan-security' ),
237
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
238
- 'hint' => __( "Day of the week for the weekly scan", 'titan-security' ),
239
- 'data' => $data_schedule_week,
240
- 'default' => '',
241
- ];
242
-
243
- $options[] = [
244
- 'type' => 'textbox',
245
- 'name' => 'scanner_schedule_weekly_time',
246
- 'title' => __( 'Time for the weekly scan', 'titan-security' ),
247
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
248
- 'hint' => __( "Time for the weekly scan", 'titan-security' ),
249
- ];
250
- $options[] = [ 'type' => 'html', 'html' => '</div>' ];
251
-
252
- //------------------------------------------------------------------
253
-
254
- $options[] = [
255
- 'type' => 'html',
256
- 'html' => '<div class="wt-schedule-controls wt-schedule-controls-custom">'
257
- ];
258
- $options[] = [
259
- 'type' => 'textbox',
260
- 'name' => 'scanner_schedule_custom',
261
- 'title' => __( 'Date and time for the Custom schedule', 'titan-security' ),
262
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
263
- 'hint' => __( "Date and time of the custom scan schedule", 'titan-security' ),
264
- ];
265
- $options[] = [ 'type' => 'html', 'html' => '</div>' ];
266
- //------------------------------------------------------------------
267
- }
268
-
269
- $options[] = [
270
- 'type' => 'dropdown',
271
- 'way' => 'buttons',
272
- 'name' => 'digest',
273
- 'data' => [
274
- [
275
- 'enable',
276
- __( 'Enable', 'titan-security' ),
277
- ],
278
- [
279
- 'disable',
280
- __( 'Disable', 'titan-security' ),
281
- ],
282
- ],
283
- 'title' => __( 'Digest on E-mail', 'titan-security' ),
284
- 'hint' => __( "You can get a weekly digest on threats found", 'titan-security' ),
285
- 'default' => 'disable'
286
- ];
287
-
288
- $options[] = [
289
- 'type' => 'html',
290
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Import/Export', 'titan-security' ) . '</strong>' . '<p>' . __( 'This group of settings allows you to configure the work of the plugin.', 'titan-security' ) . '</p>' . '</div>'
291
- ];
292
-
293
- $options[] = [
294
- 'type' => 'html',
295
- 'html' => [ $this, 'export' ]
296
- ];
297
-
298
- $formOptions = [];
299
-
300
- $formOptions[] = [
301
- 'type' => 'form-group',
302
- 'items' => $options,
303
- //'cssClass' => 'postbox'
304
- ];
305
-
306
- return apply_filters( 'wtitan/settings_form_options', $formOptions, $this );
307
- }
308
-
309
- /**
310
- * Export settings
311
- */
312
- public function export() {
313
- ?>
314
- <div class="wbcr-titan-export-import">
315
- <p>
316
- <label for="wbcr-titan-export-textarea">
317
- <strong><?php _e( 'Import/Export settings', 'titan-security' ) ?></strong>
318
- </label>
319
- <textarea id="wbcr-titan-export-textarea"><?php echo $this->getExportOptions(); ?></textarea>
320
- <button class="button wtitan-import-options-button"><?php _e( 'Import options', 'titan-security' ) ?></button>
321
- </p>
322
- </div>
323
- <?php
324
- }
325
-
326
- /**
327
- * Получает и возвращает все опции разрешенные для экспорта
328
- *
329
- * @param string $return
330
- *
331
- * @return array|string
332
- */
333
- public function getExportOptions( $return = 'json' ) {
334
- $export_options = $this->getAllowOptions();
335
-
336
- if ( $return == 'array' ) {
337
- return $export_options;
338
- }
339
-
340
- return htmlspecialchars( json_encode( $export_options ), ENT_QUOTES, 'UTF-8' );
341
- }
342
-
343
- /**
344
- * Ajax действите, выполняется для получения всех доступных опций для экспорта.
345
- */
346
- public function import_settings() {
347
- global $wpdb;
348
-
349
- check_ajax_referer( 'wtitan_import_options' );
350
-
351
- if ( ! $this->plugin->currentUserCan() ) {
352
- wp_send_json_error( array( 'error_message' => __( 'You don\'t have enough capability to edit this information.', 'titan-security' ) ) );
353
- die();
354
- }
355
-
356
- $settings = Helper::maybeGetPostJson( 'settings' );
357
-
358
- /**
359
- * Используется для фильтрации импортируемых настроек,
360
- * обычно это может пригодиться для компонентов, которым нужно выполнить дополнительные дествия к опциям,
361
- * прежде чем продолжить импорт
362
- *
363
- * wtitan/filter_import_options
364
- * @since 1.4.0
365
- */
366
- $settings = apply_filters( 'wtitan/filter_import_options', $settings );
367
-
368
- $network_id = get_current_network_id();
369
-
370
- if ( empty( $settings ) || ! is_array( $settings ) ) {
371
- wp_send_json_error( array( 'error_message' => __( 'Settings are not defined or do not exist.', 'titan-security' ) ) );
372
- die();
373
- }
374
-
375
- $values = array();
376
- $place_holders = array();
377
-
378
- if ( $this->plugin->isNetworkActive() ) {
379
- $query = "INSERT INTO {$wpdb->sitemeta} (site_id, meta_key, meta_value) VALUES ";
380
- } else {
381
- $query = "INSERT INTO {$wpdb->options} (option_name, option_value) VALUES ";
382
- }
383
-
384
- foreach ( $settings as $option_name => $option_value ) {
385
- $option_name = sanitize_text_field( $option_name );
386
- $raw_option_value = $option_value;
387
-
388
- if ( is_serialized( $option_value ) ) {
389
- $option_value = unserialize( $option_value );
390
- }
391
-
392
- if ( is_array( $option_value ) || is_object( $option_value ) ) {
393
- $option_value = Helper::recursiveSanitizeArray( $option_value, 'wp_kses_post' );
394
- $option_value = maybe_serialize( $option_value );
395
- } else {
396
- $option_value = wp_kses_post( $option_value );
397
- }
398
-
399
- /**
400
- * Используется для фильтрации импортируемых значений,
401
- * обычно это может пригодиться для компонентов, которым нужно подменять домены, пути или какие-то правила
402
- * при переносе с одного сайта на другой
403
- *
404
- * wtitan/filter_import_values
405
- * @since 1.4.0
406
- */
407
- $option_value = apply_filters( 'wtitan/filter_import_values', $option_value, $option_name, $raw_option_value );
408
-
409
- if ( $this->plugin->isNetworkActive() ) {
410
- array_push( $values, $network_id, $option_name, $option_value );
411
- $place_holders[] = "('%d', '%s', '%s')";/* In my case, i know they will always be integers */
412
- } else {
413
- array_push( $values, $option_name, $option_value );
414
- $place_holders[] = "('%s', '%s')";/* In my case, i know they will always be integers */
415
- }
416
- }
417
-
418
- $query .= implode( ', ', $place_holders );
419
-
420
- // Удаляем все опции
421
- $all_options = $this->getAllowOptions( false );
422
-
423
- if ( ! empty( $all_options ) ) {
424
- foreach ( $all_options as $name => $value ) {
425
- $this->plugin->deletePopulateOption( $name );
426
- }
427
- }
428
-
429
- // Сбрасываем кеш опций
430
- $this->plugin->flushOptionsCache();
431
-
432
- // Импортируем опции
433
- $wpdb->query( $wpdb->prepare( "$query ", $values ) );
434
-
435
- $send_data = array( 'status' => 'success' );
436
-
437
- //$package_plugin = WCL_Package::instance();
438
- //$send_data['update_notice'] = $package_plugin->getUpdateNotice();
439
-
440
- // Сбрасываем кеш для кеширующих плагинов
441
- Helper::flushPageCache();
442
-
443
- do_action( 'wtitan_imported_settings' );
444
-
445
- wp_send_json_success( $send_data );
446
- die();
447
- }
448
-
449
- /**
450
- * @param bool
451
- */
452
- public function getAllowOptions( $with_prefix = true ) {
453
- global $wpdb;
454
-
455
- $result = array();
456
-
457
- $excluded_options = array(
458
- 'plugin_activated',
459
- 'plugin_version',
460
- 'audit_results_hided',
461
- 'audit_results',
462
- 'vulnerabilities_wordpress',
463
- 'vulnerabilities_plugins',
464
- 'vulnerabilities_themes',
465
- 'scanner',
466
- 'scanner_malware_matched',
467
- 'scanner_files_count',
468
- 'scanner_status',
469
- 'files_hash',
470
- 'freemius_api_clock_diff',
471
- 'what_is_new_64',
472
- 'license',
473
- 'stats_transient_',
474
- );
475
-
476
- foreach ( $excluded_options as $key => $option ) {
477
- $excluded_options[ $key ] = $this->plugin->getOptionName( $option );
478
- }
479
-
480
- if ( $this->plugin->isNetworkActive() ) {
481
- $network_id = get_current_network_id();
482
-
483
- $request = $wpdb->get_results( $wpdb->prepare( "
484
- SELECT meta_key, meta_value
485
- FROM {$wpdb->sitemeta}
486
- WHERE site_id = '%d' AND meta_key
487
- LIKE '%s'", $network_id, $this->plugin->getPrefix() . "%" ) );
488
- } else {
489
- $request = $wpdb->get_results( $wpdb->prepare( "
490
- SELECT option_name, option_value
491
- FROM {$wpdb->options}
492
- WHERE option_name
493
- LIKE '%s'", $this->plugin->getPrefix() . "_%" ) );
494
- }
495
-
496
- if ( ! empty( $request ) ) {
497
- foreach ( $request as $option ) {
498
- if ( $this->plugin->isNetworkActive() ) {
499
- $option_name = $option->meta_key;
500
- $option_value = $option->meta_value;
501
- } else {
502
- $option_name = $option->option_name;
503
- $option_value = $option->option_value;
504
- }
505
- if ( ! in_array( $option_name, $excluded_options ) ) {
506
- $result[ $option_name ] = $option_value;
507
- }
508
- }
509
- }
510
- if ( ! $with_prefix ) {
511
- foreach ( $result as $key => $option ) {
512
- unset( $result[ $key ] );
513
- $k = preg_replace( '/^titan_/', '', $key );
514
- $result[ $k ] = $option;
515
- }
516
- }
517
-
518
- return $result;
519
- }
520
-
521
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ use WBCR\Titan\Plugin;
6
+ use WBCR\Titan\Plugin\Helper;
7
+ use Wbcr_Factory458_Plugin;
8
+
9
+ /**
10
+ * The plugin Settings.
11
+ *
12
+ * @since 7.0.0
13
+ */
14
+
15
+ // Exit if accessed directly
16
+ if( !defined('ABSPATH') ) {
17
+ exit;
18
+ }
19
+
20
+ class PluginSettings extends Base {
21
+
22
+ /**
23
+ * The id of the page in the admin menu.
24
+ *
25
+ * Mainly used to navigate between pages.
26
+ *
27
+ * @since 7.0.0
28
+ *
29
+ * @var string
30
+ */
31
+ public $id = "plugin_settings";
32
+
33
+ /**
34
+ * @var string
35
+ */
36
+ public $page_menu_dashicon = 'dashicons-admin-generic';
37
+
38
+ /**
39
+ * {@inheritdoc}
40
+ */
41
+ public $show_right_sidebar_in_options = true;
42
+
43
+ /**
44
+ * {@inheritdoc}
45
+ */
46
+ public $page_menu_position = 2;
47
+
48
+ /**
49
+ * @param Wbcr_Factory458_Plugin $plugin
50
+ */
51
+ public function __construct(Wbcr_Factory458_Plugin $plugin)
52
+ {
53
+ $this->menu_title = __('Settings', 'titan-security');
54
+ $this->page_menu_short_description = __('Global plugin settings', 'titan-security');
55
+
56
+ parent::__construct($plugin);
57
+
58
+ $this->plugin = $plugin;
59
+
60
+ add_action('wp_ajax_wtitan_import_settings', [$this, 'import_settings']);
61
+ }
62
+
63
+
64
+ /**
65
+ * Requests assets (js and css) for the page.
66
+ *
67
+ * @return void
68
+ *
69
+ * @since 7.0.0
70
+ */
71
+ public function assets($scripts, $styles)
72
+ {
73
+ parent::assets($scripts, $styles);
74
+
75
+ $this->scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/libs/jquery.datetimepicker.full.min.js');
76
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/libs/jquery.datetimepicker.min.css');
77
+
78
+ $this->scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/import.js');
79
+ $this->scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/settings.js');
80
+ wp_enqueue_script('winp_page_settings_js', WTITAN_PLUGIN_URL . '/admin/assets/js/settings.js');
81
+
82
+ $params = [
83
+ 'import_options_nonce' => wp_create_nonce('wtitan_import_options'),
84
+ 'i18n' => [
85
+ 'success_update_settings' => __('Settings successfully updated!', 'titan-security'),
86
+ 'unknown_error' => __('During the setup, an unknown error occurred, please try again or contact the plugin support.', 'titan-security'),
87
+ ]
88
+ ];
89
+ wp_localize_script('winp_page_settings_js', 'wtitan_ajax', $params);
90
+ }
91
+
92
+ /**
93
+ * Permalinks options.
94
+ *
95
+ * @return mixed[]
96
+ * @since 7.0.0
97
+ */
98
+ public function getPageOptions()
99
+ {
100
+ $is_premium = $this->plugin->is_premium();
101
+ $options = [];
102
+
103
+ $options[] = [
104
+ 'type' => 'html',
105
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __('Advanced settings', 'titan-security') . '</strong>' . '<p>' . __('This group of settings allows you to configure the work of the plugin.', 'titan-security') . '</p>' . '</div>'
106
+ ];
107
+
108
+ $options[] = [
109
+ 'type' => 'checkbox',
110
+ 'way' => 'buttons',
111
+ 'name' => 'extra_menu',
112
+ 'title' => __('Plugin menu in adminbar', 'titan-security'),
113
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
114
+ 'hint' => __('This setting allows you to enable/disable the additional menu of the plugin, in the admin bar.', 'titan-security'),
115
+ 'default' => false
116
+ ];
117
+
118
+ $options[] = [
119
+ 'type' => 'checkbox',
120
+ 'way' => 'buttons',
121
+ 'name' => 'complete_uninstall',
122
+ 'title' => __('Complete Uninstall', 'titan-security'),
123
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
124
+ 'hint' => __("When the plugin is deleted from the Plugins menu, also delete all plugin settings.", 'titan-security'),
125
+ 'default' => false
126
+ ];
127
+
128
+ $options[] = [
129
+ 'type' => 'dropdown',
130
+ //'way' => 'buttons',
131
+ 'name' => 'get_ip_method',
132
+ 'title' => __('How does Titan get IPs ', 'titan-security'),
133
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
134
+ 'hint' => __("Let Titan use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites.
135
+ This is the default mode of operation for Titan. Titan will try to get a valid IP address from PHP. If that does not work, it will look at data that a firewall or reverse proxy sends in case your site uses this configuration.
136
+
137
+ This option provides a good balance between security and compatibility.
138
+
139
+ Use PHP’s built in REMOTE_ADDR and don’t use anything else. Very secure if this is compatible with your site.
140
+ If you know that you definitely do not use a reverse proxy, cache, Cloudflare, CDN, or any other type of proxy in front of your web server that “proxies” traffic to your website, and if you are sure that your website is just a standalone PHP web server, then using this option will work and is the most secure in a non-proxy or load balancer configuration.
141
+
142
+ You may also want to select this option for other reasons – for example, to force Titan to use the \$_SERVER['REMOTE_ADDR'] variable in PHP.
143
+
144
+ Use the X-Forwarded-For HTTP header. Only use if you have a front-end proxy or spoofing may result.
145
+ Only use this option if you are using Nginx, a load balancer, or CDN as a front-end proxy in front of your web server, and the front-end proxy server sends IP addresses using the X-Forwarded-For HTTP header to the web server that runs WordPress.
146
+
147
+ Be careful about enabling this option if you do not have a front-end proxy configuration because it will then allow visitors to spoof their IP address and you will also miss many hits that should have been logged.
148
+
149
+ Use the X-Real-IP HTTP header. Only use if you have a front-end proxy or spoofing may result.
150
+ Only use this option if you are using Nginx, a load balancer, or CDN as a front-end proxy in front of your web server, and the front-end proxy server sends IP addresses using the X-Real-IP HTTP header to the web server that runs WordPress.
151
+
152
+ Use the Cloudflare “CF-Connecting-IP” HTTP header to get a visitor IP. Only use if you’re using Cloudflare.
153
+ Titan is fully compatible with Cloudflare, and in some configurations, Cloudflare will send the real visitor IP address to your web server using the CF-Connecting-IP HTTP header. If Cloudflare support personnel have advised you that this is the case, then enable this option in Titan.
154
+
155
+ Note that Cloudflare has several configurations including their own web server module that takes care of detecting the visitor IP address, so be sure to work with their technical support staff and read their documentation to determine which configuration you are using.", 'titan-security') . "<br>" . __("Advanced scanning includes a full set of signatures", 'titan-security'),
156
+ 'data' => [
157
+ [
158
+ 'recommended',
159
+ __('Let Titan use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites. (Recommended)', 'titan-security'),
160
+ "gfdgdfg"
161
+ ],
162
+ [
163
+ 'remote_addr',
164
+ __('Use PHP\'s built in REMOTE_ADDR and don\'t use anything else. Very secure if this is compatible with your site', 'titan-security'),
165
+ "111"
166
+ ],
167
+ [
168
+ 'x_forwarded_for',
169
+ __('Use the X-Forwarded-For HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'titan-security')
170
+ ],
171
+ [
172
+ 'x-real-ip',
173
+ __('Use the X-Real-IP HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'titan-security')
174
+ ],
175
+ [
176
+ 'cf-connecting-ip',
177
+ __('Use the Cloudflare "CF-Connecting-IP" HTTP header to get a visitor IP. Only use if you\'re using Cloudflare.', 'titan-security')
178
+ ]
179
+ ],
180
+ 'default' => 'recommended',
181
+ ];
182
+
183
+ $options[] = [
184
+ 'type' => 'html',
185
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __('Antivirus settings', 'titan-security') . '</strong>' . '<p>' . __('This group of settings allows you to configure the work of the plugin.', 'titan-security') . '</p>' . '</div>'
186
+ ];
187
+
188
+ $data = [
189
+ [\WBCR\Titan\MalwareScanner\Scanner::SPEED_FREE, __('Free', 'titan-security')],
190
+ [\WBCR\Titan\MalwareScanner\Scanner::SPEED_SLOW, __('Slow', 'titan-security')],
191
+ [\WBCR\Titan\MalwareScanner\Scanner::SPEED_MEDIUM, __('Medium', 'titan-security')],
192
+ [\WBCR\Titan\MalwareScanner\Scanner::SPEED_FAST, __('Fast', 'titan-security')],
193
+ ];
194
+
195
+ $options[] = [
196
+ 'type' => 'dropdown',
197
+ 'way' => 'buttons',
198
+ 'name' => 'scanner_type',
199
+ 'title' => __('Scanning type', 'titan-security'),
200
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
201
+ 'hint' => __("The basic scan includes fewer signatures", 'titan-security') . "<br>" . __("Advanced scanning includes a full set of signatures", 'titan-security'),
202
+ 'data' => [
203
+ ['basic', __('Basic scan', 'titan-security')],
204
+ ['advanced', __('Advanced scan', 'titan-security')],
205
+ ],
206
+ 'cssClass' => !$is_premium ? ['factory-checkbox--disabled wtitan-control-premium-label'] : [],
207
+ 'default' => $this->plugin->is_premium() ? 'advanced' : 'basic',
208
+ ];
209
+
210
+ $options[] = [
211
+ 'type' => 'dropdown',
212
+ 'way' => 'buttons',
213
+ 'name' => 'scanner_speed',
214
+ 'title' => __('Scanning speed', 'titan-security'),
215
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
216
+ 'hint' => __("The speed of scanning affects the resources consumed", 'titan-security') . "<br>" . __("Recommended speed: ", 'titan-security') . get_recommended_scanner_speed(),
217
+ 'data' => $data,
218
+ 'cssClass' => !$is_premium ? ['factory-checkbox--disabled wtitan-control-premium-label'] : [],
219
+ 'default' => $this->plugin->is_premium() ? \WBCR\Titan\MalwareScanner\Scanner::SPEED_SLOW : \WBCR\Titan\MalwareScanner\Scanner::SPEED_FREE,
220
+ ];
221
+
222
+ $data_schedule = [
223
+ [
224
+ \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DISABLED,
225
+ __('Disabled', 'titan-security'),
226
+ __('Disable scheduled scanning', 'titan-security')
227
+ ],
228
+ [
229
+ \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DAILY,
230
+ __('Daily', 'titan-security'),
231
+ __('Scan every day', 'titan-security')
232
+ ],
233
+ [
234
+ \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_WEEKLY,
235
+ __('Weekly', 'titan-security'),
236
+ __('Scan every week', 'titan-security')
237
+ ],
238
+ [
239
+ \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_CUSTOM,
240
+ __('Custom', 'titan-security'),
241
+ __('Select the date and time of the next scan', 'titan-security')
242
+ ],
243
+ ];
244
+
245
+ $options[] = [
246
+ 'type' => 'dropdown',
247
+ 'way' => 'buttons',
248
+ 'name' => 'scanner_schedule',
249
+ 'title' => __('Schedule scan', 'titan-security'),
250
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
251
+ 'hint' => __("The speed of scanning affects the resources consumed", 'titan-security'),
252
+ 'data' => $data_schedule,
253
+ 'cssClass' => !$is_premium ? ['factory-checkbox--disabled wtitan-control-premium-label'] : [],
254
+ 'default' => \WBCR\Titan\MalwareScanner\Scanner::SCHEDULE_DISABLED,
255
+ ];
256
+
257
+ if( Plugin::app()->is_premium() ) {
258
+ /*
259
+ * Schedule settings
260
+ * */
261
+ $options[] = [
262
+ 'type' => 'html',
263
+ 'html' => '<div class="wt-schedule-controls wt-schedule-controls-daily">'
264
+ ];
265
+ $options[] = [
266
+ 'type' => 'textbox',
267
+ 'name' => 'scanner_schedule_daily',
268
+ 'title' => __('Time for the daily scan', 'titan-security'),
269
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
270
+ 'hint' => __("What time should start scanning", 'titan-security'),
271
+ ];
272
+ $options[] = ['type' => 'html', 'html' => '</div>'];
273
+
274
+ //------------------------------------------------------------------
275
+
276
+ $options[] = [
277
+ 'type' => 'html',
278
+ 'html' => '<div class="wt-schedule-controls wt-schedule-controls-weekly">'
279
+ ];
280
+ $data_schedule_week = [
281
+ [1, 'Monday'],
282
+ [2, 'Tuesday'],
283
+ [3, 'Wednesday'],
284
+ [4, 'Thursday'],
285
+ [5, 'Friday'],
286
+ [6, 'Saturday'],
287
+ [7, 'Sunday'],
288
+ ];
289
+ $options[] = [
290
+ 'type' => 'dropdown',
291
+ 'way' => 'default',
292
+ 'name' => 'scanner_schedule_weekly_day',
293
+ 'title' => __('Day for the weekly scan', 'titan-security'),
294
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
295
+ 'hint' => __("Day of the week for the weekly scan", 'titan-security'),
296
+ 'data' => $data_schedule_week,
297
+ 'default' => '',
298
+ ];
299
+
300
+ $options[] = [
301
+ 'type' => 'textbox',
302
+ 'name' => 'scanner_schedule_weekly_time',
303
+ 'title' => __('Time for the weekly scan', 'titan-security'),
304
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
305
+ 'hint' => __("Time for the weekly scan", 'titan-security'),
306
+ ];
307
+ $options[] = ['type' => 'html', 'html' => '</div>'];
308
+
309
+ //------------------------------------------------------------------
310
+
311
+ $options[] = [
312
+ 'type' => 'html',
313
+ 'html' => '<div class="wt-schedule-controls wt-schedule-controls-custom">'
314
+ ];
315
+ $options[] = [
316
+ 'type' => 'textbox',
317
+ 'name' => 'scanner_schedule_custom',
318
+ 'title' => __('Date and time for the Custom schedule', 'titan-security'),
319
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'grey'],
320
+ 'hint' => __("Date and time of the custom scan schedule", 'titan-security'),
321
+ ];
322
+ $options[] = ['type' => 'html', 'html' => '</div>'];
323
+ //------------------------------------------------------------------
324
+ }
325
+
326
+ $options[] = [
327
+ 'type' => 'dropdown',
328
+ 'way' => 'buttons',
329
+ 'name' => 'digest',
330
+ 'data' => [
331
+ [
332
+ 'enable',
333
+ __('Enable', 'titan-security'),
334
+ ],
335
+ [
336
+ 'disable',
337
+ __('Disable', 'titan-security'),
338
+ ],
339
+ ],
340
+ 'title' => __('Digest on E-mail', 'titan-security'),
341
+ 'hint' => __("You can get a weekly digest on threats found", 'titan-security'),
342
+ 'default' => 'disable'
343
+ ];
344
+
345
+ $options[] = [
346
+ 'type' => 'html',
347
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __('Import/Export', 'titan-security') . '</strong>' . '<p>' . __('This group of settings allows you to configure the work of the plugin.', 'titan-security') . '</p>' . '</div>'
348
+ ];
349
+
350
+ $options[] = [
351
+ 'type' => 'html',
352
+ 'html' => [$this, 'export']
353
+ ];
354
+
355
+ $formOptions = [];
356
+
357
+ $formOptions[] = [
358
+ 'type' => 'form-group',
359
+ 'items' => $options,
360
+ //'cssClass' => 'postbox'
361
+ ];
362
+
363
+ return apply_filters('wtitan/settings_form_options', $formOptions, $this);
364
+ }
365
+
366
+ /**
367
+ * Export settings
368
+ */
369
+ public function export()
370
+ {
371
+ ?>
372
+ <div class="wbcr-titan-export-import">
373
+ <p>
374
+ <label for="wbcr-titan-export-textarea">
375
+ <strong><?php
376
+ _e('Import/Export settings', 'titan-security') ?></strong>
377
+ </label>
378
+ <textarea id="wbcr-titan-export-textarea"><?php
379
+ echo $this->getExportOptions(); ?></textarea>
380
+ <button class="button wtitan-import-options-button"><?php
381
+ _e('Import options', 'titan-security') ?></button>
382
+ </p>
383
+ </div>
384
+ <?php
385
+ }
386
+
387
+ /**
388
+ * Получает и возвращает все опции разрешенные для экспорта
389
+ *
390
+ * @param string $return
391
+ *
392
+ * @return array|string
393
+ */
394
+ public function getExportOptions($return = 'json')
395
+ {
396
+ $export_options = $this->getAllowOptions();
397
+
398
+ if( $return == 'array' ) {
399
+ return $export_options;
400
+ }
401
+
402
+ return htmlspecialchars(json_encode($export_options), ENT_QUOTES, 'UTF-8');
403
+ }
404
+
405
+ /**
406
+ * Ajax действите, выполняется для получения всех доступных опций для экспорта.
407
+ */
408
+ public function import_settings()
409
+ {
410
+ global $wpdb;
411
+
412
+ check_ajax_referer('wtitan_import_options');
413
+
414
+ if( !$this->plugin->currentUserCan() ) {
415
+ wp_send_json_error(['error_message' => __('You don\'t have enough capability to edit this information.', 'titan-security')]);
416
+ die();
417
+ }
418
+
419
+ $settings = Helper::maybeGetPostJson('settings');
420
+
421
+ /**
422
+ * Используется для фильтрации импортируемых настроек,
423
+ * обычно это может пригодиться для компонентов, которым нужно выполнить дополнительные дествия к опциям,
424
+ * прежде чем продолжить импорт
425
+ *
426
+ * wtitan/filter_import_options
427
+ *
428
+ * @since 1.4.0
429
+ */
430
+ $settings = apply_filters('wtitan/filter_import_options', $settings);
431
+
432
+ $network_id = get_current_network_id();
433
+
434
+ if( empty($settings) || !is_array($settings) ) {
435
+ wp_send_json_error(['error_message' => __('Settings are not defined or do not exist.', 'titan-security')]);
436
+ die();
437
+ }
438
+
439
+ $values = [];
440
+ $place_holders = [];
441
+
442
+ if( $this->plugin->isNetworkActive() ) {
443
+ $query = "INSERT INTO {$wpdb->sitemeta} (site_id, meta_key, meta_value) VALUES ";
444
+ } else {
445
+ $query = "INSERT INTO {$wpdb->options} (option_name, option_value) VALUES ";
446
+ }
447
+
448
+ foreach($settings as $option_name => $option_value) {
449
+ $option_name = sanitize_text_field($option_name);
450
+ $raw_option_value = $option_value;
451
+
452
+ if( is_serialized($option_value) ) {
453
+ $option_value = unserialize($option_value);
454
+ }
455
+
456
+ if( is_array($option_value) || is_object($option_value) ) {
457
+ $option_value = Helper::recursiveSanitizeArray($option_value, 'wp_kses_post');
458
+ $option_value = maybe_serialize($option_value);
459
+ } else {
460
+ $option_value = wp_kses_post($option_value);
461
+ }
462
+
463
+ /**
464
+ * Используется для фильтрации импортируемых значений,
465
+ * обычно это может пригодиться для компонентов, которым нужно подменять домены, пути или какие-то правила
466
+ * при переносе с одного сайта на другой
467
+ *
468
+ * wtitan/filter_import_values
469
+ *
470
+ * @since 1.4.0
471
+ */
472
+ $option_value = apply_filters('wtitan/filter_import_values', $option_value, $option_name, $raw_option_value);
473
+
474
+ if( $this->plugin->isNetworkActive() ) {
475
+ array_push($values, $network_id, $option_name, $option_value);
476
+ $place_holders[] = "('%d', '%s', '%s')";/* In my case, i know they will always be integers */
477
+ } else {
478
+ array_push($values, $option_name, $option_value);
479
+ $place_holders[] = "('%s', '%s')";/* In my case, i know they will always be integers */
480
+ }
481
+ }
482
+
483
+ $query .= implode(', ', $place_holders);
484
+
485
+ // Удаляем все опции
486
+ $all_options = $this->getAllowOptions(false);
487
+
488
+ if( !empty($all_options) ) {
489
+ foreach($all_options as $name => $value) {
490
+ $this->plugin->deletePopulateOption($name);
491
+ }
492
+ }
493
+
494
+ // Сбрасываем кеш опций
495
+ $this->plugin->flushOptionsCache();
496
+
497
+ // Импортируем опции
498
+ $wpdb->query($wpdb->prepare("$query ", $values));
499
+
500
+ $send_data = ['status' => 'success'];
501
+
502
+ //$package_plugin = WCL_Package::instance();
503
+ //$send_data['update_notice'] = $package_plugin->getUpdateNotice();
504
+
505
+ // Сбрасываем кеш для кеширующих плагинов
506
+ Helper::flushPageCache();
507
+
508
+ do_action('wtitan_imported_settings');
509
+
510
+ wp_send_json_success($send_data);
511
+ die();
512
+ }
513
+
514
+ /**
515
+ * @param bool
516
+ */
517
+ public function getAllowOptions($with_prefix = true)
518
+ {
519
+ global $wpdb;
520
+
521
+ $result = [];
522
+
523
+ $excluded_options = [
524
+ 'plugin_activated',
525
+ 'plugin_version',
526
+ 'audit_results_hided',
527
+ 'audit_results',
528
+ 'vulnerabilities_wordpress',
529
+ 'vulnerabilities_plugins',
530
+ 'vulnerabilities_themes',
531
+ 'scanner',
532
+ 'scanner_malware_matched',
533
+ 'scanner_files_count',
534
+ 'scanner_status',
535
+ 'files_hash',
536
+ 'freemius_api_clock_diff',
537
+ 'what_is_new_64',
538
+ 'license',
539
+ 'stats_transient_',
540
+ ];
541
+
542
+ foreach($excluded_options as $key => $option) {
543
+ $excluded_options[$key] = $this->plugin->getOptionName($option);
544
+ }
545
+
546
+ if( $this->plugin->isNetworkActive() ) {
547
+ $network_id = get_current_network_id();
548
+
549
+ $request = $wpdb->get_results($wpdb->prepare("
550
+ SELECT meta_key, meta_value
551
+ FROM {$wpdb->sitemeta}
552
+ WHERE site_id = '%d' AND meta_key
553
+ LIKE '%s'", $network_id, $this->plugin->getPrefix() . "%"));
554
+ } else {
555
+ $request = $wpdb->get_results($wpdb->prepare("
556
+ SELECT option_name, option_value
557
+ FROM {$wpdb->options}
558
+ WHERE option_name
559
+ LIKE '%s'", $this->plugin->getPrefix() . "_%"));
560
+ }
561
+
562
+ if( !empty($request) ) {
563
+ foreach($request as $option) {
564
+ if( $this->plugin->isNetworkActive() ) {
565
+ $option_name = $option->meta_key;
566
+ $option_value = $option->meta_value;
567
+ } else {
568
+ $option_name = $option->option_name;
569
+ $option_value = $option->option_value;
570
+ }
571
+ if( !in_array($option_name, $excluded_options) ) {
572
+ $result[$option_name] = $option_value;
573
+ }
574
+ }
575
+ }
576
+ if( !$with_prefix ) {
577
+ foreach($result as $key => $option) {
578
+ unset($result[$key]);
579
+ $k = preg_replace('/^titan_/', '', $key);
580
+ $result[$k] = $option;
581
+ }
582
+ }
583
+
584
+ return $result;
585
+ }
586
+
587
+ }
admin/pages/class-pages-scanner.php CHANGED
@@ -1,111 +1,111 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- use WBCR\Titan;
6
-
7
- use Wbcr_Factory454_Plugin;
8
- use Wbcr_FactoryClearfy000_PageBase;
9
-
10
- if ( ! defined( 'ABSPATH' ) ) {
11
- exit;
12
- }
13
-
14
- class Scanner extends Base {
15
-
16
- /**
17
- * {@inheritDoc}
18
- */
19
- public $id = 'scanner';
20
-
21
- /**
22
- * {@inheritDoc}
23
- */
24
- public $page_menu_dashicon = 'dashicons-code-standards';
25
-
26
- /**
27
- * {@inheritDoc}
28
- */
29
- public $type = 'page';
30
-
31
- /**
32
- * {@inheritDoc}
33
- */
34
- public $show_right_sidebar_in_options = false;
35
-
36
- /**
37
- * Module folder URL
38
- */
39
- public $MODULE_URL = WTITAN_PLUGIN_URL . "/includes/scanner";
40
-
41
- /**
42
- * Path to module files
43
- *
44
- * @since 7.0
45
- * @var bool
46
- */
47
- public $MODULE_PATH = WTITAN_PLUGIN_DIR . "/includes/scanner";
48
-
49
- /**
50
- * Path to module files
51
- *
52
- * @since 7.0
53
- * @var object
54
- */
55
- public $module;
56
-
57
- /**
58
- * Scanner constructor.
59
- *
60
- * @param Wbcr_Factory454_Plugin $plugin
61
- *
62
- */
63
- public function __construct( Wbcr_Factory454_Plugin $plugin ) {
64
- $this->plugin = $plugin;
65
-
66
- $this->menu_title = __( 'Scanner', 'titan-security' );
67
- $this->page_menu_short_description = __( 'Checking site for viruses', 'titan-security' );
68
-
69
- if ( $this->plugin->is_premium() ) {
70
- /** @noinspection PhpIncludeInspection */
71
- require_once $this->MODULE_PATH . "/boot.php";
72
- $this->module = new Titan\Scanner();
73
- }
74
-
75
- parent::__construct( $plugin );
76
- }
77
-
78
- /**
79
- * {@inheritDoc}
80
- */
81
- public function assets( $scripts, $styles ) {
82
- parent::assets( $scripts, $styles );
83
-
84
- if ( $this->plugin->is_premium() ) {
85
- $this->styles->add( $this->MODULE_URL . '/assets/css/scanner-dashboard.css' );
86
- $this->styles->add( $this->MODULE_URL . '/assets/css/base-statistic.css' );
87
-
88
- $this->scripts->add( $this->MODULE_URL . '/assets/js/Chart.min.js' );
89
- $this->scripts->add( $this->MODULE_URL . '/assets/js/statistic.js' );
90
- $this->scripts->add( $this->MODULE_URL . '/assets/js/scanner.js' );
91
- $this->scripts->localize( 'wpnonce', [
92
- 'start' => wp_create_nonce( 'titan-start-scan' ),
93
- 'stop' => wp_create_nonce( 'titan-stop-scan' ),
94
- 'status' => wp_create_nonce( 'titan-status-scan' ),
95
- ] );
96
- }
97
- }
98
-
99
- /**
100
- * {@inheritDoc}
101
- */
102
- public function showPageContent() {
103
- if ( ! $this->plugin->is_premium() ) {
104
- $this->plugin->view->print_template( 'require-license-activate' );
105
-
106
- return;
107
- }
108
-
109
- $this->module->showPageContent();
110
- }
111
  }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ use WBCR\Titan;
6
+
7
+ use Wbcr_Factory458_Plugin;
8
+ use Wbcr_FactoryClearfy000_PageBase;
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ exit;
12
+ }
13
+
14
+ class Scanner extends Base {
15
+
16
+ /**
17
+ * {@inheritDoc}
18
+ */
19
+ public $id = 'scanner';
20
+
21
+ /**
22
+ * {@inheritDoc}
23
+ */
24
+ public $page_menu_dashicon = 'dashicons-code-standards';
25
+
26
+ /**
27
+ * {@inheritDoc}
28
+ */
29
+ public $type = 'page';
30
+
31
+ /**
32
+ * {@inheritDoc}
33
+ */
34
+ public $show_right_sidebar_in_options = false;
35
+
36
+ /**
37
+ * Module folder URL
38
+ */
39
+ public $MODULE_URL = WTITAN_PLUGIN_URL . "/includes/scanner";
40
+
41
+ /**
42
+ * Path to module files
43
+ *
44
+ * @since 7.0
45
+ * @var bool
46
+ */
47
+ public $MODULE_PATH = WTITAN_PLUGIN_DIR . "/includes/scanner";
48
+
49
+ /**
50
+ * Path to module files
51
+ *
52
+ * @since 7.0
53
+ * @var object
54
+ */
55
+ public $module;
56
+
57
+ /**
58
+ * Scanner constructor.
59
+ *
60
+ * @param Wbcr_Factory458_Plugin $plugin
61
+ *
62
+ */
63
+ public function __construct( Wbcr_Factory458_Plugin $plugin ) {
64
+ $this->plugin = $plugin;
65
+
66
+ $this->menu_title = __( 'Scanner', 'titan-security' );
67
+ $this->page_menu_short_description = __( 'Checking site for viruses', 'titan-security' );
68
+
69
+ if ( $this->plugin->is_premium() ) {
70
+ /** @noinspection PhpIncludeInspection */
71
+ require_once $this->MODULE_PATH . "/boot.php";
72
+ $this->module = new Titan\Scanner();
73
+ }
74
+
75
+ parent::__construct( $plugin );
76
+ }
77
+
78
+ /**
79
+ * {@inheritDoc}
80
+ */
81
+ public function assets( $scripts, $styles ) {
82
+ parent::assets( $scripts, $styles );
83
+
84
+ if ( $this->plugin->is_premium() ) {
85
+ $this->styles->add( $this->MODULE_URL . '/assets/css/scanner-dashboard.css' );
86
+ $this->styles->add( $this->MODULE_URL . '/assets/css/base-statistic.css' );
87
+
88
+ $this->scripts->add( $this->MODULE_URL . '/assets/js/Chart.min.js' );
89
+ $this->scripts->add( $this->MODULE_URL . '/assets/js/statistic.js' );
90
+ $this->scripts->add( $this->MODULE_URL . '/assets/js/scanner.js' );
91
+ $this->scripts->localize( 'wpnonce', [
92
+ 'start' => wp_create_nonce( 'titan-start-scan' ),
93
+ 'stop' => wp_create_nonce( 'titan-stop-scan' ),
94
+ 'status' => wp_create_nonce( 'titan-status-scan' ),
95
+ ] );
96
+ }
97
+ }
98
+
99
+ /**
100
+ * {@inheritDoc}
101
+ */
102
+ public function showPageContent() {
103
+ if ( ! $this->plugin->is_premium() ) {
104
+ $this->plugin->view->print_template( 'require-license-activate' );
105
+
106
+ return;
107
+ }
108
+
109
+ $this->module->showPageContent();
110
+ }
111
  }
admin/pages/class-pages-sitechecker.php CHANGED
@@ -1,125 +1,125 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- use WBCR\Titan;
6
-
7
- // Exit if accessed directly
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- /**
13
- * Site checker page class
14
- *
15
- * @author Artem Prihodko <webtemyk@yandex.ru>
16
- * @version 1.0
17
- */
18
- class SiteChecker extends Base {
19
-
20
- /**
21
- * {@inheritdoc}
22
- */
23
- public $id = 'sitechecker';
24
-
25
- /**
26
- * {@inheritdoc}
27
- */
28
- public $page_menu_dashicon = 'dashicons-welcome-view-site';
29
-
30
- /**
31
- * {@inheritdoc}
32
- */
33
- public $type = 'page';
34
-
35
- /**
36
- * {@inheritdoc}
37
- */
38
- public $show_right_sidebar_in_options = true;
39
-
40
-
41
- /**
42
- * Module folder URL
43
- *
44
- * @since 7.0
45
- * @var bool
46
- */
47
- public $MODULE_URL = WTITAN_PLUGIN_URL . "/includes/sitechecker";
48
-
49
- /**
50
- * Path to module files
51
- *
52
- * @since 7.0
53
- * @var bool
54
- */
55
- public $MODULE_PATH = WTITAN_PLUGIN_DIR . "/includes/sitechecker";
56
-
57
- /**
58
- * Path to module files
59
- *
60
- * @since 7.0
61
- * @var object
62
- */
63
- public $module;
64
-
65
- /**
66
- * Site Checker constructor.
67
- *
68
- * @param \Wbcr_Factory454_Plugin $plugin
69
- *
70
- */
71
- public function __construct( \Wbcr_Factory454_Plugin $plugin ) {
72
- $this->plugin = $plugin;
73
-
74
- $this->menu_title = __( 'Site Checker', 'titan-security' );
75
- $this->page_menu_short_description = __( 'Checking sites for availability', 'titan-security' );
76
-
77
- parent::__construct( $plugin );
78
- }
79
-
80
- /**
81
- * Init class and page data
82
- */
83
- public function init() {
84
- require_once $this->MODULE_PATH . "/boot.php";
85
- $this->module = new Titan\SiteChecker();
86
- }
87
-
88
- /**
89
- * Assets
90
- *
91
- * @return void
92
- */
93
- public function assets( $scripts, $styles ) {
94
- parent::assets( $scripts, $styles );
95
-
96
- $this->styles->add( $this->MODULE_URL . '/assets/css/sitechecker-dashboard.css' );
97
- $this->scripts->add( $this->MODULE_URL . '/assets/js/sitechecker.js', [ 'jquery' ] );
98
-
99
- if ( $this->plugin->is_premium() ) {
100
- $this->scripts->add( $this->MODULE_URL . '/assets/js/firebase.min.js' );
101
- $this->scripts->localize( 'wtitan', [
102
- 'path' => $this->MODULE_URL . '/assets/js/firebase-messaging-sw.js',
103
- 'scope' => $this->MODULE_URL . '/assets/js/',
104
- 'pushTokenNonce' => wp_create_nonce( 'titan-send-push-token' ),
105
- 'sitechecker_nonce' => wp_create_nonce( 'titan-sitechecker' ),
106
- ] );
107
- $this->scripts->add( $this->MODULE_URL . '/assets/js/app.js', [ 'jquery' ] );
108
- $this->scripts->localize( 'wt_app', [
109
- 'https' => __( 'Your site must work on HTTPS to subscribe to notifications', 'titan-security' ),
110
- 'notice' => __( 'Your browser does not support notifications', 'titan-security' ),
111
- 'worker' => __( 'ServiceWorker not supported. Your site must work on HTTPS', 'titan-security' ),
112
- ] );
113
- }
114
- }
115
-
116
-
117
- /**
118
- * Show page content
119
- */
120
- public function showPageContent() {
121
- $this->init();
122
- $this->module->showPageContent();
123
- }
124
-
125
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ use WBCR\Titan;
6
+
7
+ // Exit if accessed directly
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * Site checker page class
14
+ *
15
+ * @author Artem Prihodko <webtemyk@yandex.ru>
16
+ * @version 1.0
17
+ */
18
+ class SiteChecker extends Base {
19
+
20
+ /**
21
+ * {@inheritdoc}
22
+ */
23
+ public $id = 'sitechecker';
24
+
25
+ /**
26
+ * {@inheritdoc}
27
+ */
28
+ public $page_menu_dashicon = 'dashicons-welcome-view-site';
29
+
30
+ /**
31
+ * {@inheritdoc}
32
+ */
33
+ public $type = 'page';
34
+
35
+ /**
36
+ * {@inheritdoc}
37
+ */
38
+ public $show_right_sidebar_in_options = true;
39
+
40
+
41
+ /**
42
+ * Module folder URL
43
+ *
44
+ * @since 7.0
45
+ * @var bool
46
+ */
47
+ public $MODULE_URL = WTITAN_PLUGIN_URL . "/includes/sitechecker";
48
+
49
+ /**
50
+ * Path to module files
51
+ *
52
+ * @since 7.0
53
+ * @var bool
54
+ */
55
+ public $MODULE_PATH = WTITAN_PLUGIN_DIR . "/includes/sitechecker";
56
+
57
+ /**
58
+ * Path to module files
59
+ *
60
+ * @since 7.0
61
+ * @var object
62
+ */
63
+ public $module;
64
+
65
+ /**
66
+ * Site Checker constructor.
67
+ *
68
+ * @param \Wbcr_Factory458_Plugin $plugin
69
+ *
70
+ */
71
+ public function __construct( \Wbcr_Factory458_Plugin $plugin ) {
72
+ $this->plugin = $plugin;
73
+
74
+ $this->menu_title = __( 'Site Checker', 'titan-security' );
75
+ $this->page_menu_short_description = __( 'Checking sites for availability', 'titan-security' );
76
+
77
+ parent::__construct( $plugin );
78
+ }
79
+
80
+ /**
81
+ * Init class and page data
82
+ */
83
+ public function init() {
84
+ require_once $this->MODULE_PATH . "/boot.php";
85
+ $this->module = new Titan\SiteChecker();
86
+ }
87
+
88
+ /**
89
+ * Assets
90
+ *
91
+ * @return void
92
+ */
93
+ public function assets( $scripts, $styles ) {
94
+ parent::assets( $scripts, $styles );
95
+
96
+ $this->styles->add( $this->MODULE_URL . '/assets/css/sitechecker-dashboard.css' );
97
+ $this->scripts->add( $this->MODULE_URL . '/assets/js/sitechecker.js', [ 'jquery' ] );
98
+
99
+ if ( $this->plugin->is_premium() ) {
100
+ $this->scripts->add( $this->MODULE_URL . '/assets/js/firebase.min.js' );
101
+ $this->scripts->localize( 'wtitan', [
102
+ 'path' => $this->MODULE_URL . '/assets/js/firebase-messaging-sw.js',
103
+ 'scope' => $this->MODULE_URL . '/assets/js/',
104
+ 'pushTokenNonce' => wp_create_nonce( 'titan-send-push-token' ),
105
+ 'sitechecker_nonce' => wp_create_nonce( 'titan-sitechecker' ),
106
+ ] );
107
+ $this->scripts->add( $this->MODULE_URL . '/assets/js/app.js', [ 'jquery' ] );
108
+ $this->scripts->localize( 'wt_app', [
109
+ 'https' => __( 'Your site must work on HTTPS to subscribe to notifications', 'titan-security' ),
110
+ 'notice' => __( 'Your browser does not support notifications', 'titan-security' ),
111
+ 'worker' => __( 'ServiceWorker not supported. Your site must work on HTTPS', 'titan-security' ),
112
+ ] );
113
+ }
114
+ }
115
+
116
+
117
+ /**
118
+ * Show page content
119
+ */
120
+ public function showPageContent() {
121
+ $this->init();
122
+ $this->module->showPageContent();
123
+ }
124
+
125
+ }
admin/pages/class-pages-tweaks.php CHANGED
@@ -1,291 +1,291 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * Страница общих настроек для этого плагина.
12
- *
13
- * Не поддерживает режим работы с мультисаймами.
14
- *
15
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
- * @copyright (c) 2019 Webraftic Ltd
17
- * @version 1.0
18
- */
19
- class Tweaks extends Base {
20
-
21
- /**
22
- * {@inheritDoc}
23
- *
24
- * @since 1.0
25
- * @var string
26
- */
27
- public $id = "tweaks";
28
-
29
- /**
30
- * {@inheritDoc}
31
- *
32
- * @since 1.0
33
- * @var string
34
- */
35
- public $page_menu_dashicon = 'dashicons-admin-tools';
36
-
37
- /**
38
- * {@inheritDoc}
39
- *
40
- * @since 1.0
41
- * @var bool
42
- */
43
- public $show_right_sidebar_in_options = true;
44
-
45
- /**
46
- * WBCR\Page\Settings constructor.
47
- *
48
- * @param \Wbcr_Factory454_Plugin $plugin
49
- *
50
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
51
- *
52
- */
53
- public function __construct( \Wbcr_Factory454_Plugin $plugin ) {
54
- $this->menu_title = __( 'Tweaks', 'titan-security' );
55
- $this->page_menu_short_description = __( 'Security tweaks', 'titan-security' );
56
-
57
- parent::__construct( $plugin );
58
-
59
- $this->plugin = $plugin;
60
- }
61
-
62
- public $rules = array();
63
-
64
- /**
65
- * Enqueue page assets
66
- *
67
- * @return void
68
- * @since 6.2
69
- * @see Wbcr_FactoryPages453_AdminPage
70
- *
71
- */
72
- public function assets( $scripts, $styles ) {
73
- parent::assets( $scripts, $styles );
74
-
75
- if ( $this->plugin->is_premium() ) {
76
- $this->scripts->request( [
77
- 'control.checkbox',
78
- 'control.dropdown',
79
- 'bootstrap.tooltip',
80
- 'holder.more-link'
81
- ], 'bootstrap' );
82
-
83
- $this->styles->request( [
84
- 'bootstrap.core',
85
- 'bootstrap.form-group',
86
- 'holder.more-link',
87
- 'bootstrap.separator',
88
- 'control.dropdown',
89
- 'control.checkbox'
90
- ], 'bootstrap' );
91
- }
92
- }
93
-
94
- /**
95
- * Permalinks options.
96
- *
97
- * @return mixed[]
98
- * @since 6.2
99
- */
100
- public function getPageOptions() {
101
-
102
-
103
- $options[] = array(
104
- 'type' => 'html',
105
- 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Base settings</strong>.', 'titan-security' ) . '<p>' . __( 'Basic recommended security settings.', 'titan-security' ) . '</p></div>'
106
- );
107
-
108
- $options[] = array(
109
- 'type' => 'checkbox',
110
- 'way' => 'buttons',
111
- 'name' => 'strong_password',
112
- 'title' => __( 'Strong Password Requirement', 'titan-security' ),
113
- 'layout' => array( 'hint-type' => 'icon' ),
114
- 'hint' => __( 'Force users to use strong passwords as rated by the WordPress password meter.', 'titan-security' ) . '<br><b>Titan: </b>' . __( 'Sets the redirect to exclude the possibility of obtaining a login.', 'titan-security' ),
115
- 'default' => false,
116
- 'eventsOn' => [
117
- 'show' => '.factory-control-strong_password_min_role'
118
- ],
119
- 'eventsOff' => [
120
- 'hide' => '.factory-control-strong_password_min_role'
121
- ]
122
- );
123
-
124
- $options[] = [
125
- 'type' => 'dropdown',
126
- 'name' => 'strong_password_min_role',
127
- 'title' => __( 'Strong Password Minimum Role', 'titan-security' ),
128
- 'data' => [
129
- [ 'administrator', 'Administrator' ],
130
- [ 'editor', 'Editor' ],
131
- [ 'author', 'Author' ],
132
- [ 'contributor', 'Contributor' ],
133
- [ 'subscriber', 'Subscriber' ],
134
- ],
135
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
136
- 'hint' => __( 'Minimum role at which a user must choose a strong password. For more information on WordPress roles and capabilities please see http://codex.wordpress.org/Roles_and_Capabilities. Warning: If your site invites public registrations setting the role too low may annoy your members.', 'titan-security' ),
137
- 'default' => 'administrator'
138
- ];
139
-
140
- $options[] = array(
141
- 'type' => 'separator'
142
- );
143
-
144
- $options[] = array(
145
- 'type' => 'checkbox',
146
- 'way' => 'buttons',
147
- 'name' => 'protect_author_get',
148
- 'title' => __( 'Hide author login', 'titan-security' ),
149
- 'layout' => array( 'hint-type' => 'icon' ),
150
- 'hint' => __( 'An attacker can find out the author\'s login, using a similar request to get your site. mysite.com/?author=1', 'titan-security' ) . '<br><b>Titan: </b>' . __( 'Sets the redirect to exclude the possibility of obtaining a login.', 'titan-security' ),
151
- 'default' => false
152
- );
153
-
154
- $options[] = array(
155
- 'type' => 'checkbox',
156
- 'way' => 'buttons',
157
- 'name' => 'change_login_errors',
158
- 'title' => __( 'Hide errors when logging into the site', 'titan-security' ),
159
- 'layout' => array( 'hint-type' => 'icon' ),
160
- 'hint' => __( 'WP by default shows whether you entered a wrong login or incorrect password, which allows attackers to understand if there is a certain user on the site, and then start searching through the passwords.', 'titan-security' ) . '<br><b>Titan: </b>' . __( 'Changes in the text of the error so that attackers could not find the login.', 'titan-security' ),
161
- 'default' => false
162
- );
163
-
164
- $options[] = array(
165
- 'type' => 'checkbox',
166
- 'way' => 'buttons',
167
- 'name' => 'remove_x_pingback',
168
- 'title' => __( 'Disable XML-RPC', 'titan-security' ),
169
- 'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
170
- 'hint' => __( 'A pingback is basically an automated comment that gets created when another blog links to you. A self-pingback is created when you link to an article within your own blog. Pingbacks are essentially nothing more than spam and simply waste resources.', 'titan-security' ) . '<br><b>Titan: </b>' . __( 'Removes the server responses a reference to the xmlrpc file.', 'titan-security' ),
171
- 'default' => false,
172
- 'eventsOn' => array(
173
- 'show' => '#wbcr-clearfy-xml-rpc-danger-message'
174
- ),
175
- 'eventsOff' => array(
176
- 'hide' => '#wbcr-clearfy-xml-rpc-danger-message'
177
- )
178
- );
179
-
180
- $options[] = array(
181
- 'type' => 'html',
182
- 'html' => array( $this, 'xmlRpcDangerMessage' )
183
- );
184
-
185
- //block_xml_rpc
186
- //disable_xml_rpc_auth
187
- //remove_xml_rpc_tag
188
-
189
- $options[] = array(
190
- 'type' => 'html',
191
- 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Hide WordPress versions</strong>', 'titan-security' ) . '<p>' . __( 'WordPress itself and many plugins shows their version at the public areas of your site. An attacker received this information may be aware of the vulnerabilities found in the version of the WordPress core or plugins.', 'titan-security' ) . '</p></div>'
192
- );
193
-
194
- $options[] = array(
195
- 'type' => 'checkbox',
196
- 'way' => 'buttons',
197
- 'name' => 'remove_html_comments',
198
- 'title' => __( 'Remove html comments', 'titan-security' ),
199
- 'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
200
- 'hint' => __( 'This function will remove all html comments in the source code, except for special and hidden comments. This is necessary to hide the version of installed plugins.', 'titan-security' ) . '<br><br><b>Titan: </b>' . __( 'Remove html comments in source code.', 'titan-security' ),
201
- 'default' => false
202
- );
203
-
204
- $options[] = array(
205
- 'type' => 'checkbox',
206
- 'way' => 'buttons',
207
- 'name' => 'remove_meta_generator',
208
- 'title' => __( 'Remove meta generator', 'titan-security' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'titan-security' ) . ')</span>',
209
- 'layout' => array( 'hint-type' => 'icon' ),
210
- 'hint' => __( 'Allows attacker to learn the version of WP installed on the site. This meta tag has no useful function.', 'titan-security' ) . '<br><b>Titan: </b>' . sprintf( __( 'Removes the meta tag from the %s section', 'titan-security' ), '&lt;head&gt;' ),
211
- 'default' => false
212
- );
213
-
214
- /* $options[] = [
215
- 'type' => 'html',
216
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __('Remove query strings from static resources', 'titan-security') . '</strong>' . '<p>' . __('This funcitons will remove query strings from static resources like CSS & JS files inside the HTML <head> element to improve your speed scores in services like Pingdom, GTmetrix, PageSpeed and YSlow. <b style="color:#ff5722">Important:</b> This does not work for authorized users. To avoid problems after plugins update!', 'titan-security') . '</p>' . '</div>'
217
- ];*/
218
-
219
- $options[] = [
220
- 'type' => 'checkbox',
221
- 'way' => 'buttons',
222
- 'name' => 'remove_js_version',
223
- 'title' => __( 'Remove Version from Script', 'titan-security' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'titan-security' ) . ')</span>',
224
- 'layout' => [ 'hint-type' => 'icon' ],
225
- 'hint' => __( 'To make it more difficult for others to hack your website you can remove the WordPress version number from your site, your css and js. Without that number it\'s not possible to see if you run not the current version to exploit bugs from the older versions. <br><br>
226
- Additionally it can improve the loading speed of your site, because without query strings in the URL the css and js files can be cached.', 'titan-security' ) . '<br><br><b>Titan: </b>' . __( 'Removes wordpress version number from scripts (not logged in user only).', 'titan-security' ),
227
- 'default' => false
228
- ];
229
-
230
- $options[] = [
231
- 'type' => 'checkbox',
232
- 'way' => 'buttons',
233
- 'name' => 'remove_style_version',
234
- 'title' => __( 'Remove Version from Stylesheet', 'titan-security' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'titan-security' ) . ')</span>',
235
- 'layout' => [ 'hint-type' => 'icon' ],
236
- 'hint' => __( 'To make it more difficult for others to hack your website you can remove the WordPress version number from your site, your css and js. Without that number it\'s not possible to see if you run not the current version to exploit bugs from the older versions. <br><br>
237
- Additionally it can improve the loading speed of your site, because without query strings in the URL the css and js files can be cached.', 'titan-security' ) . '<br><br><b>Titan: </b>' . __( 'Removes the wordpress version number from stylesheets (not logged in user only).', 'titan-security' ),
238
- 'default' => false
239
- /*'eventsOn' => array(
240
- 'show' => '.factory-control-disable_remove_style_version_for_auth_users'
241
- ),
242
- 'eventsOff' => array(
243
- 'hide' => '.factory-control-disable_remove_style_version_for_auth_users'
244
- )*/
245
- ];
246
-
247
- /*$options[] = array(
248
- 'type' => 'checkbox',
249
- 'way' => 'buttons',
250
- 'name' => 'disable_remove_style_version_for_auth_users',
251
- 'title' => __( 'Disable remove versions for auth users', 'titan-security' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'titan-security' ) . ')</span>',
252
- 'layout' => array( 'hint-type' => 'icon' ),
253
- 'default' => false
254
- );*/
255
-
256
- $options[] = [
257
- 'type' => 'textarea',
258
- 'name' => 'remove_version_exclude',
259
- 'height' => '120',
260
- 'title' => __( 'Exclude stylesheet/script file names', 'titan-security' ),
261
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
262
- 'hint' => __( 'Enter Stylesheet/Script file names to exclude from version removal (each exclude file starts with a new line)', 'titan-security' ) . '<br><br><b>' . __( 'Example', 'titan-security' ) . ':</b>' . ' http://testwp.dev/wp-includes/js/jquery/jquery.js',
263
- ];
264
-
265
- $form_options = [];
266
-
267
- $form_options[] = [
268
- 'type' => 'form-group',
269
- 'items' => $options,
270
- //'cssClass' => 'postbox'
271
- ];
272
-
273
- return apply_filters( 'wtitan/tweaks_form/options', $form_options, $this );
274
- }
275
-
276
- /**
277
- * Adds an html warning notification html markup.
278
- */
279
- public function xmlRpcDangerMessage() {
280
- ?>
281
- <div class="form-group">
282
- <label class="col-sm-4 control-label"></label>
283
- <div class="control-group col-sm-8">
284
- <div id="wbcr-clearfy-xml-rpc-danger-message" class="wbcr-clearfy-danger-message">
285
- <?php _e( '<b>Use this option carefully!</b><br> Plugins like jetpack may have problems using this option.', 'titan-security' ) ?>
286
- </div>
287
- </div>
288
- </div>
289
- <?php
290
- }
291
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * Страница общих настроек для этого плагина.
12
+ *
13
+ * Не поддерживает режим работы с мультисаймами.
14
+ *
15
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
+ * @copyright (c) 2019 Webraftic Ltd
17
+ * @version 1.0
18
+ */
19
+ class Tweaks extends Base {
20
+
21
+ /**
22
+ * {@inheritDoc}
23
+ *
24
+ * @since 1.0
25
+ * @var string
26
+ */
27
+ public $id = "tweaks";
28
+
29
+ /**
30
+ * {@inheritDoc}
31
+ *
32
+ * @since 1.0
33
+ * @var string
34
+ */
35
+ public $page_menu_dashicon = 'dashicons-admin-tools';
36
+
37
+ /**
38
+ * {@inheritDoc}
39
+ *
40
+ * @since 1.0
41
+ * @var bool
42
+ */
43
+ public $show_right_sidebar_in_options = true;
44
+
45
+ /**
46
+ * WBCR\Page\Settings constructor.
47
+ *
48
+ * @param \Wbcr_Factory458_Plugin $plugin
49
+ *
50
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
51
+ *
52
+ */
53
+ public function __construct( \Wbcr_Factory458_Plugin $plugin ) {
54
+ $this->menu_title = __( 'Tweaks', 'titan-security' );
55
+ $this->page_menu_short_description = __( 'Security tweaks', 'titan-security' );
56
+
57
+ parent::__construct( $plugin );
58
+
59
+ $this->plugin = $plugin;
60
+ }
61
+
62
+ public $rules = array();
63
+
64
+ /**
65
+ * Enqueue page assets
66
+ *
67
+ * @return void
68
+ * @since 6.2
69
+ * @see Wbcr_FactoryPages457_AdminPage
70
+ *
71
+ */
72
+ public function assets( $scripts, $styles ) {
73
+ parent::assets( $scripts, $styles );
74
+
75
+ if ( $this->plugin->is_premium() ) {
76
+ $this->scripts->request( [
77
+ 'control.checkbox',
78
+ 'control.dropdown',
79
+ 'bootstrap.tooltip',
80
+ 'holder.more-link'
81
+ ], 'bootstrap' );
82
+
83
+ $this->styles->request( [
84
+ 'bootstrap.core',
85
+ 'bootstrap.form-group',
86
+ 'holder.more-link',
87
+ 'bootstrap.separator',
88
+ 'control.dropdown',
89
+ 'control.checkbox'
90
+ ], 'bootstrap' );
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Permalinks options.
96
+ *
97
+ * @return mixed[]
98
+ * @since 6.2
99
+ */
100
+ public function getPageOptions() {
101
+
102
+
103
+ $options[] = array(
104
+ 'type' => 'html',
105
+ 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Base settings</strong>.', 'titan-security' ) . '<p>' . __( 'Basic recommended security settings.', 'titan-security' ) . '</p></div>'
106
+ );
107
+
108
+ $options[] = array(
109
+ 'type' => 'checkbox',
110
+ 'way' => 'buttons',
111
+ 'name' => 'strong_password',
112
+ 'title' => __( 'Strong Password Requirement', 'titan-security' ),
113
+ 'layout' => array( 'hint-type' => 'icon' ),
114
+ 'hint' => __( 'Force users to use strong passwords as rated by the WordPress password meter.', 'titan-security' ) . '<br><b>Titan: </b>' . __( 'Sets the redirect to exclude the possibility of obtaining a login.', 'titan-security' ),
115
+ 'default' => false,
116
+ 'eventsOn' => [
117
+ 'show' => '.factory-control-strong_password_min_role'
118
+ ],
119
+ 'eventsOff' => [
120
+ 'hide' => '.factory-control-strong_password_min_role'
121
+ ]
122
+ );
123
+
124
+ $options[] = [
125
+ 'type' => 'dropdown',
126
+ 'name' => 'strong_password_min_role',
127
+ 'title' => __( 'Strong Password Minimum Role', 'titan-security' ),
128
+ 'data' => [
129
+ [ 'administrator', 'Administrator' ],
130
+ [ 'editor', 'Editor' ],
131
+ [ 'author', 'Author' ],
132
+ [ 'contributor', 'Contributor' ],
133
+ [ 'subscriber', 'Subscriber' ],
134
+ ],
135
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
136
+ 'hint' => __( 'Minimum role at which a user must choose a strong password. For more information on WordPress roles and capabilities please see http://codex.wordpress.org/Roles_and_Capabilities. Warning: If your site invites public registrations setting the role too low may annoy your members.', 'titan-security' ),
137
+ 'default' => 'administrator'
138
+ ];
139
+
140
+ $options[] = array(
141
+ 'type' => 'separator'
142
+ );
143
+
144
+ $options[] = array(
145
+ 'type' => 'checkbox',
146
+ 'way' => 'buttons',
147
+ 'name' => 'protect_author_get',
148
+ 'title' => __( 'Hide author login', 'titan-security' ),
149
+ 'layout' => array( 'hint-type' => 'icon' ),
150
+ 'hint' => __( 'An attacker can find out the author\'s login, using a similar request to get your site. mysite.com/?author=1', 'titan-security' ) . '<br><b>Titan: </b>' . __( 'Sets the redirect to exclude the possibility of obtaining a login.', 'titan-security' ),
151
+ 'default' => false
152
+ );
153
+
154
+ $options[] = array(
155
+ 'type' => 'checkbox',
156
+ 'way' => 'buttons',
157
+ 'name' => 'change_login_errors',
158
+ 'title' => __( 'Hide errors when logging into the site', 'titan-security' ),
159
+ 'layout' => array( 'hint-type' => 'icon' ),
160
+ 'hint' => __( 'WP by default shows whether you entered a wrong login or incorrect password, which allows attackers to understand if there is a certain user on the site, and then start searching through the passwords.', 'titan-security' ) . '<br><b>Titan: </b>' . __( 'Changes in the text of the error so that attackers could not find the login.', 'titan-security' ),
161
+ 'default' => false
162
+ );
163
+
164
+ $options[] = array(
165
+ 'type' => 'checkbox',
166
+ 'way' => 'buttons',
167
+ 'name' => 'remove_x_pingback',
168
+ 'title' => __( 'Disable XML-RPC', 'titan-security' ),
169
+ 'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
170
+ 'hint' => __( 'A pingback is basically an automated comment that gets created when another blog links to you. A self-pingback is created when you link to an article within your own blog. Pingbacks are essentially nothing more than spam and simply waste resources.', 'titan-security' ) . '<br><b>Titan: </b>' . __( 'Removes the server responses a reference to the xmlrpc file.', 'titan-security' ),
171
+ 'default' => false,
172
+ 'eventsOn' => array(
173
+ 'show' => '#wbcr-clearfy-xml-rpc-danger-message'
174
+ ),
175
+ 'eventsOff' => array(
176
+ 'hide' => '#wbcr-clearfy-xml-rpc-danger-message'
177
+ )
178
+ );
179
+
180
+ $options[] = array(
181
+ 'type' => 'html',
182
+ 'html' => array( $this, 'xmlRpcDangerMessage' )
183
+ );
184
+
185
+ //block_xml_rpc
186
+ //disable_xml_rpc_auth
187
+ //remove_xml_rpc_tag
188
+
189
+ $options[] = array(
190
+ 'type' => 'html',
191
+ 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Hide WordPress versions</strong>', 'titan-security' ) . '<p>' . __( 'WordPress itself and many plugins shows their version at the public areas of your site. An attacker received this information may be aware of the vulnerabilities found in the version of the WordPress core or plugins.', 'titan-security' ) . '</p></div>'
192
+ );
193
+
194
+ $options[] = array(
195
+ 'type' => 'checkbox',
196
+ 'way' => 'buttons',
197
+ 'name' => 'remove_html_comments',
198
+ 'title' => __( 'Remove html comments', 'titan-security' ),
199
+ 'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
200
+ 'hint' => __( 'This function will remove all html comments in the source code, except for special and hidden comments. This is necessary to hide the version of installed plugins.', 'titan-security' ) . '<br><br><b>Titan: </b>' . __( 'Remove html comments in source code.', 'titan-security' ),
201
+ 'default' => false
202
+ );
203
+
204
+ $options[] = array(
205
+ 'type' => 'checkbox',
206
+ 'way' => 'buttons',
207
+ 'name' => 'remove_meta_generator',
208
+ 'title' => __( 'Remove meta generator', 'titan-security' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'titan-security' ) . ')</span>',
209
+ 'layout' => array( 'hint-type' => 'icon' ),
210
+ 'hint' => __( 'Allows attacker to learn the version of WP installed on the site. This meta tag has no useful function.', 'titan-security' ) . '<br><b>Titan: </b>' . sprintf( __( 'Removes the meta tag from the %s section', 'titan-security' ), '&lt;head&gt;' ),
211
+ 'default' => false
212
+ );
213
+
214
+ /* $options[] = [
215
+ 'type' => 'html',
216
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __('Remove query strings from static resources', 'titan-security') . '</strong>' . '<p>' . __('This funcitons will remove query strings from static resources like CSS & JS files inside the HTML <head> element to improve your speed scores in services like Pingdom, GTmetrix, PageSpeed and YSlow. <b style="color:#ff5722">Important:</b> This does not work for authorized users. To avoid problems after plugins update!', 'titan-security') . '</p>' . '</div>'
217
+ ];*/
218
+
219
+ $options[] = [
220
+ 'type' => 'checkbox',
221
+ 'way' => 'buttons',
222
+ 'name' => 'remove_js_version',
223
+ 'title' => __( 'Remove Version from Script', 'titan-security' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'titan-security' ) . ')</span>',
224
+ 'layout' => [ 'hint-type' => 'icon' ],
225
+ 'hint' => __( 'To make it more difficult for others to hack your website you can remove the WordPress version number from your site, your css and js. Without that number it\'s not possible to see if you run not the current version to exploit bugs from the older versions. <br><br>
226
+ Additionally it can improve the loading speed of your site, because without query strings in the URL the css and js files can be cached.', 'titan-security' ) . '<br><br><b>Titan: </b>' . __( 'Removes wordpress version number from scripts (not logged in user only).', 'titan-security' ),
227
+ 'default' => false
228
+ ];
229
+
230
+ $options[] = [
231
+ 'type' => 'checkbox',
232
+ 'way' => 'buttons',
233
+ 'name' => 'remove_style_version',
234
+ 'title' => __( 'Remove Version from Stylesheet', 'titan-security' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'titan-security' ) . ')</span>',
235
+ 'layout' => [ 'hint-type' => 'icon' ],
236
+ 'hint' => __( 'To make it more difficult for others to hack your website you can remove the WordPress version number from your site, your css and js. Without that number it\'s not possible to see if you run not the current version to exploit bugs from the older versions. <br><br>
237
+ Additionally it can improve the loading speed of your site, because without query strings in the URL the css and js files can be cached.', 'titan-security' ) . '<br><br><b>Titan: </b>' . __( 'Removes the wordpress version number from stylesheets (not logged in user only).', 'titan-security' ),
238
+ 'default' => false
239
+ /*'eventsOn' => array(
240
+ 'show' => '.factory-control-disable_remove_style_version_for_auth_users'
241
+ ),
242
+ 'eventsOff' => array(
243
+ 'hide' => '.factory-control-disable_remove_style_version_for_auth_users'
244
+ )*/
245
+ ];
246
+
247
+ /*$options[] = array(
248
+ 'type' => 'checkbox',
249
+ 'way' => 'buttons',
250
+ 'name' => 'disable_remove_style_version_for_auth_users',
251
+ 'title' => __( 'Disable remove versions for auth users', 'titan-security' ) . ' <span class="wbcr-clearfy-recomended-text">(' . __( 'Recommended', 'titan-security' ) . ')</span>',
252
+ 'layout' => array( 'hint-type' => 'icon' ),
253
+ 'default' => false
254
+ );*/
255
+
256
+ $options[] = [
257
+ 'type' => 'textarea',
258
+ 'name' => 'remove_version_exclude',
259
+ 'height' => '120',
260
+ 'title' => __( 'Exclude stylesheet/script file names', 'titan-security' ),
261
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
262
+ 'hint' => __( 'Enter Stylesheet/Script file names to exclude from version removal (each exclude file starts with a new line)', 'titan-security' ) . '<br><br><b>' . __( 'Example', 'titan-security' ) . ':</b>' . ' http://testwp.dev/wp-includes/js/jquery/jquery.js',
263
+ ];
264
+
265
+ $form_options = [];
266
+
267
+ $form_options[] = [
268
+ 'type' => 'form-group',
269
+ 'items' => $options,
270
+ //'cssClass' => 'postbox'
271
+ ];
272
+
273
+ return apply_filters( 'wtitan/tweaks_form/options', $form_options, $this );
274
+ }
275
+
276
+ /**
277
+ * Adds an html warning notification html markup.
278
+ */
279
+ public function xmlRpcDangerMessage() {
280
+ ?>
281
+ <div class="form-group">
282
+ <label class="col-sm-4 control-label"></label>
283
+ <div class="control-group col-sm-8">
284
+ <div id="wbcr-clearfy-xml-rpc-danger-message" class="wbcr-clearfy-danger-message">
285
+ <?php _e( '<b>Use this option carefully!</b><br> Plugins like jetpack may have problems using this option.', 'titan-security' ) ?>
286
+ </div>
287
+ </div>
288
+ </div>
289
+ <?php
290
+ }
291
+ }
admin/pages/firewall/class-pages-bruteforce.php CHANGED
@@ -1,299 +1,299 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- use WBCR\Titan\Views;
7
-
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- /**
13
- * The file contains a short help info.
14
- *
15
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
- * @copyright (c) 2019 Webraftic Ltd
17
- * @version 1.0
18
- */
19
- class Brute_Force extends Base {
20
-
21
- /**
22
- * {@inheritdoc}
23
- */
24
- public $id = 'bruteforce';
25
-
26
- /**
27
- * {@inheritDoc}
28
- *
29
- * @var string
30
- */
31
- public $page_parent_page = "firewall";
32
-
33
- /**
34
- * {@inheritdoc}
35
- */
36
- public $page_menu_dashicon = 'dashicons-tagcloud';
37
-
38
- /**
39
- * {@inheritdoc}
40
- */
41
- public $show_right_sidebar_in_options = false;
42
-
43
- /**
44
- * @var object|\WBCR\Titan\Views
45
- */
46
- public $view;
47
-
48
-
49
- /**
50
- * Logs constructor.
51
- *
52
- * @param \Wbcr_Factory454_Plugin $plugin
53
- *
54
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
55
- *
56
- */
57
- public function __construct( \Wbcr_Factory454_Plugin $plugin ) {
58
- $this->plugin = $plugin;
59
-
60
- $this->menu_title = __( 'Limit login Attempts', 'titan-security' );
61
- $this->page_menu_short_description = __( 'Stop login attacks', 'titan-security' );
62
-
63
- $this->view = \WBCR\Titan\Plugin::app()->view();
64
-
65
- parent::__construct( $plugin );
66
- }
67
-
68
-
69
- /**
70
- * Enqueue page assets
71
- *
72
- * @return void
73
- * @since 6.2
74
- * @see Wbcr_FactoryPages453_AdminPage
75
- *
76
- */
77
- public function assets( $scripts, $styles ) {
78
- parent::assets( $scripts, $styles );
79
-
80
- if ( $this->plugin->is_premium() ) {
81
- $this->scripts->request( [
82
- 'control.checkbox',
83
- 'control.dropdown',
84
- 'bootstrap.tooltip',
85
- 'holder.more-link'
86
- ], 'bootstrap' );
87
-
88
- $this->styles->request( [
89
- 'bootstrap.core',
90
- 'bootstrap.form-group',
91
- 'holder.more-link',
92
- 'bootstrap.separator',
93
- 'control.dropdown',
94
- 'control.checkbox'
95
- ], 'bootstrap' );
96
-
97
- add_action( 'wbcr/factory/update_option', [ $this, 'before_save' ] );
98
- }
99
- }
100
-
101
- /**
102
- * Permalinks options.
103
- *
104
- * @return mixed[]
105
- * @since 6.2
106
- */
107
- public function getPageOptions() {
108
-
109
-
110
- $options[] = array(
111
- 'type' => 'html',
112
- 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Lockout</strong>.', 'titan-security' ) . '<p>' . __( 'Basic recommended security settings.', 'titan-security' ) . '</p></div>'
113
- );
114
-
115
- $options[] = array(
116
- 'type' => 'checkbox',
117
- 'way' => 'buttons',
118
- 'name' => 'bruteforce_enabled',
119
- 'title' => __( 'Bruteforce enabled', 'titan-security' ),
120
- 'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
121
- 'hint' => __( 'Click to enable or disable protection brute force attacks.', 'titan-security' ),
122
- 'default' => false
123
- );
124
-
125
- $options[] = array(
126
- 'type' => 'checkbox',
127
- 'way' => 'buttons',
128
- 'name' => 'bruteforce_gdpr',
129
- 'title' => __( 'GDPR compliance', 'titan-security' ),
130
- 'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
131
- 'hint' => __( 'This makes the plugin GDPR compliant', 'titan-security' ),
132
- 'default' => false
133
- );
134
-
135
- $options[] = array(
136
- 'type' => 'textbox',
137
- 'name' => 'bruteforce_allowed_retries',
138
- 'title' => __( 'Allowed retries', 'titan-security' ),
139
- 'default' => 4,
140
- 'filter_value' => [ $this, 'filter_allowed_retries_option' ]
141
- );
142
- $options[] = array(
143
- 'type' => 'textbox',
144
- 'name' => 'bruteforce_minutes_lockout_raw',
145
- 'title' => __( 'Minutes lockout', 'titan-security' ),
146
- 'default' => 20,
147
- 'filter_value' => [ $this, 'filter_minutes_lockout_option' ]
148
- );
149
- $options[] = array(
150
- 'type' => 'textbox',
151
- 'name' => 'bruteforce_valid_duration_raw',
152
- 'title' => __( 'Hours until retries are reset', 'titan-security' ),
153
- 'default' => 12,
154
- 'filter_value' => [ $this, 'filter_valid_duration_option' ]
155
- );
156
- /*$options[] = array(
157
- 'type' => 'textbox',
158
- 'name' => 'bruteforce_allowed_retries',
159
- 'title' => __('Allowed retries', 'titan-security'),
160
- 'default' => 4
161
- );*/
162
-
163
- $options[] = array(
164
- 'type' => 'html',
165
- 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Whitelist</strong>.', 'titan-security' ) . '<p>' . __( 'Basic recommended security settings.', 'titan-security' ) . '</p></div>'
166
- );
167
-
168
- $options[] = array(
169
- 'type' => 'textarea',
170
- 'name' => 'bruteforce_whitelist_ips_raw',
171
- 'title' => __( 'Whitelist ips', 'titan-security' ),
172
- 'hint' => __( 'One IP or IP range (1.2.3.4-5.6.7.8) per line', 'titan-security' ),
173
- 'default' => '',
174
- 'filter_value' => [ $this, 'filter_whitelist_ips_option' ]
175
- );
176
- $options[] = array(
177
- 'type' => 'textarea',
178
- 'name' => 'bruteforce_whitelist_usernames_raw',
179
- 'title' => __( 'Whitelist usernames', 'titan-security' ),
180
- 'hint' => __( 'One Username per line', 'titan-security' ),
181
- 'default' => '',
182
- 'filter_value' => [ $this, 'filter_whitelist_usernames_option' ]
183
- );
184
-
185
- $options[] = array(
186
- 'type' => 'html',
187
- 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Blacklist</strong>.', 'titan-security' ) . '<p>' . __( 'Basic recommended security settings.', 'titan-security' ) . '</p></div>'
188
- );
189
-
190
- $options[] = array(
191
- 'type' => 'textarea',
192
- 'name' => 'bruteforce_blacklist_ips_raw',
193
- 'title' => __( 'Blacklist ips', 'titan-security' ),
194
- 'hint' => __( 'One IP or IP range (1.2.3.4-5.6.7.8) per line', 'titan-security' ),
195
- 'default' => '',
196
- 'filter_value' => [ $this, 'filter_blacklist_ips_option' ]
197
- );
198
- $options[] = array(
199
- 'type' => 'textarea',
200
- 'name' => 'bruteforce_blacklist_usernames_raw',
201
- 'title' => __( 'Blacklist usernames', 'titan-security' ),
202
- 'hint' => __( 'One Username per line', 'titan-security' ),
203
- 'default' => '',
204
- 'filter_value' => [ $this, 'filter_blacklist_usernames_option' ]
205
- );
206
-
207
- $form_options = [];
208
-
209
- $form_options[] = [
210
- 'type' => 'form-group',
211
- 'items' => $options,
212
- //'cssClass' => 'postbox'
213
- ];
214
-
215
- return apply_filters( 'wtitan/tweaks_form/options', $form_options, $this );
216
- }
217
-
218
- public function filter_allowed_retries_option( $value ) {
219
- return (int) $value;
220
- }
221
-
222
- public function filter_minutes_lockout_option( $value ) {
223
- $this->plugin->updateOption( 'bruteforce_minutes_lockout', (int) $value * 60 );
224
-
225
- return (int) $value;
226
- }
227
-
228
- public function filter_valid_duration_option( $value ) {
229
- $this->plugin->updateOption( 'bruteforce_valid_duration', (int) $value * 3600 );
230
-
231
- return (int) $value;
232
- }
233
-
234
- public function filter_whitelist_ips_option( $value ) {
235
- $white_list_ips = ( ! empty( $value ) ) ? explode( "\n", str_replace( "\r", "", stripslashes( $value ) ) ) : array();
236
-
237
- if ( ! empty( $white_list_ips ) ) {
238
- foreach ( $white_list_ips as $key => $ip ) {
239
- if ( '' == $ip ) {
240
- unset( $white_list_ips[ $key ] );
241
- }
242
- }
243
- }
244
- $this->plugin->updateOption( 'bruteforce_whitelist', $white_list_ips );
245
-
246
- return $value;
247
- }
248
-
249
-
250
- public function filter_whitelist_usernames_option( $value ) {
251
- $white_list_usernames = ( ! empty( $value ) ) ? explode( "\n", str_replace( "\r", "", stripslashes( $value ) ) ) : array();
252
-
253
- if ( ! empty( $white_list_usernames ) ) {
254
- foreach ( $white_list_usernames as $key => $ip ) {
255
- if ( '' == $ip ) {
256
- unset( $white_list_usernames[ $key ] );
257
- }
258
- }
259
- }
260
- $this->plugin->updateOption( 'bruteforce_whitelist_usernames', $white_list_usernames );
261
-
262
- return $value;
263
- }
264
-
265
- public function filter_blacklist_ips_option( $value ) {
266
- $black_list_ips = ( ! empty( $value ) ) ? explode( "\n", str_replace( "\r", "", stripslashes( $value ) ) ) : array();
267
-
268
- if ( ! empty( $black_list_ips ) ) {
269
- foreach ( $black_list_ips as $key => $ip ) {
270
- /*$range = array_map('trim', explode('-', $ip));
271
- if( count($range) > 1 && (float)sprintf("%u", ip2long($range[0])) > (float)sprintf("%u", ip2long($range[1])) ) {
272
- $this->show_error(__('The "' . $ip . '" IP range is invalid', 'titan-security'));
273
- }*/
274
- if ( '' == $ip ) {
275
- unset( $black_list_ips[ $key ] );
276
- }
277
- }
278
- }
279
-
280
- $this->plugin->updateOption( 'bruteforce_blacklist_ips', $black_list_ips );
281
-
282
- return $value;
283
- }
284
-
285
- public function filter_blacklist_usernames_option( $value ) {
286
- $black_list_usernames = ( ! empty( $value ) ) ? explode( "\n", str_replace( "\r", "", stripslashes( $value ) ) ) : array();
287
-
288
- if ( ! empty( $black_list_usernames ) ) {
289
- foreach ( $black_list_usernames as $key => $ip ) {
290
- if ( '' == $ip ) {
291
- unset( $black_list_usernames[ $key ] );
292
- }
293
- }
294
- }
295
- $this->plugin->updateOption( 'bruteforce_blacklist_usernames', $black_list_usernames );
296
-
297
- return $value;
298
- }
299
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ use WBCR\Titan\Views;
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * The file contains a short help info.
14
+ *
15
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
+ * @copyright (c) 2019 Webraftic Ltd
17
+ * @version 1.0
18
+ */
19
+ class Brute_Force extends Base {
20
+
21
+ /**
22
+ * {@inheritdoc}
23
+ */
24
+ public $id = 'bruteforce';
25
+
26
+ /**
27
+ * {@inheritDoc}
28
+ *
29
+ * @var string
30
+ */
31
+ public $page_parent_page = "firewall";
32
+
33
+ /**
34
+ * {@inheritdoc}
35
+ */
36
+ public $page_menu_dashicon = 'dashicons-tagcloud';
37
+
38
+ /**
39
+ * {@inheritdoc}
40
+ */
41
+ public $show_right_sidebar_in_options = false;
42
+
43
+ /**
44
+ * @var object|\WBCR\Titan\Views
45
+ */
46
+ public $view;
47
+
48
+
49
+ /**
50
+ * Logs constructor.
51
+ *
52
+ * @param \Wbcr_Factory458_Plugin $plugin
53
+ *
54
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
55
+ *
56
+ */
57
+ public function __construct( \Wbcr_Factory458_Plugin $plugin ) {
58
+ $this->plugin = $plugin;
59
+
60
+ $this->menu_title = __( 'Limit login Attempts', 'titan-security' );
61
+ $this->page_menu_short_description = __( 'Stop login attacks', 'titan-security' );
62
+
63
+ $this->view = \WBCR\Titan\Plugin::app()->view();
64
+
65
+ parent::__construct( $plugin );
66
+ }
67
+
68
+
69
+ /**
70
+ * Enqueue page assets
71
+ *
72
+ * @return void
73
+ * @since 6.2
74
+ * @see Wbcr_FactoryPages457_AdminPage
75
+ *
76
+ */
77
+ public function assets( $scripts, $styles ) {
78
+ parent::assets( $scripts, $styles );
79
+
80
+ if ( $this->plugin->is_premium() ) {
81
+ $this->scripts->request( [
82
+ 'control.checkbox',
83
+ 'control.dropdown',
84
+ 'bootstrap.tooltip',
85
+ 'holder.more-link'
86
+ ], 'bootstrap' );
87
+
88
+ $this->styles->request( [
89
+ 'bootstrap.core',
90
+ 'bootstrap.form-group',
91
+ 'holder.more-link',
92
+ 'bootstrap.separator',
93
+ 'control.dropdown',
94
+ 'control.checkbox'
95
+ ], 'bootstrap' );
96
+
97
+ add_action( 'wbcr/factory/update_option', [ $this, 'before_save' ] );
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Permalinks options.
103
+ *
104
+ * @return mixed[]
105
+ * @since 6.2
106
+ */
107
+ public function getPageOptions() {
108
+
109
+
110
+ $options[] = array(
111
+ 'type' => 'html',
112
+ 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Lockout</strong>.', 'titan-security' ) . '<p>' . __( 'Basic recommended security settings.', 'titan-security' ) . '</p></div>'
113
+ );
114
+
115
+ $options[] = array(
116
+ 'type' => 'checkbox',
117
+ 'way' => 'buttons',
118
+ 'name' => 'bruteforce_enabled',
119
+ 'title' => __( 'Bruteforce enabled', 'titan-security' ),
120
+ 'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
121
+ 'hint' => __( 'Click to enable or disable protection brute force attacks.', 'titan-security' ),
122
+ 'default' => false
123
+ );
124
+
125
+ $options[] = array(
126
+ 'type' => 'checkbox',
127
+ 'way' => 'buttons',
128
+ 'name' => 'bruteforce_gdpr',
129
+ 'title' => __( 'GDPR compliance', 'titan-security' ),
130
+ 'layout' => array( 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ),
131
+ 'hint' => __( 'This makes the plugin GDPR compliant', 'titan-security' ),
132
+ 'default' => false
133
+ );
134
+
135
+ $options[] = array(
136
+ 'type' => 'textbox',
137
+ 'name' => 'bruteforce_allowed_retries',
138
+ 'title' => __( 'Allowed retries', 'titan-security' ),
139
+ 'default' => 4,
140
+ 'filter_value' => [ $this, 'filter_allowed_retries_option' ]
141
+ );
142
+ $options[] = array(
143
+ 'type' => 'textbox',
144
+ 'name' => 'bruteforce_minutes_lockout_raw',
145
+ 'title' => __( 'Minutes lockout', 'titan-security' ),
146
+ 'default' => 20,
147
+ 'filter_value' => [ $this, 'filter_minutes_lockout_option' ]
148
+ );
149
+ $options[] = array(
150
+ 'type' => 'textbox',
151
+ 'name' => 'bruteforce_valid_duration_raw',
152
+ 'title' => __( 'Hours until retries are reset', 'titan-security' ),
153
+ 'default' => 12,
154
+ 'filter_value' => [ $this, 'filter_valid_duration_option' ]
155
+ );
156
+ /*$options[] = array(
157
+ 'type' => 'textbox',
158
+ 'name' => 'bruteforce_allowed_retries',
159
+ 'title' => __('Allowed retries', 'titan-security'),
160
+ 'default' => 4
161
+ );*/
162
+
163
+ $options[] = array(
164
+ 'type' => 'html',
165
+ 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Whitelist</strong>.', 'titan-security' ) . '<p>' . __( 'Basic recommended security settings.', 'titan-security' ) . '</p></div>'
166
+ );
167
+
168
+ $options[] = array(
169
+ 'type' => 'textarea',
170
+ 'name' => 'bruteforce_whitelist_ips_raw',
171
+ 'title' => __( 'Whitelist ips', 'titan-security' ),
172
+ 'hint' => __( 'One IP or IP range (1.2.3.4-5.6.7.8) per line', 'titan-security' ),
173
+ 'default' => '',
174
+ 'filter_value' => [ $this, 'filter_whitelist_ips_option' ]
175
+ );
176
+ $options[] = array(
177
+ 'type' => 'textarea',
178
+ 'name' => 'bruteforce_whitelist_usernames_raw',
179
+ 'title' => __( 'Whitelist usernames', 'titan-security' ),
180
+ 'hint' => __( 'One Username per line', 'titan-security' ),
181
+ 'default' => '',
182
+ 'filter_value' => [ $this, 'filter_whitelist_usernames_option' ]
183
+ );
184
+
185
+ $options[] = array(
186
+ 'type' => 'html',
187
+ 'html' => '<div class="wbcr-factory-page-group-header">' . __( '<strong>Blacklist</strong>.', 'titan-security' ) . '<p>' . __( 'Basic recommended security settings.', 'titan-security' ) . '</p></div>'
188
+ );
189
+
190
+ $options[] = array(
191
+ 'type' => 'textarea',
192
+ 'name' => 'bruteforce_blacklist_ips_raw',
193
+ 'title' => __( 'Blacklist ips', 'titan-security' ),
194
+ 'hint' => __( 'One IP or IP range (1.2.3.4-5.6.7.8) per line', 'titan-security' ),
195
+ 'default' => '',
196
+ 'filter_value' => [ $this, 'filter_blacklist_ips_option' ]
197
+ );
198
+ $options[] = array(
199
+ 'type' => 'textarea',
200
+ 'name' => 'bruteforce_blacklist_usernames_raw',
201
+ 'title' => __( 'Blacklist usernames', 'titan-security' ),
202
+ 'hint' => __( 'One Username per line', 'titan-security' ),
203
+ 'default' => '',
204
+ 'filter_value' => [ $this, 'filter_blacklist_usernames_option' ]
205
+ );
206
+
207
+ $form_options = [];
208
+
209
+ $form_options[] = [
210
+ 'type' => 'form-group',
211
+ 'items' => $options,
212
+ //'cssClass' => 'postbox'
213
+ ];
214
+
215
+ return apply_filters( 'wtitan/tweaks_form/options', $form_options, $this );
216
+ }
217
+
218
+ public function filter_allowed_retries_option( $value ) {
219
+ return (int) $value;
220
+ }
221
+
222
+ public function filter_minutes_lockout_option( $value ) {
223
+ $this->plugin->updateOption( 'bruteforce_minutes_lockout', (int) $value * 60 );
224
+
225
+ return (int) $value;
226
+ }
227
+
228
+ public function filter_valid_duration_option( $value ) {
229
+ $this->plugin->updateOption( 'bruteforce_valid_duration', (int) $value * 3600 );
230
+
231
+ return (int) $value;
232
+ }
233
+
234
+ public function filter_whitelist_ips_option( $value ) {
235
+ $white_list_ips = ( ! empty( $value ) ) ? explode( "\n", str_replace( "\r", "", stripslashes( $value ) ) ) : array();
236
+
237
+ if ( ! empty( $white_list_ips ) ) {
238
+ foreach ( $white_list_ips as $key => $ip ) {
239
+ if ( '' == $ip ) {
240
+ unset( $white_list_ips[ $key ] );
241
+ }
242
+ }
243
+ }
244
+ $this->plugin->updateOption( 'bruteforce_whitelist', $white_list_ips );
245
+
246
+ return $value;
247
+ }
248
+
249
+
250
+ public function filter_whitelist_usernames_option( $value ) {
251
+ $white_list_usernames = ( ! empty( $value ) ) ? explode( "\n", str_replace( "\r", "", stripslashes( $value ) ) ) : array();
252
+
253
+ if ( ! empty( $white_list_usernames ) ) {
254
+ foreach ( $white_list_usernames as $key => $ip ) {
255
+ if ( '' == $ip ) {
256
+ unset( $white_list_usernames[ $key ] );
257
+ }
258
+ }
259
+ }
260
+ $this->plugin->updateOption( 'bruteforce_whitelist_usernames', $white_list_usernames );
261
+
262
+ return $value;
263
+ }
264
+
265
+ public function filter_blacklist_ips_option( $value ) {
266
+ $black_list_ips = ( ! empty( $value ) ) ? explode( "\n", str_replace( "\r", "", stripslashes( $value ) ) ) : array();
267
+
268
+ if ( ! empty( $black_list_ips ) ) {
269
+ foreach ( $black_list_ips as $key => $ip ) {
270
+ /*$range = array_map('trim', explode('-', $ip));
271
+ if( count($range) > 1 && (float)sprintf("%u", ip2long($range[0])) > (float)sprintf("%u", ip2long($range[1])) ) {
272
+ $this->show_error(__('The "' . $ip . '" IP range is invalid', 'titan-security'));
273
+ }*/
274
+ if ( '' == $ip ) {
275
+ unset( $black_list_ips[ $key ] );
276
+ }
277
+ }
278
+ }
279
+
280
+ $this->plugin->updateOption( 'bruteforce_blacklist_ips', $black_list_ips );
281
+
282
+ return $value;
283
+ }
284
+
285
+ public function filter_blacklist_usernames_option( $value ) {
286
+ $black_list_usernames = ( ! empty( $value ) ) ? explode( "\n", str_replace( "\r", "", stripslashes( $value ) ) ) : array();
287
+
288
+ if ( ! empty( $black_list_usernames ) ) {
289
+ foreach ( $black_list_usernames as $key => $ip ) {
290
+ if ( '' == $ip ) {
291
+ unset( $black_list_usernames[ $key ] );
292
+ }
293
+ }
294
+ }
295
+ $this->plugin->updateOption( 'bruteforce_blacklist_usernames', $black_list_usernames );
296
+
297
+ return $value;
298
+ }
299
+ }
admin/pages/firewall/class-pages-firewall-attacks-log.php CHANGED
@@ -1,135 +1,135 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * The file contains a short help info.
12
- *
13
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
14
- * @copyright (c) 2019 Webraftic Ltd
15
- * @version 1.0
16
- */
17
- class Firewall_Attacks_Log extends Base {
18
-
19
- /**
20
- * {@inheritdoc}
21
- */
22
- public $id = 'firewall-attack-log';
23
-
24
- /**
25
- * {@inheritDoc}
26
- *
27
- * @since 6.0
28
- * @var string
29
- */
30
- public $type = 'page';
31
-
32
- /**
33
- * {@inheritDoc}
34
- *
35
- * @since 6.0
36
- * @var string
37
- */
38
- public $page_menu_dashicon = 'dashicons-testimonial';
39
-
40
- /**
41
- * {@inheritDoc}
42
- *
43
- * @var string
44
- */
45
- public $page_parent_page = "firewall";
46
-
47
-
48
- /**
49
- * {@inheritdoc}
50
- */
51
- public $show_right_sidebar_in_options = false;
52
-
53
-
54
- /**
55
- * @var object|\WBCR\Titan\Views
56
- */
57
- public $view;
58
-
59
- /**
60
- * @var object|\WBCR\Titan\Model\Firewall
61
- */
62
- public $firewall;
63
-
64
- /**
65
- * Logs constructor.
66
- *
67
- * @param \Wbcr_Factory454_Plugin $plugin
68
- *
69
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
70
- *
71
- */
72
- public function __construct( $plugin ) {
73
- $this->plugin = $plugin;
74
-
75
- $this->menu_title = __( 'Attacks log', 'titan-security' );
76
- $this->page_menu_short_description = __( 'Attacks log', 'titan-security' );
77
-
78
- $this->view = \WBCR\Titan\Plugin::app()->view();
79
-
80
- parent::__construct( $plugin );
81
- }
82
-
83
-
84
- /**
85
- * {@inheritdoc}
86
- *
87
- * @return void
88
- * @since 1.0.0
89
- */
90
- public function assets( $scripts, $styles ) {
91
- parent::assets( $scripts, $styles );
92
-
93
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-attacks-log.css' );
94
- }
95
-
96
-
97
- /**
98
- * {@inheritdoc}
99
- */
100
- public function showPageContent() {
101
-
102
- ?>
103
- <div class="wbcr-factory-page-group-header">
104
- <strong><?php _e( 'Attack list', 'titan-security' ) ?></strong>
105
- <p>
106
- <?php _e( 'In this table, you can see the attacks on your site that the Titan firewall repelled.', 'titan-security' ) ?>
107
- </p>
108
- </div>
109
-
110
- <div class="wtitan-attacks-log wtitan-section-disabled">
111
- <table class="wtitan-attacks-log__table wp-list-table widefat striped plugins wp-list-table__plugins">
112
- <thead>
113
- <tr>
114
- <th class='wtitan-attacks-log__table-column'>
115
- <strong><?php _e( 'IP', 'titan-security' ); ?></strong></th>
116
- <th class='wtitan-attacks-log__table-column'>
117
- <strong><?php _e( 'Event', 'titan-security' ); ?></strong>
118
- </th>
119
- <th class='wtitan-attacks-log__table-column'>
120
- <strong><?php _e( '...', 'titan-security' ); ?></strong>
121
- </th>
122
-
123
- <th class='wtitan-attacks-log__table-column'>
124
- <strong><?php _e( 'Attack time', 'titan-security' ); ?></strong>
125
- </th>
126
- </tr>
127
- </thead>
128
- <tbody id="the-list">
129
- </tbody>
130
- </table>
131
-
132
- </div>
133
- <?php
134
- }
135
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * The file contains a short help info.
12
+ *
13
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
14
+ * @copyright (c) 2019 Webraftic Ltd
15
+ * @version 1.0
16
+ */
17
+ class Firewall_Attacks_Log extends Base {
18
+
19
+ /**
20
+ * {@inheritdoc}
21
+ */
22
+ public $id = 'firewall-attack-log';
23
+
24
+ /**
25
+ * {@inheritDoc}
26
+ *
27
+ * @since 6.0
28
+ * @var string
29
+ */
30
+ public $type = 'page';
31
+
32
+ /**
33
+ * {@inheritDoc}
34
+ *
35
+ * @since 6.0
36
+ * @var string
37
+ */
38
+ public $page_menu_dashicon = 'dashicons-testimonial';
39
+
40
+ /**
41
+ * {@inheritDoc}
42
+ *
43
+ * @var string
44
+ */
45
+ public $page_parent_page = "firewall";
46
+
47
+
48
+ /**
49
+ * {@inheritdoc}
50
+ */
51
+ public $show_right_sidebar_in_options = false;
52
+
53
+
54
+ /**
55
+ * @var object|\WBCR\Titan\Views
56
+ */
57
+ public $view;
58
+
59
+ /**
60
+ * @var object|\WBCR\Titan\Model\Firewall
61
+ */
62
+ public $firewall;
63
+
64
+ /**
65
+ * Logs constructor.
66
+ *
67
+ * @param \Wbcr_Factory458_Plugin $plugin
68
+ *
69
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
70
+ *
71
+ */
72
+ public function __construct( $plugin ) {
73
+ $this->plugin = $plugin;
74
+
75
+ $this->menu_title = __( 'Attacks log', 'titan-security' );
76
+ $this->page_menu_short_description = __( 'Attacks log', 'titan-security' );
77
+
78
+ $this->view = \WBCR\Titan\Plugin::app()->view();
79
+
80
+ parent::__construct( $plugin );
81
+ }
82
+
83
+
84
+ /**
85
+ * {@inheritdoc}
86
+ *
87
+ * @return void
88
+ * @since 1.0.0
89
+ */
90
+ public function assets( $scripts, $styles ) {
91
+ parent::assets( $scripts, $styles );
92
+
93
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-attacks-log.css' );
94
+ }
95
+
96
+
97
+ /**
98
+ * {@inheritdoc}
99
+ */
100
+ public function showPageContent() {
101
+
102
+ ?>
103
+ <div class="wbcr-factory-page-group-header">
104
+ <strong><?php _e( 'Attack list', 'titan-security' ) ?></strong>
105
+ <p>
106
+ <?php _e( 'In this table, you can see the attacks on your site that the Titan firewall repelled.', 'titan-security' ) ?>
107
+ </p>
108
+ </div>
109
+
110
+ <div class="wtitan-attacks-log wtitan-section-disabled">
111
+ <table class="wtitan-attacks-log__table wp-list-table widefat striped plugins wp-list-table__plugins">
112
+ <thead>
113
+ <tr>
114
+ <th class='wtitan-attacks-log__table-column'>
115
+ <strong><?php _e( 'IP', 'titan-security' ); ?></strong></th>
116
+ <th class='wtitan-attacks-log__table-column'>
117
+ <strong><?php _e( 'Event', 'titan-security' ); ?></strong>
118
+ </th>
119
+ <th class='wtitan-attacks-log__table-column'>
120
+ <strong><?php _e( '...', 'titan-security' ); ?></strong>
121
+ </th>
122
+
123
+ <th class='wtitan-attacks-log__table-column'>
124
+ <strong><?php _e( 'Attack time', 'titan-security' ); ?></strong>
125
+ </th>
126
+ </tr>
127
+ </thead>
128
+ <tbody id="the-list">
129
+ </tbody>
130
+ </table>
131
+
132
+ </div>
133
+ <?php
134
+ }
135
+ }
admin/pages/firewall/class-pages-firewall-blocking.php CHANGED
@@ -1,153 +1,153 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * Страница общих настроек для этого плагина.
12
- *
13
- * Не поддерживает режим работы с мультисаймами.
14
- *
15
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
- * @copyright (c) 2019 Webraftic Ltd
17
- * @version 1.0
18
- */
19
- class Firewall_Blocking extends Base {
20
-
21
- /**
22
- * {@inheritDoc}
23
- *
24
- * @since 6.0
25
- * @var string
26
- */
27
- public $id = "firewall-blocking";
28
-
29
- /**
30
- * {@inheritDoc}
31
- *
32
- * @since 6.0
33
- * @var string
34
- */
35
- public $type = 'page';
36
-
37
- /**
38
- * {@inheritDoc}
39
- *
40
- * @since 6.0
41
- * @var string
42
- */
43
- public $page_menu_dashicon = 'dashicons-testimonial';
44
-
45
- /**
46
- * {@inheritDoc}
47
- *
48
- * @var string
49
- */
50
- public $page_parent_page = "firewall";
51
-
52
- /**
53
- * {@inheritDoc}
54
- *
55
- * @since 6.0
56
- * @var bool
57
- */
58
- public $show_right_sidebar_in_options = false;
59
-
60
- /**
61
- * @var object|\WBCR\Titan\Views
62
- */
63
- public $view;
64
-
65
- /**
66
- * WBCR\Page\Settings constructor.
67
- *
68
- * @param \Wbcr_Factory454_Plugin $plugin
69
- *
70
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
71
- *
72
- */
73
- public function __construct( $plugin ) {
74
- $this->menu_title = __( 'Blocking', 'titan-security' );
75
- $this->page_menu_short_description = __( 'Firewall blocking', 'titan-security' );
76
-
77
- parent::__construct( $plugin );
78
-
79
- $this->plugin = $plugin;
80
- $this->view = \WBCR\Titan\Plugin::app()->view();
81
- }
82
-
83
- /**
84
- * Enqueue page assets
85
- *
86
- * @return void
87
- * @since 6.2
88
- * @see Wbcr_FactoryPages453_AdminPage
89
- *
90
- */
91
- public function assets( $scripts, $styles ) {
92
- parent::assets( $scripts, $styles );
93
-
94
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-ips-blocking.css' );
95
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/libs/sweetalert2.css' );
96
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/sweetalert-custom.css' );
97
-
98
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/libs/sweetalert3.min.js' );
99
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/firewall/firewall-block-ip.js' );
100
- }
101
-
102
- public function showPageContent() {
103
- ?>
104
- <div class="wbcr-factory-page-group-header">
105
- <strong>Blocking Ip.</strong>
106
- <p>Blocking Ip.</p>
107
- </div>
108
- <div class="wtitan-ips-blocking wtitan-section-disabled">
109
- <ul class="wtitan-ips-blocking__controls">
110
- <li class="wtitan-ips-blocking__controls-left">
111
- <input type="text"
112
- placeholder="<?php _e( 'Filter by Type, Detail, or Reason', 'titan-security' ) ?>"
113
- style="width:200px;">
114
- <a href="#" id="wf-blocks-apply-filter"
115
- class="btn btn-default"><?php _e( 'Filter', 'titan-security' ) ?></a>
116
- </li>
117
- <li class="wtitan-ips-blocking__controls-right">
118
- <a href="#" id="wtitan-blocks-ips" data-nonce="<?php echo wp_create_nonce( 'wtitan_block_ip' ) ?>"
119
- class="btn btn-primary">Block
120
- <?php _e( 'Ip Address', 'titan-security' ) ?>
121
- </a>
122
- <a href="#" id="blocks-bulk-unblock" class="btn btn-default disabled">
123
- <?php _e( 'Unblock', 'titan-security' ) ?>
124
- </a>&nbsp; &nbsp;
125
- <a href="#" id="blocks-bulk-make-permanent" class="btn btn-default disabled">
126
- <?php _e( 'Make Permanent', 'titan-security' ) ?>
127
- </a>
128
- </li>
129
- </ul>
130
-
131
- <table class="wtitan-ips-blocking__table">
132
- <thead>
133
- <tr class="wf-blocks-columns">
134
- <th style="width: 2%;text-align: center">
135
- <input type="checkbox">
136
- </th>
137
- <th data-column="type"><?php _e( 'Block Type', 'titan-security' ) ?></th>
138
- <th data-column="detail"><?php _e( 'Detail', 'titan-security' ) ?></th>
139
- <th data-column="ruleAdded"><?php _e( 'Rule Added', 'titan-security' ) ?></th>
140
- <th data-column="reason"><?php _e( 'Reason', 'titan-security' ) ?></th>
141
- <th data-column="expiration"><?php _e( 'Expiration', 'titan-security' ) ?></th>
142
- <th data-column="blockCount"><?php _e( 'Block Count', 'titan-security' ) ?></th>
143
- <th data-column="lastAttempt"><?php _e( 'Last Attempt', 'titan-security' ) ?></th>
144
- </tr>
145
- </thead>
146
- <tbody></tbody>
147
- <tfoot></tfoot>
148
- </table>
149
- </div>
150
- <?php
151
- }
152
-
153
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * Страница общих настроек для этого плагина.
12
+ *
13
+ * Не поддерживает режим работы с мультисаймами.
14
+ *
15
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
+ * @copyright (c) 2019 Webraftic Ltd
17
+ * @version 1.0
18
+ */
19
+ class Firewall_Blocking extends Base {
20
+
21
+ /**
22
+ * {@inheritDoc}
23
+ *
24
+ * @since 6.0
25
+ * @var string
26
+ */
27
+ public $id = "firewall-blocking";
28
+
29
+ /**
30
+ * {@inheritDoc}
31
+ *
32
+ * @since 6.0
33
+ * @var string
34
+ */
35
+ public $type = 'page';
36
+
37
+ /**
38
+ * {@inheritDoc}
39
+ *
40
+ * @since 6.0
41
+ * @var string
42
+ */
43
+ public $page_menu_dashicon = 'dashicons-testimonial';
44
+
45
+ /**
46
+ * {@inheritDoc}
47
+ *
48
+ * @var string
49
+ */
50
+ public $page_parent_page = "firewall";
51
+
52
+ /**
53
+ * {@inheritDoc}
54
+ *
55
+ * @since 6.0
56
+ * @var bool
57
+ */
58
+ public $show_right_sidebar_in_options = false;
59
+
60
+ /**
61
+ * @var object|\WBCR\Titan\Views
62
+ */
63
+ public $view;
64
+
65
+ /**
66
+ * WBCR\Page\Settings constructor.
67
+ *
68
+ * @param \Wbcr_Factory458_Plugin $plugin
69
+ *
70
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
71
+ *
72
+ */
73
+ public function __construct( $plugin ) {
74
+ $this->menu_title = __( 'Blocking', 'titan-security' );
75
+ $this->page_menu_short_description = __( 'Firewall blocking', 'titan-security' );
76
+
77
+ parent::__construct( $plugin );
78
+
79
+ $this->plugin = $plugin;
80
+ $this->view = \WBCR\Titan\Plugin::app()->view();
81
+ }
82
+
83
+ /**
84
+ * Enqueue page assets
85
+ *
86
+ * @return void
87
+ * @since 6.2
88
+ * @see Wbcr_FactoryPages457_AdminPage
89
+ *
90
+ */
91
+ public function assets( $scripts, $styles ) {
92
+ parent::assets( $scripts, $styles );
93
+
94
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-ips-blocking.css' );
95
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/libs/sweetalert2.css' );
96
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/sweetalert-custom.css' );
97
+
98
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/libs/sweetalert3.min.js' );
99
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/firewall/firewall-block-ip.js' );
100
+ }
101
+
102
+ public function showPageContent() {
103
+ ?>
104
+ <div class="wbcr-factory-page-group-header">
105
+ <strong>Blocking Ip.</strong>
106
+ <p>Blocking Ip.</p>
107
+ </div>
108
+ <div class="wtitan-ips-blocking wtitan-section-disabled">
109
+ <ul class="wtitan-ips-blocking__controls">
110
+ <li class="wtitan-ips-blocking__controls-left">
111
+ <input type="text"
112
+ placeholder="<?php _e( 'Filter by Type, Detail, or Reason', 'titan-security' ) ?>"
113
+ style="width:200px;">
114
+ <a href="#" id="wf-blocks-apply-filter"
115
+ class="btn btn-default"><?php _e( 'Filter', 'titan-security' ) ?></a>
116
+ </li>
117
+ <li class="wtitan-ips-blocking__controls-right">
118
+ <a href="#" id="wtitan-blocks-ips" data-nonce="<?php echo wp_create_nonce( 'wtitan_block_ip' ) ?>"
119
+ class="btn btn-primary">Block
120
+ <?php _e( 'Ip Address', 'titan-security' ) ?>
121
+ </a>
122
+ <a href="#" id="blocks-bulk-unblock" class="btn btn-default disabled">
123
+ <?php _e( 'Unblock', 'titan-security' ) ?>
124
+ </a>&nbsp; &nbsp;
125
+ <a href="#" id="blocks-bulk-make-permanent" class="btn btn-default disabled">
126
+ <?php _e( 'Make Permanent', 'titan-security' ) ?>
127
+ </a>
128
+ </li>
129
+ </ul>
130
+
131
+ <table class="wtitan-ips-blocking__table">
132
+ <thead>
133
+ <tr class="wf-blocks-columns">
134
+ <th style="width: 2%;text-align: center">
135
+ <input type="checkbox">
136
+ </th>
137
+ <th data-column="type"><?php _e( 'Block Type', 'titan-security' ) ?></th>
138
+ <th data-column="detail"><?php _e( 'Detail', 'titan-security' ) ?></th>
139
+ <th data-column="ruleAdded"><?php _e( 'Rule Added', 'titan-security' ) ?></th>
140
+ <th data-column="reason"><?php _e( 'Reason', 'titan-security' ) ?></th>
141
+ <th data-column="expiration"><?php _e( 'Expiration', 'titan-security' ) ?></th>
142
+ <th data-column="blockCount"><?php _e( 'Block Count', 'titan-security' ) ?></th>
143
+ <th data-column="lastAttempt"><?php _e( 'Last Attempt', 'titan-security' ) ?></th>
144
+ </tr>
145
+ </thead>
146
+ <tbody></tbody>
147
+ <tfoot></tfoot>
148
+ </table>
149
+ </div>
150
+ <?php
151
+ }
152
+
153
+ }
admin/pages/firewall/class-pages-firewall-login-attempts.php CHANGED
@@ -1,161 +1,161 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * The file contains a short help info.
12
- *
13
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
14
- * @copyright (c) 2019 Webraftic Ltd
15
- * @version 1.0
16
- */
17
- class Firewall_Login_Attempts extends Base {
18
-
19
- /**
20
- * {@inheritdoc}
21
- */
22
- public $id = 'firewall-activity-log';
23
-
24
- /**
25
- * {@inheritDoc}
26
- *
27
- * @since 6.0
28
- * @var string
29
- */
30
- public $type = 'page';
31
-
32
- /**
33
- * {@inheritDoc}
34
- *
35
- * @since 6.0
36
- * @var string
37
- */
38
- public $page_menu_dashicon = 'dashicons-testimonial';
39
-
40
- /**
41
- * {@inheritDoc}
42
- *
43
- * @var string
44
- */
45
- public $page_parent_page = "firewall";
46
-
47
-
48
- /**
49
- * {@inheritdoc}
50
- */
51
- public $show_right_sidebar_in_options = false;
52
-
53
-
54
- /**
55
- * @var object|\WBCR\Titan\Views
56
- */
57
- public $view;
58
-
59
- /**
60
- * @var object|\WBCR\Titan\Model\Firewall
61
- */
62
- public $firewall;
63
-
64
- /**
65
- * Logs constructor.
66
- *
67
- * @param \Wbcr_Factory454_Plugin $plugin
68
- *
69
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
70
- *
71
- */
72
- public function __construct( $plugin ) {
73
- $this->plugin = $plugin;
74
-
75
- $this->menu_title = __( 'Login Attempts Log', 'titan-security' );
76
- $this->page_menu_short_description = __( 'Login Attempts', 'titan-security' );
77
-
78
- $this->view = \WBCR\Titan\Plugin::app()->view();
79
-
80
- parent::__construct( $plugin );
81
- }
82
-
83
-
84
- /**
85
- * {@inheritdoc}
86
- *
87
- * @return void
88
- * @since 1.0.0
89
- */
90
- public function assets( $scripts, $styles ) {
91
- parent::assets( $scripts, $styles );
92
-
93
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall-attacks-log.css' );
94
- }
95
-
96
- /**
97
- * {@inheritdoc}
98
- */
99
- public function showPageContent() {
100
- require_once( WTITAN_PLUGIN_DIR . '/includes/bruteforce/class-helpers.php' );
101
-
102
- $lockouts = (array) $this->get_option( 'bruteforce_lockouts' );
103
- $lockouts_log = $this->plugin->getOption( 'bruteforce_logged' );
104
- $log = \WBCR\Titan\Bruteforce\Helpers::sorted_log_by_date( $lockouts_log );
105
- ?>
106
- <div class="wbcr-factory-page-group-header">
107
- <strong><?php _e( 'Login Attempts', 'titan-security' ) ?></strong>
108
- <p>
109
- <?php _e( 'In this table, you can see the attacks on your site that the Titan firewall repelled.', 'titan-security' ) ?>
110
- </p>
111
- </div>
112
-
113
- <div class="wtitan-attacks-log">
114
-
115
- <table class="wtitan-attacks-log__table wp-list-table widefat striped plugins wp-list-table__plugins">
116
- <thead>
117
- <tr>
118
- <th class='wtitan-attacks-log__table-column'>
119
- <strong><?php _e( 'Date', 'titan-security' ); ?></strong>
120
- </th>
121
- <th class='wtitan-attacks-log__table-column'>
122
- <strong><?php _e( 'IP', 'titan-security' ); ?></strong></th>
123
- <th class='wtitan-attacks-log__table-column'>
124
- <strong><?php _e( 'Tried to log in as', 'titan-security' ); ?></strong>
125
- </th>
126
- <th class='wtitan-attacks-log__table-column'>
127
- <strong><?php _e( 'Gateway', 'titan-security' ); ?></strong>
128
- </th>
129
- </tr>
130
- </thead>
131
- <tbody id="the-list">
132
- <?php if ( ! empty( $log ) ): ?>
133
- <?php foreach ( $log as $date => $user_info ): ?>
134
- <tr>
135
- <td class="wtitan-attacks-log__table-column">
136
- <?php echo date_i18n( 'F d, Y H:i', $date ); ?>
137
- </td>
138
- <td class="wtitan-attacks-log__table-column">
139
- <?php echo esc_html( $user_info['ip'] ); ?>
140
- </td>
141
- <td class="wtitan-attacks-log__table-column">
142
- <?php echo esc_html( $user_info['username'] ) . ' (' . esc_html( $user_info['counter'] ) . ' lockouts)'; ?>
143
- </td>
144
- <td class="wtitan-attacks-log__table-column">
145
- <?php if ( ! empty( $lockouts[ $user_info['ip'] ] ) && $lockouts[ $user_info['ip'] ] > time() ) : ?>
146
- <a href="#" class="button limit-login-unlock"
147
- data-ip="<?= esc_attr( $user_info['ip'] ) ?>"
148
- data-username="<?= esc_attr( $user_info['username'] ) ?>">Unlock</a>
149
- <?php elseif ( $user_info['unlocked'] ): ?>
150
- Unlocked
151
- <?php endif ?>
152
- </td>
153
- </tr>
154
- <?php endforeach; ?>
155
- <?php endif; ?>
156
- </tbody>
157
- </table>
158
- </div>
159
- <?php
160
- }
161
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * The file contains a short help info.
12
+ *
13
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
14
+ * @copyright (c) 2019 Webraftic Ltd
15
+ * @version 1.0
16
+ */
17
+ class Firewall_Login_Attempts extends Base {
18
+
19
+ /**
20
+ * {@inheritdoc}
21
+ */
22
+ public $id = 'firewall-activity-log';
23
+
24
+ /**
25
+ * {@inheritDoc}
26
+ *
27
+ * @since 6.0
28
+ * @var string
29
+ */
30
+ public $type = 'page';
31
+
32
+ /**
33
+ * {@inheritDoc}
34
+ *
35
+ * @since 6.0
36
+ * @var string
37
+ */
38
+ public $page_menu_dashicon = 'dashicons-testimonial';
39
+
40
+ /**
41
+ * {@inheritDoc}
42
+ *
43
+ * @var string
44
+ */
45
+ public $page_parent_page = "firewall";
46
+
47
+
48
+ /**
49
+ * {@inheritdoc}
50
+ */
51
+ public $show_right_sidebar_in_options = false;
52
+
53
+
54
+ /**
55
+ * @var object|\WBCR\Titan\Views
56
+ */
57
+ public $view;
58
+
59
+ /**
60
+ * @var object|\WBCR\Titan\Model\Firewall
61
+ */
62
+ public $firewall;
63
+
64
+ /**
65
+ * Logs constructor.
66
+ *
67
+ * @param \Wbcr_Factory458_Plugin $plugin
68
+ *
69
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
70
+ *
71
+ */
72
+ public function __construct( $plugin ) {
73
+ $this->plugin = $plugin;
74
+
75
+ $this->menu_title = __( 'Login Attempts Log', 'titan-security' );
76
+ $this->page_menu_short_description = __( 'Login Attempts', 'titan-security' );
77
+
78
+ $this->view = \WBCR\Titan\Plugin::app()->view();
79
+
80
+ parent::__construct( $plugin );
81
+ }
82
+
83
+
84
+ /**
85
+ * {@inheritdoc}
86
+ *
87
+ * @return void
88
+ * @since 1.0.0
89
+ */
90
+ public function assets( $scripts, $styles ) {
91
+ parent::assets( $scripts, $styles );
92
+
93
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall-attacks-log.css' );
94
+ }
95
+
96
+ /**
97
+ * {@inheritdoc}
98
+ */
99
+ public function showPageContent() {
100
+ require_once( WTITAN_PLUGIN_DIR . '/includes/bruteforce/class-helpers.php' );
101
+
102
+ $lockouts = (array) $this->get_option( 'bruteforce_lockouts' );
103
+ $lockouts_log = $this->plugin->getOption( 'bruteforce_logged' );
104
+ $log = \WBCR\Titan\Bruteforce\Helpers::sorted_log_by_date( $lockouts_log );
105
+ ?>
106
+ <div class="wbcr-factory-page-group-header">
107
+ <strong><?php _e( 'Login Attempts', 'titan-security' ) ?></strong>
108
+ <p>
109
+ <?php _e( 'In this table, you can see the attacks on your site that the Titan firewall repelled.', 'titan-security' ) ?>
110
+ </p>
111
+ </div>
112
+
113
+ <div class="wtitan-attacks-log">
114
+
115
+ <table class="wtitan-attacks-log__table wp-list-table widefat striped plugins wp-list-table__plugins">
116
+ <thead>
117
+ <tr>
118
+ <th class='wtitan-attacks-log__table-column'>
119
+ <strong><?php _e( 'Date', 'titan-security' ); ?></strong>
120
+ </th>
121
+ <th class='wtitan-attacks-log__table-column'>
122
+ <strong><?php _e( 'IP', 'titan-security' ); ?></strong></th>
123
+ <th class='wtitan-attacks-log__table-column'>
124
+ <strong><?php _e( 'Tried to log in as', 'titan-security' ); ?></strong>
125
+ </th>
126
+ <th class='wtitan-attacks-log__table-column'>
127
+ <strong><?php _e( 'Gateway', 'titan-security' ); ?></strong>
128
+ </th>
129
+ </tr>
130
+ </thead>
131
+ <tbody id="the-list">
132
+ <?php if ( ! empty( $log ) ): ?>
133
+ <?php foreach ( $log as $date => $user_info ): ?>
134
+ <tr>
135
+ <td class="wtitan-attacks-log__table-column">
136
+ <?php echo date_i18n( 'F d, Y H:i', $date ); ?>
137
+ </td>
138
+ <td class="wtitan-attacks-log__table-column">
139
+ <?php echo esc_html( $user_info['ip'] ); ?>
140
+ </td>
141
+ <td class="wtitan-attacks-log__table-column">
142
+ <?php echo esc_html( $user_info['username'] ) . ' (' . esc_html( $user_info['counter'] ) . ' lockouts)'; ?>
143
+ </td>
144
+ <td class="wtitan-attacks-log__table-column">
145
+ <?php if ( ! empty( $lockouts[ $user_info['ip'] ] ) && $lockouts[ $user_info['ip'] ] > time() ) : ?>
146
+ <a href="#" class="button limit-login-unlock"
147
+ data-ip="<?= esc_attr( $user_info['ip'] ) ?>"
148
+ data-username="<?= esc_attr( $user_info['username'] ) ?>">Unlock</a>
149
+ <?php elseif ( $user_info['unlocked'] ): ?>
150
+ Unlocked
151
+ <?php endif ?>
152
+ </td>
153
+ </tr>
154
+ <?php endforeach; ?>
155
+ <?php endif; ?>
156
+ </tbody>
157
+ </table>
158
+ </div>
159
+ <?php
160
+ }
161
+ }
admin/pages/firewall/class-pages-firewall-settings.php CHANGED
@@ -1,746 +1,746 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- if ( ! defined( 'ABSPATH' ) ) {
7
- exit;
8
- }
9
-
10
- /**
11
- * Страница общих настроек для этого плагина.
12
- *
13
- * Не поддерживает режим работы с мультисаймами.
14
- *
15
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
- * @copyright (c) 2019 Webraftic Ltd
17
- * @version 1.0
18
- */
19
- class Firewall_Settings extends Base {
20
-
21
- /**
22
- * {@inheritDoc}
23
- *
24
- * @since 6.0
25
- * @var string
26
- */
27
- public $id = "firewall-settings";
28
-
29
- /**
30
- * {@inheritDoc}
31
- *
32
- * @var string
33
- */
34
- public $page_parent_page = "firewall";
35
-
36
- /**
37
- * {@inheritDoc}
38
- *
39
- * @since 6.0
40
- * @var string
41
- */
42
- public $page_menu_dashicon = 'dashicons-testimonial';
43
-
44
- /**
45
- * {@inheritDoc}
46
- *
47
- * @since 6.0
48
- * @var bool
49
- */
50
- public $show_right_sidebar_in_options = false;
51
-
52
- /**
53
- * WBCR\Page\Settings constructor.
54
- *
55
- * @param \Wbcr_Factory454_Plugin $plugin
56
- *
57
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
58
- *
59
- */
60
- public function __construct( $plugin ) {
61
- $this->menu_title = __( 'Settings', 'titan-security' );
62
- $this->page_menu_short_description = __( 'Firewall settings', 'titan-security' );
63
-
64
- parent::__construct( $plugin );
65
-
66
- $this->plugin = $plugin;
67
- }
68
-
69
- public $rules = array();
70
-
71
- /**
72
- * Enqueue page assets
73
- *
74
- * @return void
75
- * @since 6.2
76
- * @see Wbcr_FactoryPages453_AdminPage
77
- *
78
- */
79
- public function assets( $scripts, $styles ) {
80
- parent::assets( $scripts, $styles );
81
-
82
- $this->scripts->request( [
83
- 'control.checkbox',
84
- 'control.dropdown',
85
- 'bootstrap.tooltip',
86
- 'holder.more-link'
87
- ], 'bootstrap' );
88
-
89
- $this->styles->request( [
90
- 'bootstrap.core',
91
- 'bootstrap.form-group',
92
- 'holder.more-link',
93
- 'bootstrap.separator',
94
- 'control.dropdown',
95
- 'control.checkbox'
96
- ], 'bootstrap' );
97
-
98
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-settings.css' );
99
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/firewall/firewall-settings.js' );
100
-
101
- add_action( 'wbcr/factory/update_option', [ $this, 'before_save' ] );
102
- }
103
-
104
- /**
105
- * Permalinks options.
106
- *
107
- * @return mixed[]
108
- * @since 6.2
109
- */
110
- public function getPageOptions() {
111
- $is_premium = \WBCR\Titan\Plugin::app()->premium->is_active() && \WBCR\Titan\Plugin::app()->premium->is_install_package();
112
-
113
- $options[] = [
114
- 'type' => 'html',
115
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Base Options.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
116
- ];
117
- $options[] = [
118
- 'type' => 'dropdown',
119
- 'name' => 'howget_ip',
120
- 'way' => 'buttons',
121
- 'title' => __( 'How does Titan get IPs ', 'titan-security' ),
122
- 'data' => [
123
- [
124
- '',
125
- __( 'Default', 'titan-security' ),
126
- __( 'Let Titan use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites. (Recommended)', 'titan-security' )
127
- ],
128
- [
129
- 'REMOTE_ADDR',
130
- __( 'REMOTE_ADDR', 'titan-security' ),
131
- __( 'Use PHP\'s built in REMOTE_ADDR and don\'t use anything else. Very secure if this is compatible with your site.', 'titan-security' )
132
- ],
133
- [
134
- 'HTTP_X_FORWARDED_FOR',
135
- __( 'HTTP_X_FORWARDED_FOR', 'titan-security' ),
136
- __( 'Use the X-Forwarded-For HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'titan-security' )
137
- ],
138
- [
139
- 'HTTP_X_REAL_IP',
140
- __( 'HTTP_X_REAL_IP', 'titan-security' ),
141
- __( 'Use the X-Real-IP HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'titan-security' )
142
- ],
143
- [
144
- 'HTTP_CF_CONNECTING_IP',
145
- __( 'HTTP_CF_CONNECTING_IP', 'titan-security' ),
146
- __( 'Use the Cloudflare "CF-Connecting-IP" HTTP header to get a visitor IP. Only use if you\'re using Cloudflare.', 'titan-security' )
147
- ]
148
- ],
149
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
150
- 'hint' => __( 'Titan needs to determine each visitor’s IP address to provide security functions on your website. The Titan default configuration works just fine for most websites, but it’s important that this configuration is correct. For example, if Titan is not receiving IP addresses correctly and thinks an external visitor originates from a private address, it will whitelist that visitor and bypass security protocols. You can read more about which addresses Titan considers private here.
151
-
152
- The Titan scanner has an option to “Scan for misconfigured How does Titan get IPs”. This scan feature can help you detect if the wrong option has been selected for “How does Titan get IPs.”
153
-
154
- Another way of determining if Titan is getting IPs correctly is to check the “IPs” section in the Titan Tools > Diagnostics.
155
-
156
- Let Titan use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites.
157
- This is the default mode of operation for Titan. Titan will try to get a valid IP address from PHP and if that doesn’t work, it will look at data that a firewall or reverse proxy sends in case your website uses this configuration.
158
-
159
- This option provides a good balance between security and compatibility.
160
-
161
- Use PHP’s built in REMOTE_ADDR and don’t use anything else. Very secure if this is compatible with your site.
162
- If you know that you definitely don’t use a reverse proxy, cache, Cloudflare, CDN or anything else in front of your web server that “proxies” traffic to your website, and if you are sure that your website is just a standalone PHP web server, then using this option will work and is the most secure in a non-proxy or load balancer configuration.
163
-
164
- You may also want to select this option for other reasons – for example to force Titan to use the $_SERVER[‘REMOTE_ADDR’] variable in PHP.
165
-
166
- Use the X-Forwarded-For HTTP header. Only use if you have a front-end proxy or spoofing may result.
167
- If you are using Nginx or another load balancer as a front-end-proxy or load balancer in front of your web server, and the front-end server sends IP addresses to the web server that runs WordPress using the HTTP X-Forwarded-For header, then you should enable this option.
168
-
169
- Be careful about enabling this option if you do not have a front-end-proxy, load balancer, or CDN configuration, because it will then allow visitors to spoof their IP address and you will also miss many hits that should have been logged.
170
-
171
- Use the X-Real-IP HTTP header. Only use if you have a front-end proxy or spoofing may result.
172
- As with the X-Forwarded-For option above, only use this option if you are sure that you want Titan to retrieve the visitor IP address from the X-Real-IP HTTP header, and do not enable this if you don’t have a front-end proxy or load balancer that is sending visits to your real web server and adding the X-Real-IP header.
173
-
174
- Use the Cloudflare “CF-Connecting-IP” HTTP header to get a visitor IP. Only use if you’re using Cloudflare.
175
- Titan is fully compatible with CloudFlare, and in some configurations Cloudflare will send the real visitor IP address to your web server using the CF-Connecting-IP HTTP header. If the CloudFlare support personnel have advised you that this is the case, then enable this option on Titan to ensure that Titan is able to get your visitor IP address.
176
-
177
- Note that Cloudflare has several configurations including their own web server module that takes care of detecting the visitor IP address, so be sure to work with their technical support staff and read their documentation to determine which configuration you’re using.
178
-
179
- Multiple IPs detected
180
- If your host requires using the X-Forwarded-For header, there may be multiple IP addresses detected. If your own IP address does not appear where it shows “Your IP with this setting,” you may need to add trusted proxies.
181
-
182
- If you do not know whether your host uses more than one proxy address, contact your host or the reverse-proxy service that you use. If you know there is only one proxy address, it should be the last address in the “Detected IPs” field.
183
-
184
- Once you know which proxies to trust, click the + Edit trusted proxies link below the detected IPs.
185
- In the Trusted proxies field that appears, enter the IP addresses of the proxies. You can enter a single IP like 10.0.0.15. You can also enter a “CIDR” range like 10.0.0.0/24. Note that your host’s trusted IPs should not be the same addresses in these examples.
186
- Click Save Options to save the changes, and check that your IP appears correctly in the “Your IP with this setting” field.', 'titan-security' ) . '<br><b>Clearfy</b>: ' . __( 'Disable admin top bar.', 'titan-security' ),
187
- 'default' => '',
188
- 'filter_value' => [ $this, 'filter_howget_ip_option' ],
189
- 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
190
- ];
191
-
192
- $options[] = [
193
- 'type' => 'textarea',
194
- 'name' => 'howget_ips_trusted_proxies',
195
- 'title' => __( 'Trusted Proxies', 'titan-security' ),
196
- //'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
197
- 'hint' => __( 'These IPs (or CIDR ranges) will be ignored when determining the requesting IP via the X-Forwarded-For HTTP header. Enter one IP or CIDR range per line.', 'titan-security' ),
198
- 'default' => '',
199
- //'filter_value' => [$this, 'filter_howget_ips_trusted_proxies_option'],
200
- 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
201
-
202
- ];
203
-
204
- $options[] = [
205
- 'type' => 'html',
206
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Advanced Firewall Options.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
207
- ];
208
-
209
- $options[] = [
210
- 'type' => 'checkbox',
211
- 'way' => 'buttons',
212
- 'name' => 'disable_wafip_blocking',
213
- 'title' => __( 'Delay IP and Country blocking until after WordPress and plugins have loaded (only process firewall rules early)', 'titan-security' ),
214
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
215
- 'hint' => __( 'When the Titan Firewall is optimized, the Firewall loads before the WordPress environment loads. This is desired behavior, as it increases security and gives the Firewall a performance boost. But if your server has a conflict with blocking by IP, country, or other advanced blocking settings before WordPress has loaded, you can turn on this option to allow WordPress to load first. We do not recommend enabling this option except for testing purposes.', 'titan-security' ),
216
- 'default' => true,
217
- 'eventsOn' => [
218
- 'show' => '.factory-control-whitelisted, .wtitan-disable-wafip-blocking-separator'
219
- ],
220
- 'eventsOff' => [
221
- 'hide' => '.factory-control-whitelisted, .wtitan-disable-wafip-blocking-separator'
222
- ],
223
- 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
224
- ];
225
-
226
- $options[] = [
227
- 'type' => 'textarea',
228
- 'name' => 'whitelisted',
229
- 'title' => __( 'Whitelisted IP addresses that bypass all rules', 'titan-security' ),
230
- //'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
231
- 'hint' => __( 'Whitelisted IPs must be separated by commas or placed on separate lines. You can specify ranges using the following formats: 127.0.0.1/24, 127.0.0.[1-100], or 127.0.0.1-127.0.1.100. Titan automatically whitelists private networks because these are not routable on the public Internet.', 'titan-security' ),
232
- 'default' => '',
233
- 'filter_value' => [ $this, 'filter_whitelisted_option' ],
234
- 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
235
- ];
236
-
237
- $options[] = [
238
- 'type' => 'separator',
239
- 'cssClass' => 'wtitan-disable-wafip-blocking-separator'
240
- ];
241
-
242
- $options[] = [
243
- 'type' => 'list',
244
- 'way' => 'checklist',
245
- 'name' => 'whitelisted_services',
246
- 'title' => __( 'Whitelisted services', 'comments-plus' ),
247
- 'data' => [
248
- [ 'sucuri', 'Sucuri' ],
249
- [ 'facebook', 'Facebook' ],
250
- [ 'uptime_robot', 'Uptime Robot' ],
251
- [ 'status_cake', 'StatusCake' ],
252
- [ 'managewp', 'ManageWP' ],
253
- [ 'seznam', 'Seznam Search Engine' ],
254
- ],
255
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
256
- 'hint' => __( 'Select the post types for which comments will be disabled', 'comments-plus' ),
257
- //'filter_value' => [$this, 'filter_whitelisted_services_option'],
258
- 'default' => 'sucuri,facebook,uptime_robots',
259
- 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
260
- ];
261
-
262
- $options[] = [
263
- 'type' => 'textarea',
264
- 'name' => 'banned_urls',
265
- 'title' => __( 'Immediately block IPs that access these URLs', 'titan-security' ),
266
- //'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
267
- 'hint' => __( 'Separate multiple URLs with commas or place them on separate lines. Asterisks are wildcards, but use with care. If you see an attacker repeatedly probing your site for a known vulnerability you can use this to immediately block them. All URLs must start with a "/" without quotes and must be relative. e.g. /badURLone/, /bannedPage.html, /dont-access/this/URL/, /starts/with-*', 'titan-security' ),
268
- 'default' => '',
269
- 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
270
- ];
271
-
272
- $options[] = [
273
- 'type' => 'textarea',
274
- 'name' => 'waf_alert_whitelist',
275
- 'title' => __( 'Ignored IP addresses for Titan Web Application Firewall alerting', 'titan-security' ),
276
- //'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
277
- 'hint' => __( 'Ignored IPs must be separated by commas or placed on separate lines. These addresses will be ignored from any alerts about increased attacks and can be used to ignore things like standalone website security scanners.', 'titan-security' ),
278
- 'default' => '',
279
- 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
280
- ];
281
-
282
- $options[] = [
283
- 'type' => 'html',
284
- 'html' => [ $this, 'get_rules_control' ]
285
- ];
286
-
287
- $options[] = [
288
- 'type' => 'html',
289
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Whitelisted URLs.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
290
- ];
291
-
292
- $options[] = [
293
- 'type' => 'html',
294
- 'html' => [ $this, 'get_whitelisted_urls_section' ]
295
- ];
296
-
297
- $options[] = [
298
- 'type' => 'html',
299
- 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Rate Limiting.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
300
- ];
301
-
302
- $options[] = [
303
- 'type' => 'checkbox',
304
- 'way' => 'buttons',
305
- 'name' => 'enable_advanced_blocking',
306
- 'title' => __( "Enable Rate Limiting and Advanced Blocking", 'titan-security' ),
307
- //'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'green'],
308
- 'hint' => __( 'NOTE: This checkbox enables ALL blocking/throttling functions including IP, country and advanced blocking, and the "Rate Limiting Rules" below.', 'titan-security' ),
309
- 'default' => true,
310
- 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
311
- ];
312
-
313
- $options[] = [
314
- 'type' => 'separator',
315
- //'cssClass' => 'wtitan-brute-force-block-bad-post-separator'
316
- ];
317
- $options[] = [
318
- 'type' => 'checkbox',
319
- 'way' => 'buttons',
320
- 'name' => 'immediately_block_fake_google',
321
- 'title' => __( "Enable Rate Limiting and Advanced Blocking", 'titan-security' ),
322
- 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'red' ],
323
- 'hint' => __( 'If you are having a problem with people stealing your content and pretending to be Google as they crawl your site, then you can enable this option which will immediately block anyone pretending to be Google. The way this option works is that we look at the visitor User-Agent HTTP header which indicates which browser the visitor is running. If it appears to be Googlebot, then we do a reverse lookup on the visitor’s IP address to verify that the IP does belong to Google. If the IP is not a Google IP, then we block it if you have this option enabled. Be careful about using this option, because we have had reports of it blocking real site visitors, especially (for some reason) legitimate visitors from Brazil. It’s possible, although we haven’t confirmed this, that some Internet service providers in Brazil use transparent proxies that modify their customers’ user-agent headers to pretend to be Googlebot rather than the real header. Or it may be possible that these providers are engaging in some sort of crawling activity pretending to be Googlebot using the same IP address that is the public IP for their customers. Whatever the cause is, the result is that if you enable this you may block some real visitors.', 'titan-security' ),
324
- 'default' => false,
325
- 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
326
- ];
327
-
328
- $options[] = [
329
- 'type' => 'html',
330
- 'html' => [ $this, 'get_rate_limit_section' ]
331
- ];
332
-
333
- $form_options = [];
334
-
335
- $form_options[] = [
336
- 'type' => 'form-group',
337
- 'items' => $options,
338
- //'cssClass' => 'postbox'
339
- ];
340
-
341
- return apply_filters( 'wtitan/settings_form/options', $form_options, $this );
342
- }
343
-
344
-
345
- /**
346
- * Adds an html warning notification html markup.
347
- */
348
- public function get_rules_control() {
349
- ?>
350
- <div class="form-group wtitan-section-disabled">
351
- <label class="col-sm-4 control-label"></label>
352
- <div class="control-group col-sm-8">
353
- <strong>Rules</strong>
354
- <div class="wtitan-excluded-rules">
355
- <table>
356
- <thead>
357
- <tr>
358
- <th style="width: 10%"></th>
359
- <th style="width: 30%; text-align:left;">Category</th>
360
- <th style="text-align: left;">Description</th>
361
- </tr>
362
- </thead>
363
- <tbody>
364
-
365
- <tr>
366
- <td style="text-align: center">
367
- <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="119">
368
- </td>
369
- <td>rce</td>
370
- <td>Duplicator Installer wp-config.php Overwrite</td>
371
- </tr>
372
- <tr>
373
- <td style="text-align: center">
374
- <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="18">
375
- </td>
376
- <td>priv-esc</td>
377
- <td>User Roles Manager Privilege Escalation &lt;= 4.24</td>
378
- </tr>
379
- <tr>
380
- <td style="text-align: center">
381
- <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="66">
382
- </td>
383
- <td>dos</td>
384
- <td>WordPress Core &lt;= 4.5.3 - DoS</td>
385
- </tr>
386
- <tr>
387
- <td style="text-align: center">
388
- <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="117">
389
- </td>
390
- <td>privesc</td>
391
- <td>WordPress Core: Arbitrary File Deletion</td>
392
- </tr>
393
- <tr>
394
- <td style="text-align: center">
395
- <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="126"
396
- checked="checked">
397
- </td>
398
- <td>privesc</td>
399
- <td>WordPress &lt;= 5.0 - PHP Object Injection via Meta Data &amp; Authenticated File
400
- Delete
401
- </td>
402
- </tr>
403
- <tr>
404
- <td style="text-align: center">
405
- <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="1"
406
- checked="checked">
407
- </td>
408
- <td>whitelist</td>
409
- <td>Whitelisted URL</td>
410
- </tr>
411
- <tr>
412
- <td style="text-align: center">
413
- <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="2"
414
- checked="checked">
415
- </td>
416
- <td>lfi</td>
417
- <td>Slider Revolution: Local File Inclusion</td>
418
- </tr>
419
- <tr>
420
- <td style="text-align: center">
421
- <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="60"
422
- checked="checked">
423
- </td>
424
- <td>file_upload</td>
425
- <td>Slider Revolution: Arbitrary File Upload</td>
426
- </tr>
427
- </tbody>
428
- </table>
429
- <input type="hidden" id="js-wtitan-excluded-rules__field" name="titan_disabled_rules" value="">
430
- </div>
431
- </div>
432
- </div>
433
- <?php
434
- }
435
-
436
- public function get_whitelisted_urls_section() {
437
-
438
-
439
- ?>
440
- <div class="wtitan-whitelist">
441
- <ul>
442
- <li class="wtitan-whitelist__top-section">
443
- <ul>
444
- <li>
445
- <strong class="wtitan-whitelist__label">Add Whitelisted URL/Param</strong>
446
- <span class="wtitan-whitelist__hint">
447
- The URL/parameters in this table will not be tested by the firewall. They are typically
448
- added while the firewall is in Learning Mode or by an admin who identifies a particular
449
- action/request is a false positive.</span>
450
- </li>
451
- <li>
452
- <div>
453
- <div class="wtitan-whitelist__form-group">
454
- <input type="text" name="whitelistURL" id="whitelistURL" placeholder="URL" disabled>
455
- </div>
456
- <div class="wtitan-whitelist__form-group">
457
- <select style="width:200px;" name="whitelistParam" id="whitelistParam" tabindex="-1"
458
- aria-hidden="true" disabled>
459
- <option value="request.body">POST Body</option>
460
- <option value="request.cookies">Cookie</option>
461
- <option value="request.fileNames">File Name</option>
462
- <option value="request.headers">Header</option>
463
- <option value="request.queryString">Query String</option>
464
- </select>
465
- </div>
466
- <div class="wtitan-whitelist__form-group">
467
- <input style="display:inline-block;" type="text" name="whitelistParamName"
468
- id="whitelistParamName" placeholder="Param Name" disabled>
469
- </div>
470
- <a href="#" class="btn btn-default btn-small disabled"
471
- id="waf-whitelisted-urls-add">Add</a>
472
- </div>
473
- </li>
474
- <li>
475
- <hr>
476
- </li>
477
- <li class="wtitan-whitelist__table-controls">
478
- <div class="wtitan-whitelist__table-controls-left">
479
- <a href="#" id="whitelist-bulk-delete"
480
- class="btn btn-default btn-small disabled">Delete</a>&nbsp;&nbsp;<a href="#"
481
- id="whitelist-bulk-enable"
482
- class="disabled btn btn-default btn-small">Enable</a>&nbsp;&nbsp;<a
483
- href="#" id="whitelist-bulk-disable" class="btn btn-default btn-small disabled">Disable</a>
484
- </div>
485
- <div class="wtitan-whitelist__table-controls-right">
486
- <select name="filterColumn" disabled>
487
- <option value="url">URL</option>
488
- <option value="param">Param</option>
489
- <option value="source">Source</option>
490
- <option value="user">User</option>
491
- <option value="ip">IP</option>
492
- </select>&nbsp;
493
- <input type="text" placeholder="Filter Value" name="filterValue" disabled>
494
- <a href="#" id="whitelist-apply-filter" class="btn btn-default btn-small disabled">Filter</a>
495
- </div>
496
- </li>
497
- <li>
498
- <table class="wtitan-whitelist__table">
499
- <thead>
500
- <tr>
501
- <th style="width: 2%;text-align: center">
502
- <input type="checkbox" disabled>
503
- </th>
504
- <th style="width: 5%;">Enabled</th>
505
- <th>URL</th>
506
- <th>Param</th>
507
- <th>Created</th>
508
- <th>Source</th>
509
- <th>User</th>
510
- <th>IP</th>
511
- </tr>
512
- </thead>
513
- <tbody>
514
- </tbody>
515
- </table>
516
- </li>
517
- </ul>
518
- </li>
519
- <li class="wtitan-whitelist__bottom-section">
520
- <ul>
521
- <li class="wtitan-whitelist__label">
522
- <strong>Monitor background requests from an administrator's
523
- web browser for false positives</strong>
524
- </li>
525
- <li class="wtitan-whitelist__bg-requests-controls">
526
- <ul>
527
- <li><label><input type="checkbox" disabled> Front-end Website</label></li>
528
- <li><label><input type="checkbox" disabled> Admin Panel</label></li>
529
- </ul>
530
- </li>
531
- </ul>
532
- </li>
533
- </ul>
534
- </div>
535
- <?php
536
- }
537
-
538
- public function get_rate_limit_section() {
539
- $max_global_requests_options = [
540
- '1' => '1 per minute',
541
- '2' => '2 per minute',
542
- '3' => '3 per minute',
543
- '4' => '4 per minute',
544
- '5' => '5 per minute',
545
- '10' => '15 per minute',
546
- '15' => '15 per minute',
547
- '30' => '30 per minute',
548
- '60' => '60 per minute',
549
- '120' => '120 per minute',
550
- '240' => '240 per minute',
551
- '480' => '960 per minute',
552
- '960' => '960 per minute',
553
- '1920' => '1920 per minute',
554
- ];
555
- ?>
556
- <div class="wtitan-rate-limit-settings" style="padding:0 40px 0 0;">
557
- <ul>
558
- <li>
559
- <ul class="wtitan-rate-limit-settings__control">
560
- <li class="wtitan-rate-limit-settings__control-title"><span>How should we treat Google's crawlers</span>
561
- </li>
562
- <li>
563
- <select style="width:400px;font-weight:normal;" name="titan_never_block_bg" disabled>
564
- <option value="never_block_verified">
565
- Verified Google crawlers have unlimited access to this site
566
- </option>
567
- <option value="never_block_ua">
568
- Anyone claiming to
569
- be Google has unlimited access
570
- </option>
571
- <option value="treat_as_other_crawlers">
572
- Treat
573
- Google like any other Crawler
574
- </option>
575
- </select>
576
- </li>
577
- </ul>
578
- </li>
579
- <li>
580
- <ul class="wtitan-rate-limit-settings__control">
581
- <li class="wtitan-rate-limit-settings__control-title">If anyone's requests exceed</li>
582
- <li class="wtitan-rate-limit-settings__control-fields">
583
- <select name="titan_max_global_requests"
584
- class="wtitan-rate-limit-settings__control-block-time-select" disabled>
585
- <option value="disabled">
586
- Unlimited
587
- </option>
588
- <?php foreach ( $max_global_requests_options as $value => $title ): ?>
589
- <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
590
- <?php endforeach; ?>
591
- </select>&nbsp;then
592
- <select name="titan_max_global_requests_action"
593
- class="wtitan-rate-limit-settings__control-action-select" disabled>
594
- <option value="throttle">
595
- throttle it
596
- </option>
597
- <option value="block">block it
598
- </option>
599
- </select>
600
- </li>
601
- </ul>
602
-
603
- </li>
604
- <li>
605
- <ul class="wtitan-rate-limit-settings__control">
606
- <li class="wtitan-rate-limit-settings__control-title">If a crawler's page views exceed</li>
607
- <li class="wtitan-rate-limit-settings__control-fields">
608
- <select name="titan_max_requests_crawlers"
609
- class="wtitan-rate-limit-settings__control-block-time-select" disabled>
610
- <option value="disabled">
611
- Unlimited
612
- </option>
613
- <?php foreach ( $max_global_requests_options as $value => $title ): ?>
614
- <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
615
- <?php endforeach; ?>
616
- </select>&nbsp;then
617
- <select name="titan_max_requests_crawlers_action"
618
- class="wtitan-rate-limit-settings__control-action-select" disabled>
619
- <option value="throttle">
620
- throttle it
621
- </option>
622
- <option value="block">block
623
- it
624
- </option>
625
- </select>
626
- </li>
627
- </ul>
628
- </li>
629
- <li>
630
- <ul class="wtitan-rate-limit-settings__control">
631
- <li class="wtitan-rate-limit-settings__control-title">If a crawler's pages not found (404s)
632
- exceed
633
- </li>
634
- <li class="wtitan-rate-limit-settings__control-fields">
635
- <select name="titan_max404_crawlers"
636
- class="wtitan-rate-limit-settings__control-block-time-select" disabled>
637
- <option value="disabled">
638
- Unlimited
639
- </option>
640
- <?php foreach ( $max_global_requests_options as $value => $title ): ?>
641
- <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
642
- <?php endforeach; ?>
643
- </select>&nbsp;then
644
- <select name="titan_max404_crawlers_action"
645
- class="wtitan-rate-limit-settings__control-action-select" disabled>
646
- <option value="throttle">
647
- throttle it
648
- </option>
649
- <option value="block">block it
650
- </option>
651
- </select>
652
- </li>
653
- </ul>
654
- </li>
655
- <li>
656
- <ul class="wtitan-rate-limit-settings__control">
657
- <li class="wtitan-rate-limit-settings__control-title">If a human's page views exceed</li>
658
- <li class="wtitan-rate-limit-settings__control-fields">
659
- <select name="titan_max_requests_humans"
660
- class="wtitan-rate-limit-settings__control-block-time-select" disabled>
661
- <option value="disabled">
662
- Unlimited
663
- </option>
664
- <?php foreach ( $max_global_requests_options as $value => $title ): ?>
665
- <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
666
- <?php endforeach; ?>
667
- </select>&nbsp;then
668
- <select name="titan_max_requests_humans_action"
669
- class="wtitan-rate-limit-settings__control-action-select" disabled>
670
- <option value="throttle">
671
- throttle it
672
- </option>
673
- <option value="block">block it
674
- </option>
675
- </select>
676
- </li>
677
- </ul>
678
- </li>
679
- <li>
680
- <ul class="wtitan-rate-limit-settings__control">
681
- <li class="wtitan-rate-limit-settings__control-title">If a human's pages not found (404s)
682
- exceed
683
- </li>
684
- <li class="wtitan-rate-limit-settings__control-fields">
685
- <select name="titan_max404_humans"
686
- class="wtitan-rate-limit-settings__control-block-time-select" disabled>
687
- <option value="disabled">
688
- Unlimited
689
- </option>
690
- <?php foreach ( $max_global_requests_options as $value => $title ): ?>
691
- <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
692
- <?php endforeach; ?>
693
- </select>&nbsp;then
694
- <select name="titan_max404_humans_action"
695
- class="wtitan-rate-limit-settings__control-action-select" disabled>
696
- <option value="throttle">
697
- throttle it
698
- </option>
699
- <option value="block">block it</option>
700
- </select>
701
- </li>
702
- </ul>
703
- </li>
704
- <li>
705
- <ul class="wtitan-rate-limit-settings__control">
706
- <li class="wtitan-rate-limit-settings__control-title">How long is an IP address blocked when it
707
- breaks a rule</span></li>
708
- <li class="wtitan-rate-limit-settings__control-fields">
709
- <select name="titan_blocked_time" disabled>
710
- <option value="60">1 minute</option>
711
- <option value="300">5 minutes</option>
712
- <option value="1800">30 minutes</option>
713
- <option value="3600">1 hour</option>
714
- <option value="7200">2 hours</option>
715
- <option value="21600">6 hours</option>
716
- <option value="43200">12 hours</option>
717
- <option value="86400">1 day</option>
718
- <option value="172800">2 days</option>
719
- <option value="432000">5 days</option>
720
- <option value="864000">10 days</option>
721
- <option value="2592000">1 month</option>
722
- </select>
723
- </li>
724
- </ul>
725
- </li>
726
- <li>
727
- <ul class="wtitan-rate-limit-settings__control">
728
- <li class="wtitan-rate-limit-settings__control-title">Whitelisted 404 URLs
729
- <span class="wtitan-rate-limit-settings__control-subtitle">These URL patterns will be excluded from the
730
- throttling rules used to limit crawlers.</span></li>
731
-
732
- <li class="wtitan-rate-limit-settings__control-fields">
733
- <textarea name="titan_allowed404s"
734
- class="wtitan-rate-limit-settings__control-allowed404s-textarea"
735
- disabled></textarea>
736
- </li>
737
- </ul>
738
- </li>
739
- </ul>
740
-
741
- </div>
742
- <?php
743
- }
744
-
745
-
746
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
+ }
9
+
10
+ /**
11
+ * Страница общих настроек для этого плагина.
12
+ *
13
+ * Не поддерживает режим работы с мультисаймами.
14
+ *
15
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
+ * @copyright (c) 2019 Webraftic Ltd
17
+ * @version 1.0
18
+ */
19
+ class Firewall_Settings extends Base {
20
+
21
+ /**
22
+ * {@inheritDoc}
23
+ *
24
+ * @since 6.0
25
+ * @var string
26
+ */
27
+ public $id = "firewall-settings";
28
+
29
+ /**
30
+ * {@inheritDoc}
31
+ *
32
+ * @var string
33
+ */
34
+ public $page_parent_page = "firewall";
35
+
36
+ /**
37
+ * {@inheritDoc}
38
+ *
39
+ * @since 6.0
40
+ * @var string
41
+ */
42
+ public $page_menu_dashicon = 'dashicons-testimonial';
43
+
44
+ /**
45
+ * {@inheritDoc}
46
+ *
47
+ * @since 6.0
48
+ * @var bool
49
+ */
50
+ public $show_right_sidebar_in_options = false;
51
+
52
+ /**
53
+ * WBCR\Page\Settings constructor.
54
+ *
55
+ * @param \Wbcr_Factory458_Plugin $plugin
56
+ *
57
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
58
+ *
59
+ */
60
+ public function __construct( $plugin ) {
61
+ $this->menu_title = __( 'Settings', 'titan-security' );
62
+ $this->page_menu_short_description = __( 'Firewall settings', 'titan-security' );
63
+
64
+ parent::__construct( $plugin );
65
+
66
+ $this->plugin = $plugin;
67
+ }
68
+
69
+ public $rules = array();
70
+
71
+ /**
72
+ * Enqueue page assets
73
+ *
74
+ * @return void
75
+ * @since 6.2
76
+ * @see Wbcr_FactoryPages457_AdminPage
77
+ *
78
+ */
79
+ public function assets( $scripts, $styles ) {
80
+ parent::assets( $scripts, $styles );
81
+
82
+ $this->scripts->request( [
83
+ 'control.checkbox',
84
+ 'control.dropdown',
85
+ 'bootstrap.tooltip',
86
+ 'holder.more-link'
87
+ ], 'bootstrap' );
88
+
89
+ $this->styles->request( [
90
+ 'bootstrap.core',
91
+ 'bootstrap.form-group',
92
+ 'holder.more-link',
93
+ 'bootstrap.separator',
94
+ 'control.dropdown',
95
+ 'control.checkbox'
96
+ ], 'bootstrap' );
97
+
98
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-settings.css' );
99
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/firewall/firewall-settings.js' );
100
+
101
+ add_action( 'wbcr/factory/update_option', [ $this, 'before_save' ] );
102
+ }
103
+
104
+ /**
105
+ * Permalinks options.
106
+ *
107
+ * @return mixed[]
108
+ * @since 6.2
109
+ */
110
+ public function getPageOptions() {
111
+ $is_premium = \WBCR\Titan\Plugin::app()->premium->is_active() && \WBCR\Titan\Plugin::app()->premium->is_install_package();
112
+
113
+ $options[] = [
114
+ 'type' => 'html',
115
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Base Options.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
116
+ ];
117
+ $options[] = [
118
+ 'type' => 'dropdown',
119
+ 'name' => 'howget_ip',
120
+ 'way' => 'buttons',
121
+ 'title' => __( 'How does Titan get IPs ', 'titan-security' ),
122
+ 'data' => [
123
+ [
124
+ '',
125
+ __( 'Default', 'titan-security' ),
126
+ __( 'Let Titan use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites. (Recommended)', 'titan-security' )
127
+ ],
128
+ [
129
+ 'REMOTE_ADDR',
130
+ __( 'REMOTE_ADDR', 'titan-security' ),
131
+ __( 'Use PHP\'s built in REMOTE_ADDR and don\'t use anything else. Very secure if this is compatible with your site.', 'titan-security' )
132
+ ],
133
+ [
134
+ 'HTTP_X_FORWARDED_FOR',
135
+ __( 'HTTP_X_FORWARDED_FOR', 'titan-security' ),
136
+ __( 'Use the X-Forwarded-For HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'titan-security' )
137
+ ],
138
+ [
139
+ 'HTTP_X_REAL_IP',
140
+ __( 'HTTP_X_REAL_IP', 'titan-security' ),
141
+ __( 'Use the X-Real-IP HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'titan-security' )
142
+ ],
143
+ [
144
+ 'HTTP_CF_CONNECTING_IP',
145
+ __( 'HTTP_CF_CONNECTING_IP', 'titan-security' ),
146
+ __( 'Use the Cloudflare "CF-Connecting-IP" HTTP header to get a visitor IP. Only use if you\'re using Cloudflare.', 'titan-security' )
147
+ ]
148
+ ],
149
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
150
+ 'hint' => __( 'Titan needs to determine each visitor’s IP address to provide security functions on your website. The Titan default configuration works just fine for most websites, but it’s important that this configuration is correct. For example, if Titan is not receiving IP addresses correctly and thinks an external visitor originates from a private address, it will whitelist that visitor and bypass security protocols. You can read more about which addresses Titan considers private here.
151
+
152
+ The Titan scanner has an option to “Scan for misconfigured How does Titan get IPs”. This scan feature can help you detect if the wrong option has been selected for “How does Titan get IPs.”
153
+
154
+ Another way of determining if Titan is getting IPs correctly is to check the “IPs” section in the Titan Tools > Diagnostics.
155
+
156
+ Let Titan use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites.
157
+ This is the default mode of operation for Titan. Titan will try to get a valid IP address from PHP and if that doesn’t work, it will look at data that a firewall or reverse proxy sends in case your website uses this configuration.
158
+
159
+ This option provides a good balance between security and compatibility.
160
+
161
+ Use PHP’s built in REMOTE_ADDR and don’t use anything else. Very secure if this is compatible with your site.
162
+ If you know that you definitely don’t use a reverse proxy, cache, Cloudflare, CDN or anything else in front of your web server that “proxies” traffic to your website, and if you are sure that your website is just a standalone PHP web server, then using this option will work and is the most secure in a non-proxy or load balancer configuration.
163
+
164
+ You may also want to select this option for other reasons – for example to force Titan to use the $_SERVER[‘REMOTE_ADDR’] variable in PHP.
165
+
166
+ Use the X-Forwarded-For HTTP header. Only use if you have a front-end proxy or spoofing may result.
167
+ If you are using Nginx or another load balancer as a front-end-proxy or load balancer in front of your web server, and the front-end server sends IP addresses to the web server that runs WordPress using the HTTP X-Forwarded-For header, then you should enable this option.
168
+
169
+ Be careful about enabling this option if you do not have a front-end-proxy, load balancer, or CDN configuration, because it will then allow visitors to spoof their IP address and you will also miss many hits that should have been logged.
170
+
171
+ Use the X-Real-IP HTTP header. Only use if you have a front-end proxy or spoofing may result.
172
+ As with the X-Forwarded-For option above, only use this option if you are sure that you want Titan to retrieve the visitor IP address from the X-Real-IP HTTP header, and do not enable this if you don’t have a front-end proxy or load balancer that is sending visits to your real web server and adding the X-Real-IP header.
173
+
174
+ Use the Cloudflare “CF-Connecting-IP” HTTP header to get a visitor IP. Only use if you’re using Cloudflare.
175
+ Titan is fully compatible with CloudFlare, and in some configurations Cloudflare will send the real visitor IP address to your web server using the CF-Connecting-IP HTTP header. If the CloudFlare support personnel have advised you that this is the case, then enable this option on Titan to ensure that Titan is able to get your visitor IP address.
176
+
177
+ Note that Cloudflare has several configurations including their own web server module that takes care of detecting the visitor IP address, so be sure to work with their technical support staff and read their documentation to determine which configuration you’re using.
178
+
179
+ Multiple IPs detected
180
+ If your host requires using the X-Forwarded-For header, there may be multiple IP addresses detected. If your own IP address does not appear where it shows “Your IP with this setting,” you may need to add trusted proxies.
181
+
182
+ If you do not know whether your host uses more than one proxy address, contact your host or the reverse-proxy service that you use. If you know there is only one proxy address, it should be the last address in the “Detected IPs” field.
183
+
184
+ Once you know which proxies to trust, click the + Edit trusted proxies link below the detected IPs.
185
+ In the Trusted proxies field that appears, enter the IP addresses of the proxies. You can enter a single IP like 10.0.0.15. You can also enter a “CIDR” range like 10.0.0.0/24. Note that your host’s trusted IPs should not be the same addresses in these examples.
186
+ Click Save Options to save the changes, and check that your IP appears correctly in the “Your IP with this setting” field.', 'titan-security' ) . '<br><b>Clearfy</b>: ' . __( 'Disable admin top bar.', 'titan-security' ),
187
+ 'default' => '',
188
+ 'filter_value' => [ $this, 'filter_howget_ip_option' ],
189
+ 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
190
+ ];
191
+
192
+ $options[] = [
193
+ 'type' => 'textarea',
194
+ 'name' => 'howget_ips_trusted_proxies',
195
+ 'title' => __( 'Trusted Proxies', 'titan-security' ),
196
+ //'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
197
+ 'hint' => __( 'These IPs (or CIDR ranges) will be ignored when determining the requesting IP via the X-Forwarded-For HTTP header. Enter one IP or CIDR range per line.', 'titan-security' ),
198
+ 'default' => '',
199
+ //'filter_value' => [$this, 'filter_howget_ips_trusted_proxies_option'],
200
+ 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
201
+
202
+ ];
203
+
204
+ $options[] = [
205
+ 'type' => 'html',
206
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Advanced Firewall Options.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
207
+ ];
208
+
209
+ $options[] = [
210
+ 'type' => 'checkbox',
211
+ 'way' => 'buttons',
212
+ 'name' => 'disable_wafip_blocking',
213
+ 'title' => __( 'Delay IP and Country blocking until after WordPress and plugins have loaded (only process firewall rules early)', 'titan-security' ),
214
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
215
+ 'hint' => __( 'When the Titan Firewall is optimized, the Firewall loads before the WordPress environment loads. This is desired behavior, as it increases security and gives the Firewall a performance boost. But if your server has a conflict with blocking by IP, country, or other advanced blocking settings before WordPress has loaded, you can turn on this option to allow WordPress to load first. We do not recommend enabling this option except for testing purposes.', 'titan-security' ),
216
+ 'default' => true,
217
+ 'eventsOn' => [
218
+ 'show' => '.factory-control-whitelisted, .wtitan-disable-wafip-blocking-separator'
219
+ ],
220
+ 'eventsOff' => [
221
+ 'hide' => '.factory-control-whitelisted, .wtitan-disable-wafip-blocking-separator'
222
+ ],
223
+ 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
224
+ ];
225
+
226
+ $options[] = [
227
+ 'type' => 'textarea',
228
+ 'name' => 'whitelisted',
229
+ 'title' => __( 'Whitelisted IP addresses that bypass all rules', 'titan-security' ),
230
+ //'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
231
+ 'hint' => __( 'Whitelisted IPs must be separated by commas or placed on separate lines. You can specify ranges using the following formats: 127.0.0.1/24, 127.0.0.[1-100], or 127.0.0.1-127.0.1.100. Titan automatically whitelists private networks because these are not routable on the public Internet.', 'titan-security' ),
232
+ 'default' => '',
233
+ 'filter_value' => [ $this, 'filter_whitelisted_option' ],
234
+ 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
235
+ ];
236
+
237
+ $options[] = [
238
+ 'type' => 'separator',
239
+ 'cssClass' => 'wtitan-disable-wafip-blocking-separator'
240
+ ];
241
+
242
+ $options[] = [
243
+ 'type' => 'list',
244
+ 'way' => 'checklist',
245
+ 'name' => 'whitelisted_services',
246
+ 'title' => __( 'Whitelisted services', 'comments-plus' ),
247
+ 'data' => [
248
+ [ 'sucuri', 'Sucuri' ],
249
+ [ 'facebook', 'Facebook' ],
250
+ [ 'uptime_robot', 'Uptime Robot' ],
251
+ [ 'status_cake', 'StatusCake' ],
252
+ [ 'managewp', 'ManageWP' ],
253
+ [ 'seznam', 'Seznam Search Engine' ],
254
+ ],
255
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
256
+ 'hint' => __( 'Select the post types for which comments will be disabled', 'comments-plus' ),
257
+ //'filter_value' => [$this, 'filter_whitelisted_services_option'],
258
+ 'default' => 'sucuri,facebook,uptime_robots',
259
+ 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
260
+ ];
261
+
262
+ $options[] = [
263
+ 'type' => 'textarea',
264
+ 'name' => 'banned_urls',
265
+ 'title' => __( 'Immediately block IPs that access these URLs', 'titan-security' ),
266
+ //'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
267
+ 'hint' => __( 'Separate multiple URLs with commas or place them on separate lines. Asterisks are wildcards, but use with care. If you see an attacker repeatedly probing your site for a known vulnerability you can use this to immediately block them. All URLs must start with a "/" without quotes and must be relative. e.g. /badURLone/, /bannedPage.html, /dont-access/this/URL/, /starts/with-*', 'titan-security' ),
268
+ 'default' => '',
269
+ 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
270
+ ];
271
+
272
+ $options[] = [
273
+ 'type' => 'textarea',
274
+ 'name' => 'waf_alert_whitelist',
275
+ 'title' => __( 'Ignored IP addresses for Titan Web Application Firewall alerting', 'titan-security' ),
276
+ //'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
277
+ 'hint' => __( 'Ignored IPs must be separated by commas or placed on separate lines. These addresses will be ignored from any alerts about increased attacks and can be used to ignore things like standalone website security scanners.', 'titan-security' ),
278
+ 'default' => '',
279
+ 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
280
+ ];
281
+
282
+ $options[] = [
283
+ 'type' => 'html',
284
+ 'html' => [ $this, 'get_rules_control' ]
285
+ ];
286
+
287
+ $options[] = [
288
+ 'type' => 'html',
289
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Whitelisted URLs.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
290
+ ];
291
+
292
+ $options[] = [
293
+ 'type' => 'html',
294
+ 'html' => [ $this, 'get_whitelisted_urls_section' ]
295
+ ];
296
+
297
+ $options[] = [
298
+ 'type' => 'html',
299
+ 'html' => '<div class="wbcr-factory-page-group-header">' . '<strong>' . __( 'Rate Limiting.', 'titan-security' ) . '</strong>' . '<p>' . __( 'Additional modules to spam protect.', 'titan-security' ) . '</p>' . '</div>'
300
+ ];
301
+
302
+ $options[] = [
303
+ 'type' => 'checkbox',
304
+ 'way' => 'buttons',
305
+ 'name' => 'enable_advanced_blocking',
306
+ 'title' => __( "Enable Rate Limiting and Advanced Blocking", 'titan-security' ),
307
+ //'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'green'],
308
+ 'hint' => __( 'NOTE: This checkbox enables ALL blocking/throttling functions including IP, country and advanced blocking, and the "Rate Limiting Rules" below.', 'titan-security' ),
309
+ 'default' => true,
310
+ 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
311
+ ];
312
+
313
+ $options[] = [
314
+ 'type' => 'separator',
315
+ //'cssClass' => 'wtitan-brute-force-block-bad-post-separator'
316
+ ];
317
+ $options[] = [
318
+ 'type' => 'checkbox',
319
+ 'way' => 'buttons',
320
+ 'name' => 'immediately_block_fake_google',
321
+ 'title' => __( "Enable Rate Limiting and Advanced Blocking", 'titan-security' ),
322
+ 'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'red' ],
323
+ 'hint' => __( 'If you are having a problem with people stealing your content and pretending to be Google as they crawl your site, then you can enable this option which will immediately block anyone pretending to be Google. The way this option works is that we look at the visitor User-Agent HTTP header which indicates which browser the visitor is running. If it appears to be Googlebot, then we do a reverse lookup on the visitor’s IP address to verify that the IP does belong to Google. If the IP is not a Google IP, then we block it if you have this option enabled. Be careful about using this option, because we have had reports of it blocking real site visitors, especially (for some reason) legitimate visitors from Brazil. It’s possible, although we haven’t confirmed this, that some Internet service providers in Brazil use transparent proxies that modify their customers’ user-agent headers to pretend to be Googlebot rather than the real header. Or it may be possible that these providers are engaging in some sort of crawling activity pretending to be Googlebot using the same IP address that is the public IP for their customers. Whatever the cause is, the result is that if you enable this you may block some real visitors.', 'titan-security' ),
324
+ 'default' => false,
325
+ 'cssClass' => ! $is_premium ? [ 'factory-control--disabled factory-control-premium-label' ] : [],
326
+ ];
327
+
328
+ $options[] = [
329
+ 'type' => 'html',
330
+ 'html' => [ $this, 'get_rate_limit_section' ]
331
+ ];
332
+
333
+ $form_options = [];
334
+
335
+ $form_options[] = [
336
+ 'type' => 'form-group',
337
+ 'items' => $options,
338
+ //'cssClass' => 'postbox'
339
+ ];
340
+
341
+ return apply_filters( 'wtitan/settings_form/options', $form_options, $this );
342
+ }
343
+
344
+
345
+ /**
346
+ * Adds an html warning notification html markup.
347
+ */
348
+ public function get_rules_control() {
349
+ ?>
350
+ <div class="form-group wtitan-section-disabled">
351
+ <label class="col-sm-4 control-label"></label>
352
+ <div class="control-group col-sm-8">
353
+ <strong>Rules</strong>
354
+ <div class="wtitan-excluded-rules">
355
+ <table>
356
+ <thead>
357
+ <tr>
358
+ <th style="width: 10%"></th>
359
+ <th style="width: 30%; text-align:left;">Category</th>
360
+ <th style="text-align: left;">Description</th>
361
+ </tr>
362
+ </thead>
363
+ <tbody>
364
+
365
+ <tr>
366
+ <td style="text-align: center">
367
+ <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="119">
368
+ </td>
369
+ <td>rce</td>
370
+ <td>Duplicator Installer wp-config.php Overwrite</td>
371
+ </tr>
372
+ <tr>
373
+ <td style="text-align: center">
374
+ <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="18">
375
+ </td>
376
+ <td>priv-esc</td>
377
+ <td>User Roles Manager Privilege Escalation &lt;= 4.24</td>
378
+ </tr>
379
+ <tr>
380
+ <td style="text-align: center">
381
+ <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="66">
382
+ </td>
383
+ <td>dos</td>
384
+ <td>WordPress Core &lt;= 4.5.3 - DoS</td>
385
+ </tr>
386
+ <tr>
387
+ <td style="text-align: center">
388
+ <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="117">
389
+ </td>
390
+ <td>privesc</td>
391
+ <td>WordPress Core: Arbitrary File Deletion</td>
392
+ </tr>
393
+ <tr>
394
+ <td style="text-align: center">
395
+ <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="126"
396
+ checked="checked">
397
+ </td>
398
+ <td>privesc</td>
399
+ <td>WordPress &lt;= 5.0 - PHP Object Injection via Meta Data &amp; Authenticated File
400
+ Delete
401
+ </td>
402
+ </tr>
403
+ <tr>
404
+ <td style="text-align: center">
405
+ <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="1"
406
+ checked="checked">
407
+ </td>
408
+ <td>whitelist</td>
409
+ <td>Whitelisted URL</td>
410
+ </tr>
411
+ <tr>
412
+ <td style="text-align: center">
413
+ <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="2"
414
+ checked="checked">
415
+ </td>
416
+ <td>lfi</td>
417
+ <td>Slider Revolution: Local File Inclusion</td>
418
+ </tr>
419
+ <tr>
420
+ <td style="text-align: center">
421
+ <input type="checkbox" class="js-wtitan-excluded-rules__checkbox" value="60"
422
+ checked="checked">
423
+ </td>
424
+ <td>file_upload</td>
425
+ <td>Slider Revolution: Arbitrary File Upload</td>
426
+ </tr>
427
+ </tbody>
428
+ </table>
429
+ <input type="hidden" id="js-wtitan-excluded-rules__field" name="titan_disabled_rules" value="">
430
+ </div>
431
+ </div>
432
+ </div>
433
+ <?php
434
+ }
435
+
436
+ public function get_whitelisted_urls_section() {
437
+
438
+
439
+ ?>
440
+ <div class="wtitan-whitelist">
441
+ <ul>
442
+ <li class="wtitan-whitelist__top-section">
443
+ <ul>
444
+ <li>
445
+ <strong class="wtitan-whitelist__label">Add Whitelisted URL/Param</strong>
446
+ <span class="wtitan-whitelist__hint">
447
+ The URL/parameters in this table will not be tested by the firewall. They are typically
448
+ added while the firewall is in Learning Mode or by an admin who identifies a particular
449
+ action/request is a false positive.</span>
450
+ </li>
451
+ <li>
452
+ <div>
453
+ <div class="wtitan-whitelist__form-group">
454
+ <input type="text" name="whitelistURL" id="whitelistURL" placeholder="URL" disabled>
455
+ </div>
456
+ <div class="wtitan-whitelist__form-group">
457
+ <select style="width:200px;" name="whitelistParam" id="whitelistParam" tabindex="-1"
458
+ aria-hidden="true" disabled>
459
+ <option value="request.body">POST Body</option>
460
+ <option value="request.cookies">Cookie</option>
461
+ <option value="request.fileNames">File Name</option>
462
+ <option value="request.headers">Header</option>
463
+ <option value="request.queryString">Query String</option>
464
+ </select>
465
+ </div>
466
+ <div class="wtitan-whitelist__form-group">
467
+ <input style="display:inline-block;" type="text" name="whitelistParamName"
468
+ id="whitelistParamName" placeholder="Param Name" disabled>
469
+ </div>
470
+ <a href="#" class="btn btn-default btn-small disabled"
471
+ id="waf-whitelisted-urls-add">Add</a>
472
+ </div>
473
+ </li>
474
+ <li>
475
+ <hr>
476
+ </li>
477
+ <li class="wtitan-whitelist__table-controls">
478
+ <div class="wtitan-whitelist__table-controls-left">
479
+ <a href="#" id="whitelist-bulk-delete"
480
+ class="btn btn-default btn-small disabled">Delete</a>&nbsp;&nbsp;<a href="#"
481
+ id="whitelist-bulk-enable"
482
+ class="disabled btn btn-default btn-small">Enable</a>&nbsp;&nbsp;<a
483
+ href="#" id="whitelist-bulk-disable" class="btn btn-default btn-small disabled">Disable</a>
484
+ </div>
485
+ <div class="wtitan-whitelist__table-controls-right">
486
+ <select name="filterColumn" disabled>
487
+ <option value="url">URL</option>
488
+ <option value="param">Param</option>
489
+ <option value="source">Source</option>
490
+ <option value="user">User</option>
491
+ <option value="ip">IP</option>
492
+ </select>&nbsp;
493
+ <input type="text" placeholder="Filter Value" name="filterValue" disabled>
494
+ <a href="#" id="whitelist-apply-filter" class="btn btn-default btn-small disabled">Filter</a>
495
+ </div>
496
+ </li>
497
+ <li>
498
+ <table class="wtitan-whitelist__table">
499
+ <thead>
500
+ <tr>
501
+ <th style="width: 2%;text-align: center">
502
+ <input type="checkbox" disabled>
503
+ </th>
504
+ <th style="width: 5%;">Enabled</th>
505
+ <th>URL</th>
506
+ <th>Param</th>
507
+ <th>Created</th>
508
+ <th>Source</th>
509
+ <th>User</th>
510
+ <th>IP</th>
511
+ </tr>
512
+ </thead>
513
+ <tbody>
514
+ </tbody>
515
+ </table>
516
+ </li>
517
+ </ul>
518
+ </li>
519
+ <li class="wtitan-whitelist__bottom-section">
520
+ <ul>
521
+ <li class="wtitan-whitelist__label">
522
+ <strong>Monitor background requests from an administrator's
523
+ web browser for false positives</strong>
524
+ </li>
525
+ <li class="wtitan-whitelist__bg-requests-controls">
526
+ <ul>
527
+ <li><label><input type="checkbox" disabled> Front-end Website</label></li>
528
+ <li><label><input type="checkbox" disabled> Admin Panel</label></li>
529
+ </ul>
530
+ </li>
531
+ </ul>
532
+ </li>
533
+ </ul>
534
+ </div>
535
+ <?php
536
+ }
537
+
538
+ public function get_rate_limit_section() {
539
+ $max_global_requests_options = [
540
+ '1' => '1 per minute',
541
+ '2' => '2 per minute',
542
+ '3' => '3 per minute',
543
+ '4' => '4 per minute',
544
+ '5' => '5 per minute',
545
+ '10' => '15 per minute',
546
+ '15' => '15 per minute',
547
+ '30' => '30 per minute',
548
+ '60' => '60 per minute',
549
+ '120' => '120 per minute',
550
+ '240' => '240 per minute',
551
+ '480' => '960 per minute',
552
+ '960' => '960 per minute',
553
+ '1920' => '1920 per minute',
554
+ ];
555
+ ?>
556
+ <div class="wtitan-rate-limit-settings" style="padding:0 40px 0 0;">
557
+ <ul>
558
+ <li>
559
+ <ul class="wtitan-rate-limit-settings__control">
560
+ <li class="wtitan-rate-limit-settings__control-title"><span>How should we treat Google's crawlers</span>
561
+ </li>
562
+ <li>
563
+ <select style="width:400px;font-weight:normal;" name="titan_never_block_bg" disabled>
564
+ <option value="never_block_verified">
565
+ Verified Google crawlers have unlimited access to this site
566
+ </option>
567
+ <option value="never_block_ua">
568
+ Anyone claiming to
569
+ be Google has unlimited access
570
+ </option>
571
+ <option value="treat_as_other_crawlers">
572
+ Treat
573
+ Google like any other Crawler
574
+ </option>
575
+ </select>
576
+ </li>
577
+ </ul>
578
+ </li>
579
+ <li>
580
+ <ul class="wtitan-rate-limit-settings__control">
581
+ <li class="wtitan-rate-limit-settings__control-title">If anyone's requests exceed</li>
582
+ <li class="wtitan-rate-limit-settings__control-fields">
583
+ <select name="titan_max_global_requests"
584
+ class="wtitan-rate-limit-settings__control-block-time-select" disabled>
585
+ <option value="disabled">
586
+ Unlimited
587
+ </option>
588
+ <?php foreach ( $max_global_requests_options as $value => $title ): ?>
589
+ <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
590
+ <?php endforeach; ?>
591
+ </select>&nbsp;then
592
+ <select name="titan_max_global_requests_action"
593
+ class="wtitan-rate-limit-settings__control-action-select" disabled>
594
+ <option value="throttle">
595
+ throttle it
596
+ </option>
597
+ <option value="block">block it
598
+ </option>
599
+ </select>
600
+ </li>
601
+ </ul>
602
+
603
+ </li>
604
+ <li>
605
+ <ul class="wtitan-rate-limit-settings__control">
606
+ <li class="wtitan-rate-limit-settings__control-title">If a crawler's page views exceed</li>
607
+ <li class="wtitan-rate-limit-settings__control-fields">
608
+ <select name="titan_max_requests_crawlers"
609
+ class="wtitan-rate-limit-settings__control-block-time-select" disabled>
610
+ <option value="disabled">
611
+ Unlimited
612
+ </option>
613
+ <?php foreach ( $max_global_requests_options as $value => $title ): ?>
614
+ <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
615
+ <?php endforeach; ?>
616
+ </select>&nbsp;then
617
+ <select name="titan_max_requests_crawlers_action"
618
+ class="wtitan-rate-limit-settings__control-action-select" disabled>
619
+ <option value="throttle">
620
+ throttle it
621
+ </option>
622
+ <option value="block">block
623
+ it
624
+ </option>
625
+ </select>
626
+ </li>
627
+ </ul>
628
+ </li>
629
+ <li>
630
+ <ul class="wtitan-rate-limit-settings__control">
631
+ <li class="wtitan-rate-limit-settings__control-title">If a crawler's pages not found (404s)
632
+ exceed
633
+ </li>
634
+ <li class="wtitan-rate-limit-settings__control-fields">
635
+ <select name="titan_max404_crawlers"
636
+ class="wtitan-rate-limit-settings__control-block-time-select" disabled>
637
+ <option value="disabled">
638
+ Unlimited
639
+ </option>
640
+ <?php foreach ( $max_global_requests_options as $value => $title ): ?>
641
+ <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
642
+ <?php endforeach; ?>
643
+ </select>&nbsp;then
644
+ <select name="titan_max404_crawlers_action"
645
+ class="wtitan-rate-limit-settings__control-action-select" disabled>
646
+ <option value="throttle">
647
+ throttle it
648
+ </option>
649
+ <option value="block">block it
650
+ </option>
651
+ </select>
652
+ </li>
653
+ </ul>
654
+ </li>
655
+ <li>
656
+ <ul class="wtitan-rate-limit-settings__control">
657
+ <li class="wtitan-rate-limit-settings__control-title">If a human's page views exceed</li>
658
+ <li class="wtitan-rate-limit-settings__control-fields">
659
+ <select name="titan_max_requests_humans"
660
+ class="wtitan-rate-limit-settings__control-block-time-select" disabled>
661
+ <option value="disabled">
662
+ Unlimited
663
+ </option>
664
+ <?php foreach ( $max_global_requests_options as $value => $title ): ?>
665
+ <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
666
+ <?php endforeach; ?>
667
+ </select>&nbsp;then
668
+ <select name="titan_max_requests_humans_action"
669
+ class="wtitan-rate-limit-settings__control-action-select" disabled>
670
+ <option value="throttle">
671
+ throttle it
672
+ </option>
673
+ <option value="block">block it
674
+ </option>
675
+ </select>
676
+ </li>
677
+ </ul>
678
+ </li>
679
+ <li>
680
+ <ul class="wtitan-rate-limit-settings__control">
681
+ <li class="wtitan-rate-limit-settings__control-title">If a human's pages not found (404s)
682
+ exceed
683
+ </li>
684
+ <li class="wtitan-rate-limit-settings__control-fields">
685
+ <select name="titan_max404_humans"
686
+ class="wtitan-rate-limit-settings__control-block-time-select" disabled>
687
+ <option value="disabled">
688
+ Unlimited
689
+ </option>
690
+ <?php foreach ( $max_global_requests_options as $value => $title ): ?>
691
+ <option value="<?php echo esc_attr( $value ); ?>"><?php echo $title; ?></option>
692
+ <?php endforeach; ?>
693
+ </select>&nbsp;then
694
+ <select name="titan_max404_humans_action"
695
+ class="wtitan-rate-limit-settings__control-action-select" disabled>
696
+ <option value="throttle">
697
+ throttle it
698
+ </option>
699
+ <option value="block">block it</option>
700
+ </select>
701
+ </li>
702
+ </ul>
703
+ </li>
704
+ <li>
705
+ <ul class="wtitan-rate-limit-settings__control">
706
+ <li class="wtitan-rate-limit-settings__control-title">How long is an IP address blocked when it
707
+ breaks a rule</span></li>
708
+ <li class="wtitan-rate-limit-settings__control-fields">
709
+ <select name="titan_blocked_time" disabled>
710
+ <option value="60">1 minute</option>
711
+ <option value="300">5 minutes</option>
712
+ <option value="1800">30 minutes</option>
713
+ <option value="3600">1 hour</option>
714
+ <option value="7200">2 hours</option>
715
+ <option value="21600">6 hours</option>
716
+ <option value="43200">12 hours</option>
717
+ <option value="86400">1 day</option>
718
+ <option value="172800">2 days</option>
719
+ <option value="432000">5 days</option>
720
+ <option value="864000">10 days</option>
721
+ <option value="2592000">1 month</option>
722
+ </select>
723
+ </li>
724
+ </ul>
725
+ </li>
726
+ <li>
727
+ <ul class="wtitan-rate-limit-settings__control">
728
+ <li class="wtitan-rate-limit-settings__control-title">Whitelisted 404 URLs
729
+ <span class="wtitan-rate-limit-settings__control-subtitle">These URL patterns will be excluded from the
730
+ throttling rules used to limit crawlers.</span></li>
731
+
732
+ <li class="wtitan-rate-limit-settings__control-fields">
733
+ <textarea name="titan_allowed404s"
734
+ class="wtitan-rate-limit-settings__control-allowed404s-textarea"
735
+ disabled></textarea>
736
+ </li>
737
+ </ul>
738
+ </li>
739
+ </ul>
740
+
741
+ </div>
742
+ <?php
743
+ }
744
+
745
+
746
+ }
admin/pages/firewall/class-pages-firewall.php CHANGED
@@ -1,104 +1,104 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- // Exit if accessed directly
6
- use WBCR\Titan\Views;
7
-
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- /**
13
- * The file contains a short help info.
14
- *
15
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
- * @copyright (c) 2019 Webraftic Ltd
17
- * @version 1.0
18
- */
19
- class Firewall extends Base {
20
-
21
- /**
22
- * {@inheritdoc}
23
- */
24
- public $id = 'firewall';
25
-
26
- /**
27
- * {@inheritdoc}
28
- */
29
- public $page_menu_dashicon = 'dashicons-tagcloud';
30
-
31
- /**
32
- * {@inheritdoc}
33
- */
34
- public $type = 'page';
35
-
36
- /**
37
- * {@inheritdoc}
38
- */
39
- public $show_right_sidebar_in_options = false;
40
-
41
- /**
42
- * @var object|\WBCR\Titan\Views
43
- */
44
- public $view;
45
-
46
- /**
47
- * @var object|\WBCR\Titan\Model\Firewall
48
- */
49
- public $firewall;
50
-
51
- /**
52
- * Logs constructor.
53
- *
54
- * @param \Wbcr_Factory454_Plugin $plugin
55
- *
56
- * @author Alexander Kovalev <alex.kovalevv@gmail.com>
57
- *
58
- */
59
- public function __construct( $plugin ) {
60
- $this->plugin = $plugin;
61
-
62
- $this->menu_title = __( 'Firewall', 'titan-security' );
63
- $this->page_menu_short_description = __( 'Stops Complex Attacks', 'titan-security' );
64
-
65
- $this->view = \WBCR\Titan\Plugin::app()->view();
66
-
67
- parent::__construct( $plugin );
68
- }
69
-
70
- /**
71
- * {@inheritdoc}
72
- *
73
- * @return void
74
- * @since 1.0.0
75
- */
76
- public function assets( $scripts, $styles ) {
77
- parent::assets( $scripts, $styles );
78
-
79
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-dashboard.css' );
80
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/libs/circular-progress.js', [ 'jquery' ] );
81
-
82
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/libs/sweetalert2.css' );
83
- $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/sweetalert-custom.css' );
84
-
85
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/libs/sweetalert3.min.js' );
86
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/libs/popover.min.js' );
87
- $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/firewall/firewall-dashboard.js' );
88
- }
89
-
90
-
91
- /**
92
- * {@inheritdoc}
93
- */
94
- public function showPageContent() {
95
-
96
- $data = array();
97
-
98
- $data['firewall_mode'] = 'disabled';
99
- $data['firewall_status_percent'] = 0.0;
100
- $data['firewall_status_color'] = "#5d05b7";
101
-
102
- $this->view->print_template( 'firewall/firewall-dashboard-page', $data );
103
- }
104
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ // Exit if accessed directly
6
+ use WBCR\Titan\Views;
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * The file contains a short help info.
14
+ *
15
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
16
+ * @copyright (c) 2019 Webraftic Ltd
17
+ * @version 1.0
18
+ */
19
+ class Firewall extends Base {
20
+
21
+ /**
22
+ * {@inheritdoc}
23
+ */
24
+ public $id = 'firewall';
25
+
26
+ /**
27
+ * {@inheritdoc}
28
+ */
29
+ public $page_menu_dashicon = 'dashicons-tagcloud';
30
+
31
+ /**
32
+ * {@inheritdoc}
33
+ */
34
+ public $type = 'page';
35
+
36
+ /**
37
+ * {@inheritdoc}
38
+ */
39
+ public $show_right_sidebar_in_options = false;
40
+
41
+ /**
42
+ * @var object|\WBCR\Titan\Views
43
+ */
44
+ public $view;
45
+
46
+ /**
47
+ * @var object|\WBCR\Titan\Model\Firewall
48
+ */
49
+ public $firewall;
50
+
51
+ /**
52
+ * Logs constructor.
53
+ *
54
+ * @param \Wbcr_Factory458_Plugin $plugin
55
+ *
56
+ * @author Alexander Kovalev <alex.kovalevv@gmail.com>
57
+ *
58
+ */
59
+ public function __construct( $plugin ) {
60
+ $this->plugin = $plugin;
61
+
62
+ $this->menu_title = __( 'Firewall', 'titan-security' );
63
+ $this->page_menu_short_description = __( 'Stops Complex Attacks', 'titan-security' );
64
+
65
+ $this->view = \WBCR\Titan\Plugin::app()->view();
66
+
67
+ parent::__construct( $plugin );
68
+ }
69
+
70
+ /**
71
+ * {@inheritdoc}
72
+ *
73
+ * @return void
74
+ * @since 1.0.0
75
+ */
76
+ public function assets( $scripts, $styles ) {
77
+ parent::assets( $scripts, $styles );
78
+
79
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-dashboard.css' );
80
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/libs/circular-progress.js', [ 'jquery' ] );
81
+
82
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/libs/sweetalert2.css' );
83
+ $this->styles->add( WTITAN_PLUGIN_URL . '/admin/assets/css/sweetalert-custom.css' );
84
+
85
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/libs/sweetalert3.min.js' );
86
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/libs/popover.min.js' );
87
+ $this->scripts->add( WTITAN_PLUGIN_URL . '/admin/assets/js/firewall/firewall-dashboard.js' );
88
+ }
89
+
90
+
91
+ /**
92
+ * {@inheritdoc}
93
+ */
94
+ public function showPageContent() {
95
+
96
+ $data = array();
97
+
98
+ $data['firewall_mode'] = 'disabled';
99
+ $data['firewall_status_percent'] = 0.0;
100
+ $data['firewall_status_color'] = "#5d05b7";
101
+
102
+ $this->view->print_template( 'firewall/firewall-dashboard-page', $data );
103
+ }
104
+ }
admin/pages/setup/class-pages-setup.php CHANGED
@@ -1,72 +1,72 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- /**
6
- * The page Settings.
7
- *
8
- * @since 1.0.0
9
- */
10
-
11
- // Exit if accessed directly
12
- if( !defined('ABSPATH') ) {
13
- exit;
14
- }
15
-
16
- class Setup extends \WBCR\Factory_Templates_106\Pages\Setup {
17
-
18
- /**
19
- * @param \Wbcr_Factory454_Plugin $plugin
20
- */
21
- public function __construct(\Wbcr_Factory454_Plugin $plugin)
22
- {
23
- parent::__construct($plugin);
24
-
25
- $path = WTITAN_PLUGIN_DIR . '/admin/pages/setup/steps';
26
-
27
- #Step 1 is default \WBCR\Factory_Templates_106\Pages\Step_Plugins
28
- $this->register_step($path . '/class-step-default.php', '\WBCR\Titan\Page\Step_Default');
29
-
30
- #Step 2 \WBCR\Factory_Templates_106\Pages\Step_Plugins
31
- $this->register_step($path . '/class-step-plugins.php', '\WBCR\Titan\Page\Step_Plugins');
32
- #Step 3
33
- $this->register_step($path . '/class-step-security-audit.php', '\WBCR\Titan\Page\Step_Security_Audit');
34
- #Step 4
35
- $this->register_step($path . '/class-step-setting-scan-malware.php', '\WBCR\Titan\Page\Step_Scan_Malware');
36
- #Step 5
37
- $this->register_step($path . '/class-step-setting-tweaks.php', '\WBCR\Titan\Page\Step_Setting_Tweaks');
38
- #Step 6
39
- $this->register_step($path . '/class-step-setting-antispam.php', '\WBCR\Titan\Page\Step_Setting_Antispam');
40
- #Step 7
41
- //$this->register_step($path . '/class-step-google-page-speed-after.php', '\WBCR\Titan\Page\Step_Google_Page_Speed_After');
42
- #Step 8
43
- $this->register_step($path . '/class-step-congratulation.php', '\WBCR\Titan\Page\Step_Congratulation');
44
- }
45
-
46
- public function get_close_wizard_url()
47
- {
48
- return $this->getBaseUrl('dashboard');
49
- }
50
-
51
- /**
52
- * Requests assets (js and css) for the page.
53
- *
54
- * @return void
55
- * @since 1.0.0
56
- * @see FactoryPages453_AdminPage
57
- *
58
- */
59
- public function assets($scripts, $styles)
60
- {
61
- parent::assets($scripts, $styles);
62
-
63
- /* Install addons styles and scripts */
64
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/install-addons.css');
65
- $this->scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/install-addons.js');
66
-
67
- //$this->scripts->add(WCL_PLUGIN_URL . '/admin/assets/js/circular-progress.js');
68
- //$this->scripts->add(WCL_PLUGIN_URL . '/admin/assets/js/setup.js');
69
- $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/setup/page-setup.css');
70
- }
71
-
72
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ /**
6
+ * The page Settings.
7
+ *
8
+ * @since 1.0.0
9
+ */
10
+
11
+ // Exit if accessed directly
12
+ if( !defined('ABSPATH') ) {
13
+ exit;
14
+ }
15
+
16
+ class Setup extends \WBCR\Factory_Templates_110\Pages\Setup {
17
+
18
+ /**
19
+ * @param \Wbcr_Factory458_Plugin $plugin
20
+ */
21
+ public function __construct(\Wbcr_Factory458_Plugin $plugin)
22
+ {
23
+ parent::__construct($plugin);
24
+
25
+ $path = WTITAN_PLUGIN_DIR . '/admin/pages/setup/steps';
26
+
27
+ #Step 1 is default \WBCR\Factory_Templates_110\Pages\Step_Plugins
28
+ $this->register_step($path . '/class-step-default.php', '\WBCR\Titan\Page\Step_Default');
29
+
30
+ #Step 2 \WBCR\Factory_Templates_110\Pages\Step_Plugins
31
+ $this->register_step($path . '/class-step-plugins.php', '\WBCR\Titan\Page\Step_Plugins');
32
+ #Step 3
33
+ $this->register_step($path . '/class-step-security-audit.php', '\WBCR\Titan\Page\Step_Security_Audit');
34
+ #Step 4
35
+ $this->register_step($path . '/class-step-setting-scan-malware.php', '\WBCR\Titan\Page\Step_Scan_Malware');
36
+ #Step 5
37
+ $this->register_step($path . '/class-step-setting-tweaks.php', '\WBCR\Titan\Page\Step_Setting_Tweaks');
38
+ #Step 6
39
+ $this->register_step($path . '/class-step-setting-antispam.php', '\WBCR\Titan\Page\Step_Setting_Antispam');
40
+ #Step 7
41
+ //$this->register_step($path . '/class-step-google-page-speed-after.php', '\WBCR\Titan\Page\Step_Google_Page_Speed_After');
42
+ #Step 8
43
+ $this->register_step($path . '/class-step-congratulation.php', '\WBCR\Titan\Page\Step_Congratulation');
44
+ }
45
+
46
+ public function get_close_wizard_url()
47
+ {
48
+ return $this->getBaseUrl('dashboard');
49
+ }
50
+
51
+ /**
52
+ * Requests assets (js and css) for the page.
53
+ *
54
+ * @return void
55
+ * @since 1.0.0
56
+ * @see FactoryPages457_AdminPage
57
+ *
58
+ */
59
+ public function assets($scripts, $styles)
60
+ {
61
+ parent::assets($scripts, $styles);
62
+
63
+ /* Install addons styles and scripts */
64
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/install-addons.css');
65
+ $this->scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/install-addons.js');
66
+
67
+ //$this->scripts->add(WCL_PLUGIN_URL . '/admin/assets/js/circular-progress.js');
68
+ //$this->scripts->add(WCL_PLUGIN_URL . '/admin/assets/js/setup.js');
69
+ $this->styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/setup/page-setup.css');
70
+ }
71
+
72
+ }
admin/pages/setup/steps/class-step-congratulation.php CHANGED
@@ -1,193 +1,193 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- /**
6
- * Step
7
- * @author Webcraftic <wordpress.webraftic@gmail.com>
8
- * @copyright (c) 23.07.2020, Webcraftic
9
- * @version 1.0
10
- */
11
- class Step_Congratulation extends \WBCR\Factory_Templates_106\Pages\Step_Custom {
12
-
13
- protected $prev_id = 'step5';
14
- protected $id = 'step6';
15
-
16
- public function get_title()
17
- {
18
- return __("Finish", "titan-security");
19
- }
20
-
21
- /**
22
- * Requests assets (js and css) for the page.
23
- *
24
- * @return void
25
- * @since 1.0.0
26
- * @see FactoryPages453_AdminPage
27
- *
28
- */
29
- public function assets($scripts, $styles)
30
- {
31
- $styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-dashboard.css');
32
- $scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/libs/circular-progress.js', ['jquery']);
33
- $scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/libs/popover.min.js');
34
- }
35
-
36
- public function html()
37
- {
38
- $pricing_page_url = $this->plugin->get_support()->get_pricing_url(true, 'setup_wizard');
39
- ?>
40
- <div class="w-factory-templates-106-setup__inner-wrap">
41
- <h3><?php _e("Congratulations, the plugin configuration is complete!", "titan-security"); ?></h3>
42
- <script>
43
- jQuery(document).ready(function($) {
44
- $('#wtitan-circle-firewall-coverage').wfCircularProgress({
45
- endPercent: 0.6,
46
- color: '#ca4a1f',
47
- inactiveColor: '#ececec',
48
- strokeWidth: 2,
49
- diameter: 100,
50
- });
51
- $("#wtitan-circle-firewall-coverage").fu_popover({
52
- content: $('#wtitan-status-tooltip').html(),
53
- dismissable: true,
54
- placement: 'right',
55
- trigger: 'hover',
56
- width: '350px',
57
- autoHide: false
58
- });
59
- });
60
- </script>
61
- <table>
62
- <tr>
63
- <td>
64
- <div id="wtitan-circle-firewall-coverage" class="wtitan-status-circular"></div>
65
-
66
- <div id="wtitan-status-tooltip" style="display: none">
67
- <strong><?php _e('How do I get to 100%?', 'titan-security'); ?></strong>
68
- <ul>
69
- <li><?php _e('15% Use the Titan Firewall', 'titan-security'); ?></li>
70
- <li><?php _e('10% Use WordPress Security Scanner PRO', 'titan-security'); ?></li>
71
- <li><?php _e('10% Use Malware scanner PRO', 'titan-security'); ?></li>
72
- <li><?php _e('5% Use Site Checker', 'titan-security'); ?></li>
73
- <li>
74
- <a href="#"><?php _e('How does Titan determine this?', 'titan-security'); ?></a>
75
- </li>
76
- </ul>
77
- </div>
78
- </td>
79
- <td style="vert-align: top">
80
- <p style="text-align: left;margin:0;">
81
- <?php _e('You have successfully completed the basic plugin setup! You can go to the general plugin settings to enable other options that we did not offer you. Your site is 60% secure.', 'titan-security'); ?>
82
- </p>
83
- </td>
84
- </tr>
85
- </table>
86
- <hr>
87
- <div>
88
- <p style="text-align: left;">
89
- <?php _e("Basic protection will help you avoid many security problems for your site, but to fully protect your site, we recommend that you purchase the premium version of the plugin.", "titan-security") ?>
90
- </p>
91
- <table style="width: 100%">
92
- <thead>
93
- <tr>
94
- <th></th>
95
- <th><?php _e('Free', 'titan-security'); ?></th>
96
- <th><?php _e('PRO', 'titan-security'); ?></th>
97
- </tr>
98
- </thead>
99
- <tbody>
100
- <tr>
101
- <td>Antispam</td>
102
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
103
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
104
- </tr>
105
- <tr>
106
- <td>Malware scanner</td>
107
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
108
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
109
- </tr>
110
- <tr>
111
- <td>WordPress Security Scanner</td>
112
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
113
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
114
- </tr>
115
- <tr>
116
- <td>Hide login page</td>
117
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
118
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
119
- </tr>
120
- <tr>
121
- <td>Strong password</td>
122
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
123
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
124
- </tr>
125
- <tr>
126
- <td>Antispam PRO</td>
127
- <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
128
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
129
- </tr>
130
- <tr>
131
- <td>Firewall (WAF)</td>
132
- <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
133
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
134
- </tr>
135
- <tr>
136
- <td>WordPress Security Scanner PRO</td>
137
- <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
138
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
139
- </tr>
140
- <tr>
141
- <td>Malware scanner PRO</td>
142
- <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
143
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
144
- </tr>
145
- <tr>
146
- <td>Real-time IP Blacklist</td>
147
- <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
148
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
149
- </tr>
150
- <tr>
151
- <td>
152
- Detect Malicious Code in Themes and Plugins
153
- </td>
154
- <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
155
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
156
- </tr>
157
- <tr>
158
- <td>
159
- Site Checker
160
- </td>
161
- <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
162
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
163
- </tr>
164
- <tr>
165
- <td>Premium support</td>
166
- <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
167
- <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
168
- </tr>
169
- </tbody>
170
- </table>
171
- <p>
172
- <a href="<?php echo esc_url($pricing_page_url); ?>" class="wtitan-setup__install-component-button" target="_blank">
173
- <?php _e('Get Pro', 'titan-security') ?>
174
- </a>
175
- </p>
176
- </div>
177
- </div>
178
- <?php $this->render_button();
179
- ?>
180
- <?php
181
- }
182
-
183
- protected function continue_step($skip = false)
184
- {
185
- $next_id = $this->get_next_id();
186
- if( !$next_id ) {
187
- wp_safe_redirect($this->plugin->getPluginPageUrl('dashboard'));
188
- die();
189
- }
190
- wp_safe_redirect($this->page->getActionUrl($next_id));
191
- die();
192
- }
193
  }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ /**
6
+ * Step
7
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
8
+ * @copyright (c) 23.07.2020, Webcraftic
9
+ * @version 1.0
10
+ */
11
+ class Step_Congratulation extends \WBCR\Factory_Templates_110\Pages\Step_Custom {
12
+
13
+ protected $prev_id = 'step5';
14
+ protected $id = 'step6';
15
+
16
+ public function get_title()
17
+ {
18
+ return __("Finish", "titan-security");
19
+ }
20
+
21
+ /**
22
+ * Requests assets (js and css) for the page.
23
+ *
24
+ * @return void
25
+ * @since 1.0.0
26
+ * @see FactoryPages457_AdminPage
27
+ *
28
+ */
29
+ public function assets($scripts, $styles)
30
+ {
31
+ $styles->add(WTITAN_PLUGIN_URL . '/admin/assets/css/firewall/firewall-dashboard.css');
32
+ $scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/libs/circular-progress.js', ['jquery']);
33
+ $scripts->add(WTITAN_PLUGIN_URL . '/admin/assets/js/libs/popover.min.js');
34
+ }
35
+
36
+ public function html()
37
+ {
38
+ $pricing_page_url = $this->plugin->get_support()->get_pricing_url(true, 'setup_wizard');
39
+ ?>
40
+ <div class="w-factory-templates-110-setup__inner-wrap">
41
+ <h3><?php _e("Congratulations, the plugin configuration is complete!", "titan-security"); ?></h3>
42
+ <script>
43
+ jQuery(document).ready(function($) {
44
+ $('#wtitan-circle-firewall-coverage').wfCircularProgress({
45
+ endPercent: 0.6,
46
+ color: '#ca4a1f',
47
+ inactiveColor: '#ececec',
48
+ strokeWidth: 2,
49
+ diameter: 100,
50
+ });
51
+ $("#wtitan-circle-firewall-coverage").fu_popover({
52
+ content: $('#wtitan-status-tooltip').html(),
53
+ dismissable: true,
54
+ placement: 'right',
55
+ trigger: 'hover',
56
+ width: '350px',
57
+ autoHide: false
58
+ });
59
+ });
60
+ </script>
61
+ <table>
62
+ <tr>
63
+ <td>
64
+ <div id="wtitan-circle-firewall-coverage" class="wtitan-status-circular"></div>
65
+
66
+ <div id="wtitan-status-tooltip" style="display: none">
67
+ <strong><?php _e('How do I get to 100%?', 'titan-security'); ?></strong>
68
+ <ul>
69
+ <li><?php _e('15% Use the Titan Firewall', 'titan-security'); ?></li>
70
+ <li><?php _e('10% Use WordPress Security Scanner PRO', 'titan-security'); ?></li>
71
+ <li><?php _e('10% Use Malware scanner PRO', 'titan-security'); ?></li>
72
+ <li><?php _e('5% Use Site Checker', 'titan-security'); ?></li>
73
+ <li>
74
+ <a href="#"><?php _e('How does Titan determine this?', 'titan-security'); ?></a>
75
+ </li>
76
+ </ul>
77
+ </div>
78
+ </td>
79
+ <td style="vert-align: top">
80
+ <p style="text-align: left;margin:0;">
81
+ <?php _e('You have successfully completed the basic plugin setup! You can go to the general plugin settings to enable other options that we did not offer you. Your site is 60% secure.', 'titan-security'); ?>
82
+ </p>
83
+ </td>
84
+ </tr>
85
+ </table>
86
+ <hr>
87
+ <div>
88
+ <p style="text-align: left;">
89
+ <?php _e("Basic protection will help you avoid many security problems for your site, but to fully protect your site, we recommend that you purchase the premium version of the plugin.", "titan-security") ?>
90
+ </p>
91
+ <table style="width: 100%">
92
+ <thead>
93
+ <tr>
94
+ <th></th>
95
+ <th><?php _e('Free', 'titan-security'); ?></th>
96
+ <th><?php _e('PRO', 'titan-security'); ?></th>
97
+ </tr>
98
+ </thead>
99
+ <tbody>
100
+ <tr>
101
+ <td>Antispam</td>
102
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
103
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
104
+ </tr>
105
+ <tr>
106
+ <td>Malware scanner</td>
107
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
108
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
109
+ </tr>
110
+ <tr>
111
+ <td>WordPress Security Scanner</td>
112
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
113
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
114
+ </tr>
115
+ <tr>
116
+ <td>Hide login page</td>
117
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
118
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
119
+ </tr>
120
+ <tr>
121
+ <td>Strong password</td>
122
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
123
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
124
+ </tr>
125
+ <tr>
126
+ <td>Antispam PRO</td>
127
+ <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
128
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
129
+ </tr>
130
+ <tr>
131
+ <td>Firewall (WAF)</td>
132
+ <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
133
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
134
+ </tr>
135
+ <tr>
136
+ <td>WordPress Security Scanner PRO</td>
137
+ <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
138
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
139
+ </tr>
140
+ <tr>
141
+ <td>Malware scanner PRO</td>
142
+ <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
143
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
144
+ </tr>
145
+ <tr>
146
+ <td>Real-time IP Blacklist</td>
147
+ <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
148
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
149
+ </tr>
150
+ <tr>
151
+ <td>
152
+ Detect Malicious Code in Themes and Plugins
153
+ </td>
154
+ <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
155
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
156
+ </tr>
157
+ <tr>
158
+ <td>
159
+ Site Checker
160
+ </td>
161
+ <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
162
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
163
+ </tr>
164
+ <tr>
165
+ <td>Premium support</td>
166
+ <td class="wtitan-setup__color--red"><span class="dashicons dashicons-minus"></span></td>
167
+ <td class="wtitan-setup__color--green"><span class="dashicons dashicons-yes"></span></td>
168
+ </tr>
169
+ </tbody>
170
+ </table>
171
+ <p>
172
+ <a href="<?php echo esc_url($pricing_page_url); ?>" class="wtitan-setup__install-component-button" target="_blank">
173
+ <?php _e('Get Pro', 'titan-security') ?>
174
+ </a>
175
+ </p>
176
+ </div>
177
+ </div>
178
+ <?php $this->render_button();
179
+ ?>
180
+ <?php
181
+ }
182
+
183
+ protected function continue_step($skip = false)
184
+ {
185
+ $next_id = $this->get_next_id();
186
+ if( !$next_id ) {
187
+ wp_safe_redirect($this->plugin->getPluginPageUrl('dashboard'));
188
+ die();
189
+ }
190
+ wp_safe_redirect($this->page->getActionUrl($next_id));
191
+ die();
192
+ }
193
  }
admin/pages/setup/steps/class-step-default.php CHANGED
@@ -1,39 +1,39 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- /**
6
- * Step
7
- * @author Webcraftic <wordpress.webraftic@gmail.com>
8
- * @copyright (c) 23.07.2020, Webcraftic
9
- * @version 1.0
10
- */
11
- class Step_Default extends \WBCR\Factory_Templates_106\Pages\Step_Custom {
12
-
13
- protected $id = 'step0';
14
- protected $next_id = 'step1';
15
-
16
- public function get_title()
17
- {
18
- return "Welcome";
19
- }
20
-
21
- public function html()
22
- {
23
- ?>
24
- <div class="w-factory-templates-106-setup__inner-wrap">
25
- <div class="w-factory-templates-106-setup-step__new_onboarding-wrapper">
26
- <p class="w-factory-templates-106-setup-step__new_onboarding-welcome">
27
- <?php _e('Welcome to', 'titan-security') ?>
28
- </p>
29
- <h1 class="w-factory-templates-106-logo">
30
- <img src="<?php echo WTITAN_PLUGIN_URL; ?>/admin/assets/img/logo9.png" alt="">
31
- </h1>
32
- <p><?php _e('Protect your site from external and internal threats in just 2 minutes.', 'titan-security') ?></p>
33
- </div>
34
-
35
- </div>
36
- <?php $this->render_button(true, false, __('Yes, I want to try the wizard'), 'center'); ?>
37
- <?php
38
- }
39
  }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ /**
6
+ * Step
7
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
8
+ * @copyright (c) 23.07.2020, Webcraftic
9
+ * @version 1.0
10
+ */
11
+ class Step_Default extends \WBCR\Factory_Templates_110\Pages\Step_Custom {
12
+
13
+ protected $id = 'step0';
14
+ protected $next_id = 'step1';
15
+
16
+ public function get_title()
17
+ {
18
+ return "Welcome";
19
+ }
20
+
21
+ public function html()
22
+ {
23
+ ?>
24
+ <div class="w-factory-templates-110-setup__inner-wrap">
25
+ <div class="w-factory-templates-110-setup-step__new_onboarding-wrapper">
26
+ <p class="w-factory-templates-110-setup-step__new_onboarding-welcome">
27
+ <?php _e('Welcome to', 'titan-security') ?>
28
+ </p>
29
+ <h1 class="w-factory-templates-110-logo">
30
+ <img src="<?php echo WTITAN_PLUGIN_URL; ?>/admin/assets/img/logo9.png" alt="">
31
+ </h1>
32
+ <p><?php _e('Protect your site from external and internal threats in just 2 minutes.', 'titan-security') ?></p>
33
+ </div>
34
+
35
+ </div>
36
+ <?php $this->render_button(true, false, __('Yes, I want to try the wizard'), 'center'); ?>
37
+ <?php
38
+ }
39
  }
admin/pages/setup/steps/class-step-plugins.php CHANGED
@@ -1,50 +1,50 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- /**
6
- * Step
7
- * @author Webcraftic <wordpress.webraftic@gmail.com>
8
- * @copyright (c) 23.07.2020, Webcraftic
9
- * @version 1.0
10
- */
11
- class Step_Plugins extends \WBCR\Factory_Templates_106\Pages\Step_Custom {
12
-
13
- protected $prev_id = 'step0';
14
- protected $id = 'step1';
15
- protected $next_id = 'step2';
16
-
17
- public function get_title()
18
- {
19
- return "Setup Plugins";
20
- }
21
-
22
- public function html()
23
- {
24
- $install_hide_login_page_btn = $this->plugin->get_install_component_button('wordpress', 'hide-login-page/hide-login-page.php');
25
- ?>
26
- <div class="w-factory-templates-106-setup__inner-wrap">
27
- <h3><?php _e('Installing plugins', 'titan-security') ?></h3>
28
- <p style="text-align: left;"><?php _e('We analyzed your site and decided that in order to get the maximum result in
29
- optimizing your site, you will need to install additional plugins.', 'titan-security') ?></p>
30
- <table class="form-table">
31
- <thead>
32
- <tr>
33
- <th style="width:300px"><?php _e('Plugin', 'titan-security') ?></th>
34
- <th style="width:150px"><?php _e('Security score', 'titan-security') ?></th>
35
- <th style="width:80px"></th>
36
- </tr>
37
- </thead>
38
- <tr>
39
- <td>Hide login page</td>
40
- <td style="color:grey">+10</td>
41
- <td>
42
- <?php $install_hide_login_page_btn->render_link(); ?>
43
- </td>
44
- </tr>
45
- </table>
46
- </div>
47
- <?php $this->render_button(); ?>
48
- <?php
49
- }
50
  }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ /**
6
+ * Step
7
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
8
+ * @copyright (c) 23.07.2020, Webcraftic
9
+ * @version 1.0
10
+ */
11
+ class Step_Plugins extends \WBCR\Factory_Templates_110\Pages\Step_Custom {
12
+
13
+ protected $prev_id = 'step0';
14
+ protected $id = 'step1';
15
+ protected $next_id = 'step2';
16
+
17
+ public function get_title()
18
+ {
19
+ return "Setup Plugins";
20
+ }
21
+
22
+ public function html()
23
+ {
24
+ $install_hide_login_page_btn = $this->plugin->get_install_component_button('wordpress', 'hide-login-page/hide-login-page.php');
25
+ ?>
26
+ <div class="w-factory-templates-110-setup__inner-wrap">
27
+ <h3><?php _e('Installing plugins', 'titan-security') ?></h3>
28
+ <p style="text-align: left;"><?php _e('We analyzed your site and decided that in order to get the maximum result in
29
+ optimizing your site, you will need to install additional plugins.', 'titan-security') ?></p>
30
+ <table class="form-table">
31
+ <thead>
32
+ <tr>
33
+ <th style="width:300px"><?php _e('Plugin', 'titan-security') ?></th>
34
+ <th style="width:150px"><?php _e('Security score', 'titan-security') ?></th>
35
+ <th style="width:80px"></th>
36
+ </tr>
37
+ </thead>
38
+ <tr>
39
+ <td>Hide login page</td>
40
+ <td style="color:grey">+10</td>
41
+ <td>
42
+ <?php $install_hide_login_page_btn->render_link(); ?>
43
+ </td>
44
+ </tr>
45
+ </table>
46
+ </div>
47
+ <?php $this->render_button(); ?>
48
+ <?php
49
+ }
50
  }
admin/pages/setup/steps/class-step-security-audit.php CHANGED
@@ -1,94 +1,94 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- /**
6
- * Step
7
- * @author Webcraftic <wordpress.webraftic@gmail.com>
8
- * @copyright (c) 23.07.2020, Webcraftic
9
- * @version 1.0
10
- */
11
- class Step_Security_Audit extends \WBCR\Factory_Templates_106\Pages\Step_Custom {
12
-
13
- protected $prev_id = 'step1';
14
- protected $id = 'step2';
15
- protected $next_id = 'step3';
16
-
17
- public function get_title()
18
- {
19
- return __("Security Audit", "titan-security");
20
- }
21
-
22
- public function html()
23
- {
24
- $site_url = get_home_url();
25
- ?>
26
- <script>
27
- jQuery(document).ready(function($) {
28
- //HIDE
29
- jQuery(document).on('click', '.wt-scanner-hide-button', function(e) {
30
- e.preventDefault();
31
- var btn = jQuery(this);
32
- var wtitan_hide_target = jQuery(".wtitan-tab-table-container#wtitan-hided");
33
-
34
- jQuery.ajax({
35
- method: 'POST',
36
- url: ajaxurl,
37
- data: {
38
- action: 'wtitan_scanner_hide',
39
- type: btn.data('type'),
40
- id: btn.data('id'),
41
- _ajax_nonce: "<?php echo wp_create_nonce("hide"); ?>"
42
- },
43
- beforeSend: function() {
44
- btn.parent('td').parent('tr').css('opacity', '0.5');
45
- },
46
- success: function(result) {
47
- if( result.success ) {
48
- btn.parent('td').parent('tr').animate({
49
- opacity: 'hide',
50
- height: 'hide'
51
- }, 200);
52
- wtitan_hide_target.html(result.data.html);
53
- console.log('Hided - ' + btn.data('id'));
54
- }
55
- },
56
- complete: function() {
57
- }
58
- });
59
- });
60
-
61
- jQuery.ajax({
62
- method: 'POST',
63
- url: ajaxurl,
64
- data: {
65
- action: 'wtitan_audit_all',
66
- _ajax_nonce: "<?php echo wp_create_nonce('get_audits'); ?>"
67
- },
68
- beforeSend: function() {
69
- $('.wtitan-step-audit__preloader').show();
70
- },
71
- success: function(result) {
72
- console.log('audit - ok');
73
- $('.wtitan-step-audit__preloader').hide();
74
- $('#wtitan-step-audit__content').html(result)
75
- },
76
- complete: function() {
77
- }
78
- });
79
- });
80
- </script>
81
- <div class="w-factory-templates-106-setup__inner-wrap">
82
- <h3><?php _e("Security Audit", "titan-security"); ?> (<?php _e("Issues", "titan-security"); ?>)</h3>
83
- <p style="text-align: left;">
84
- <?php _e("We will audit your site for potential threats, vulnerabilities and security issues. Please see the list
85
- of issues below:", "titan-security"); ?>
86
- </p>
87
-
88
- <div class="wtitan-step-audit__preloader"></div>
89
- <div id="wtitan-step-audit__content"></div>
90
- </div>
91
- <?php $this->render_button(); ?>
92
- <?php
93
- }
94
  }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ /**
6
+ * Step
7
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
8
+ * @copyright (c) 23.07.2020, Webcraftic
9
+ * @version 1.0
10
+ */
11
+ class Step_Security_Audit extends \WBCR\Factory_Templates_110\Pages\Step_Custom {
12
+
13
+ protected $prev_id = 'step1';
14
+ protected $id = 'step2';
15
+ protected $next_id = 'step3';
16
+
17
+ public function get_title()
18
+ {
19
+ return __("Security Audit", "titan-security");
20
+ }
21
+
22
+ public function html()
23
+ {
24
+ $site_url = get_home_url();
25
+ ?>
26
+ <script>
27
+ jQuery(document).ready(function($) {
28
+ //HIDE
29
+ jQuery(document).on('click', '.wt-scanner-hide-button', function(e) {
30
+ e.preventDefault();
31
+ var btn = jQuery(this);
32
+ var wtitan_hide_target = jQuery(".wtitan-tab-table-container#wtitan-hided");
33
+
34
+ jQuery.ajax({
35
+ method: 'POST',
36
+ url: ajaxurl,
37
+ data: {
38
+ action: 'wtitan_scanner_hide',
39
+ type: btn.data('type'),
40
+ id: btn.data('id'),
41
+ _ajax_nonce: "<?php echo wp_create_nonce("hide"); ?>"
42
+ },
43
+ beforeSend: function() {
44
+ btn.parent('td').parent('tr').css('opacity', '0.5');
45
+ },
46
+ success: function(result) {
47
+ if( result.success ) {
48
+ btn.parent('td').parent('tr').animate({
49
+ opacity: 'hide',
50
+ height: 'hide'
51
+ }, 200);
52
+ wtitan_hide_target.html(result.data.html);
53
+ console.log('Hided - ' + btn.data('id'));
54
+ }
55
+ },
56
+ complete: function() {
57
+ }
58
+ });
59
+ });
60
+
61
+ jQuery.ajax({
62
+ method: 'POST',
63
+ url: ajaxurl,
64
+ data: {
65
+ action: 'wtitan_audit_all',
66
+ _ajax_nonce: "<?php echo wp_create_nonce('get_audits'); ?>"
67
+ },
68
+ beforeSend: function() {
69
+ $('.wtitan-step-audit__preloader').show();
70
+ },
71
+ success: function(result) {
72
+ console.log('audit - ok');
73
+ $('.wtitan-step-audit__preloader').hide();
74
+ $('#wtitan-step-audit__content').html(result)
75
+ },
76
+ complete: function() {
77
+ }
78
+ });
79
+ });
80
+ </script>
81
+ <div class="w-factory-templates-110-setup__inner-wrap">
82
+ <h3><?php _e("Security Audit", "titan-security"); ?> (<?php _e("Issues", "titan-security"); ?>)</h3>
83
+ <p style="text-align: left;">
84
+ <?php _e("We will audit your site for potential threats, vulnerabilities and security issues. Please see the list
85
+ of issues below:", "titan-security"); ?>
86
+ </p>
87
+
88
+ <div class="wtitan-step-audit__preloader"></div>
89
+ <div id="wtitan-step-audit__content"></div>
90
+ </div>
91
+ <?php $this->render_button(); ?>
92
+ <?php
93
+ }
94
  }
admin/pages/setup/steps/class-step-setting-antispam.php CHANGED
@@ -1,51 +1,51 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- /**
6
- * Step
7
- * @author Webcraftic <wordpress.webraftic@gmail.com>
8
- * @copyright (c) 23.07.2020, Webcraftic
9
- * @version 1.0
10
- */
11
- class Step_Setting_Antispam extends \WBCR\Factory_Templates_106\Pages\Step_Form {
12
-
13
- protected $prev_id = 'step4';
14
- protected $id = 'step5';
15
- protected $next_id = 'step6';
16
-
17
- public function get_title()
18
- {
19
- return __("Setting Antispam", "titan-security");
20
- }
21
-
22
- public function get_form_description()
23
- {
24
- return _e("The antispam module protects comment forms on your site from spam attacks. We recommend enabling protection if you do not use other antispam plugins and use comments in your articles.", "titan-security");
25
- }
26
-
27
- public function get_form_options()
28
- {
29
- $options[] = [
30
- 'type' => 'checkbox',
31
- 'way' => 'buttons',
32
- 'name' => 'antispam_mode',
33
- 'title' => __('Anti-spam mode', 'titan-security'),
34
- 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'green'],
35
- 'hint' => __('Enable or disable anti-spam for all site.', 'titan-security'),
36
- 'default' => true,
37
- ];
38
-
39
- $options[] = [
40
- 'type' => 'checkbox',
41
- 'way' => 'buttons',
42
- 'name' => 'save_spam_comments',
43
- 'title' => __('Save spam comments', 'titan-security'),
44
- 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'green'],
45
- 'hint' => __('Save spam comments into spam section. Useful for testing how the plugin works.', 'titan-security'),
46
- 'default' => true
47
- ];
48
-
49
- return $options;
50
- }
51
  }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ /**
6
+ * Step
7
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
8
+ * @copyright (c) 23.07.2020, Webcraftic
9
+ * @version 1.0
10
+ */
11
+ class Step_Setting_Antispam extends \WBCR\Factory_Templates_110\Pages\Step_Form {
12
+
13
+ protected $prev_id = 'step4';
14
+ protected $id = 'step5';
15
+ protected $next_id = 'step6';
16
+
17
+ public function get_title()
18
+ {
19
+ return __("Setting Antispam", "titan-security");
20
+ }
21
+
22
+ public function get_form_description()
23
+ {
24
+ return _e("The antispam module protects comment forms on your site from spam attacks. We recommend enabling protection if you do not use other antispam plugins and use comments in your articles.", "titan-security");
25
+ }
26
+
27
+ public function get_form_options()
28
+ {
29
+ $options[] = [
30
+ 'type' => 'checkbox',
31
+ 'way' => 'buttons',
32
+ 'name' => 'antispam_mode',
33
+ 'title' => __('Anti-spam mode', 'titan-security'),
34
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'green'],
35
+ 'hint' => __('Enable or disable anti-spam for all site.', 'titan-security'),
36
+ 'default' => true,
37
+ ];
38
+
39
+ $options[] = [
40
+ 'type' => 'checkbox',
41
+ 'way' => 'buttons',
42
+ 'name' => 'save_spam_comments',
43
+ 'title' => __('Save spam comments', 'titan-security'),
44
+ 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'green'],
45
+ 'hint' => __('Save spam comments into spam section. Useful for testing how the plugin works.', 'titan-security'),
46
+ 'default' => true
47
+ ];
48
+
49
+ return $options;
50
+ }
51
  }
admin/pages/setup/steps/class-step-setting-scan-malware.php CHANGED
@@ -1,113 +1,113 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- /**
6
- * Step
7
- *
8
- * @author Webcraftic <wordpress.webraftic@gmail.com>
9
- * @copyright (c) 23.07.2020, Webcraftic
10
- * @version 1.0
11
- */
12
- class Step_Scan_Malware extends \WBCR\Factory_Templates_106\Pages\Step_Custom {
13
-
14
- protected $prev_id = 'step2';
15
- protected $id = 'step3';
16
- protected $next_id = 'step4';
17
-
18
- public function get_title()
19
- {
20
- return __("Scan Malware", 'titan-security');
21
- }
22
-
23
- public function html()
24
- {
25
- /** @var \WBCR\Titan\MalwareScanner\Scanner $scanner */
26
- $scanner = get_option($this->plugin->getPrefix() . 'scanner');
27
-
28
- if( !$scanner ) {
29
- $chart_data = [
30
- //'scanner_started' => 0,
31
- 'matched' => false,
32
- 'progress' => [0, 0, 100],
33
- 'cleaned' => 0,
34
- 'suspicious' => 0,
35
- 'scanned' => 0,
36
- 'notverified' => 0,
37
- 'files_count' => 0,
38
- ];
39
- } else {
40
- $matched = get_option($this->plugin->getPrefix() . 'scanner_malware_matched', false);
41
- $scanner_started = $this->plugin->getOption('scanner_status') == 'started';
42
- $files_count = $this->plugin->getOption('scanner_files_count', 0);
43
-
44
- $progress = [
45
- $files_count > 0 ? floor($scanner->cleaned_count / $files_count * 100) : 0,
46
- $files_count > 0 ? ceil($scanner->suspicious_count / $files_count * 100) : 0,
47
- $files_count > 0 ? floor($scanner->files_count / $files_count * 100) : 0
48
- ];
49
-
50
- $chart_data = [
51
- //'scanner_started' => $scanner_started,
52
- 'matched' => $matched,
53
- 'cleaned' => $scanner->cleaned_count,
54
- 'suspicious' => $scanner->suspicious_count,
55
- 'scanned' => $scanner->cleaned_count + $scanner->suspicious_count,
56
- 'notverified' => $scanner->files_count,
57
- 'files_count' => $files_count,
58
- 'progress' => $progress,
59
- ];
60
- }
61
-
62
- ?>
63
- <div class="w-factory-templates-106-setup__inner-wrap">
64
- <h3><?php _e("Scan Malware", 'titan-security'); ?></h3>
65
- <p style="text-align: left;">
66
- <?php _e("Titan Scanner to check your website for viruses and malicious code. After scan, you will receive a detailed report on the crawl of your site.", 'titan-security'); ?>
67
- </p>
68
- <div>
69
- <div class="wt-scanner-chart">
70
- <div class="wt-scanner-chart-clean" style="width: <?php echo $chart_data['progress'][0]; ?>%;"></div>
71
- <div class="wt-scanner-chart-suspicious" style="width: <?php echo $chart_data['progress'][1]; ?>%;"></div>
72
- <div class="wt-scanner-chart-notverified"
73
- style="width: <?php echo $chart_data['progress'][2]; ?>%;"></div>
74
- </div>
75
- </div>
76
- <div>
77
- <div class="wt-scanner-legend">
78
- <table>
79
- <tbody>
80
- <tr>
81
- <td><span class="wt-scanner-chart-clean wt-legend-item"></span></td>
82
- <td><?php _e("Cleaned", 'titan-security'); ?> -
83
- <span id="wtitan-cleaned-num"><?php echo $chart_data['cleaned']; ?></span>
84
- </td>
85
-
86
- <td><span class="wt-scanner-chart-suspicious wt-legend-item"></span></td>
87
- <td><?php _e("Suspicious", 'titan-security'); ?> -
88
- <span id="wtitan-suspicious-num"><?php echo $chart_data['suspicious']; ?></span>
89
- </td>
90
-
91
- <td><span class="wt-scanner-chart-notverified wt-legend-item"></span></td>
92
- <td><?php _e("Not verified", 'titan-security'); ?> -
93
- <span id="wtitan-notverified-num"><?php echo $chart_data['notverified']; ?></span></td>
94
- </tr>
95
- </tbody>
96
- </table>
97
- </div>
98
- </div>
99
- </div>
100
- <?php $this->render_button(!$scanner_started, true, 'Start Scan And Continue'); ?>
101
- <?php
102
- }
103
-
104
- protected function continue_step($skip = false)
105
- {
106
- if( !current_user_can('install_plugins') ) {
107
- wp_die(__('Sorry, you are not allowed to access this page.'), 403);
108
- }
109
-
110
- titan_create_scheduler_scanner();
111
- parent::continue_step($skip);
112
- }
113
  }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ /**
6
+ * Step
7
+ *
8
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
9
+ * @copyright (c) 23.07.2020, Webcraftic
10
+ * @version 1.0
11
+ */
12
+ class Step_Scan_Malware extends \WBCR\Factory_Templates_110\Pages\Step_Custom {
13
+
14
+ protected $prev_id = 'step2';
15
+ protected $id = 'step3';
16
+ protected $next_id = 'step4';
17
+
18
+ public function get_title()
19
+ {
20
+ return __("Scan Malware", 'titan-security');
21
+ }
22
+
23
+ public function html()
24
+ {
25
+ /** @var \WBCR\Titan\MalwareScanner\Scanner $scanner */
26
+ $scanner = get_option($this->plugin->getPrefix() . 'scanner');
27
+
28
+ if( !$scanner ) {
29
+ $chart_data = [
30
+ //'scanner_started' => 0,
31
+ 'matched' => false,
32
+ 'progress' => [0, 0, 100],
33
+ 'cleaned' => 0,
34
+ 'suspicious' => 0,
35
+ 'scanned' => 0,
36
+ 'notverified' => 0,
37
+ 'files_count' => 0,
38
+ ];
39
+ } else {
40
+ $matched = get_option($this->plugin->getPrefix() . 'scanner_malware_matched', false);
41
+ $scanner_started = $this->plugin->getOption('scanner_status') == 'started';
42
+ $files_count = $this->plugin->getOption('scanner_files_count', 0);
43
+
44
+ $progress = [
45
+ $files_count > 0 ? floor($scanner->cleaned_count / $files_count * 100) : 0,
46
+ $files_count > 0 ? ceil($scanner->suspicious_count / $files_count * 100) : 0,
47
+ $files_count > 0 ? floor($scanner->files_count / $files_count * 100) : 0
48
+ ];
49
+
50
+ $chart_data = [
51
+ //'scanner_started' => $scanner_started,
52
+ 'matched' => $matched,
53
+ 'cleaned' => $scanner->cleaned_count,
54
+ 'suspicious' => $scanner->suspicious_count,
55
+ 'scanned' => $scanner->cleaned_count + $scanner->suspicious_count,
56
+ 'notverified' => $scanner->files_count,
57
+ 'files_count' => $files_count,
58
+ 'progress' => $progress,
59
+ ];
60
+ }
61
+
62
+ ?>
63
+ <div class="w-factory-templates-110-setup__inner-wrap">
64
+ <h3><?php _e("Scan Malware", 'titan-security'); ?></h3>
65
+ <p style="text-align: left;">
66
+ <?php _e("Titan Scanner to check your website for viruses and malicious code. After scan, you will receive a detailed report on the crawl of your site.", 'titan-security'); ?>
67
+ </p>
68
+ <div>
69
+ <div class="wt-scanner-chart">
70
+ <div class="wt-scanner-chart-clean" style="width: <?php echo $chart_data['progress'][0]; ?>%;"></div>
71
+ <div class="wt-scanner-chart-suspicious" style="width: <?php echo $chart_data['progress'][1]; ?>%;"></div>
72
+ <div class="wt-scanner-chart-notverified"
73
+ style="width: <?php echo $chart_data['progress'][2]; ?>%;"></div>
74
+ </div>
75
+ </div>
76
+ <div>
77
+ <div class="wt-scanner-legend">
78
+ <table>
79
+ <tbody>
80
+ <tr>
81
+ <td><span class="wt-scanner-chart-clean wt-legend-item"></span></td>
82
+ <td><?php _e("Cleaned", 'titan-security'); ?> -
83
+ <span id="wtitan-cleaned-num"><?php echo $chart_data['cleaned']; ?></span>
84
+ </td>
85
+
86
+ <td><span class="wt-scanner-chart-suspicious wt-legend-item"></span></td>
87
+ <td><?php _e("Suspicious", 'titan-security'); ?> -
88
+ <span id="wtitan-suspicious-num"><?php echo $chart_data['suspicious']; ?></span>
89
+ </td>
90
+
91
+ <td><span class="wt-scanner-chart-notverified wt-legend-item"></span></td>
92
+ <td><?php _e("Not verified", 'titan-security'); ?> -
93
+ <span id="wtitan-notverified-num"><?php echo $chart_data['notverified']; ?></span></td>
94
+ </tr>
95
+ </tbody>
96
+ </table>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ <?php $this->render_button(!$scanner_started, true, 'Start Scan And Continue'); ?>
101
+ <?php
102
+ }
103
+
104
+ protected function continue_step($skip = false)
105
+ {
106
+ if( !current_user_can('install_plugins') ) {
107
+ wp_die(__('Sorry, you are not allowed to access this page.'), 403);
108
+ }
109
+
110
+ titan_create_scheduler_scanner();
111
+ parent::continue_step($skip);
112
+ }
113
  }
admin/pages/setup/steps/class-step-setting-tweaks.php CHANGED
@@ -1,138 +1,138 @@
1
- <?php
2
-
3
- namespace WBCR\Titan\Page;
4
-
5
- /**
6
- * Step
7
- * @author Webcraftic <wordpress.webraftic@gmail.com>
8
- * @copyright (c) 23.07.2020, Webcraftic
9
- * @version 1.0
10
- */
11
- class Step_Setting_Tweaks extends \WBCR\Factory_Templates_106\Pages\Step_Form {
12
-
13
- protected $prev_id = 'step3';
14
- protected $id = 'step4';
15
- protected $next_id = 'step5';
16
-
17
- public function get_title()
18
- {
19
- return __("Setting Tweaks", "titan-security");
20
- }
21
-
22
- public function get_form_description()
23
- {
24
- return __('Tweaks are minor security fixes to your site. Enabling tweaks can prevent your site from being hacked.', 'titan-security');
25
- }
26
-
27
- public function get_form_options()
28
- {
29
- $options[] = array(
30
- 'type' => 'checkbox',
31
- 'way' => 'buttons',
32
- 'name' => 'strong_password',
33
- 'title' => __('Strong Password Requirement', 'titan-security'),
34
- 'layout' => array('hint-type' => 'icon'),
35
- 'hint' => __('Force users to use strong passwords as rated by the WordPress password meter.', 'titan-security') . '<br><b>Titan: </b>' . __('Sets the redirect to exclude the possibility of obtaining a login.', 'titan-security'),
36
- 'default' => false,
37
- 'eventsOn' => [
38
- 'show' => '.factory-control-strong_password_min_role'
39
- ],
40
- 'eventsOff' => [
41
- 'hide' => '.factory-control-strong_password_min_role'
42
- ]
43
- );
44
-
45
- $options[] = [
46
- 'type' => 'dropdown',
47
- 'name' => 'strong_password_min_role',
48
- 'title' => __('Strong Password Minimum Role', 'titan-security'),
49
- 'data' => [
50
- ['administrator', 'Administrator'],
51
- ['editor', 'Editor'],
52
- ['author', 'Author'],
53
- ['contributor', 'Contributor'],
54
- ['subscriber', 'Subscriber'],
55
- ],
56
- 'layout' => ['hint-type' => 'icon', 'hint-icon-color' => 'green'],
57
- 'hint' => __('Minimum role at which a user must choose a strong password. For more information on WordPress roles and capabilities please see http://codex.wordpress.org/Roles_and_Capabilities. Warning: If your site invites public registrations setting the role too low may annoy your members.', 'titan-security'),
58
- 'default' => 'administrator'
59
- ];
60
-
61
- $options[] = array(
62
- 'type' => 'checkbox',
63
- 'way' => 'buttons',
64
- 'name' => 'protect_author_get',
65
- 'title' => __('Hide author login', 'titan-security'),
66
- 'layout' => array('hint-type' => 'icon'),
67
- 'hint' => __('An attacker can find out the author\'s login, using a similar request to get your site. mysite.com/?author=1', 'titan-security') . '<br><b>Titan: </b>' . __('Sets the redirect to exclude the possibility of obtaining a login.', 'titan-security'),
68
- 'default' => true
69
- );
70
-
71
- $options[] = array(
72
- 'type' => 'checkbox',
73
- 'way' => 'buttons',
74
- 'name' => 'change_login_errors',
75
- 'title' => __('Hide errors when logging into the site', 'titan-security'),
76
- 'layout' => array('hint-type' => 'icon'),
77
- 'hint' => __('WP by default shows whether you entered a wrong login or incorrect password, which allows attackers to understand if there is a certain user on the site, and then start searching through the passwords.', 'titan-security') . '<br><b>Titan: </b>' . __('Changes in the text of the error so that attackers could not find the login.', 'titan-security'),
78
- 'default' => true
79
- );
80
-
81
- $options[] = array(
82
- 'type' => 'checkbox',
83
- 'way' => 'buttons',
84
- 'name' => 'remove_meta_generator',
85
- 'title' => __('Remove meta generator', 'titan-security'),
86
- 'layout' => array('hint-type' => 'icon'),
87
- 'hint' => __('Allows attacker to learn the version of WP installed on the site. This meta tag has no useful function.', 'titan-security') . '<br><b>Titan: </b>' . sprintf(__('Removes the meta tag from the %s section', 'titan-security'), '&lt;head&gt;'),
88
- 'default' => true
89
- );
90
-
91
- $options[] = [
92
- 'type' => 'checkbox',
93
- 'way' => 'buttons',
94
- 'name' => 'remove_js_version',
95
- 'title' => __('Remove Version from Script', 'titan-security'),
96
- 'layout' => ['hint-type' => 'icon'],
97
- 'hint' => __('To make it more difficult for others to hack your website you can remove the WordPress version number from your site, your css and js. Without that number it\'s not possible to see if you run not the current version to exploit bugs from the older versions. <br><br>
98
- Additionally it can improve the loading speed of your site, because without query strings in the URL the css and js files can be cached.', 'titan-security') . '<br><br><b>Titan: </b>' . __('Removes wordpress version number from scripts (not logged in user only).', 'titan-security'),
99
- 'default' => true
100
- ];
101
-
102
- $options[] = [
103
- 'type' => 'checkbox',
104
- 'way' => 'buttons',
105
- 'name' => 'remove_style_version',
106
- 'title' => __('Remove Version from Stylesheet', 'titan-security'),
107
- 'layout' => ['hint-type' => 'icon'],
108
- 'hint' => __('To make it more difficult for others to hack your website you can remove the WordPress version number from your site, your css and js. Without that number it\'s not possible to see if you run not the current version to exploit bugs from the older versions. <br><br>
109
- Additionally it can improve the loading speed of your site, because without query strings in the URL the css and js files can be cached.', 'titan-security') . '<br><br><b>Titan: </b>' . __('Removes the wordpress version number from stylesheets (not logged in user only).', 'titan-security'),
110
- 'default' => true
111
- /*'eventsOn' => array(
112
- 'show' => '.factory-control-disable_remove_style_version_for_auth_users'
113
- ),
114
- 'eventsOff' => array(
115
- 'hide' => '.factory-control-disable_remove_style_version_for_auth_users'
116
- )*/
117
- ];
118
-
119
- return $options;
120
- }
121
-
122
- /**
123
- * Adds an html warning notification html markup.
124
- */
125
- public function xmlRpcDangerMessage()
126
- {
127
- ?>
128
- <div class="form-group">
129
- <label class="col-sm-4 control-label"></label>
130
- <div class="control-group col-sm-8">
131
- <div id="wbcr-clearfy-xml-rpc-danger-message" class="wbcr-clearfy-danger-message">
132
- <?php _e('<b>Use this option carefully!</b><br> Plugins like jetpack may have problems using this option.', 'titan-security') ?>
133
- </div>
134
- </div>
135
- </div>
136
- <?php
137
- }
1
+ <?php
2
+
3
+ namespace WBCR\Titan\Page;
4
+
5
+ /**
6
+ * Step
7
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
8
+ * @copyright (c) 23.07.2020, Webcraftic
9
+ * @version 1.0
10
+ */
11
+ class Step_Setting_Tweaks extends \WBCR\Factory_Templates_110\Pages\Step_Form {
12
+
13
+ protected $prev_id = 'step3';
14
+ protected $id = 'step4';
15
+ protected $next_id = 'step5';
16
+
17
+ public function get_title()
18
+ {
19
+ return __("Setting Tweaks", "titan-security");
20
+ }
21
+
22
+ public function get_form_description()
23
+ {
24
+ return __('Tweaks are minor security fixes to your site. Enabling tweaks can prevent your site from being hacked.', 'titan-security');
25
+ }
26
+
27
+ public function get_form_options()
28
+ {
29
+ $options[] = array(
30
+ 'type' => 'checkbox',
31
+ 'way' => 'buttons',
32
+ 'name' => 'strong_password',
33
+ 'title' => __('Strong Password Requirement', 'titan-security'),
34
+ 'layout' => array('hint-type' => 'icon'),
35
+ 'hint' => __('Force users to use strong passwords as rated by the WordPress password meter.', 'titan-security') . '<br><b>Ti