@@ -40,8 +40,8 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public static function get(array $setting): MessengerInterface |
| 42 | 42 | { |
| 43 | - $apiKey = $setting['config']['api_key'] ?? ''; |
|
| 44 | - $sender = $setting['config']['sender'] ?? ''; |
|
| 43 | + $apiKey = $setting['config']['api_key'] ?? ''; |
|
| 44 | + $sender = $setting['config']['sender'] ?? ''; |
|
| 45 | 45 | $recipients = $setting['config']['recipients'] ?? []; |
| 46 | 46 | |
| 47 | 47 | $instance = new Sendgrid($apiKey); |
@@ -50,19 +50,19 @@ discard block |
||
| 50 | 50 | protected $deniedList = [ |
| 51 | 51 | |
| 52 | 52 | // Backlink crawlers |
| 53 | - 'Ahrefs', // http://ahrefs.com/robot/ |
|
| 54 | - 'roger', // rogerbot (SEOMOZ) |
|
| 55 | - 'moz.com', // SEOMOZ crawlers |
|
| 56 | - 'MJ12bot', // Majestic crawlers |
|
| 57 | - 'findlinks', // http://wortschatz.uni-leipzig.de/findlinks |
|
| 58 | - 'Semrush', // http://www.semrush.com/bot.html |
|
| 53 | + 'Ahrefs', // http://ahrefs.com/robot/ |
|
| 54 | + 'roger', // rogerbot (SEOMOZ) |
|
| 55 | + 'moz.com', // SEOMOZ crawlers |
|
| 56 | + 'MJ12bot', // Majestic crawlers |
|
| 57 | + 'findlinks', // http://wortschatz.uni-leipzig.de/findlinks |
|
| 58 | + 'Semrush', // http://www.semrush.com/bot.html |
|
| 59 | 59 | |
| 60 | 60 | // Web information crawlers |
| 61 | - 'domain', // Domain name information crawlers. |
|
| 62 | - 'copyright', // Copyright information crawlers. |
|
| 61 | + 'domain', // Domain name information crawlers. |
|
| 62 | + 'copyright', // Copyright information crawlers. |
|
| 63 | 63 | |
| 64 | 64 | // Others |
| 65 | - 'archive', // Wayback machine |
|
| 65 | + 'archive', // Wayback machine |
|
| 66 | 66 | ]; |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | if (!empty($this->deniedList)) { |
| 99 | - if (preg_match('/(' . implode('|', $this->deniedList). ')/i', $userAgent)) { |
|
| 99 | + if (preg_match('/(' . implode('|', $this->deniedList) . ')/i', $userAgent)) { |
|
| 100 | 100 | return (new Response)->withStatus(self::HTTP_STATUS_CODE); |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -274,8 +274,8 @@ |
||
| 274 | 274 | { |
| 275 | 275 | $table = [ |
| 276 | 276 | 'filter' => $this->tableFilterLogs . ':' . $ip, |
| 277 | - 'session' => $this->tableSessions . ':' . $ip, |
|
| 278 | - 'rule' => $this->tableRuleList . ':' . $ip, |
|
| 277 | + 'session' => $this->tableSessions . ':' . $ip, |
|
| 278 | + 'rule' => $this->tableRuleList . ':' . $ip, |
|
| 279 | 279 | ]; |
| 280 | 280 | |
| 281 | 281 | return $table[$type] ?? ''; |
@@ -100,8 +100,8 @@ |
||
| 100 | 100 | $path = []; |
| 101 | 101 | |
| 102 | 102 | $path['filter'] = $this->directory . '/' . $this->tableFilterLogs . '/' . $ip . '.' . $this->extension; |
| 103 | - $path['session'] = $this->directory . '/' . $this->tableSessions . '/' . $ip . '.' . $this->extension; |
|
| 104 | - $path['rule'] = $this->directory . '/' . $this->tableRuleList . '/' . $ip . '.' . $this->extension; |
|
| 103 | + $path['session'] = $this->directory . '/' . $this->tableSessions . '/' . $ip . '.' . $this->extension; |
|
| 104 | + $path['rule'] = $this->directory . '/' . $this->tableRuleList . '/' . $ip . '.' . $this->extension; |
|
| 105 | 105 | |
| 106 | 106 | return $path[$type] ?? ''; |
| 107 | 107 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public static function get(array $setting): CaptchaInterface |
| 41 | 41 | { |
| 42 | - $type = $setting['config']['type'] ?? 'alnum'; |
|
| 42 | + $type = $setting['config']['type'] ?? 'alnum'; |
|
| 43 | 43 | $length = $setting['config']['length'] ?? 8; |
| 44 | 44 | |
| 45 | 45 | $imageCaptchaConfig = []; |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | define('SHIELDON_VIEW', true); |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - $viewFilePath = __DIR__ . '/../../../templates/' . $page . '.php'; |
|
| 167 | + $viewFilePath = __DIR__ . '/../../../templates/' . $page . '.php'; |
|
| 168 | 168 | |
| 169 | 169 | if (!empty($data)) { |
| 170 | 170 | extract($data); |
@@ -433,12 +433,10 @@ discard block |
||
| 433 | 433 | $echo = []; |
| 434 | 434 | |
| 435 | 435 | $echo['css'] = $this->getConfig('messengers.' . $moduleName . '.confirm_test') ? |
| 436 | - 'success' : |
|
| 437 | - ''; |
|
| 436 | + 'success' : ''; |
|
| 438 | 437 | |
| 439 | 438 | $echo['icon'] = $this->getConfig('messengers.' . $moduleName . '.confirm_test') ? |
| 440 | - '<i class="fas fa-check"></i>' : |
|
| 441 | - '<i class="fas fa-exclamation"></i>'; |
|
| 439 | + '<i class="fas fa-check"></i>' : '<i class="fas fa-exclamation"></i>'; |
|
| 442 | 440 | |
| 443 | 441 | echo $echo[$echoType]; |
| 444 | 442 | } |
@@ -263,13 +263,16 @@ |
||
| 263 | 263 | <?php endif; ?> |
| 264 | 264 | </span> |
| 265 | 265 | </div> |
| 266 | - <?php else: ?> |
|
| 266 | + <?php else { |
|
| 267 | + : ?> |
|
| 267 | 268 | <div class="icon-box"> |
| 268 | 269 | <span class="message-icon"> |
| 269 | 270 | <i class="fas fa-exclamation-circle"></i> |
| 270 | 271 | </span> |
| 271 | 272 | </div> |
| 272 | - <?php endif; ?> |
|
| 273 | + <?php endif; |
|
| 274 | +} |
|
| 275 | +?> |
|
| 273 | 276 | </div> |
| 274 | 277 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| 275 | 278 | <span aria-hidden="true">×</span> |
@@ -67,7 +67,8 @@ discard block |
||
| 67 | 67 | </tbdoy> |
| 68 | 68 | </table> |
| 69 | 69 | </div> |
| 70 | - <?php else: ?> |
|
| 70 | + <?php else { |
|
| 71 | + : ?> |
|
| 71 | 72 | <div id="so-table-loading" class="so-datatables"> |
| 72 | 73 | <div class="lds-css ng-scope"> |
| 73 | 74 | <div class="lds-ripple"> |
@@ -76,7 +77,9 @@ discard block |
||
| 76 | 77 | </div> |
| 77 | 78 | </div> |
| 78 | 79 | </div> |
| 79 | - <?php endif; ?> |
|
| 80 | + <?php endif; |
|
| 81 | +} |
|
| 82 | +?> |
|
| 80 | 83 | <?php if (!empty($rule_list)) : ?> |
| 81 | 84 | <div id="so-table-container" class="so-datatables" style="display: none;"> |
| 82 | 85 | <table id="so-datalog" class="cell-border compact stripe responsive" cellspacing="0" width="100%"> |
@@ -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'); |
@@ -350,18 +350,18 @@ discard block |
||
| 350 | 350 | |
| 351 | 351 | $results['captcha_chart_string'] = ''; // string |
| 352 | 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 | - $results['captcha_failure_percentage'] = 0; // integer |
|
| 359 | - $results['captcha_success_percentage'] = 0; // integer |
|
| 360 | - $results['action_ban_count'] = 0; // integer |
|
| 361 | - $results['action_temp_ban_count'] = 0; // integer |
|
| 362 | - $results['action_unban_count'] = 0; // integer |
|
| 363 | - $results['blacklist_count'] = 0; // integer |
|
| 364 | - $results['session_limit_count'] = 0; // integer |
|
| 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 | + $results['captcha_failure_percentage'] = 0; // integer |
|
| 359 | + $results['captcha_success_percentage'] = 0; // integer |
|
| 360 | + $results['action_ban_count'] = 0; // integer |
|
| 361 | + $results['action_temp_ban_count'] = 0; // integer |
|
| 362 | + $results['action_unban_count'] = 0; // integer |
|
| 363 | + $results['blacklist_count'] = 0; // integer |
|
| 364 | + $results['session_limit_count'] = 0; // integer |
|
| 365 | 365 | |
| 366 | 366 | $ipdData = $this->getIpData(); |
| 367 | 367 | |
@@ -406,18 +406,18 @@ discard block |
||
| 406 | 406 | $results['label_chart_string'] = ''; // string |
| 407 | 407 | $results['captcha_chart_string'] = ''; // string |
| 408 | 408 | $results['pageview_chart_string'] = ''; // string |
| 409 | - $results['captcha_success_count'] = 0; // integer |
|
| 410 | - $results['captcha_failure_count'] = 0; // integer |
|
| 411 | - $results['captcha_count'] = 0; // integer |
|
| 412 | - $results['pageview_count'] = 0; // integer |
|
| 413 | - $results['captcha_percentageage'] = 0; // integer |
|
| 414 | - $results['captcha_failure_percentage'] = 0; // integer |
|
| 415 | - $results['captcha_success_percentage'] = 0; // integer |
|
| 416 | - $results['action_ban_count'] = 0; // integer |
|
| 417 | - $results['action_temp_ban_count'] = 0; // integer |
|
| 418 | - $results['action_unban_count'] = 0; // integer |
|
| 419 | - $results['blacklist_count'] = 0; // integer |
|
| 420 | - $results['session_limit_count'] = 0; // integer |
|
| 409 | + $results['captcha_success_count'] = 0; // integer |
|
| 410 | + $results['captcha_failure_count'] = 0; // integer |
|
| 411 | + $results['captcha_count'] = 0; // integer |
|
| 412 | + $results['pageview_count'] = 0; // integer |
|
| 413 | + $results['captcha_percentageage'] = 0; // integer |
|
| 414 | + $results['captcha_failure_percentage'] = 0; // integer |
|
| 415 | + $results['captcha_success_percentage'] = 0; // integer |
|
| 416 | + $results['action_ban_count'] = 0; // integer |
|
| 417 | + $results['action_temp_ban_count'] = 0; // integer |
|
| 418 | + $results['action_unban_count'] = 0; // integer |
|
| 419 | + $results['blacklist_count'] = 0; // integer |
|
| 420 | + $results['session_limit_count'] = 0; // integer |
|
| 421 | 421 | |
| 422 | 422 | if (!empty($periodData)) { |
| 423 | 423 | |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | $ip = $log['ip']; |
| 478 | 478 | $sessionId = $log['session_id']; |
| 479 | 479 | |
| 480 | - $this->ipDetail[$t][$ip]['session_id'][$sessionId ] = 1; |
|
| 480 | + $this->ipDetail[$t][$ip]['session_id'][$sessionId] = 1; |
|
| 481 | 481 | |
| 482 | 482 | if ($logActionCode === self::LOG_TEMPORARILY_BAN) { |
| 483 | 483 | $this->periodDetail[$t][$k]['action_temp_ban_count']++; |