]> git.donarmstrong.com Git - roundcube.git/blob - program/steps/mail/headers.inc
Prepare a new release
[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     $source = htmlspecialchars(trim($source));
28     $source = preg_replace('/\t/', '&nbsp;&nbsp;&nbsp;&nbsp;', $source);
29     $source = preg_replace('/^([a-z0-9_:-]+)/im', '<font class="bold">'.'\1'.'</font>', $source);
30     $source = preg_replace('/\r?\n/', '<br />', $source);
31     
32     $OUTPUT->command('set_headers', $source);
33     $OUTPUT->send();
34     }
35 }
36   
37 exit;
38
39 ?>