PluginProbe
Patchstack – WordPress & Plugins Security / 2.2.3
Patchstack – WordPress & Plugins Security v2.2.3
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.2.3, at includes/views/pages/logs.php

65 lines 2.1 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 $site_id = get_option( 'patchstack_site_id', 0 );
12 $app_url = $site_id != 0 ? 'https://app.patchstack.com/app/' . $site_id . '/"' : 'https://app.patchstack.com/apps/overview';
13 if ( strpos( $url, 'logtype' ) === false ) {
14 $url .= '&logtype=' . $logtype;
15 }
16 ?>
17 <div class="patchstack-font">
18 <h2 class="patchstack-logs-nav">
19 <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' : ''; ?>">
20 <?php echo __( 'Firewall Log', 'patchstack' ); ?>
21 </a>
22
23 <?php if ( $class >= 1 || $class === '' ) { ?>
24 <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' : ''; ?>">
25 <?php echo __( 'Activity Log', 'patchstack' ); ?>
26 </a>
27 <?php } ?>
28 </h2>
29 <div class="patchstack-content-inner-table">
30 <div class="patchstack-font">
31 <h4>Log-in at <a href="<?php echo $app_url; ?>" target="_blank">Patchstack App</a> to view more logs.</h4>
32 <?php if ( $logtype == 'firewall' ) { ?>
33 <table class="table table-lg table-hover table-firewall-log">
34 <thead>
35 <tr>
36 <th>REASON</th>
37 <th>URL REQUESTED</th>
38 <th>METHOD</th>
39 <th>ORIGIN</th>
40 <th>DATE</th>
41 </tr>
42 </thead>
43 <tbody>
44 </tbody>
45 </table>
46 <?php } elseif ( $logtype == 'activity' ) { ?>
47 <table class="table table-lg table-hover table-user-log dt-table">
48 <thead>
49 <tr>
50 <th>Username</th>
51 <th>Action</th>
52 <th>Object</th>
53 <th>Object name</th>
54 <th>IP</th>
55 <th>Date</th>
56 </tr>
57 </thead>
58 <tbody>
59 </tbody>
60 </table>
61 <?php } ?>
62 </div>
63 </div>
64 </div>
65