@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | ?> |
15 | 15 | |
16 | 16 | <div class="so-dashboard"> |
17 | - <?php if (! empty($period_data)) : ?> |
|
17 | + <?php if (!empty($period_data)) : ?> |
|
18 | 18 | <div class="so-flex"> |
19 | 19 | <div class="so-board"> |
20 | 20 | <div class="board-field left"> |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | </tr> |
86 | 86 | </thead> |
87 | 87 | <tbody> |
88 | - <?php if (! empty($ip_details)) : ?> |
|
89 | - <?php foreach($ip_details as $ip => $ipInfo) : ?> |
|
88 | + <?php if (!empty($ip_details)) : ?> |
|
89 | + <?php foreach ($ip_details as $ip => $ipInfo) : ?> |
|
90 | 90 | <tr> |
91 | 91 | <td> |
92 | 92 | <?php if ($this->mode === 'demo') : ?> |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | </table> |
109 | 109 | </div> |
110 | 110 | <div class="so-timezone"> |
111 | - <?php if (! empty($last_cached_time)) : ?> |
|
111 | + <?php if (!empty($last_cached_time)) : ?> |
|
112 | 112 | <?php _e('panel', 'log_label_cache_time', 'Report generated time'); ?>: <strong class="text-info"><?php echo $last_cached_time; ?></strong> |
113 | 113 | |
114 | 114 | <?php endif; ?> |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | <?php |
120 | 120 | |
121 | - if (! empty($period_data)) { |
|
121 | + if (!empty($period_data)) { |
|
122 | 122 | $data['period_data'] = $period_data; |
123 | 123 | $this->_include('panel/js/chart', $data); |
124 | 124 | } |
@@ -60,9 +60,12 @@ |
||
60 | 60 | </div> |
61 | 61 | </div> |
62 | 62 | </div> |
63 | - <?php else : ?> |
|
63 | + <?php else { |
|
64 | + : ?> |
|
64 | 65 | <div class="alert alert-danger"> |
65 | - <?php _e('panel', 'log_msg_no_logger', 'Sorry, you have to implement ActionLogger to use this function.'); ?> |
|
66 | + <?php _e('panel', 'log_msg_no_logger', 'Sorry, you have to implement ActionLogger to use this function.'); |
|
67 | +} |
|
68 | +?> |
|
66 | 69 | |
67 | 70 | </div> |
68 | 71 | <?php endif; ?> |
@@ -304,9 +304,12 @@ |
||
304 | 304 | <div> |
305 | 305 | <?php if ($this->mode === 'demo') : ?> |
306 | 306 | <code id="code1" style="display: none">* * * * * root bash your_project_folder/vendor/shieldon/bin/iptable_bridge.sh --watch=your_watching_folder >> /var/log/shieldon.log 2>&1</code> |
307 | - <?php else: ?> |
|
307 | + <?php else { |
|
308 | + : ?> |
|
308 | 309 | <code id="code1" style="display: none">* * * * * root bash <?php echo realpath(__DIR__ . '/../../../bin/iptable_bridge.sh') ?> --watch=<span id="iptables-watch-folder"></span> >> /var/log/shieldon.log 2>&1</code> |
309 | - <?php endif; ?> |
|
310 | + <?php endif; |
|
311 | +} |
|
312 | +?> |
|
310 | 313 | |
311 | 314 | <textarea id="code2" class="form-control" rows="4" style="font-size: 12px; font-family: monospace;"></textarea> |
312 | 315 | </div><br /> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | ?> |
15 | 15 | |
16 | 16 | <div class="so-dashboard"> |
17 | - <?php if (! empty($period_data)) : ?> |
|
17 | + <?php if (!empty($period_data)) : ?> |
|
18 | 18 | <div class="so-flex"> |
19 | 19 | <div class="so-board"> |
20 | 20 | <div class="board-field left"> |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | </tr> |
86 | 86 | </thead> |
87 | 87 | <tbody> |
88 | - <?php if (! empty($ip_details)) : ?> |
|
89 | - <?php foreach($ip_details as $ip => $ipInfo) : ?> |
|
88 | + <?php if (!empty($ip_details)) : ?> |
|
89 | + <?php foreach ($ip_details as $ip => $ipInfo) : ?> |
|
90 | 90 | <tr> |
91 | 91 | <td> |
92 | 92 | <?php if ($this->mode === 'demo') : ?> |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | </table> |
109 | 109 | </div> |
110 | 110 | <div class="so-timezone"> |
111 | - <?php if (! empty($last_cached_time)) : ?> |
|
111 | + <?php if (!empty($last_cached_time)) : ?> |
|
112 | 112 | <?php _e('panel', 'log_label_cache_time', 'Report generated time'); ?>: <strong class="text-info"><?php echo $last_cached_time; ?></strong> |
113 | 113 | |
114 | 114 | <?php endif; ?> |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | <?php |
120 | 120 | |
121 | - if (! empty($period_data)) { |
|
121 | + if (!empty($period_data)) { |
|
122 | 122 | $data['period_data'] = $period_data; |
123 | 123 | $this->_include('panel/js/chart', $data); |
124 | 124 | } |
@@ -60,9 +60,12 @@ |
||
60 | 60 | </div> |
61 | 61 | </div> |
62 | 62 | </div> |
63 | - <?php else : ?> |
|
63 | + <?php else { |
|
64 | + : ?> |
|
64 | 65 | <div class="alert alert-danger"> |
65 | - <?php _e('panel', 'log_msg_no_logger', 'Sorry, you have to implement ActionLogger to use this function.'); ?> |
|
66 | + <?php _e('panel', 'log_msg_no_logger', 'Sorry, you have to implement ActionLogger to use this function.'); |
|
67 | +} |
|
68 | +?> |
|
66 | 69 | |
67 | 70 | </div> |
68 | 71 | <?php endif; ?> |
@@ -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> |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * |
49 | 49 | * @return bool |
50 | 50 | */ |
51 | - public function __call($function , $args) |
|
51 | + public function __call($function, $args) |
|
52 | 52 | { |
53 | 53 | return false; |
54 | 54 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | |
286 | 286 | $messenger = new Messenger\Smtp($user, $pass, $host, (int) $port); |
287 | 287 | |
288 | - foreach($recipients as $recipient) { |
|
288 | + foreach ($recipients as $recipient) { |
|
289 | 289 | if (filter_var($recipient, FILTER_VALIDATE_EMAIL)) { |
290 | 290 | $messenger->addRecipient($recipient); |
291 | 291 | } |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | |
325 | 325 | $messenger = new Messenger\Mail(); |
326 | 326 | |
327 | - foreach($recipients as $recipient) { |
|
327 | + foreach ($recipients as $recipient) { |
|
328 | 328 | if (filter_var($recipient, FILTER_VALIDATE_EMAIL)) { |
329 | 329 | $messenger->addRecipient($recipient); |
330 | 330 | } |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | |
365 | 365 | $messenger = new Messenger\Sendgrid($apiKey); |
366 | 366 | |
367 | - foreach($recipients as $recipient) { |
|
367 | + foreach ($recipients as $recipient) { |
|
368 | 368 | if (filter_var($recipient, FILTER_VALIDATE_EMAIL)) { |
369 | 369 | $messenger->addRecipient($recipient); |
370 | 370 | } |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | |
406 | 406 | $messenger = new Messenger\Mailgun($apiKey, $domain); |
407 | 407 | |
408 | - foreach($recipients as $recipient) { |
|
408 | + foreach ($recipients as $recipient) { |
|
409 | 409 | if (filter_var($recipient, FILTER_VALIDATE_EMAIL)) { |
410 | 410 | $messenger->addRecipient($recipient); |
411 | 411 | } |