This commit has been accessed 681 times via Git panel.
commit 47c4c2e7fcd56d426cccaf2b86fce981ef01342b
tree 551c38db3366f5bbc7434a5fd3c2460d8a98b371
parent f86887c646e3784be970ac784418519cf5b08793
author Engels Antonio <engels@majcms.org> 1342905185 +0800
committer Engels Antonio <engels@majcms.org> 1342905185 +0800
Add high priority indicator
diff --git a/inbox.php b/inbox.php
index 384a0bd..c21e5d9 100644
--- a/inbox.php
+++ b/inbox.php
@@ -93,7 +93,7 @@ else {
}
echo "</td><td align=\"center\" width=\"64\">size</td><td align=\"center\" width=\"32\">read</td></tr>\n";
-
+
foreach ($mbox_sort as $mbox_num => $mbox_row) {
if ($mbox_num < $mbox_min) {
@@ -131,7 +131,7 @@ foreach ($mbox_sort as $mbox_num => $mbox_row) {
$subj = substr($subj,0,74) . "...";
}
- $date=$val[0]->date;
+ $date = $val[0]->date;
$date = strtotime($date);
$date = time_elapsed_string($date);
@@ -160,6 +160,27 @@ foreach ($mbox_sort as $mbox_num => $mbox_row) {
$status_img = "mail-replied.png";
}
+ $header_fetch = imap_fetchheader($mbox,$mbox_row,FT_UID|FT_PREFETCHTEXT);
+
+ $header_raw_lines = explode("\r\n",$header_fetch);
+
+ $header_priority = "";
+
+ foreach ($header_raw_lines as $header_raw_line) {
+
+ if (strstr($header_raw_line,"X-Priority:")) {
+ $header_priority = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"Importance:")) {
+ $header_priority = $header_raw_line;
+ }
+ }
+
+ if ($header_priority != "") {
+ $subj = "<b style=\"color: red; text-shadow: 0.1em 0.1em #dedede;\">!</b> $subj";
+ }
+
echo "<tr bgcolor=\"$bgColor\">";
echo "<form method=\"post\"><td>";
diff --git a/read.php b/read.php
index 1da89c7..2134e79 100644
--- a/read.php
+++ b/read.php
@@ -27,6 +27,9 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$header_ccaddress = header_mime2text($header->ccaddress);
$header_ccaddress = htmlentities($header_ccaddress,ENT_QUOTES);
+ $header_bccaddress = header_mime2text($header->bccaddress);
+ $header_bccaddress = htmlentities($header_bccaddress,ENT_QUOTES);
+
$header_fetch = imap_fetchheader($mbox,$msgno,FT_UID|FT_PREFETCHTEXT);
$header_raw_lines = explode("\r\n",$header_fetch);
@@ -34,14 +37,32 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
foreach ($header_raw_lines as $header_raw_line) {
if (strstr($header_raw_line,"X-Mailer:")) {
-
$header_mailer = $header_raw_line;
}
if (strstr($header_raw_line,"User-Agent:")) {
-
$header_user_agent = $header_raw_line;
}
+
+ if (strstr($header_raw_line,"X-Priority:")) {
+ $header_priority = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"Importance:")) {
+ $header_priority = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"X-Confirm-Reading-To:")) {
+ $header_rr = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"Disposition-Notification-To:")) {
+ $header_rr = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"Return-Receipt-To:")) {
+ $header_dr = $header_raw_line;
+ }
}
if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
@@ -107,6 +128,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
}
+ if ($header_priority != "") {
+ echo "<b style=\"color: red; text-shadow: 0.1em 0.1em #dedede;\">!</b> ";
+ }
+
echo "<b>Subject: $header_subject</b>";
echo "<br><br>From: $header_fromaddress";
echo "<br>To: $header_toaddress";
@@ -115,6 +140,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
echo "<br>Cc: $header_ccaddress";
}
+ if ($header_bccaddress != "") {
+ echo "<br>Bcc: $header_bccaddress";
+ }
+
echo "<br>Date: $header_date ($header_date_age ago)";
if ($header_mailer != "") {
@@ -124,7 +153,15 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
if (($header_user_agent != "") and ($header_mailer == "")) {
echo "<br>$header_user_agent";
}
+/*
+ if ($header_rr != "") {
+ echo "<br>$header_rr";
+ }
+ if ($header_dr != "") {
+ echo "<br>$header_dr";
+ }
+*/
echo " ";
echo "<span class=\"label\" id=\"headerM\" onclick=\"document.getElementById('header1').className ='message';document.getElementById('header2').className='spacer';document.getElementById('headerL').className='label';document.getElementById('headerM').className='hide'\">+</span>";
tree 551c38db3366f5bbc7434a5fd3c2460d8a98b371
parent f86887c646e3784be970ac784418519cf5b08793
author Engels Antonio <engels@majcms.org> 1342905185 +0800
committer Engels Antonio <engels@majcms.org> 1342905185 +0800
Add high priority indicator
diff --git a/inbox.php b/inbox.php
index 384a0bd..c21e5d9 100644
--- a/inbox.php
+++ b/inbox.php
@@ -93,7 +93,7 @@ else {
}
echo "</td><td align=\"center\" width=\"64\">size</td><td align=\"center\" width=\"32\">read</td></tr>\n";
-
+
foreach ($mbox_sort as $mbox_num => $mbox_row) {
if ($mbox_num < $mbox_min) {
@@ -131,7 +131,7 @@ foreach ($mbox_sort as $mbox_num => $mbox_row) {
$subj = substr($subj,0,74) . "...";
}
- $date=$val[0]->date;
+ $date = $val[0]->date;
$date = strtotime($date);
$date = time_elapsed_string($date);
@@ -160,6 +160,27 @@ foreach ($mbox_sort as $mbox_num => $mbox_row) {
$status_img = "mail-replied.png";
}
+ $header_fetch = imap_fetchheader($mbox,$mbox_row,FT_UID|FT_PREFETCHTEXT);
+
+ $header_raw_lines = explode("\r\n",$header_fetch);
+
+ $header_priority = "";
+
+ foreach ($header_raw_lines as $header_raw_line) {
+
+ if (strstr($header_raw_line,"X-Priority:")) {
+ $header_priority = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"Importance:")) {
+ $header_priority = $header_raw_line;
+ }
+ }
+
+ if ($header_priority != "") {
+ $subj = "<b style=\"color: red; text-shadow: 0.1em 0.1em #dedede;\">!</b> $subj";
+ }
+
echo "<tr bgcolor=\"$bgColor\">";
echo "<form method=\"post\"><td>";
diff --git a/read.php b/read.php
index 1da89c7..2134e79 100644
--- a/read.php
+++ b/read.php
@@ -27,6 +27,9 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
$header_ccaddress = header_mime2text($header->ccaddress);
$header_ccaddress = htmlentities($header_ccaddress,ENT_QUOTES);
+ $header_bccaddress = header_mime2text($header->bccaddress);
+ $header_bccaddress = htmlentities($header_bccaddress,ENT_QUOTES);
+
$header_fetch = imap_fetchheader($mbox,$msgno,FT_UID|FT_PREFETCHTEXT);
$header_raw_lines = explode("\r\n",$header_fetch);
@@ -34,14 +37,32 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
foreach ($header_raw_lines as $header_raw_line) {
if (strstr($header_raw_line,"X-Mailer:")) {
-
$header_mailer = $header_raw_line;
}
if (strstr($header_raw_line,"User-Agent:")) {
-
$header_user_agent = $header_raw_line;
}
+
+ if (strstr($header_raw_line,"X-Priority:")) {
+ $header_priority = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"Importance:")) {
+ $header_priority = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"X-Confirm-Reading-To:")) {
+ $header_rr = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"Disposition-Notification-To:")) {
+ $header_rr = $header_raw_line;
+ }
+
+ if (strstr($header_raw_line,"Return-Receipt-To:")) {
+ $header_dr = $header_raw_line;
+ }
}
if (isset($_POST['imap_search_query']) and !empty($_POST['imap_search_query']) and isset($_POST['imap_search_where']) and !empty($_POST['imap_search_where'])) {
@@ -107,6 +128,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
}
+ if ($header_priority != "") {
+ echo "<b style=\"color: red; text-shadow: 0.1em 0.1em #dedede;\">!</b> ";
+ }
+
echo "<b>Subject: $header_subject</b>";
echo "<br><br>From: $header_fromaddress";
echo "<br>To: $header_toaddress";
@@ -115,6 +140,10 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
echo "<br>Cc: $header_ccaddress";
}
+ if ($header_bccaddress != "") {
+ echo "<br>Bcc: $header_bccaddress";
+ }
+
echo "<br>Date: $header_date ($header_date_age ago)";
if ($header_mailer != "") {
@@ -124,7 +153,15 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
if (($header_user_agent != "") and ($header_mailer == "")) {
echo "<br>$header_user_agent";
}
+/*
+ if ($header_rr != "") {
+ echo "<br>$header_rr";
+ }
+ if ($header_dr != "") {
+ echo "<br>$header_dr";
+ }
+*/
echo " ";
echo "<span class=\"label\" id=\"headerM\" onclick=\"document.getElementById('header1').className ='message';document.getElementById('header2').className='spacer';document.getElementById('headerL').className='label';document.getElementById('headerM').className='hide'\">+</span>";