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