This commit has been accessed 599 times via Git panel.
commit f62cb53bf0b47125acabadb5af83b5f5a820d4f6
tree ad467e872940dd8e866f775a7d8f511091ed497a
parent 2f5d4854ebc77a9c0203504c693455414738e613
author Engels Antonio <engels@majcms.org> 1322157814 +0800
committer Engels Antonio <engels@majcms.org> 1322157814 +0800
Reverse search results display
diff --git a/inbox.php b/inbox.php
index 0000910..d8402c3 100644
--- a/inbox.php
+++ b/inbox.php
@@ -56,6 +56,8 @@ if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) a
$imap_search_criteria = $imap_search_where . ' "'. $imap_search_query . '"';
$mbox_sort = imap_search($mbox,$imap_search_criteria);
+ rsort($mbox_sort);
+
if ($mbox_sort) {
$msgCount = count($mbox_sort);
}
diff --git a/read.php b/read.php
index 54bba45..ca6f018 100644
--- a/read.php
+++ b/read.php
@@ -62,6 +62,8 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$imap_search_criteria = $imap_search_where . ' "'. $imap_search_query . '"';
$mbox_sort = imap_search($mbox,$imap_search_criteria);
+ rsort($mbox_sort);
+
if ($mbox_sort) {
$msgCount = count($mbox_sort);
}
@@ -356,6 +358,16 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$fileSize = filesize($fileAttachment);
$fileSize = HumanReadableFilesize($fileSize);
+ $fileScan = "";
+
+ $scanFile = exec("clamdscan -i --no-summary $fileAttachment",$scanResult,$scanErr);
+
+ if ($scanErr == "1") {
+
+ $fileScan = explode(" ", $scanFile);
+ $fileScan = " <font color=\"red\">{$fileScan[1]}</font>";
+ }
+
if (is_image($fileAttachment)) {
$img_size = getimagesize($fileAttachment);
@@ -372,10 +384,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
}
- echo "\r\n<tr><td><a href=\"$fileAttachment\" target=\"_blank\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" target=\"_blank\">$fileName</a><br>$fileSize{$imgSize}</td></tr>\r\n";
+ echo "\r\n<tr><td><a href=\"$fileAttachment\" target=\"_blank\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" target=\"_blank\">$fileName</a><br>$fileSize{$imgSize}{$fileScan}</td></tr>\r\n";
}
else {
- echo "\r\n<tr><td><a href=\"$fileAttachment\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\">$fileName</a><br>$fileSize</td></tr>\r\n";
+ echo "\r\n<tr><td><a href=\"$fileAttachment\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
}
}
tree ad467e872940dd8e866f775a7d8f511091ed497a
parent 2f5d4854ebc77a9c0203504c693455414738e613
author Engels Antonio <engels@majcms.org> 1322157814 +0800
committer Engels Antonio <engels@majcms.org> 1322157814 +0800
Reverse search results display
diff --git a/inbox.php b/inbox.php
index 0000910..d8402c3 100644
--- a/inbox.php
+++ b/inbox.php
@@ -56,6 +56,8 @@ if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) a
$imap_search_criteria = $imap_search_where . ' "'. $imap_search_query . '"';
$mbox_sort = imap_search($mbox,$imap_search_criteria);
+ rsort($mbox_sort);
+
if ($mbox_sort) {
$msgCount = count($mbox_sort);
}
diff --git a/read.php b/read.php
index 54bba45..ca6f018 100644
--- a/read.php
+++ b/read.php
@@ -62,6 +62,8 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$imap_search_criteria = $imap_search_where . ' "'. $imap_search_query . '"';
$mbox_sort = imap_search($mbox,$imap_search_criteria);
+ rsort($mbox_sort);
+
if ($mbox_sort) {
$msgCount = count($mbox_sort);
}
@@ -356,6 +358,16 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$fileSize = filesize($fileAttachment);
$fileSize = HumanReadableFilesize($fileSize);
+ $fileScan = "";
+
+ $scanFile = exec("clamdscan -i --no-summary $fileAttachment",$scanResult,$scanErr);
+
+ if ($scanErr == "1") {
+
+ $fileScan = explode(" ", $scanFile);
+ $fileScan = " <font color=\"red\">{$fileScan[1]}</font>";
+ }
+
if (is_image($fileAttachment)) {
$img_size = getimagesize($fileAttachment);
@@ -372,10 +384,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
}
- echo "\r\n<tr><td><a href=\"$fileAttachment\" target=\"_blank\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" target=\"_blank\">$fileName</a><br>$fileSize{$imgSize}</td></tr>\r\n";
+ echo "\r\n<tr><td><a href=\"$fileAttachment\" target=\"_blank\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" target=\"_blank\">$fileName</a><br>$fileSize{$imgSize}{$fileScan}</td></tr>\r\n";
}
else {
- echo "\r\n<tr><td><a href=\"$fileAttachment\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\">$fileName</a><br>$fileSize</td></tr>\r\n";
+ echo "\r\n<tr><td><a href=\"$fileAttachment\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
}
}