[Web] Add smtp and header from to quarantine items, add more info to qhandler, allow to open qhandler links from qitem details

This commit is contained in:
andryyy
2020-06-06 13:25:32 +02:00
parent f9b8d386bc
commit b93371ca0a
19 changed files with 225 additions and 31 deletions

View File

@@ -1,6 +1,10 @@
<?php
session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
if (quarantine('hash_details', $_GET['hash']) === false) {
header('Location: /admin');
exit();
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
if (preg_match("/^([a-f0-9]{64})$/", $_POST['quick_release']) || preg_match("/^([a-f0-9]{64})$/", $_POST['quick_delete'])) {
?>
@@ -29,7 +33,29 @@ elseif (in_array($_GET['action'], array('release', 'delete'))) {
<div class="panel panel-default">
<div class="panel-heading"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <?= $lang['header']['quarantine']; ?></div>
<div class="panel-body">
<legend><?=$lang['quarantine']['release'];?></legend>
<legend data-hash="<?=$_GET['hash'];?>"><?=$lang['quarantine']['release'];?></legend>
<div id="qid_error" style="display:none" class="alert alert-danger"></div>
<div class="form-group">
<label for="qid_detail_symbols"><h4><?=$lang['quarantine']['rspamd_result'];?>:</h4></label>
<p><?=$lang['quarantine']['spam_score'];?>: <span id="qid_detail_score"></span></p>
<p id="qid_detail_symbols"></p>
</div>
<div class="form-group">
<label for="qid_detail_subj"><h4><?=$lang['quarantine']['subj'];?>:</h4></label>
<p id="qid_detail_subj"></p>
</div>
<div class="form-group">
<label for="qid_detail_hfrom"><h4><?=$lang['quarantine']['sender_header'];?>:</h4></label>
<p><span class="mail-address-item" id="qid_detail_hfrom"></span></p>
</div>
<div class="form-group">
<label for="qid_detail_efrom"><h4><?=$lang['quarantine']['sender'];?>:</h4></label>
<p><span class="mail-address-item" id="qid_detail_efrom"></span></p>
</div>
<div class="form-group">
<label for="qid_detail_recipients"><h4><?=$lang['quarantine']['recipients'];?>:</h4></label>
<p id="qid_detail_recipients"></p>
</div>
<form method="post" autofill="off">
<div class="form-group">
<button type="submit" class="btn btn-success" name="quick_release" value="<?=$_GET['hash'];?>"><?= $lang['tfa']['confirm']; ?></button>
@@ -49,7 +75,29 @@ elseif (in_array($_GET['action'], array('release', 'delete'))) {
<div class="panel panel-default">
<div class="panel-heading"><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <?= $lang['header']['quarantine']; ?></div>
<div class="panel-body">
<legend><?=$lang['quarantine']['remove'];?></legend>
<legend data-hash="<?=$_GET['hash'];?>"><?=$lang['quarantine']['remove'];?></legend>
<div id="qid_error" style="display:none" class="alert alert-danger"></div>
<div class="form-group">
<label for="qid_detail_symbols"><h4><?=$lang['quarantine']['rspamd_result'];?>:</h4></label>
<p><?=$lang['quarantine']['spam_score'];?>: <span id="qid_detail_score"></span></p>
<p id="qid_detail_symbols"></p>
</div>
<div class="form-group">
<label for="qid_detail_subj"><h4><?=$lang['quarantine']['subj'];?>:</h4></label>
<p id="qid_detail_subj"></p>
</div>
<div class="form-group">
<label for="qid_detail_hfrom"><h4><?=$lang['quarantine']['sender_header'];?>:</h4></label>
<p><span class="mail-address-item" id="qid_detail_hfrom"></span></p>
</div>
<div class="form-group">
<label for="qid_detail_efrom"><h4><?=$lang['quarantine']['sender'];?>:</h4></label>
<p><span class="mail-address-item" id="qid_detail_efrom"></span></p>
</div>
<div class="form-group">
<label for="qid_detail_recipients"><h4><?=$lang['quarantine']['recipients'];?>:</h4></label>
<p id="qid_detail_recipients"></p>
</div>
<form method="post" autofill="off">
<div class="form-group">
<button type="submit" class="btn btn-success" name="quick_delete" value="<?=$_GET['hash'];?>"><?= $lang['tfa']['confirm']; ?></button>
@@ -64,5 +112,6 @@ elseif (in_array($_GET['action'], array('release', 'delete'))) {
endif;
}
}
$js_minifier->add('/web/js/site/qhandler.js');
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
?>