| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,131 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+/** |
|
| 4 |
+ * @copyright 2024 Double Bastion LLC <www.doublebastion.com> |
|
| 5 |
+ * |
|
| 6 |
+ * @author Double Bastion LLC |
|
| 7 |
+ * |
|
| 8 |
+ * @license GNU AGPL version 3 or any later version |
|
| 9 |
+ * |
|
| 10 |
+ * This program is free software; you can redistribute it and/or |
|
| 11 |
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
|
| 12 |
+ * License as published by the Free Software Foundation; either |
|
| 13 |
+ * version 3 of the License, or any later version. |
|
| 14 |
+ * |
|
| 15 |
+ * This program 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 AFFERO GENERAL PUBLIC LICENSE for more details. |
|
| 19 |
+ * |
|
| 20 |
+ * You should have received a copy of the GNU Affero General Public |
|
| 21 |
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 22 |
+ * |
|
| 23 |
+ */ |
|
| 24 |
+ |
|
| 25 |
+define('ACCESSCONST', TRUE);
|
|
| 26 |
+ |
|
| 27 |
+session_start(); |
|
| 28 |
+ |
|
| 29 |
+if ($_SESSION['loggedtorspanel'] == true) {
|
|
| 30 |
+ |
|
| 31 |
+require('db-connect.php');
|
|
| 32 |
+ |
|
| 33 |
+?> |
|
| 34 |
+ |
|
| 35 |
+<!doctype html> |
|
| 36 |
+<head> |
|
| 37 |
+ <meta charset="utf-8"> |
|
| 38 |
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
| 39 |
+ <title>Set Detections Directory</title> |
|
| 40 |
+ <meta name="description" content="Set Detections Directory"> |
|
| 41 |
+ <meta name="viewport" content="width=device-width, initial-scale=1"> |
|
| 42 |
+ |
|
| 43 |
+ <link rel="shortcut icon" type="image/png" href="images/favicon.png" /> |
|
| 44 |
+ <link rel="stylesheet" href="assets/css/normalize.min.css"> |
|
| 45 |
+ <link rel="stylesheet" href="assets/css/bootstrap.min.css"> |
|
| 46 |
+ <link rel="stylesheet" href="assets/css/font-awesome-4.7.0/css/font-awesome.min.css"> |
|
| 47 |
+ <link rel="stylesheet" href="assets/css/themify-icons/themify-icons.css"> |
|
| 48 |
+ <link rel="stylesheet" href="assets/css/cs-skin-elastic.css"> |
|
| 49 |
+ <link rel="stylesheet" href="assets/css/style.css"> |
|
| 50 |
+ |
|
| 51 |
+ <script type="text/javascript" src="assets/js/jquery-3.3.1.min.js"></script> |
|
| 52 |
+ <script type="text/javascript" src="assets/js/jquery.min.js"></script> |
|
| 53 |
+ <script type="text/javascript" src="assets/js/popper.min.js"></script> |
|
| 54 |
+ <script type="text/javascript" src="assets/js/bootstrap.min.js"></script> |
|
| 55 |
+ <script type="text/javascript" src="assets/js/jquery.matchHeight.min.js"></script> |
|
| 56 |
+ <script type="text/javascript" src="assets/js/main.js"></script> |
|
| 57 |
+ <script type="text/javascript" src="assets/js/moment.min.js"></script> |
|
| 58 |
+ |
|
| 59 |
+ <script type="text/javascript" src="assets/js/settingsmenu.js"></script> |
|
| 60 |
+ <script type="text/javascript" src="assets/js/set-detections-dir.js"></script> |
|
| 61 |
+ |
|
| 62 |
+</head> |
|
| 63 |
+ |
|
| 64 |
+<body> |
|
| 65 |
+ |
|
| 66 |
+<?php include 'panels.php'; ?> |
|
| 67 |
+ |
|
| 68 |
+ <!-- Content --> |
|
| 69 |
+ |
|
| 70 |
+ <div class="content"> |
|
| 71 |
+ |
|
| 72 |
+ <div class="pagetitle">ClamAV Detections Directory</div> |
|
| 73 |
+ |
|
| 74 |
+ <div class="col-lg-8"> |
|
| 75 |
+ <div class="card newpasscard"> |
|
| 76 |
+ <div class="card-header">Change ClamAV Detections Directory</div> |
|
| 77 |
+ <div class="card-body card-block"> |
|
| 78 |
+ <div class="form-group"> |
|
| 79 |
+ <div class="input-group"> |
|
| 80 |
+ <div class="explanationtext">If the 'detections' directory where ClamAV stores the periodic scan results has been changed and is no |
|
| 81 |
+ longer the default "/srv/scripts/detections", you can set the new path and/or directory below and save it to the panel database so as to allow the panel to read the periodic scan results |
|
| 82 |
+ and display them on the Dashboard.</br></br>(Please note that ClamAV virus detections are of two kinds: 1. Detections made by periodic scanning triggered by a cron job, which |
|
| 83 |
+ are stored in the '/srv/scripts/detections' directory and are listed on the first section of the Dashboard; 2. Real-time detections which are made when an infected email arrives, when an |
|
| 84 |
+ infected file is uploaded to Nextcloud, or during an on-demand file/directory scan. The real-time detections are recorded in logs and they are listed in the periodic emails sent to the |
|
| 85 |
+ administrator by 'System Health and Security Probe'.)</div> |
|
| 86 |
+ <div class="input-group-addon"><i class="fa fa-folder-open"></i></div> |
|
| 87 |
+ <?php |
|
| 88 |
+ $detectionsdir = "SELECT id, detdir FROM detectionsdir WHERE id = 1"; |
|
| 89 |
+ $detectresult = $mysqli->query($detectionsdir); |
|
| 90 |
+ $clamavdet = $detectresult->fetch_array(); |
|
| 91 |
+ $clamavreportdir = $clamavdet[1]; |
|
| 92 |
+ ?> |
|
| 93 |
+ <input type="text" id="currentdetdir" name="currentdetdir" class="form-control" placeholder="Enter the new ClamAV Detections Directory" value="<?php print_r($clamavreportdir); ?>" / > |
|
| 94 |
+ </div> |
|
| 95 |
+ </div> |
|
| 96 |
+ <span id="savenewdettext"></span> |
|
| 97 |
+ <input type="button" id="savenewdetdir" value="Save New Directory" /> |
|
| 98 |
+ </div> |
|
| 99 |
+ </div> |
|
| 100 |
+ </div> |
|
| 101 |
+ |
|
| 102 |
+<?php include 'about.php'; ?> |
|
| 103 |
+ |
|
| 104 |
+ </div> |
|
| 105 |
+ |
|
| 106 |
+ <!-- /.content --> |
|
| 107 |
+ |
|
| 108 |
+ <div class="clearfix"></div> |
|
| 109 |
+ |
|
| 110 |
+<?php include 'footer.php'; ?> |
|
| 111 |
+ |
|
| 112 |
+ </div> |
|
| 113 |
+ <!-- /#right-panel --> |
|
| 114 |
+ |
|
| 115 |
+ <script type="text/javascript"> |
|
| 116 |
+ $("#settingsdroparea").show();
|
|
| 117 |
+ $("#detectionsfolder").css('color', '#03A9F3');
|
|
| 118 |
+ </script> |
|
| 119 |
+ |
|
| 120 |
+</body> |
|
| 121 |
+</html> |
|
| 122 |
+ |
|
| 123 |
+<?php |
|
| 124 |
+ |
|
| 125 |
+} else {
|
|
| 126 |
+ |
|
| 127 |
+ header("Location: panel-login.php");
|
|
| 128 |
+} |
|
| 129 |
+ |
|
| 130 |
+?> |
|
| 131 |
+ |