Fix a FIXME
[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
ebd2391c 14/** This is the image page */
15define('PAGE_NAME', 'image');
16
30967a1e 17/**
202bcbcc 18 * Include the SquirrelMail initialization file.
30967a1e 19 */
202bcbcc 20require('../include/init.php');
7baf86a9 21
876fdb60 22displayPageHeader($color);
5be9f195 23
0b97a708 24/* globals */
1e12d1ff 25if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
26 $passed_id = (int) $temp;
27}
28sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
29sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
30sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
0b97a708 31/* end globals */
32
91e0dccc 33echo '<br />' .
796f91d9 34 '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
ff9d4297 35 "\n" .
796f91d9 36 '<tr><td bgcolor="' . $color[0] . '">' .
f265009a 37 '<div style="text-align: center;"><b>' .
ff9d4297 38 _("Viewing an image attachment") . " - ";
39
da56720b 40$msg_url = 'read_body.php?' . $QUERY_STRING;
ff9d4297 41$msg_url = set_url_var($msg_url, 'ent_id', 0);
42echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
43
5be9f195 44
45$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
91e0dccc 46 '&amp;mailbox=' . urlencode($mailbox) .
9b761dbd 47 '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
a2b193bc 48
796f91d9 49?>
f265009a 50</b></div></td></tr>
796f91d9 51<tr><td align="center">
52<a href="<?php echo $DownloadLink; ?>"><?php echo _("Download this as a file"); ?></a>
53<br />&nbsp;</td></tr></table>
ff9d4297 54
796f91d9 55<table border="0" cellspacing="0" cellpadding="2" align="center">
56<tr><td bgcolor="<?php echo $color[4]; ?>">
57<img src="<?php echo $DownloadLink; ?>" />
7baf86a9 58
796f91d9 59</td></tr></table>
5c4ff7bf 60<?php
61$oTemplate->display('footer.tpl');