]> git.donarmstrong.com Git - roundcube.git/blob - program/steps/mail/headers.inc
Merge commit 'debian/0.3.1-1' into debian
[roundcube.git] / program / steps / mail / headers.inc
1 <?php
2 /*
3  +-----------------------------------------------------------------------+
4  | program/steps/mail/headers.inc                                        |
5  |                                                                       |
6  | This file is part of the RoundCube Webmail client                     |
7  | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
8  | Licensed under the GNU GPL                                            |
9  |                                                                       |
10  | PURPOSE:                                                              |
11  |   Fetch message headers in raw format for display                     |
12  |                                                                       |
13  +-----------------------------------------------------------------------+
14  | Author: Aleksander Machniak <alec@alec.pl>                            |
15  +-----------------------------------------------------------------------+
16
17  $Id: mark.inc 1580 2008-06-30 09:36:18Z alec $
18
19 */
20
21 if ($uid = get_input_value('_uid', RCUBE_INPUT_POST))
22 {
23   $source = $IMAP->get_raw_headers($uid);
24
25   if ($source)
26     {
27     $browser = new rcube_browser;
28     
29     if ($browser->ie)
30       $source = rc_utf8_clean($source);   
31
32     $source = htmlspecialchars(trim($source));
33     $source = preg_replace('/\t/', '&nbsp;&nbsp;&nbsp;&nbsp;', $source);
34     $source = preg_replace('/^([a-z0-9_:-]+)/im', '<font class="bold">'.'\1'.'</font>', $source);
35     $source = preg_replace('/\r?\n/', '<br />', $source);
36     
37     $OUTPUT->command('set_headers', $source);
38     $OUTPUT->send();
39     }
40 }
41   
42 exit;
43
44 ?>