| @@ -45,7 +45,7 @@ | ||
| 45 | 45 | public function isDenied(): bool | 
| 46 | 46 |      { | 
| 47 | 47 |          if (!empty($this->deniedList)) { | 
| 48 | -            if (preg_match('/(' . implode('|', $this->deniedList). ')/i', $this->rdns)) { | |
| 48 | +            if (preg_match('/(' . implode('|', $this->deniedList) . ')/i', $this->rdns)) { | |
| 49 | 49 | return true; | 
| 50 | 50 | } | 
| 51 | 51 | } | 
| @@ -49,19 +49,19 @@ discard block | ||
| 49 | 49 | $this->deniedList = [ | 
| 50 | 50 | |
| 51 | 51 | // Backlink crawlers | 
| 52 | - 'Ahrefs', // http://ahrefs.com/robot/ | |
| 53 | - 'roger', // rogerbot (SEOMOZ) | |
| 54 | - 'moz.com', // SEOMOZ crawlers | |
| 55 | - 'MJ12bot', // Majestic crawlers | |
| 56 | - 'findlinks', // http://wortschatz.uni-leipzig.de/findlinks | |
| 57 | - 'Semrush', // http://www.semrush.com/bot.html | |
| 52 | + 'Ahrefs', // http://ahrefs.com/robot/ | |
| 53 | + 'roger', // rogerbot (SEOMOZ) | |
| 54 | + 'moz.com', // SEOMOZ crawlers | |
| 55 | + 'MJ12bot', // Majestic crawlers | |
| 56 | + 'findlinks', // http://wortschatz.uni-leipzig.de/findlinks | |
| 57 | + 'Semrush', // http://www.semrush.com/bot.html | |
| 58 | 58 | |
| 59 | 59 | // Web information crawlers | 
| 60 | - 'domain', // Domain name information crawlers. | |
| 61 | - 'copyright', // Copyright information crawlers. | |
| 60 | + 'domain', // Domain name information crawlers. | |
| 61 | + 'copyright', // Copyright information crawlers. | |
| 62 | 62 | |
| 63 | 63 | // Others | 
| 64 | - 'archive', // Wayback machine | |
| 64 | + 'archive', // Wayback machine | |
| 65 | 65 | ]; | 
| 66 | 66 | } | 
| 67 | 67 | |
| @@ -71,7 +71,7 @@ discard block | ||
| 71 | 71 | public function isDenied(): bool | 
| 72 | 72 |      { | 
| 73 | 73 |          if (!empty($this->deniedList)) { | 
| 74 | -            if (preg_match('/(' . implode('|', $this->deniedList). ')/i', $this->userAgent)) { | |
| 74 | +            if (preg_match('/(' . implode('|', $this->deniedList) . ')/i', $this->userAgent)) { | |
| 75 | 75 | return true; | 
| 76 | 76 | } | 
| 77 | 77 | } | 
| @@ -40,19 +40,19 @@ discard block | ||
| 40 | 40 | protected $deniedList = [ | 
| 41 | 41 | |
| 42 | 42 | // Backlink crawlers | 
| 43 | - 'Ahrefs', // http://ahrefs.com/robot/ | |
| 44 | - 'roger', // rogerbot (SEOMOZ) | |
| 45 | - 'moz.com', // SEOMOZ crawlers | |
| 46 | - 'MJ12bot', // Majestic crawlers | |
| 47 | - 'findlinks', // http://wortschatz.uni-leipzig.de/findlinks | |
| 48 | - 'Semrush', // http://www.semrush.com/bot.html | |
| 43 | + 'Ahrefs', // http://ahrefs.com/robot/ | |
| 44 | + 'roger', // rogerbot (SEOMOZ) | |
| 45 | + 'moz.com', // SEOMOZ crawlers | |
| 46 | + 'MJ12bot', // Majestic crawlers | |
| 47 | + 'findlinks', // http://wortschatz.uni-leipzig.de/findlinks | |
| 48 | + 'Semrush', // http://www.semrush.com/bot.html | |
| 49 | 49 | |
| 50 | 50 | // Web information crawlers | 
| 51 | - 'domain', // Domain name information crawlers. | |
| 52 | - 'copyright', // Copyright information crawlers. | |
| 51 | + 'domain', // Domain name information crawlers. | |
| 52 | + 'copyright', // Copyright information crawlers. | |
| 53 | 53 | |
| 54 | 54 | // Others | 
| 55 | - 'archive', // Wayback machine | |
| 55 | + 'archive', // Wayback machine | |
| 56 | 56 | ]; | 
| 57 | 57 | |
| 58 | 58 | /** | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | public function __construct(array $deniedList = []) | 
| 66 | 66 |      { | 
| 67 | 67 |          if (!empty($deniedList)) { | 
| 68 | - $this->deniedList =$deniedList; | |
| 68 | + $this->deniedList = $deniedList; | |
| 69 | 69 | } | 
| 70 | 70 | } | 
| 71 | 71 | |
| @@ -86,7 +86,7 @@ discard block | ||
| 86 | 86 | } | 
| 87 | 87 | |
| 88 | 88 |          if (!empty($this->deniedList)) { | 
| 89 | -            if (preg_match('/(' . implode('|', $this->deniedList). ')/i', $userAgent)) { | |
| 89 | +            if (preg_match('/(' . implode('|', $this->deniedList) . ')/i', $userAgent)) { | |
| 90 | 90 | return (new Response)->withStatus(self::HTTP_STATUS_CODE); | 
| 91 | 91 | } | 
| 92 | 92 | } | 
| @@ -51,7 +51,7 @@ | ||
| 51 | 51 | public function __construct(array $fieldList = []) | 
| 52 | 52 |      { | 
| 53 | 53 |          if (!empty($fieldList)) { | 
| 54 | - $this->fieldList =$fieldList; | |
| 54 | + $this->fieldList = $fieldList; | |
| 55 | 55 | } | 
| 56 | 56 | } | 
| 57 | 57 | |
| @@ -33,7 +33,7 @@ | ||
| 33 | 33 | */ | 
| 34 | 34 | public function __construct(array &$data = []) | 
| 35 | 35 |      { | 
| 36 | - $this->data =& $data; | |
| 36 | + $this->data = & $data; | |
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | 39 | /** | 
| @@ -203,7 +203,7 @@ discard block | ||
| 203 | 203 | <div class="filter-status"> | 
| 204 | 204 |                      <div class="heading"><?php _e('panel', 'overview_label_action_logger', 'Action Logger'); ?></div> | 
| 205 | 205 | <div class="nums"> | 
| 206 | - <?php echo $data['action_logger'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> | |
| 206 | + <?php echo $data['action_logger'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> | |
| 207 | 207 | </div> | 
| 208 | 208 |                      <div class="note"><?php _e('panel', 'overview_note_action_logger', 'Record every visitor’s behavior.'); ?></div> | 
| 209 | 209 | </div> | 
| @@ -222,7 +222,7 @@ discard block | ||
| 222 | 222 | <div class="filter-status"> | 
| 223 | 223 |                      <div class="heading"><?php _e('panel', 'overview_label_recaptcha', 'reCAPTCHA'); ?></div> | 
| 224 | 224 | <div class="nums"> | 
| 225 | - <?php echo $captcha['recaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> | |
| 225 | + <?php echo $captcha['recaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> | |
| 226 | 226 | </div> | 
| 227 | 227 |                      <div class="note"><?php _e('panel', 'overview_note_recaptcha', 'Provided by Google.'); ?></div> | 
| 228 | 228 | </div> | 
| @@ -231,7 +231,7 @@ discard block | ||
| 231 | 231 | <div class="filter-status"> | 
| 232 | 232 |                      <div class="heading"><?php _e('panel', 'overview_label_image_captcha', 'Image Captcha'); ?></div> | 
| 233 | 233 | <div class="nums"> | 
| 234 | - <?php echo $captcha['imagecaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> | |
| 234 | + <?php echo $captcha['imagecaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> | |
| 235 | 235 | </div> | 
| 236 | 236 |                      <div class="note"><?php _e('panel', 'overview_note_image_captcha', 'A simple text-in-image Captcha.'); ?></div> | 
| 237 | 237 | </div> | 
| @@ -251,7 +251,7 @@ discard block | ||
| 251 | 251 | <div class="filter-status"> | 
| 252 | 252 |                      <div class="heading"><?php _e('panel', 'overview_label_' . $k, ''); ?></div> | 
| 253 | 253 | <div class="nums"> | 
| 254 | - <?php echo $messengers[$k] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> | |
| 254 | + <?php echo $messengers[$k] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> | |
| 255 | 255 | </div> | 
| 256 | 256 |                      <div class="note"><?php _e('panel', 'overview_note_' . $k, ''); ?></div> | 
| 257 | 257 | </div> | 
| @@ -236,11 +236,11 @@ | ||
| 236 | 236 | private function overviewTemplateVarsOfComponents(array $data = []): array | 
| 237 | 237 |      { | 
| 238 | 238 | $data['components'] = [ | 
| 239 | - 'Ip' => (!empty($this->kernel->component['Ip'])) ? true : false, | |
| 239 | + 'Ip' => (!empty($this->kernel->component['Ip'])) ? true : false, | |
| 240 | 240 | 'TrustedBot' => (!empty($this->kernel->component['TrustedBot'])) ? true : false, | 
| 241 | - 'Header' => (!empty($this->kernel->component['Header'])) ? true : false, | |
| 242 | - 'Rdns' => (!empty($this->kernel->component['Rdns'])) ? true : false, | |
| 243 | - 'UserAgent' => (!empty($this->kernel->component['UserAgent'])) ? true : false, | |
| 241 | + 'Header' => (!empty($this->kernel->component['Header'])) ? true : false, | |
| 242 | + 'Rdns' => (!empty($this->kernel->component['Rdns'])) ? true : false, | |
| 243 | + 'UserAgent' => (!empty($this->kernel->component['UserAgent'])) ? true : false, | |
| 244 | 244 | ]; | 
| 245 | 245 | |
| 246 | 246 | return $data; | 
| @@ -39,7 +39,7 @@ discard block | ||
| 39 | 39 | </div> | 
| 40 | 40 | <div class="board-field right"> | 
| 41 | 41 |                  <div class="heading"><?php _e('panel', 'table_heading_period', 'Period'); ?></div> | 
| 42 | - <div class="nums"><?php echo number_format($session_limit_period ); ?></div> | |
| 42 | + <div class="nums"><?php echo number_format($session_limit_period); ?></div> | |
| 43 | 43 |                  <div class="note"><?php _e('panel', 'table_note_period', 'Keep-alive period. (minutes)'); ?></div> | 
| 44 | 44 | </div> | 
| 45 | 45 | </div> | 
| @@ -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_online', 'Online'); ?></div> | 
| 52 | - <div class="nums"><?php echo number_format($online_count ); ?></div> | |
| 52 | + <div class="nums"><?php echo number_format($online_count); ?></div> | |
| 53 | 53 |                  <div class="note"><?php _e('panel', 'table_note_online', 'Online session amount.'); ?></div> | 
| 54 | 54 | </div> | 
| 55 | 55 | </div> | 
| @@ -89,14 +89,14 @@ discard block | ||
| 89 | 89 | |
| 90 | 90 | $remainsTime = $expires - (time() - $sessionInfo['time']); | 
| 91 | 91 | |
| 92 | -                        if ($remainsTime < 1 ) { | |
| 92 | +                        if ($remainsTime < 1) { | |
| 93 | 93 | $remainsTime = 0; | 
| 94 | 94 | } | 
| 95 | 95 | |
| 96 | -                        if ($i < $session_limit_count ) { | |
| 96 | +                        if ($i < $session_limit_count) { | |
| 97 | 97 |                              $satusName = __('panel', 'table_text_allowable', 'Allowable'); | 
| 98 | 98 | |
| 99 | -                            if ($remainsTime < 1 ) { | |
| 99 | +                            if ($remainsTime < 1) { | |
| 100 | 100 |                                  $satusName = __('panel', 'table_text_expired', 'Expired'); | 
| 101 | 101 | } | 
| 102 | 102 |                          } else { | 
| @@ -58,20 +58,20 @@ | ||
| 58 | 58 | </thead> | 
| 59 | 59 | <tbody> | 
| 60 | 60 | <?php foreach ($ip_log_list as $ipInfo) : ?> | 
| 61 | - <?php $logData = is_array($ipInfo['log_data']) ? $ipInfo['log_data'] : json_decode($ipInfo['log_data'], true ); ?> | |
| 61 | + <?php $logData = is_array($ipInfo['log_data']) ? $ipInfo['log_data'] : json_decode($ipInfo['log_data'], true); ?> | |
| 62 | 62 | <?php | 
| 63 | 63 | |
| 64 | 64 | $text_warning = ''; | 
| 65 | 65 | |
| 66 | -                        if ($logData['pageviews_m'] > 6 || $logData['pageviews_h'] > 50 || $logData['pageviews_d'] > 100 ) { | |
| 66 | +                        if ($logData['pageviews_m'] > 6 || $logData['pageviews_h'] > 50 || $logData['pageviews_d'] > 100) { | |
| 67 | 67 | $text_warning = '<span class="so-text-warning"><i class="fas fa-exclamation-triangle"></i></span>'; | 
| 68 | 68 | } | 
| 69 | 69 | |
| 70 | -                        if ($logData['flag_js_cookie'] > 2 || $logData['flag_multi_session'] > 2 || $logData['flag_empty_referer'] > 2 ) { | |
| 70 | +                        if ($logData['flag_js_cookie'] > 2 || $logData['flag_multi_session'] > 2 || $logData['flag_empty_referer'] > 2) { | |
| 71 | 71 | $text_warning = '<span class="so-text-warning"><i class="fas fa-exclamation-triangle"></i></span>'; | 
| 72 | 72 | } | 
| 73 | 73 | |
| 74 | -                        if ($logData['flag_js_cookie'] > 3 || $logData['flag_multi_session'] > 3 || $logData['flag_empty_referer'] > 3 ) { | |
| 74 | +                        if ($logData['flag_js_cookie'] > 3 || $logData['flag_multi_session'] > 3 || $logData['flag_empty_referer'] > 3) { | |
| 75 | 75 | $text_warning = '<span class="so-text-danger"><i class="fas fa-exclamation-triangle"></i></span>'; | 
| 76 | 76 | } | 
| 77 | 77 | ?> |