printmsg.php
来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 83 行
PHP
83 行
<?
require './inc/inc.php';
if ((!isset ($folder) OR !isset ($ix)))
{
exit ('Expected parameters');
}
$mail_info = $sess['headers'][base64_encode (strtolower ($folder))][$ix];
echo $nocache;
if (!file_exists ($mail_info['localname']))
{
exit ('File not found');
}
$email = $UM->_read_file ($mail_info['localname']);
$email = $UM->Decode ($email);
$body = $email['body'];
if (eregi ('<[ ]*body.*background[ ]*=[ ]*["\']?([A-Za-z0-9._&?=:/{}%+-]+)["\']?.*>', $body, $regs))
{
$backimg = ((' background="'.$regs[1]).'"');
}
$smarty->assign ('umBackImg', $backimg);
if (eregi ('<[ ]*body[A-Z0-9._&?=:/"\' -]*bgcolor=["\']?([A-Z0-9#]+)["\']?[A-Z0-9._&?=:/"\' -]*>', $body, $regs))
{
$backcolor = ((' bgcolor="'.$regs[1]).'"');
}
$smarty->assign ('umBackColor', $backcolor);
$body = eregi_replace ('<body', '<uebimiau_body_not_alowed', $body);
$body = eregi_replace ('a:(link|visited|hover)', ('.'.uniqid ('')), $body);
$body = eregi_replace ('(body)[ ]?\\{', ('.'.uniqid ('')), $body);
$smarty->assign ('umMessageBody', $body);
$ARFrom = $email['from'];
$useremail = $sess['email'];
$name = $ARFrom[0]['name'];
$thismail = $ARFrom[0]['mail'];
$ARFrom[0]['link'] = (('newmsg.php?nameto='.urlencode ($name)).((((((((''.'&mailto=').$thismail).'&sid=').$sid).'&tid=').$tid).'&lid=').$lid));
$ARRom[0]['title'] = ((((''.$name).' <').$thismail).'>');
$smarty->assign ('umFromList', $ARFrom);
$ARTo = $email['to'];
for ($i = 0; ($i < count ($ARTo)); ++$i)
{
$name = $ARTo[$i]['name'];
$thismail = $ARTo[$i]['mail'];
$link = (('newmsg.php?nameto='.urlencode ($name)).((((((((''.'&mailto=').$thismail).'&sid=').$sid).'&tid=').$tid).'&lid=').$lid));
$ARTo[$i]['link'] = $link;
$ARTo[$i]['title'] = ((((''.$name).' <').$thismail).'>');
$smarty->assign ('umTOList', $ARTo);
}
$ARCC = $email['cc'];
if ((0 < count ($ARCC)))
{
$smarty->assign ('umHaveCC', 1);
for ($i = 0; ($i < count ($ARCC)); ++$i)
{
$name = $ARCC[$i]['name'];
$thismail = $ARCC[$i]['mail'];
$link = (('newmsg.php?nameto='.urlencode ($name)).((((((((''.'&mailto=').$thismail).'&sid=').$sid).'&tid=').$tid).'&lid=').$lid));
$ARCC[$i]['link'] = $link;
$ARCC[$i]['title'] = ((((''.$name).' <').$thismail).'>');
}
$smarty->assign ('umCCList', $ARCC);
}
$smarty->assign ('umPageTitle', $email['subject']);
$smarty->assign ('umSubject', $email['subject']);
$smarty->assign ('umDate', $email['date']);
$anexos = $email['attachments'];
$haveattachs = ((0 < count ($anexos)) ? 1 : 0);
$smarty->assign ('umHaveAttachments', $haveattachs);
if ((0 < count ($anexos)))
{
for ($i = 0; ($i < count ($anexos)); ++$i)
{
$link1 = (((((((((((''.'download.php?folder=').$folder).'&ix=').$ix).'&mnum=').$mnum).'&bound=').base64_encode ($anexos[$i]['boundary'])).'&part=').$anexos[$i]['part']).((((((''.'&sid=').$sid).'&tid=').$tid).'&lid=').$lid));
$link2 = ((''.$link1).'&down=1');
$anexos[$i]['normlink'] = $link1;
$anexos[$i]['downlink'] = $link2;
$anexos[$i]['size'] = ceil (($anexos[$i]['size'] / 1024));
$anexos[$i]['type'] = trim ($anexos[$i]['content-type']);
}
$smarty->assign ('umAttachList', $anexos);
}
unset ($UM);
$smarty->display ('neotech.net/print-message.htm');
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?