| 1 |
<div class="wrap"> |
| 2 |
<h2><?php echo __('Unauthorized access log', 'easy-basic-authentication'); ?></h2> |
| 3 |
<p> |
| 4 |
<form method="post" action="<?php echo esc_url(admin_url('admin.php?page=basic-auth-login')); ?>"> |
| 5 |
<input type="hidden" name="clear_mode" value="1"> |
| 6 |
<button type="submit" class="button button-primary"> |
| 7 |
<?php echo __('Clear log', 'easy-basic-authentication'); ?> |
| 8 |
</button> |
| 9 |
</form> |
| 10 |
</p> |
| 11 |
<table class="wp-list-table widefat fixed striped"> |
| 12 |
<thead> |
| 13 |
<tr> |
| 14 |
<th><?php echo __('ID', 'easy-basic-authentication'); ?></th> |
| 15 |
<th><?php echo __('IP Address', 'easy-basic-authentication'); ?></th> |
| 16 |
<th><?php echo __('Date', 'easy-basic-authentication'); ?></th> |
| 17 |
<th><?php echo __('Browser', 'easy-basic-authentication'); ?></th> |
| 18 |
<th><?php echo __('Request URI', 'easy-basic-authentication'); ?></th> |
| 19 |
</tr> |
| 20 |
</thead> |
| 21 |
<tbody> |
| 22 |
<?php |
| 23 |
foreach ($user_log_data as $entry) { |
| 24 |
$new = $entry['viewed']?'':' ('.__('new', 'easy-basic-authentication').')'; |
| 25 |
echo "<tr>"; |
| 26 |
echo "<td>" . esc_html($entry['id']) .$new. "</td>"; |
| 27 |
echo "<td>" . esc_html($entry['ip']) . "</td>"; |
| 28 |
echo "<td>" . esc_html($entry['data']) . "</td>"; |
| 29 |
echo "<td>" . esc_html($entry['browser']) . "</td>"; |
| 30 |
echo "<td>" . esc_html(isset($entry['request_uri'])?$entry['request_uri']:'') . "</td>"; |
| 31 |
echo "</tr>"; |
| 32 |
} |
| 33 |
?> |
| 34 |
</tbody> |
| 35 |
</table> |
| 36 |
</div> |
| 37 |
|