6 * This file shows an attached image
8 * @copyright © 1999-2005 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
11 * @package squirrelmail
15 * Path for SquirrelMail required files.
18 define('SM_PATH','../');
20 /* SquirrelMail required files. */
21 require_once(SM_PATH
. 'include/validate.php');
22 require_once(SM_PATH
. 'functions/global.php');
23 require_once(SM_PATH
. 'functions/date.php');
24 require_once(SM_PATH
. 'functions/page_header.php');
25 require_once(SM_PATH
. 'functions/html.php');
26 require_once(SM_PATH
. 'include/load_prefs.php');
28 displayPageHeader($color, 'None');
31 if ( sqgetGlobalVar('passed_id', $temp, SQ_GET
) ) {
32 $passed_id = (int) $temp;
34 sqgetGlobalVar('mailbox', $mailbox, SQ_GET
);
35 sqgetGlobalVar('ent_id', $ent_id, SQ_GET
);
36 sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER
);
40 '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
42 '<tr><td bgcolor="' . $color[0] . '">' .
44 _("Viewing an image attachment") . " - ";
46 $msg_url = 'read_body.php?' . $QUERY_STRING;
47 $msg_url = set_url_var($msg_url, 'ent_id', 0);
48 echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
51 $DownloadLink = '../src/download.php?passed_id=' . $passed_id .
52 '&mailbox=' . urlencode($mailbox) .
53 '&ent_id=' . urlencode($ent_id) . '&absolute_dl=true';
57 <tr
><td align
="center">
58 <a href
="<?php echo $DownloadLink; ?>"><?php
echo _("Download this as a file"); ?
></a
>
59 <br
/> 
;</td
></tr
></table
>
61 <table border
="0" cellspacing
="0" cellpadding
="2" align
="center">
62 <tr
><td bgcolor
="<?php echo $color[4]; ?>">
63 <img src
="<?php echo $DownloadLink; ?>" />