@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | ]; |
208 | 208 | |
209 | 209 | if (empty($dataRange[$this->type])) { |
210 | - if (preg_match('/past_([0-9]+)_days/', $this->type, $matches) ) { |
|
210 | + if (preg_match('/past_([0-9]+)_days/', $this->type, $matches)) { |
|
211 | 211 | $dayCount = $matches[1]; |
212 | 212 | $startDate = date('Ymd', strtotime('-' . $dayCount . ' days')); |
213 | 213 | $endDate = date('Ymd'); |
@@ -348,21 +348,21 @@ discard block |
||
348 | 348 | |
349 | 349 | $results = []; |
350 | 350 | |
351 | - $results['captcha_chart_string'] = ''; // string |
|
352 | - $results['pageview_chart_string'] = ''; // string |
|
353 | - $results['captcha_success_count'] = 0; // integer |
|
354 | - $results['captcha_failure_count'] = 0; // integer |
|
355 | - $results['captcha_count'] = 0; // integer |
|
356 | - $results['pageview_count'] = 0; // integer |
|
357 | - $results['captcha_percentageage'] = 0; // integer |
|
351 | + $results['captcha_chart_string'] = ''; // string |
|
352 | + $results['pageview_chart_string'] = ''; // string |
|
353 | + $results['captcha_success_count'] = 0; // integer |
|
354 | + $results['captcha_failure_count'] = 0; // integer |
|
355 | + $results['captcha_count'] = 0; // integer |
|
356 | + $results['pageview_count'] = 0; // integer |
|
357 | + $results['captcha_percentageage'] = 0; // integer |
|
358 | 358 | $results['captcha_failure_percentage'] = 0; // integer |
359 | 359 | $results['captcha_success_percentage'] = 0; // integer |
360 | 360 | |
361 | - $results['action_ban_count'] = 0; // integer |
|
362 | - $results['action_temp_ban_count'] = 0; // integer |
|
363 | - $results['action_unban_count'] = 0; // integer |
|
364 | - $results['blacklist_count'] = 0; // integer |
|
365 | - $results['session_limit_count'] = 0; // integer |
|
361 | + $results['action_ban_count'] = 0; // integer |
|
362 | + $results['action_temp_ban_count'] = 0; // integer |
|
363 | + $results['action_unban_count'] = 0; // integer |
|
364 | + $results['blacklist_count'] = 0; // integer |
|
365 | + $results['session_limit_count'] = 0; // integer |
|
366 | 366 | |
367 | 367 | $ipdData = $this->getIpData(); |
368 | 368 | |
@@ -405,22 +405,22 @@ discard block |
||
405 | 405 | |
406 | 406 | $results = []; |
407 | 407 | |
408 | - $results['captcha_chart_string'] = ''; // string |
|
409 | - $results['pageview_chart_string'] = ''; // string |
|
410 | - $results['label_chart_string'] = ''; // string |
|
411 | - $results['captcha_success_count'] = 0; // integer |
|
412 | - $results['captcha_failure_count'] = 0; // integer |
|
413 | - $results['captcha_count'] = 0; // integer |
|
414 | - $results['pageview_count'] = 0; // integer |
|
415 | - $results['captcha_percentageage'] = 0; // integer |
|
408 | + $results['captcha_chart_string'] = ''; // string |
|
409 | + $results['pageview_chart_string'] = ''; // string |
|
410 | + $results['label_chart_string'] = ''; // string |
|
411 | + $results['captcha_success_count'] = 0; // integer |
|
412 | + $results['captcha_failure_count'] = 0; // integer |
|
413 | + $results['captcha_count'] = 0; // integer |
|
414 | + $results['pageview_count'] = 0; // integer |
|
415 | + $results['captcha_percentageage'] = 0; // integer |
|
416 | 416 | $results['captcha_failure_percentage'] = 0; // integer |
417 | 417 | $results['captcha_success_percentage'] = 0; // integer |
418 | 418 | |
419 | - $results['action_ban_count'] = 0; // integer |
|
420 | - $results['action_temp_ban_count'] = 0; // integer |
|
421 | - $results['action_unban_count'] = 0; // integer |
|
422 | - $results['blacklist_count'] = 0; // integer |
|
423 | - $results['session_limit_count'] = 0; // integer |
|
419 | + $results['action_ban_count'] = 0; // integer |
|
420 | + $results['action_temp_ban_count'] = 0; // integer |
|
421 | + $results['action_unban_count'] = 0; // integer |
|
422 | + $results['blacklist_count'] = 0; // integer |
|
423 | + $results['session_limit_count'] = 0; // integer |
|
424 | 424 | |
425 | 425 | if (!empty($periodData)) { |
426 | 426 | |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | } |
451 | 451 | |
452 | 452 | $results['captcha_chart_string'] = implode(',', $chartCaptcha); |
453 | - $results['pageview_chart_string']= implode(',', $chartPageview); |
|
453 | + $results['pageview_chart_string'] = implode(',', $chartPageview); |
|
454 | 454 | $results['captcha_success_chart_string'] = implode(',', $chartCaptchaSuccess); |
455 | 455 | $results['captcha_failure_chart_string'] = implode(',', $chartCaptchaFailure); |
456 | 456 | $results['label_chart_string'] = "'" . implode("','", $labels) . "'"; |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | $ip = $log['ip']; |
481 | 481 | $sessionId = $log['session_id']; |
482 | 482 | |
483 | - $this->ipDetail[$t][$ip]['session_id'][$sessionId ] = 1; |
|
483 | + $this->ipDetail[$t][$ip]['session_id'][$sessionId] = 1; |
|
484 | 484 | |
485 | 485 | if ($logActionCode === self::LOG_TEMPORARILY_BAN) { |
486 | 486 | $this->periodDetail[$t][$k]['action_temp_ban_count']++; |
@@ -355,13 +355,16 @@ |
||
355 | 355 | <i class="fas fa-times-circle"></i> |
356 | 356 | <?php endif; ?> |
357 | 357 | </div> |
358 | - <?php else: ?> |
|
358 | + <?php else { |
|
359 | + : ?> |
|
359 | 360 | <div class="icon-box"> |
360 | 361 | <span class="message-icon"> |
361 | 362 | <i class="fas fa-exclamation-circle"></i> |
362 | 363 | </span> |
363 | 364 | </div> |
364 | - <?php endif; ?> |
|
365 | + <?php endif; |
|
366 | +} |
|
367 | +?> |
|
365 | 368 | </div> |
366 | 369 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
367 | 370 | <span aria-hidden="true">×</span> |
@@ -246,7 +246,7 @@ |
||
246 | 246 | </div> |
247 | 247 | </div> |
248 | 248 | </div> |
249 | - <?php if (! empty($this->messages)) : ?> |
|
249 | + <?php if (!empty($this->messages)) : ?> |
|
250 | 250 | <div id="message-modal" class="modal fade" tabindex="-1" role="dialog"> |
251 | 251 | <div class="modal-dialog modal-dialog-centered modal-lightbox" role="document"> |
252 | 252 | <div class="modal-content"> |
@@ -97,10 +97,10 @@ |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
100 | - * Load CSS content. |
|
101 | - * |
|
102 | - * @return string |
|
103 | - */ |
|
100 | + * Load CSS content. |
|
101 | + * |
|
102 | + * @return string |
|
103 | + */ |
|
104 | 104 | protected function loadJs(): string |
105 | 105 | { |
106 | 106 | ob_start(); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | |
280 | 280 | foreach ($ipList as $ip) { |
281 | 281 | |
282 | - if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url']) ) { |
|
282 | + if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url'])) { |
|
283 | 283 | |
284 | 284 | if ('allow' === $ip['rule']) { |
285 | 285 | $allowedList[] = $ip['ip']; |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | $this->kernel->setProperty( |
353 | 353 | 'deny_attempt_enable', |
354 | 354 | [ |
355 | - 'data_circle' => $setting['data_circle']['enable'], // false |
|
355 | + 'data_circle' => $setting['data_circle']['enable'], // false |
|
356 | 356 | 'system_firewall' => $setting['system_firewall']['enable'], // false |
357 | 357 | ] |
358 | 358 | ); |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $this->kernel->setProperty( |
361 | 361 | 'deny_attempt_buffer', |
362 | 362 | [ |
363 | - 'data_circle' => $setting['data_circle']['buffer'], // 10 |
|
363 | + 'data_circle' => $setting['data_circle']['buffer'], // 10 |
|
364 | 364 | 'system_firewall' => $setting['system_firewall']['buffer'], // 10 |
365 | 365 | ] |
366 | 366 | ); |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | |
429 | 429 | $lastResetTime = $cronjobSetting['config']['last_update']; |
430 | 430 | |
431 | - if (!empty($lastResetTime) ) { |
|
431 | + if (!empty($lastResetTime)) { |
|
432 | 432 | $lastResetTime = strtotime($lastResetTime); |
433 | 433 | } else { |
434 | 434 | // @codeCoverageIgnoreStart |