Update mailto support
[squirrelmail.git] / src / image.php
CommitLineData
7baf86a9 1<?php
895905c0 2
35586184 3/**
4 * image.php
5 *
76911253 6 * Copyright (c) 1999-2003 The SquirrelMail Project Team
35586184 7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * This file shows an attached image
10 *
11 * $Id$
8f6f9ba5 12 * @package squirrelmail
35586184 13 */
7baf86a9 14
8f6f9ba5 15/** Path for SquirrelMail required files. */
86725763 16define('SM_PATH','../');
17
18/* SquirrelMail required files. */
08185f2a 19require_once(SM_PATH . 'include/validate.php');
1e12d1ff 20require_once(SM_PATH . 'functions/global.php');
86725763 21require_once(SM_PATH . 'functions/date.php');
22require_once(SM_PATH . 'functions/page_header.php');
23require_once(SM_PATH . 'functions/html.php');
08185f2a 24require_once(SM_PATH . 'include/load_prefs.php');
7baf86a9 25
5be9f195 26displayPageHeader($color, 'None');
27
0b97a708 28/* globals */
1e12d1ff 29if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
30 $passed_id = (int) $temp;
31}
32sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
33sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
34sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
0b97a708 35/* end globals */
36
ff9d4297 37echo '<BR>' .
38 '<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
39 "\n" .
40 '<TR><TD BGCOLOR="' . $color[0] . '">' .
41 '<B><CENTER>' .
42 _("Viewing an image attachment") . " - ";
43
da56720b 44$msg_url = 'read_body.php?' . $QUERY_STRING;
ff9d4297 45$msg_url = set_url_var($msg_url, 'ent_id', 0);
46echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
47
5be9f195 48
49$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
5e9e90fd 50 '&amp;mailbox=' . urlencode($mailbox) .
9b761dbd 51 '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
ff9d4297 52
53echo '</b></td></tr>' . "\n" .
54 '<tr><td align=center><A HREF="' . $DownloadLink . '">' .
55 _("Download this as a file") .
56 '</A></B><BR>&nbsp;' . "\n" .
57 '</TD></TR></TABLE>' . "\n" .
58
59 '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' . "\n" .
60 '<TR><TD BGCOLOR="' . $color[4] . '">' .
61 '<img src="' . $DownloadLink . '">' .
62
63 '</TD></TR></TABLE>' . "\n";
dcc1cc82 64 '</body></html>' . "\n";
7baf86a9 65
dcc1cc82 66?>