@@ -321,8 +321,8 @@ |
||
| 321 | 321 | $statStart = Container::get('shieldon_start'); |
| 322 | 322 | $statEnd = Container::get('shieldon_end'); |
| 323 | 323 | |
| 324 | - $startTimeArr = explode(' ',$statStart['time']); |
|
| 325 | - $endTimeArr = explode(' ',$statStart['time']); |
|
| 324 | + $startTimeArr = explode(' ', $statStart['time']); |
|
| 325 | + $endTimeArr = explode(' ', $statStart['time']); |
|
| 326 | 326 | |
| 327 | 327 | $timeDifference = ($endTimeArr[1] - $startTimeArr[1]) + ($endTimeArr[0] - $startTimeArr[0]); |
| 328 | 328 | $memoryDifference = round(($statEnd['memory'] - $statStart['memory']) / 1024, 2); // KB |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | $this->driver->setChannel($channel); |
| 106 | 106 | } else { |
| 107 | 107 | Event::AddListener('set_driver', |
| 108 | - function ($args) use ($channel) { |
|
| 108 | + function($args) use ($channel) { |
|
| 109 | 109 | $args['driver']->setChannel($channel); |
| 110 | 110 | } |
| 111 | 111 | ); |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | |
| 315 | 315 | foreach ($ipList as $ip) { |
| 316 | 316 | |
| 317 | - if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url']) ) { |
|
| 317 | + if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url'])) { |
|
| 318 | 318 | |
| 319 | 319 | if ('allow' === $ip['rule']) { |
| 320 | 320 | $allowedList[] = $ip['ip']; |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | $this->kernel->setProperty( |
| 377 | 377 | 'deny_attempt_enable', |
| 378 | 378 | [ |
| 379 | - 'data_circle' => $setting['data_circle']['enable'], // false |
|
| 379 | + 'data_circle' => $setting['data_circle']['enable'], // false |
|
| 380 | 380 | 'system_firewall' => $setting['system_firewall']['enable'], // false |
| 381 | 381 | ] |
| 382 | 382 | ); |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | $this->kernel->setProperty( |
| 385 | 385 | 'deny_attempt_buffer', |
| 386 | 386 | [ |
| 387 | - 'data_circle' => $setting['data_circle']['buffer'], // 10 |
|
| 387 | + 'data_circle' => $setting['data_circle']['buffer'], // 10 |
|
| 388 | 388 | 'system_firewall' => $setting['system_firewall']['buffer'], // 10 |
| 389 | 389 | ] |
| 390 | 390 | ); |
@@ -429,8 +429,8 @@ discard block |
||
| 429 | 429 | |
| 430 | 430 | if ($sessionLimitSetting['enable']) { |
| 431 | 431 | |
| 432 | - $onlineUsers = $sessionLimitSetting['config']['count']; // default: 100 |
|
| 433 | - $alivePeriod = $sessionLimitSetting['config']['period']; // default: 300 |
|
| 432 | + $onlineUsers = $sessionLimitSetting['config']['count']; // default: 100 |
|
| 433 | + $alivePeriod = $sessionLimitSetting['config']['period']; // default: 300 |
|
| 434 | 434 | $isUniqueIp = $sessionLimitSetting['config']['unique_only']; // false |
| 435 | 435 | |
| 436 | 436 | $this->kernel->limitSession($onlineUsers, $alivePeriod, $isUniqueIp); |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | |
| 454 | 454 | $lastResetTime = $cronjobSetting['config']['last_update']; |
| 455 | 455 | |
| 456 | - if (!empty($lastResetTime) ) { |
|
| 456 | + if (!empty($lastResetTime)) { |
|
| 457 | 457 | $lastResetTime = strtotime($lastResetTime); |
| 458 | 458 | } else { |
| 459 | 459 | // @codeCoverageIgnoreStart |
@@ -535,8 +535,8 @@ discard block |
||
| 535 | 535 | $dialogInfo = $this->getOption('dialog_info_disclosure'); |
| 536 | 536 | |
| 537 | 537 | $this->kernel->setProperty('display_online_info', $dialogInfo['online_user_amount']); |
| 538 | - $this->kernel->setProperty('display_user_info', $dialogInfo['user_inforamtion']); |
|
| 539 | - $this->kernel->setProperty('display_http_code', $dialogInfo['http_status_code']); |
|
| 538 | + $this->kernel->setProperty('display_user_info', $dialogInfo['user_inforamtion']); |
|
| 539 | + $this->kernel->setProperty('display_http_code', $dialogInfo['http_status_code']); |
|
| 540 | 540 | $this->kernel->setProperty('display_reason_code', $dialogInfo['reason_code']); |
| 541 | 541 | $this->kernel->setProperty('display_reason_text', $dialogInfo['reason_text']); |
| 542 | 542 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | </div> |
| 50 | 50 | <div class="board-field right"> |
| 51 | 51 | <div class="heading"><?php _e('panel', 'table_heading_period', 'Period'); ?></div> |
| 52 | - <div class="nums"><?php echo number_format($session_limit_period ); ?></div> |
|
| 52 | + <div class="nums"><?php echo number_format($session_limit_period); ?></div> |
|
| 53 | 53 | <div class="note"><?php _e('panel', 'table_note_period', 'Keep-alive period (in minutes)'); ?></div> |
| 54 | 54 | </div> |
| 55 | 55 | </div> |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | </div> |
| 60 | 60 | <div class="board-field right"> |
| 61 | 61 | <div class="heading"><?php _e('panel', 'table_heading_online', 'Online'); ?></div> |
| 62 | - <div class="nums"><?php echo number_format($online_count ); ?></div> |
|
| 62 | + <div class="nums"><?php echo number_format($online_count); ?></div> |
|
| 63 | 63 | <div class="note"><?php _e('panel', 'table_note_online', 'Online user count.'); ?></div> |
| 64 | 64 | </div> |
| 65 | 65 | </div> |
@@ -99,14 +99,14 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | $remainsTime = $expires - (time() - $sessionInfo['time']); |
| 101 | 101 | |
| 102 | - if ($remainsTime < 1 ) { |
|
| 102 | + if ($remainsTime < 1) { |
|
| 103 | 103 | $remainsTime = 0; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - if ($i < $session_limit_count ) { |
|
| 106 | + if ($i < $session_limit_count) { |
|
| 107 | 107 | $satusName = __('panel', 'table_text_allowable', 'Allowable'); |
| 108 | 108 | |
| 109 | - if ($remainsTime < 1 ) { |
|
| 109 | + if ($remainsTime < 1) { |
|
| 110 | 110 | $satusName = __('panel', 'table_text_expired', 'Expired'); |
| 111 | 111 | } |
| 112 | 112 | } else { |
@@ -111,10 +111,10 @@ |
||
| 111 | 111 | |
| 112 | 112 | $data = []; |
| 113 | 113 | |
| 114 | - $data[0] = $record['ip'] ?? 'null'; |
|
| 115 | - $data[1] = $record['session_id'] ?? 'null'; |
|
| 114 | + $data[0] = $record['ip'] ?? 'null'; |
|
| 115 | + $data[1] = $record['session_id'] ?? 'null'; |
|
| 116 | 116 | $data[2] = $record['action_code'] ?? 'null'; |
| 117 | - $data[3] = $record['timestamp'] ?? 'null'; |
|
| 117 | + $data[3] = $record['timestamp'] ?? 'null'; |
|
| 118 | 118 | |
| 119 | 119 | file_put_contents($this->filePath, implode(',', $data) . "\n", FILE_APPEND | LOCK_EX); |
| 120 | 120 | } |
@@ -272,7 +272,7 @@ |
||
| 272 | 272 | $channel = '_' . $this->channel; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - return $this->directory . '/' . $this->version . $channel . '_' . $driverType . '_' . $this->checkpoint; |
|
| 275 | + return $this->directory . '/' . $this->version . $channel . '_' . $driverType . '_' . $this->checkpoint; |
|
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | /** |
@@ -72,15 +72,15 @@ |
||
| 72 | 72 | |
| 73 | 73 | $text_warning = ''; |
| 74 | 74 | |
| 75 | - if ($logData['pageviews_m'] > 6 || $logData['pageviews_h'] > 50 || $logData['pageviews_d'] > 100 ) { |
|
| 75 | + if ($logData['pageviews_m'] > 6 || $logData['pageviews_h'] > 50 || $logData['pageviews_d'] > 100) { |
|
| 76 | 76 | $text_warning = '<span class="so-text-warning"><i class="fas fa-exclamation-triangle"></i></span>'; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - if ($logData['flag_js_cookie'] > 2 || $logData['flag_multi_session'] > 2 || $logData['flag_empty_referer'] > 2 ) { |
|
| 79 | + if ($logData['flag_js_cookie'] > 2 || $logData['flag_multi_session'] > 2 || $logData['flag_empty_referer'] > 2) { |
|
| 80 | 80 | $text_warning = '<span class="so-text-warning"><i class="fas fa-exclamation-triangle"></i></span>'; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if ($logData['flag_js_cookie'] > 3 || $logData['flag_multi_session'] > 3 || $logData['flag_empty_referer'] > 3 ) { |
|
| 83 | + if ($logData['flag_js_cookie'] > 3 || $logData['flag_multi_session'] > 3 || $logData['flag_empty_referer'] > 3) { |
|
| 84 | 84 | $text_warning = '<span class="so-text-danger"><i class="fas fa-exclamation-triangle"></i></span>'; |
| 85 | 85 | } |
| 86 | 86 | ?> |