adding deepscan to rtp

This commit is contained in:
jakani24
2024-06-07 08:29:24 +02:00
parent 8af5add732
commit fdaf27b8ed
19 changed files with 300 additions and 88 deletions

View File

@@ -24,6 +24,8 @@ $setting_communication_unsafe_tls = "not configured yet";
$setting_server_server_url="not configured yet";
$setting_rtp_folder_scan_status=0;
$setting_rtp_process_scan_status=0;
$setting_rtp_process_scan_use_deepscan=0;
$setting_rtp_folder_scan_use_deepscan=0;
$setting_ac_status=0;
include "../../../config.php";
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD,$DB_DATABASE);
@@ -196,13 +198,29 @@ load_settings();
?>
<label class="form-check-label" for="flexSwitchCheckDefault">Check file modifications</label>
</div>
<div class="form-check form-switch">
<?php if($setting_rtp_folder_scan_use_deepscan=="true")
echo ("<input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"setting_rtp_folder_scan_use_deepscan\" onclick=\"update_switch('setting_rtp_folder_scan_use_deepscan','setting_rtp_folder_scan_use_deepscan')\" checked>");
else
echo ("<input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"setting_rtp_folder_scan_use_deepscan\" onclick=\"update_switch('setting_rtp_folder_scan_use_deepscan','setting_rtp_folder_scan_use_deepscan')\">");
?>
<label class="form-check-label" for="setting_rtp_folder_scan_use_deepscan">Check file modifications with deepscan</label>
</div>
<div class="form-check form-switch">
<?php if($setting_rtp_process_scan_status=="true")
echo ("<input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"flexSwitchCheckDefault1\" onclick=\"update_switch('flexSwitchCheckDefault1','setting_rtp_process_scan_status')\" checked>");
else
echo ("<input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"flexSwitchCheckDefault1\" onclick=\"update_switch('flexSwitchCheckDefault1','setting_rtp_process_scan_status')\">");
?>
<label class="form-check-label" for="flexSwitchCheckDefault1">Check Processes</label>
<label class="form-check-label" for="flexSwitchCheckDefault1">Check processes</label>
</div>
<div class="form-check form-switch">
<?php if($setting_rtp_folder_scan_use_deepscan=="true")
echo ("<input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"setting_rtp_process_scan_use_deepscan\" onclick=\"update_switch('setting_rtp_process_scan_use_deepscan','setting_rtp_process_scan_use_deepscan')\" checked>");
else
echo ("<input class=\"form-check-input\" type=\"checkbox\" role=\"switch\" id=\"setting_rtp_process_scan_use_deepscan\" onclick=\"update_switch('setting_rtp_process_scan_use_deepscan','setting_rtp_process_scan_use_deepscan')\">");
?>
<label class="form-check-label" for="setting_rtp_process_scan_use_deepscan">Check processes modifications with deepscan</label>
</div>
<br>
<h7>Included folders for RTP folderscanner</h7>

View File

@@ -78,6 +78,18 @@ function safe_settings(){
$stmt->execute();
$stmt->close();
}
if($_GET["update"]=="setting_rtp_process_scan_use_deepscan"){
$stmt = $conn->prepare("INSERT INTO settings (name,value) VALUES (?,?) ON DUPLICATE KEY UPDATE value = ?;");
$stmt->bind_param("sss",$name,$value,$value);
$stmt->execute();
$stmt->close();
}
if($_GET["update"]=="setting_rtp_folder_scan_use_deepscan"){
$stmt = $conn->prepare("INSERT INTO settings (name,value) VALUES (?,?) ON DUPLICATE KEY UPDATE value = ?;");
$stmt->bind_param("sss",$name,$value,$value);
$stmt->execute();
$stmt->close();
}
if($_GET["update"]=="setting_communication_unsafe_tls"){
$stmt = $conn->prepare("INSERT INTO settings (name,value) VALUES (?,?) ON DUPLICATE KEY UPDATE value = ?;");
$stmt->bind_param("sss",$name,$value,$value);
@@ -127,6 +139,8 @@ function load_settings(){
global $setting_virus_ctrl_virus_process_found_kill;
global $setting_server_server_url;
global $setting_rtp_folder_scan_status;
global $setting_rtp_folder_scan_use_deepscan;
global $setting_rtp_process_scan_use_deepscan;
global $setting_rtp_process_scan_status;
global $setting_communication_unsafe_tls;
global $setting_ac_status;
@@ -187,6 +201,32 @@ function load_settings(){
}
$stmt -> close();
//get setting: setting_rtp_process_scan_use_deepscan
$sql = "SELECT * FROM settings WHERE name = 'setting_rtp_process_scan_use_deepscan'";
$stmt = $conn->prepare($sql);
// Execute the statement
$stmt->execute();
// Get the result
$result = $stmt->get_result();
$row = $result->fetch_assoc();
if($row!==null){
$setting_rtp_process_scan_use_deepscan=$row["value"];
}
$stmt -> close();
//get setting: setting_rtp_folder_scan_use_deepscan
$sql = "SELECT * FROM settings WHERE name = 'setting_rtp_folder_scan_use_deepscan'";
$stmt = $conn->prepare($sql);
// Execute the statement
$stmt->execute();
// Get the result
$result = $stmt->get_result();
$row = $result->fetch_assoc();
if($row!==null){
$setting_rtp_folder_scan_use_deepscan=$row["value"];
}
$stmt -> close();
//get setting: setting_server_server_url
$sql = "SELECT * FROM settings WHERE name = 'setting_server_server_url'";