| 1 |
<?php |
| 2 |
defined('ABSPATH') or die("Protected By WT!"); |
| 3 |
?> |
| 4 |
<?php if($arguments['waf']['edges']): ?> |
| 5 |
<?php foreach ($arguments['waf']['edges'] as $edge) : ?> |
| 6 |
<div class="wtotem_data__tr"> |
| 7 |
<div class="wtotem_data__td <?= $edge['node']['blocked'] ? 'wtotem_data__td_banned' : 'wtotem_data__td_blocked' ?> wtotem_data_width_1 break-word"> |
| 8 |
<div class="wtotem_data__ip"> |
| 9 |
<?= $edge['node']['ip'] ?> |
| 10 |
</div> |
| 11 |
</div> |
| 12 |
<div class="wtotem_data__td wtotem_data_width_2 break-word"> |
| 13 |
<div class="wtotem_data__country wt-flex wt-flex-middle"> |
| 14 |
<?php if(strtolower($edge['node']['country'])): ?> |
| 15 |
<img src="https://assets.wtotem.net/images/flags/<?= strtolower($edge['node']['country']) ?>.png" class="wt-margin-right-10 wt_flag"> |
| 16 |
<?= $edge['node']['location']['country']['nameEn'] ?> |
| 17 |
<?php else: ?> |
| 18 |
<?= __( 'Unknown', 'wtotem' ) ?> |
| 19 |
<?php endif; ?> |
| 20 |
</div> |
| 21 |
</div> |
| 22 |
<div class="wtotem_data__td wtotem_data_width_3"> |
| 23 |
<?= convertTimeToReadable($edge['node']['time']) ?> |
| 24 |
</div> |
| 25 |
<?php $request = htmlspecialchars(urldecode($edge['node']['request'])); ?> |
| 26 |
<div class="wtotem_data__td wtotem_data_width_4 break-word" title="<?= $request ?>"> |
| 27 |
<?php |
| 28 |
$shortRequest = (strlen($request) > 30) ? substr($request,0,30).'...' : $request ; |
| 29 |
echo $shortRequest; |
| 30 |
?> |
| 31 |
</div> |
| 32 |
<div |
| 33 |
class="wtotem_data__td wtotem_data_width_6"> |
| 34 |
<?= $edge['node']['blocked'] ? __( 'Blocked IP', 'wtotem' ) : __( 'Not blocked', 'wtotem' ) ?> |
| 35 |
</div> |
| 36 |
</div> |
| 37 |
<?php endforeach; ?> |
| 38 |
|
| 39 |
<?php if($arguments['waf']['hasNextPage']):?> |
| 40 |
<a href="#" class="wtotem_chart__btn" id="waf_load_more"><?= __( 'Show more', 'wtotem' ) ?></a> |
| 41 |
<?php endif; ?> |
| 42 |
<?php else:?> |
| 43 |
<!-- No data block --> |
| 44 |
<section class="wtotem_reports-no-data" style="height:300px" > |
| 45 |
<h2 class="visually-hidden"><?= __( 'No data', 'wtotem' ) ?></h2> |
| 46 |
<p class="wtotem_reports-no-data__text"> |
| 47 |
<?= __( 'Has no action ready yet', 'wtotem' ) ?> |
| 48 |
</p> |
| 49 |
</section> |
| 50 |
<?php endif; ?> |
| 51 |
|