* Plugin to view the RFC822 raw message output and the bodystructure of a message
*
* Licensed under the GNU GPL. For full terms see the file COPYING.
- *
+ *
* @author Marc Groot Koerkamp
* @copyright Copyright © 2002 Marc Groot Koerkamp, The Netherlands
* @copyright Copyright © 2004 The SquirrelMail Project Team
if ($pos === false) {
$entString++;
$result= $entString;
- }
+ }
else {
$level = substr($entString,0,$pos);
$sublevel = substr($entString,$pos+1);
} else if ($messageheader) {
if ($header) {
$header=false;
- $end = "\n \n".'</div>'."\n \n".'<div class="ent_body" id="'.$entStr.'B">'."\n \n";
+ $end = "\n \n".'</div>'."\n \n".'<div class="ent_body" id="'.$entStr.'B">'."\n \n";
}
$mimepart = -$header;
$bnd_end = false;
} else {
if ($header) {
$pre = '';
- $end = "\n \n".'</div>'."\n \n".'<div class="ent_body" id="'.$entStr.'B">'."\n \n";
+ $end = "\n \n".'</div>'."\n \n".'<div class="ent_body" id="'.$entStr.'B">'."\n \n";
}
$header = false;
$mimepart=true;
- }
+ }
$contentset = false;
$nameset = false;
} else {
$pre = '<i><font color ="'.$color[1].'">';
$end = '</i></font>';
}
- }
+ }
if (!$messageheader && !$header ) {
$mimepart=true;
} else {
}
if ( ( $header || $messageheader) && (preg_match("/^.*boundary=\"?(.+(?=\")|.+).*/i",$line,$reg)) ) {
$bnd = $reg[1];
- $bndreg = $bnd;
+ $bndreg = $bnd;
$bndreg = str_replace("\\","\\\\",$bndreg);
$bndreg = str_replace("?","\\?",$bndreg);
$bndreg = str_replace("+","\\+",$bndreg);
$entStr = CalcEntity("$entStr",1);
}
}
-
+
if (($line != '' && $line{0} == '-' || $header) && isset($boundaries[0])) {
$cnt=count($boundaries)-1;
$bnd = $boundaries[$cnt]['bnd'];
$bndreg = $boundaries[$cnt]['bndreg'];
-
+
$regstr = '/^--'."($bndreg)".".*".'/';
if (preg_match($regstr,$line,$reg) ) {
$bndlen = strlen($reg[1]);
- $bndend = false;
+ $bndend = false;
if (strlen($line) > ($bndlen + 3)) {
- if ($line{$bndlen+2} == '-' && $line{$bndlen+3} == '-')
+ if ($line{$bndlen+2} == '-' && $line{$bndlen+3} == '-')
$bndend = true;
}
if ($bndend) {
$entities["$entStr"] = array();
$entities["$entStr"]['entity'] = $entStr;
$entities["$entStr"]['contenttype']=$reg[2].'/'.$reg[3];
- }
+ }
} else if (!$nameset && preg_match("/^.*(name=\s*)\"(.*)\".*/i",$line,$reg)) {
$name = htmlspecialchars($reg[2]);
$content[$content_indx]['name'] = decodeHeader($name);
echo '<div><div class="header">'."\n\n";
echo $message_body;
echo '</div></div></font></code></body></html>';
-?>
+?>
\ No newline at end of file