PluginProbe
WebTotem Security / 2.3.14
WebTotem Security v2.3.14
3.0.1 3.0.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.1 2.2.2 2.2.3 2.2.4 All 109 releases
← All changes | includes/firewall.php +126 -14 2.2.12.3.14 View file →
@@ -1,8 +1,9 @@
1 1 <?php defined('ABSPATH') or die("Protected By WT!");?>
2 -<?php if(!empty($arguments)):?>
2 +<?php if(!empty($arguments)): ?>
3 3 <div class="wtotem_content">
4 4
5 +
5 6 <div class="wtotem_container">
6 7 <div class="wtotem_map">
7 8 <div class="wtotem_map__first section-header-mb">
8 9 <h2 class="title"><?= wtsec_locale("firewall_activity") ?></h2>
@@ -9,8 +10,109 @@
9 10 <!-- <div class="wtotem_print">-->
10 11 <!-- <div class="wtotem_print__img"></div>-->
11 12 <!-- <div class="wtotem_print__label">Print PDF</div>-->
12 13 <!-- </div>-->
14 +
15 + <div class="wtotem-waf-settings">
16 + <button type="button" class="wtotem-waf-settings__button wtotem-waf-settings__button--active">
17 + <span class="wtotem-waf-settings__button-text"><?= wtsec_locale("settings") ?></span>
18 + <svg class="wtotem-waf-settings__button-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
19 + <path fill-rule="evenodd" clip-rule="evenodd" d="M13.6015 9.05337C13.84 9.18004 14.0239 9.38004 14.1534 9.58004C14.4055 9.99337 14.385 10.5 14.1398 10.9467L13.6628 11.7467C13.4108 12.1734 12.9407 12.44 12.4569 12.44C12.2185 12.44 11.9528 12.3734 11.7347 12.24C11.5576 12.1267 11.3532 12.0867 11.1352 12.0867C10.4607 12.0867 9.89522 12.64 9.87479 13.3C9.87479 14.0667 9.24798 14.6667 8.46448 14.6667H7.53791C6.7476 14.6667 6.1208 14.0667 6.1208 13.3C6.10717 12.64 5.54169 12.0867 4.86719 12.0867C4.64236 12.0867 4.43797 12.1267 4.26765 12.24C4.04963 12.3734 3.77711 12.44 3.54546 12.44C3.05492 12.44 2.58482 12.1734 2.33274 11.7467L1.86264 10.9467C1.61056 10.5134 1.59693 9.99337 1.84901 9.58004C1.95802 9.38004 2.16241 9.18004 2.39406 9.05337C2.58482 8.96004 2.70746 8.80671 2.82328 8.62671C3.16393 8.05337 2.95954 7.30004 2.38043 6.96004C1.70594 6.58004 1.48792 5.73337 1.87627 5.07337L2.33274 4.28671C2.7279 3.62671 3.57271 3.39337 4.25402 3.78004C4.84675 4.10004 5.61663 3.88671 5.9641 3.32004C6.0731 3.13337 6.13442 2.93337 6.1208 2.73337C6.10717 2.47337 6.18211 2.22671 6.31156 2.02671C6.56364 1.61337 7.02012 1.34671 7.51747 1.33337H8.47811C8.98228 1.33337 9.43875 1.61337 9.69083 2.02671C9.81347 2.22671 9.89522 2.47337 9.87479 2.73337C9.86116 2.93337 9.92248 3.13337 10.0315 3.32004C10.379 3.88671 11.1488 4.10004 11.7484 3.78004C12.4229 3.39337 13.2745 3.62671 13.6628 4.28671L14.1193 5.07337C14.5145 5.73337 14.2965 6.58004 13.6151 6.96004C13.036 7.30004 12.8316 8.05337 13.1791 8.62671C13.2881 8.80671 13.4108 8.96004 13.6015 9.05337ZM6.0731 8.00669C6.0731 9.05336 6.93835 9.88669 8.008 9.88669C9.07765 9.88669 9.92247 9.05336 9.92247 8.00669C9.92247 6.96002 9.07765 6.12002 8.008 6.12002C6.93835 6.12002 6.0731 6.96002 6.0731 8.00669Z" fill="#3D50DF" />
20 + </svg>
21 + </button>
22 + <div class="wtotem-waf-settings__popup">
23 +
24 + <div class="wt-spinner d-none"><img src="<?= wtsec_getImagePath("spinner.svg") ?>" alt="spinner"></div>
25 + <section class="wtotem-waf-settings-popup">
26 + <h2 class="wtotem-waf-settings-popup__title"><?= wtsec_locale("settings") ?>
27 + <div class="wtotem_title-info__info wtotem-tooltip">
28 + <div class="wtotem-tooltip__content">
29 + <?= wtsec_locale("tooltips.waf_settings") ?>
30 + </div>
31 + </div>
32 + </h2>
33 + <form action="#" class="wtotem-waf-settings-popup__form" method="post" id="wtotem-waf-settings-form">
34 +
35 + <input type="hidden" name="action" value="waf_settings">
36 + <div class="wtotem_firewall-section-menu-item">
37 + <div class="wt-flex wt-flex-middle"><strong>GDN</strong><div>
38 + <div class="wtotem_title-info__info wtotem-tooltip">
39 + <div class="wtotem-tooltip__content">
40 + <p class="wtotem-tooltip__header">GDN</p>
41 + <?= wtsec_locale("tooltips.gdn") ?>
42 + </div>
43 + </div>
44 + </div>
45 + <div class="wtotem_option__checkbox onoff wtotem_switch-checkbox-with-text">
46 + <input type="checkbox" class="onoff__input waf_settings_toggle" name="gdn" id="gdn"
47 + <?= ($arguments['waf']['settings']['gdn'])? 'checked' : '' ?> />
48 + <label for="gdn" class="onoff__label">
49 + <span class="onoff__circle"></span>
50 + </label>
51 + </div>
52 + </div>
53 +
54 + <div class="wtotem_firewall-section-menu-item">
55 + <div class="wt-flex wt-flex-middle"><strong><?= wtsec_locale("dos_limit") ?></strong><div>
56 + <div class="wtotem_title-info__info wtotem-tooltip">
57 + <div class="wtotem-tooltip__content">
58 + <p class="wtotem-tooltip__header"><?= wtsec_locale("dos_limit") ?></p>
59 + <?= wtsec_locale("tooltips.dos") ?>
60 + </div>
61 + </div>
62 + </div>
63 + <div class="wtotem_option__checkbox onoff wtotem_switch-checkbox-with-text">
64 + <input type="checkbox" class="onoff__input waf_settings_toggle"
65 + id="wtotem-dos" name="dosProtection"
66 + <?= ($arguments['waf']['settings']['dosProtection'])? 'checked' : '' ?> />
67 + <label for="wtotem-dos" class="onoff__label">
68 + <span class="onoff__circle"></span>
69 + </label>
70 + </div>
71 + </div>
72 + </div>
73 +
74 + <div class="wtotem_firewall-section-menu-item">
75 + <div class="wt-flex wt-flex-middle"><strong><?= wtsec_locale("login_attempts") ?></strong><div>
76 + <div class="wtotem_title-info__info wtotem-tooltip">
77 + <div class="wtotem-tooltip__content">
78 + <?= wtsec_locale("tooltips.login_attempts") ?>
79 + </div>
80 + </div>
81 + </div>
82 + <div class="wtotem_option__checkbox onoff wtotem_switch-checkbox-with-text">
83 + <input type="checkbox" class="onoff__input waf_settings_toggle"
84 + id="wtotem-login-attempts" name="loginAttemptsProtection"
85 + <?= ($arguments['waf']['settings']['loginAttemptsProtection'])? 'checked' : '' ?> />
86 + <label for="wtotem-login-attempts" class="onoff__label">
87 + <span class="onoff__circle"></span>
88 + </label>
89 + </div>
90 + </div>
91 + </div>
92 +
93 + <div id="wtotem-dos-limit" class="<?= (!$arguments['waf']['settings']['dosProtection'])? 'visually-hidden' : '' ?>">
94 + <label class="wtotem-waf-settings-popup__label" for="waf-limit"><?= wtsec_locale("dos_limit_requests") ?></label>
95 + <input class="wtotem-waf-settings-popup__input"
96 + type="number" min="0" placeholder="Type limit" id="waf-limit" name="dosLimit"
97 + <?= (!$arguments['waf']['settings']['dosProtection'])? 'disabled="disabled"' : '' ?>
98 + value="<?= $arguments['waf']['settings']['dosLimit'] ?: 20000 ?>"
99 + required>
100 + </div>
101 +
102 + <div id="wtotem-login-attempts-limit" class="<?= (!$arguments['waf']['settings']['loginAttemptsProtection'])? 'visually-hidden' : '' ?>">
103 + <label class="wtotem-waf-settings-popup__label" for="waf-login-attempts"><?= wtsec_locale("login_attempts") ?></label>
104 + <input class="wtotem-waf-settings-popup__input"
105 + type="number" min="0" placeholder="Type limit" id="waf-login-attempts" name="loginAttemptsLimit"
106 + <?= (!$arguments['waf']['settings']['loginAttemptsProtection'])? 'disabled="disabled"' : '' ?>
107 + value="<?= $arguments['waf']['settings']['loginAttemptsLimit'] ?: 20 ?>"
108 + required>
109 + </div>
110 + <button class="wtotem-waf-settings-popup__save button" type="submit"><?= wtsec_locale("save_settings") ?></button>
111 + </form>
112 + </section>
113 + </div>
114 + </div>
13 115 </div>
14 116 <div class="wtotem_map-wrap wt_card">
15 117 <div class="wtotem_chart-first">
16 118 <div class="wtotem_country">
@@ -98,11 +200,8 @@
98 200 </div>
99 201 <div class="wtotem_chart wt_card">
100 202 <div class="wtotem_chart-first">
101 203 <div class="wtotem_chart-first__left">
102 - <div class="wtotem_chart-first__all">
103 - <?= wtsec_locale("chart.all") ?>
104 - </div>
105 204 <div class="wtotem_chart-first__hack wtotem_chart-first__hack_attack" >
106 205 <span></span>
107 206 <p><?= wtsec_locale("chart.attacks") ?></p>
108 207 </div>
@@ -111,27 +210,25 @@
111 210 <p><?= wtsec_locale("chart.blocked") ?></p>
112 211 </div>
113 212 </div>
114 213
115 - <div class="wtotem_chart__wrapper">
116 -
117 - <div class="wtotem_chart-first__right" id="chart_btn">
118 - <div class="wtotem_chart-first__btn" data-days="365"><?= wtsec_locale("chart.yearly") ?></div>
119 - <div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="31"><?= wtsec_locale("chart.monthly") ?></div>
120 - <div class="wtotem_chart-first__btn" data-days="7"><?= wtsec_locale("chart.weekly") ?></div>
121 - <div class="wtotem_chart-first__btn" data-days="1"><?= wtsec_locale("chart.daily") ?></div>
122 - </div>
214 + <div class="wtotem_chart-first__right chart_btn" data-box="chart_wrap" data-service="waf">
215 + <div class="wtotem_chart-first__btn" data-days="365"><?= wtsec_locale("chart.yearly") ?></div>
216 + <div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="31"><?= wtsec_locale("chart.monthly") ?></div>
217 + <div class="wtotem_chart-first__btn" data-days="7"><?= wtsec_locale("chart.weekly") ?></div>
218 + <div class="wtotem_chart-first__btn" data-days="1"><?= wtsec_locale("chart.daily") ?></div>
123 219 </div>
124 220 </div>
125 221
126 222
223 + <?php if($arguments["waf"]["chart"] && $arguments["waf"]["chart"] != 'null'):?>
127 224 <div id="chart_wrap">
128 - <div class="wtotem_chart__diagram" data-days="7" id="wtotem_chart_diagram">
225 + <div class="wtotem_chart__diagram" data-days="30" id="wtotem_chart_diagram">
129 226 <div id="line-chart" class="line-chart">
130 227 <div id="tooltipAttacks" class="line-chart__tooltip">
131 228 <span id="countAttacks"></span>
132 229 </div>
133 - <div id="tooltipBlocked" class="line-chart__tooltip">
230 + <div id="tooltipBlocked" class="line-chart__tooltip line-chart__tooltip--reverse">
134 231 <span id="countBlocked"></span>
135 232 </div>
136 233 </div>
137 234 </div>
@@ -137,9 +234,20 @@
137 234 </div>
138 235
139 236 <div class="wtotem_chart__line"></div>
140 237 </div>
238 + <?php else:?>
141 239
240 + <!-- No data block -->
241 + <section class="wtotem_reports-no-data" style="height:300px">
242 + <h2 class="visually-hidden"><?= wtsec_locale("no_data") ?></h2>
243 + <p class="wtotem_reports-no-data__text">
244 + <?= wtsec_locale("has_no_action_ready_yet") ?>
245 + </p>
246 + </section>
247 +
248 + <?php endif; ?>
249 +
142 250 <div class="wtotem_filter__wrapper wt-margin-20">
143 251 <div class="wtotem_chart__calendars">
144 252 <div class="wtotem_calendar-icon"></div>
145 253 <input
@@ -208,11 +316,15 @@
208 316 </div>
209 317 </div>
210 318 </div>
211 319 </div>
320 +
321 +<?php if($arguments["waf"]["chart"]):?>
212 322 <script>
213 323 var waf_chart = <?=$arguments["waf"]["chart"]?>;
214 324 </script>
325 +<?php endif;?>
326 +
215 327 <?php else:?>
216 328
217 329 <?php endif;?>
218 330