on second thought, revise r12527 to use one, generic constant
[squirrelmail.git] / src / image.php
CommitLineData
7baf86a9 1<?php
895905c0 2
35586184 3/**
4 * image.php
5 *
35586184 6 * This file shows an attached image
7 *
4b5049de 8 * @copyright &copy; 1999-2007 The SquirrelMail Project Team
4b4abf93 9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
30967a1e 10 * @version $Id$
8f6f9ba5 11 * @package squirrelmail
35586184 12 */
7baf86a9 13
30967a1e 14/**
202bcbcc 15 * Include the SquirrelMail initialization file.
30967a1e 16 */
202bcbcc 17require('../include/init.php');
7baf86a9 18
876fdb60 19displayPageHeader($color);
5be9f195 20
0b97a708 21/* globals */
1e12d1ff 22if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
23 $passed_id = (int) $temp;
24}
25sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
26sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
27sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
0b97a708 28/* end globals */
29
91e0dccc 30echo '<br />' .
796f91d9 31 '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
ff9d4297 32 "\n" .
796f91d9 33 '<tr><td bgcolor="' . $color[0] . '">' .
f265009a 34 '<div style="text-align: center;"><b>' .
ff9d4297 35 _("Viewing an image attachment") . " - ";
36
da56720b 37$msg_url = 'read_body.php?' . $QUERY_STRING;
ff9d4297 38$msg_url = set_url_var($msg_url, 'ent_id', 0);
39echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
40
5be9f195 41
42$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
91e0dccc 43 '&amp;mailbox=' . urlencode($mailbox) .
9b761dbd 44 '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
a2b193bc 45
796f91d9 46?>
f265009a 47</b></div></td></tr>
796f91d9 48<tr><td align="center">
49<a href="<?php echo $DownloadLink; ?>"><?php echo _("Download this as a file"); ?></a>
50<br />&nbsp;</td></tr></table>
ff9d4297 51
796f91d9 52<table border="0" cellspacing="0" cellpadding="2" align="center">
53<tr><td bgcolor="<?php echo $color[4]; ?>">
54<img src="<?php echo $DownloadLink; ?>" />
7baf86a9 55
796f91d9 56</td></tr></table>
5c4ff7bf 57<?php
58$oTemplate->display('footer.tpl');