Source for file view_header.php
Documentation is available at view_header.php
* This is the code to view the message header.
* @copyright 1999-2020 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: view_header.php 14840 2020-01-07 07:42:38Z pdontthink $
/** This is the view_header page */
define('PAGE_NAME', 'view_header');
* Path for SquirrelMail required files.
/* SquirrelMail required files. */
require_once(SM_PATH .
'include/validate.php');
require_once(SM_PATH .
'functions/global.php');
require_once(SM_PATH .
'functions/imap.php');
require_once(SM_PATH .
'functions/html.php');
require_once(SM_PATH .
'functions/url_parser.php');
* Extract message headers
* @param resource $imapConnection
* @param string $id Message ID
* @param string $passed_ent_id Nested/attached/embedded message ID (if any)
* @return array List of all message headers, where each
* element is a sub-array that contains two
* elements: header name and header value
* (in that order) where the header value is
* HTML-formatted, ready for display in browser
$header_output =
array();
true, $a, $b, $uid_support);
$query =
"FETCH $id BODY[".
$passed_ent_id.
'.HEADER]';
true, $a, $b, $uid_support);
for ($i=
1; $i <
count($read); $i++
) {
// FIXME: is the pipe character below a mistake? I think the original author might have thought it carried special meaning in the character class, which it does not... but then again, I am not currently trying to understand what this code actually does
case (preg_match('/^([^:]+):(.+)/', $line, $regs)):
$first[$i] =
$regs[1] .
':';
$second[$i] =
trim($line);
for ($i=
0; $i <
count($second); $i =
$j) {
$f =
(isset
($first[$i]) ?
$first[$i] :
'');
$s =
(isset
($second[$i]) ?
nl2br($second[$i]) :
'');
while (($first[$j] ==
'') &&
($j <
count($first))) {
$s .=
' ' .
nl2br($second[$j]);
/* do not mark these headers as emailaddresses */
if($lowf !=
'message-id:' &&
$lowf !=
'in-reply-to:' &&
$lowf !=
'references:') {
$header_output[] =
array($f,$s);
$ret_addr =
SM_PATH .
'src/read_body.php?'.
$queryStr;
'<table width="100%" cellpadding="2" cellspacing="0" border="0" '.
'align="center">' .
"\n" .
'<tr><td bgcolor="'.
$color[9].
'" width="100%" align="center"><b>'.
_("Viewing Full Header") .
'</b> - '.
echo
'">' .
_("View message") .
"</a></b></td></tr></table>\n";
'<table width="99%" cellpadding="2" cellspacing="0" border="0" '.
"align=center>\n".
'<tr><td>',
'</td></tr></table>'.
"\n"
$passed_id = (int)
$temp;
global $imap_stream_options; // in case not defined in config
$imapConnection =
sqimap_login($username, $key, $imapServerAddress,
$imapPort, 0, $imap_stream_options);
Documentation generated on Mon, 13 Jan 2020 04:25:25 +0100 by phpDocumentor 1.4.3