PluginProbe
Patchstack – WordPress & Plugins Security / 2.1.18
Patchstack – WordPress & Plugins Security v2.1.18
2.3.7 trunk 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.2 2.1.20 2.1.21 2.1.22 2.1.23 2.1.24 2.1.25 2.1.3 2.1.4 2.1.5 2.1.6 All 49 releases
patchstack / includes / views / pages / logs.php

logs.php in Patchstack – WordPress & Plugins Security 2.1.18, at includes/views/pages/logs.php

56 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Do not allow the file to be called directly.
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 // Determine the log table that should be shown.
9 $logtype = ( isset( $_GET['logtype'] ) && $_GET['logtype'] == 'activity' ? 'activity' : 'firewall' );
10 $url = $_SERVER['REQUEST_URI'];
11 if ( strpos( $url, 'logtype' ) === false ) {
12 $url .= '&logtype=' . $logtype;
13 }
14 ?>
15 <div class="patchstack-font">
16 <h2 class="patchstack-logs-nav">
17 <a href="<?php echo esc_url( str_replace( 'activity', 'firewall', $url ) ); ?>" class="nav-tab patchstack-nav-tab <?php echo $logtype == 'firewall' ? 'nav-tab-active patchstack-nav-tab-active' : ''; ?>"><?php echo __( 'Firewall Log', 'patchstack' ); ?></a>
18 <a href="<?php echo esc_url( str_replace( 'firewall', 'activity', $url ) ); ?>" class="nav-tab patchstack-nav-tab <?php echo $logtype == 'activity' ? 'nav-tab-active patchstack-nav-tab-active' : ''; ?>"><?php echo __( 'Activity Log', 'patchstack' ); ?></a>
19 </h2>
20 <div class="patchstack-content-inner-table">
21 <div class="patchstack-font">
22 <h4>This will display the basic logs of the last 2 weeks.<br />If you would like to see the in-depth logs history of up to 90 days ago, login into your account at the <a href="https://app.patchstack.com" target="_blank">Patchstack App</a></h4>
23 <?php if ( $logtype == 'firewall' ) { ?>
24 <table class="table table-lg table-hover table-firewall-log">
25 <thead>
26 <tr>
27 <th>REASON</th>
28 <th>URL REQUESTED</th>
29 <th>METHOD</th>
30 <th>ORIGIN</th>
31 <th>DATE</th>
32 </tr>
33 </thead>
34 <tbody>
35 </tbody>
36 </table>
37 <?php } elseif ( $logtype == 'activity' ) { ?>
38 <table class="table table-lg table-hover table-user-log dt-table">
39 <thead>
40 <tr>
41 <th>Username</th>
42 <th>Action</th>
43 <th>Object</th>
44 <th>Object name</th>
45 <th>IP</th>
46 <th>Date</th>
47 </tr>
48 </thead>
49 <tbody>
50 </tbody>
51 </table>
52 <?php } ?>
53 </div>
54 </div>
55 </div>
56