andryyy 2019-07-23 08:08:11 +02:00
commit 584fb75f05
6 changed files with 8 additions and 3 deletions

View File

@ -619,7 +619,7 @@ function quarantine($_action, $_data = null) {
break;
case 'get':
if ($_SESSION['mailcow_cc_role'] == "user") {
$stmt = $pdo->prepare('SELECT `id`, `qid`, `subject`, LOCATE("VIRUS_FOUND", `symbols`) AS `virus_flag`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantine` WHERE `rcpt` = :mbox');
$stmt = $pdo->prepare('SELECT `id`, `qid`, `subject`, LOCATE("VIRUS_FOUND", `symbols`) AS `virus_flag`, `score`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantine` WHERE `rcpt` = :mbox');
$stmt->execute(array(':mbox' => $_SESSION['mailcow_cc_username']));
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
while($row = array_shift($rows)) {
@ -627,7 +627,7 @@ function quarantine($_action, $_data = null) {
}
}
elseif ($_SESSION['mailcow_cc_role'] == "admin") {
$stmt = $pdo->query('SELECT `id`, `qid`, `subject`, LOCATE("VIRUS_FOUND", `symbols`) AS `virus_flag`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantine`');
$stmt = $pdo->query('SELECT `id`, `qid`, `subject`, LOCATE("VIRUS_FOUND", `symbols`) AS `virus_flag`, `score`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantine`');
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
while($row = array_shift($rows)) {
$q_meta[] = $row;
@ -636,7 +636,7 @@ function quarantine($_action, $_data = null) {
else {
$domains = array_merge(mailbox('get', 'domains'), mailbox('get', 'alias_domains'));
foreach ($domains as $domain) {
$stmt = $pdo->prepare('SELECT `id`, `qid`, `subject`, LOCATE("VIRUS_FOUND", `symbols`) AS `virus_flag`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantine` WHERE `rcpt` REGEXP :domain');
$stmt = $pdo->prepare('SELECT `id`, `qid`, `subject`, LOCATE("VIRUS_FOUND", `symbols`) AS `virus_flag`, `score`, `rcpt`, `sender`, UNIX_TIMESTAMP(`created`) AS `created` FROM `quarantine` WHERE `rcpt` REGEXP :domain');
$stmt->execute(array(':domain' => '@' . $domain . '$'));
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
while($row = array_shift($rows)) {

View File

@ -17,6 +17,7 @@ jQuery(function($){
{"name":"sender","title":lang.sender},
{"name":"rcpt","title":lang.rcpt, "breakpoints":"xs sm md", "type": "text"},
{"name":"virus","title":lang.danger, "type": "text"},
{"name":"score","title": lang.spam_score,"type": "number"},
{"name":"subject","title":lang.subj, "type": "text"},
{"name":"created","formatter":function unix_time_format(tm) { var date = new Date(tm ? tm * 1000 : 0); return date.toLocaleString();},"title":lang.received,"style":{"width":"170px"}},
{"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right"},"style":{"width":"220px"},"type":"html","title":lang.action,"breakpoints":"xs sm md"}

View File

@ -715,6 +715,7 @@ $lang['quarantine']['subj'] = "Předmět";
$lang['quarantine']['recipients'] = "Příjemci";
$lang['quarantine']['text_plain_content'] = "Obsah (text/plain)";
$lang['quarantine']['text_from_html_content'] = "Obsah (konvertované html)";
$lang['quarantine']['spam_score'] = "Skóre";
$lang['quarantine']['atts'] = "Přílohy";
$lang['warning']['fuzzy_learn_error'] = "Chyba při učení Fuzzy hash: %s";
$lang['danger']['spam_learn_error'] = "Chyba při učení spamu: %s";

View File

@ -745,6 +745,7 @@ $lang['quarantine']['neutral_danger'] = "Neutral/ohne Bewertung";
$lang['quarantine']['medium_danger'] = "Mittlere Gefahr";
$lang['quarantine']['high_danger'] = "Hohe Gefahr";
$lang['quarantine']['danger'] = "Gefahr";
$lang['quarantine']['spam_score'] = "Bewertung";
$lang['quarantine']['qhandler_success'] = "Aktion wurde an das System übergeben. Sie dürfen dieses Fenster nun schließen.";
$lang['warning']['fuzzy_learn_error'] = "Fuzzy Lernfehler: %s";
$lang['danger']['spam_learn_error'] = "Spam Lernfehler: %s";

View File

@ -767,6 +767,7 @@ $lang['quarantine']['neutral_danger'] = "Neutral/no rating";
$lang['quarantine']['medium_danger'] = "Medium danger";
$lang['quarantine']['high_danger'] = "High";
$lang['quarantine']['danger'] = "Danger";
$lang['quarantine']['spam_score'] = "Score";
$lang['quarantine']['confirm_delete'] = "Confirm the deletion of this element.";
$lang['quarantine']['qhandler_success'] = "Request successfully sent to the system. You can now close the window.";

View File

@ -750,6 +750,7 @@ $lang['quarantine']['neutral_danger'] = "Neutraal/geen beoordeling";
$lang['quarantine']['medium_danger'] = "Middelmatig risico";
$lang['quarantine']['high_danger'] = "Hoog risico";
$lang['quarantine']['danger'] = "Risico";
$lang['quarantine']['spam_score'] = "Score";
$lang['quarantine']['confirm_delete'] = "Bevestig de verwijdering van dit item.";
$lang['quarantine']['qhandler_success'] = "Verzoek met succes verzonden naar het systeem. Je kunt het venster nu veilig sluiten.";