This commit has been accessed 596 times via Git panel.
commit 3c11452aea01e3af9751c6b6ea546f0152a299b1
tree 054c286784a8389efba9ae9549da344fabb7cf7d
parent b1c0981d7f7cda47f8254436fe146714f9ec0454
author Engels Antonio <engels@majcms.org> 1342015814 +0800
committer Engels Antonio <engels@majcms.org> 1342015814 +0800
Add header view toggle
diff --git a/css.php b/css.php
index 0fb760d..c58c339 100644
--- a/css.php
+++ b/css.php
@@ -121,3 +121,7 @@ a,a:link,a:visited,a:hover,a:active {
.loader {
display: none;
}
+
+.hide {
+ display: none;
+}
diff --git a/index.php b/index.php
index c3c37c4..f094c22 100644
--- a/index.php
+++ b/index.php
@@ -1132,8 +1132,6 @@ if (isset($_SESSION['logged_uid'])) {
echo "<title>Kartero - Contacts</title>";
- echo "<style> .hide { display: none; } </style>";
-
echo "<div class=\"message\">";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>";
@@ -1216,8 +1214,6 @@ echo "</tr>";
echo "<title>Kartero - Settings</title>";
- echo "<style> .hide { display: none; } </style>";
-
echo "<div class=\"message\">";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>";
diff --git a/read.php b/read.php
index 90c9e9f..1da89c7 100644
--- a/read.php
+++ b/read.php
@@ -27,7 +27,7 @@ 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_fetch = imap_fetchheader($mbox,$msgno,FT_UID);
+ $header_fetch = imap_fetchheader($mbox,$msgno,FT_UID|FT_PREFETCHTEXT);
$header_raw_lines = explode("\r\n",$header_fetch);
@@ -125,10 +125,22 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
echo "<br>$header_user_agent";
}
+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>";
+
+echo "<span class=\"hide\" id=\"headerL\" onclick=\"document.getElementById('header1').className ='hide';document.getElementById('header2').className='hide';document.getElementById('headerL').className='hide';document.getElementById('headerM').className='label'\">-</span>";
+
echo "</div>";
echo "<div class=\"spacer\"></div>";
+ echo "<div id=\"header1\" class=\"hide\">";
+ echo nl2br(htmlentities(preg_replace('/^\n+|^[\t\s]*\n+/m','',$header_fetch),ENT_QUOTES));
+ echo "</div>";
+
+ echo "<div id=\"header2\" class=\"hide\"></div>";
+
$fileDir = sha1(microtime(true));
echo "<div class=\"message\" style=\"padding: 2px;\">";
@@ -283,6 +295,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
echo "<td></td>";
+
echo "<td class=\"label\">unread</td>";
echo "<td width=\"5\"></td>";
@@ -358,6 +371,8 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
echo "<div class=\"spacer\"></div>";
}
+
+
echo "<div class=\"message\">";
$filePath = "attach/o/$fileUsr/$fileDir";
tree 054c286784a8389efba9ae9549da344fabb7cf7d
parent b1c0981d7f7cda47f8254436fe146714f9ec0454
author Engels Antonio <engels@majcms.org> 1342015814 +0800
committer Engels Antonio <engels@majcms.org> 1342015814 +0800
Add header view toggle
diff --git a/css.php b/css.php
index 0fb760d..c58c339 100644
--- a/css.php
+++ b/css.php
@@ -121,3 +121,7 @@ a,a:link,a:visited,a:hover,a:active {
.loader {
display: none;
}
+
+.hide {
+ display: none;
+}
diff --git a/index.php b/index.php
index c3c37c4..f094c22 100644
--- a/index.php
+++ b/index.php
@@ -1132,8 +1132,6 @@ if (isset($_SESSION['logged_uid'])) {
echo "<title>Kartero - Contacts</title>";
- echo "<style> .hide { display: none; } </style>";
-
echo "<div class=\"message\">";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>";
@@ -1216,8 +1214,6 @@ echo "</tr>";
echo "<title>Kartero - Settings</title>";
- echo "<style> .hide { display: none; } </style>";
-
echo "<div class=\"message\">";
echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>";
diff --git a/read.php b/read.php
index 90c9e9f..1da89c7 100644
--- a/read.php
+++ b/read.php
@@ -27,7 +27,7 @@ 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_fetch = imap_fetchheader($mbox,$msgno,FT_UID);
+ $header_fetch = imap_fetchheader($mbox,$msgno,FT_UID|FT_PREFETCHTEXT);
$header_raw_lines = explode("\r\n",$header_fetch);
@@ -125,10 +125,22 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
echo "<br>$header_user_agent";
}
+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>";
+
+echo "<span class=\"hide\" id=\"headerL\" onclick=\"document.getElementById('header1').className ='hide';document.getElementById('header2').className='hide';document.getElementById('headerL').className='hide';document.getElementById('headerM').className='label'\">-</span>";
+
echo "</div>";
echo "<div class=\"spacer\"></div>";
+ echo "<div id=\"header1\" class=\"hide\">";
+ echo nl2br(htmlentities(preg_replace('/^\n+|^[\t\s]*\n+/m','',$header_fetch),ENT_QUOTES));
+ echo "</div>";
+
+ echo "<div id=\"header2\" class=\"hide\"></div>";
+
$fileDir = sha1(microtime(true));
echo "<div class=\"message\" style=\"padding: 2px;\">";
@@ -283,6 +295,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
}
echo "<td></td>";
+
echo "<td class=\"label\">unread</td>";
echo "<td width=\"5\"></td>";
@@ -358,6 +371,8 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
echo "<div class=\"spacer\"></div>";
}
+
+
echo "<div class=\"message\">";
$filePath = "attach/o/$fileUsr/$fileDir";