Converted all files in functions/ to use SM_PATH. This will break all
[squirrelmail.git] / src / image.php
CommitLineData
7baf86a9 1<?php
895905c0 2
35586184 3/**
4 * image.php
5 *
15e6162e 6 * Copyright (c) 1999-2002 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$
12 */
7baf86a9 13
86725763 14/* Path for SquirrelMail required files. */
15define('SM_PATH','../');
16
17/* SquirrelMail required files. */
18require_once(SM_PATH . 'src/validate.php');
19require_once(SM_PATH . 'functions/date.php');
20require_once(SM_PATH . 'functions/page_header.php');
21require_once(SM_PATH . 'functions/html.php');
22require_once(SM_PATH . 'src/load_prefs.php');
7baf86a9 23
5be9f195 24displayPageHeader($color, 'None');
25
ff9d4297 26echo '<BR>' .
27 '<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
28 "\n" .
29 '<TR><TD BGCOLOR="' . $color[0] . '">' .
30 '<B><CENTER>' .
31 _("Viewing an image attachment") . " - ";
32
33$msg_url = 'read_body.php?' . $QUERY_STRING;
34$msg_url = set_url_var($msg_url, 'ent_id', 0);
35echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
36
5be9f195 37
38$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
5e9e90fd 39 '&amp;mailbox=' . urlencode($mailbox) .
ff9d4297 40 '&amp;ent_id=' . $ent_id . '&amp;absolute_dl=true';
41
42echo '</b></td></tr>' . "\n" .
43 '<tr><td align=center><A HREF="' . $DownloadLink . '">' .
44 _("Download this as a file") .
45 '</A></B><BR>&nbsp;' . "\n" .
46 '</TD></TR></TABLE>' . "\n" .
47
48 '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' . "\n" .
49 '<TR><TD BGCOLOR="' . $color[4] . '">' .
50 '<img src="' . $DownloadLink . '">' .
51
52 '</TD></TR></TABLE>' . "\n";
53 '</body></html>' . "\n";
7baf86a9 54
55?>