PluginProbe
RSFirewall! / trunk
RSFirewall! vtrunk
rsfirewall / views / file.php

file.php in RSFirewall! trunk, at views/file.php

41 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package RSFirewall!
4 * @copyright (c) 2018 RSJoomla!
5 * @link https://www.rsjoomla.com
6 * @license GNU General Public License http://www.gnu.org/licenses/gpl-3.0.en.html
7 */
8
9 if ( ! defined( 'WPINC' ) ) {
10 die;
11 }
12 try {
13 $contents = $this->model->get_contents();
14
15 ?>
16 <!-- Create a header in the default WordPress 'wrap' container -->
17 <!-- Title -->
18 <div class="row margin-bottom-x1">
19 <div class="col-md-12">
20 <h3><?php echo esc_html__( 'File Contents', 'rsfirewall' ); ?></h3>
21 <h4><?php echo $contents->status['reason'] ?></h4>
22 <hr/>
23 </div>
24 </div>
25 <!-- /.Title -->
26 <!-- Info Box -->
27 <pre>
28 <?php
29 if ( $contents->status ) {
30 $contents = str_replace( $contents->status['match'], '<strong class="rsfirewall-level-high">' . $contents->status['match'] . '</strong>', esc_html( $contents->file_contents ) );
31 } else {
32 $contents = esc_html( $contents->file_contents );
33 }
34 echo $contents;
35 ?>
36 </pre>
37 <!-- /.Info Box -->
38 <?php } catch( Exception $e) { ?>
39 <div class="notice notice-error"><p><?php echo $e->getMessage(); ?></p></div>
40 <?php }
41