Adding template for error box.
[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 *
47ccfad4 8 * @copyright &copy; 1999-2006 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/**
15 * Path for SquirrelMail required files.
16 * @ignore
17 */
86725763 18define('SM_PATH','../');
19
20/* SquirrelMail required files. */
5c4ff7bf 21include_once(SM_PATH . 'include/validate.php');
1e12d1ff 22require_once(SM_PATH . 'functions/global.php');
86725763 23require_once(SM_PATH . 'functions/date.php');
24require_once(SM_PATH . 'functions/page_header.php');
25require_once(SM_PATH . 'functions/html.php');
08185f2a 26require_once(SM_PATH . 'include/load_prefs.php');
7baf86a9 27
5be9f195 28displayPageHeader($color, 'None');
29
0b97a708 30/* globals */
1e12d1ff 31if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
32 $passed_id = (int) $temp;
33}
34sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
35sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
36sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
0b97a708 37/* end globals */
38
91e0dccc 39echo '<br />' .
796f91d9 40 '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
ff9d4297 41 "\n" .
796f91d9 42 '<tr><td bgcolor="' . $color[0] . '">' .
f265009a 43 '<div style="text-align: center;"><b>' .
ff9d4297 44 _("Viewing an image attachment") . " - ";
45
da56720b 46$msg_url = 'read_body.php?' . $QUERY_STRING;
ff9d4297 47$msg_url = set_url_var($msg_url, 'ent_id', 0);
48echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
49
5be9f195 50
51$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
91e0dccc 52 '&amp;mailbox=' . urlencode($mailbox) .
9b761dbd 53 '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
a2b193bc 54
796f91d9 55?>
f265009a 56</b></div></td></tr>
796f91d9 57<tr><td align="center">
58<a href="<?php echo $DownloadLink; ?>"><?php echo _("Download this as a file"); ?></a>
59<br />&nbsp;</td></tr></table>
ff9d4297 60
796f91d9 61<table border="0" cellspacing="0" cellpadding="2" align="center">
62<tr><td bgcolor="<?php echo $color[4]; ?>">
63<img src="<?php echo $DownloadLink; ?>" />
7baf86a9 64
796f91d9 65</td></tr></table>
5c4ff7bf 66<?php
67$oTemplate->display('footer.tpl');
68?>