| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package Logtivity |
| 4 |
* @contact logtivity.io, [email protected] |
| 5 |
* @copyright 2024-2026 Logtivity. All rights reserved |
| 6 |
* @license https://www.gnu.org/licenses/gpl.html GNU/GPL |
| 7 |
* |
| 8 |
* This file is part of Logtivity. |
| 9 |
* |
| 10 |
* Logtivity is free software: you can redistribute it and/or modify |
| 11 |
* it under the terms of the GNU General Public License as published by |
| 12 |
* the Free Software Foundation, either version 2 of the License, or |
| 13 |
* (at your option) any later version. |
| 14 |
* |
| 15 |
* Logtivity is distributed in the hope that it will be useful, |
| 16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 |
* GNU General Public License for more details. |
| 19 |
* |
| 20 |
* You should have received a copy of the GNU General Public License |
| 21 |
* along with Logtivity. If not, see <https://www.gnu.org/licenses/>. |
| 22 |
*/ |
| 23 |
|
| 24 |
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- logtivity_view() renders trusted plugin templates. |
| 25 |
echo logtivity_view('_admin-header', compact('options')); |
| 26 |
?> |
| 27 |
|
| 28 |
<div class="postbox"> |
| 29 |
<div class="logtivity-settings"> |
| 30 |
|
| 31 |
<div class="inside"> |
| 32 |
<h1 style="padding-top: 10px;">Logs</h1> |
| 33 |
</div> |
| 34 |
|
| 35 |
<form id="logtivity-log-index-search-form" method="GET" action="<?php echo esc_url(admin_url( 'admin-ajax.php' )) ?>"> |
| 36 |
<input type="hidden" name="action" value="logtivity_log_index_filter"> |
| 37 |
<?php wp_nonce_field('logtivity_log_index_filter', 'logtivity_log_index_nonce') ?> |
| 38 |
<input id="logtivity_page" type="hidden" name="page"> |
| 39 |
|
| 40 |
<div class="logtivity-row"> |
| 41 |
<div class="logtivity-col-md-4"> |
| 42 |
<label for="logtivity-search-action"> |
| 43 |
<?php esc_html_e( 'Search', 'logtivity' ) ?> |
| 44 |
</label> |
| 45 |
<input id="logtivity-search-action" type="search" name="search_action" class="large-text" placeholder="<?php esc_attr_e( 'User Created or %keyword%', 'logtivity' ) ?>"> |
| 46 |
</div> |
| 47 |
<div class="logtivity-col-md-4"> |
| 48 |
<label for="logtivity-search-context"> |
| 49 |
<?php esc_html_e( 'Context', 'logtivity' ) ?> |
| 50 |
</label> |
| 51 |
<input id="logtivity-search-context" type="search" name="search_context" class="large-text" placeholder="<?php esc_attr_e( 'admin or %keyword%', 'logtivity' ) ?>"> |
| 52 |
</div> |
| 53 |
<div class="logtivity-col-md-4"> |
| 54 |
<label for="logtivity-search-user"> |
| 55 |
<?php esc_html_e( 'User', 'logtivity' ) ?> |
| 56 |
</label> |
| 57 |
<input id="logtivity-search-user" type="search" name="action_user" class="large-text" placeholder="<?php esc_attr_e( 'User ID / Username / IP Address', 'logtivity' ) ?>"> |
| 58 |
</div> |
| 59 |
</div> |
| 60 |
</form> |
| 61 |
|
| 62 |
<div |
| 63 |
style="padding-top: 15px" |
| 64 |
id="logtivity-log-index" |
| 65 |
role="region" |
| 66 |
aria-live="polite" |
| 67 |
aria-busy="true" |
| 68 |
aria-label="<?php esc_attr_e( 'Log results', 'logtivity' ) ?>" |
| 69 |
> |
| 70 |
<!-- Populated with AJAX --> |
| 71 |
</div> |
| 72 |
|
| 73 |
</div> |
| 74 |
</div> |
| 75 |
|
| 76 |
<?php |
| 77 |
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- logtivity_view() renders trusted plugin templates. |
| 78 |
echo logtivity_view('_admin-footer', compact('options')); |
| 79 |
?> |
| 80 |
|