6 * Copyright (c) 1999-2003 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * This file shows an attached image
14 /* Path for SquirrelMail required files. */
15 define('SM_PATH','../');
17 /* SquirrelMail required files. */
18 require_once(SM_PATH
. 'include/validate.php');
19 require_once(SM_PATH
. 'functions/date.php');
20 require_once(SM_PATH
. 'functions/page_header.php');
21 require_once(SM_PATH
. 'functions/html.php');
22 require_once(SM_PATH
. 'include/load_prefs.php');
24 displayPageHeader($color, 'None');
27 $mailbox = $_GET['mailbox'];
28 $passed_id = (int) $_GET['passed_id'];
29 $ent_id = $_GET['ent_id'];
30 $QUERY_STRING = $_SERVER['QUERY_STRING'];
34 '<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
36 '<TR><TD BGCOLOR="' . $color[0] . '">' .
38 _("Viewing an image attachment") . " - ";
40 $msg_url = 'read_body.php?' . $QUERY_STRING;
41 $msg_url = set_url_var($msg_url, 'ent_id', 0);
42 echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
45 $DownloadLink = '../src/download.php?passed_id=' . $passed_id .
46 '&mailbox=' . urlencode($mailbox) .
47 '&ent_id=' . urlencode($ent_id) . '&absolute_dl=true';
49 echo '</b></td></tr>' . "\n" .
50 '<tr><td align=center><A HREF="' . $DownloadLink . '">' .
51 _("Download this as a file") .
52 '</A></B><BR> ' . "\n" .
53 '</TD></TR></TABLE>' . "\n" .
55 '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' . "\n" .
56 '<TR><TD BGCOLOR="' . $color[4] . '">' .
57 '<img src="' . $DownloadLink . '">' .
59 '</TD></TR></TABLE>' . "\n";
60 '</body></html>' . "\n";