download related fixes
[squirrelmail.git] / src / image.php
1 <?php
2
3 /**
4 * image.php
5 *
6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * This file shows an attached image
10 *
11 * $Id$
12 */
13
14 require_once('../src/validate.php');
15 require_once('../functions/date.php');
16 require_once('../functions/page_header.php');
17 require_once('../functions/html.php');
18 require_once('../src/load_prefs.php');
19
20 displayPageHeader($color, 'None');
21
22 echo '<BR>' .
23 '<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
24 "\n" .
25 '<TR><TD BGCOLOR="' . $color[0] . '">' .
26 '<B><CENTER>' .
27 _("Viewing an image attachment") . " - ";
28
29 $msg_url = 'read_body.php?' . $QUERY_STRING;
30 $msg_url = set_url_var($msg_url, 'ent_id', 0);
31 echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
32
33
34 $DownloadLink = '../src/download.php?passed_id=' . $passed_id .
35 '&amp;mailbox=' . urlencode($mailbox) .
36 '&amp;ent_id=' . $ent_id . '&amp;absolute_dl=true';
37
38 echo '</b></td></tr>' . "\n" .
39 '<tr><td align=center><A HREF="' . $DownloadLink . '">' .
40 _("Download this as a file") .
41 '</A></B><BR>&nbsp;' . "\n" .
42 '</TD></TR></TABLE>' . "\n" .
43
44 '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' . "\n" .
45 '<TR><TD BGCOLOR="' . $color[4] . '">' .
46 '<img src="' . $DownloadLink . '">' .
47
48 '</TD></TR></TABLE>' . "\n";
49 '</body></html>' . "\n";
50
51 ?>