Fixed broken highlighting form (missing security tokens) (#3381117)
[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 *
ae5dddc0 8 * @copyright 1999-2011 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 */
51bbe8fa 25sqgetGlobalVar('passed_id', $passed_id, SQ_GET, NULL, SQ_TYPE_BIGINT);
1e12d1ff 26sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
27sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
28sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
0b97a708 29/* end globals */
30
91e0dccc 31echo '<br />' .
796f91d9 32 '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
ff9d4297 33 "\n" .
796f91d9 34 '<tr><td bgcolor="' . $color[0] . '">' .
f265009a 35 '<div style="text-align: center;"><b>' .
ff9d4297 36 _("Viewing an image attachment") . " - ";
37
da56720b 38$msg_url = 'read_body.php?' . $QUERY_STRING;
ff9d4297 39$msg_url = set_url_var($msg_url, 'ent_id', 0);
40echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
41
5be9f195 42
43$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
91e0dccc 44 '&amp;mailbox=' . urlencode($mailbox) .
9b761dbd 45 '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
a2b193bc 46
796f91d9 47?>
f265009a 48</b></div></td></tr>
796f91d9 49<tr><td align="center">
50<a href="<?php echo $DownloadLink; ?>"><?php echo _("Download this as a file"); ?></a>
51<br />&nbsp;</td></tr></table>
ff9d4297 52
796f91d9 53<table border="0" cellspacing="0" cellpadding="2" align="center">
54<tr><td bgcolor="<?php echo $color[4]; ?>">
55<img src="<?php echo $DownloadLink; ?>" />
7baf86a9 56
796f91d9 57</td></tr></table>
5c4ff7bf 58<?php
59$oTemplate->display('footer.tpl');