removed local directory name used for testing.
[squirrelmail.git] / src / image.php
... / ...
CommitLineData
1<?php
2
3/**
4 * image.php
5 *
6 * Copyright (c) 1999-2005 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * This file shows an attached image
10 *
11 * @version $Id$
12 * @package squirrelmail
13 */
14
15/**
16 * Path for SquirrelMail required files.
17 * @ignore
18 */
19define('SM_PATH','../');
20
21/* SquirrelMail required files. */
22require_once(SM_PATH . 'include/validate.php');
23require_once(SM_PATH . 'functions/global.php');
24require_once(SM_PATH . 'functions/date.php');
25require_once(SM_PATH . 'functions/page_header.php');
26require_once(SM_PATH . 'functions/html.php');
27require_once(SM_PATH . 'include/load_prefs.php');
28
29displayPageHeader($color, 'None');
30
31/* globals */
32if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
33 $passed_id = (int) $temp;
34}
35sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
36sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
37sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
38/* end globals */
39
40echo '<br />' .
41 '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
42 "\n" .
43 '<tr><td bgcolor="' . $color[0] . '">' .
44 '<b><center>' .
45 _("Viewing an image attachment") . " - ";
46
47$msg_url = 'read_body.php?' . $QUERY_STRING;
48$msg_url = set_url_var($msg_url, 'ent_id', 0);
49echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
50
51
52$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
53 '&amp;mailbox=' . urlencode($mailbox) .
54 '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
55
56?>
57</b></td></tr>
58<tr><td align="center">
59<a href="<?php echo $DownloadLink; ?>"><?php echo _("Download this as a file"); ?></a>
60<br />&nbsp;</td></tr></table>
61
62<table border="0" cellspacing="0" cellpadding="2" align="center">
63<tr><td bgcolor="<?php echo $color[4]; ?>">
64<img src="<?php echo $DownloadLink; ?>" />
65
66</td></tr></table>
67</body></html>