Just fixing a bug I ran across where attachments was an empty array.
[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
35586184 14require_once('../src/validate.php');
15require_once('../functions/date.php');
16require_once('../functions/page_header.php');
17require_once('../src/load_prefs.php');
7baf86a9 18
5be9f195 19displayPageHeader($color, 'None');
20
21echo '<BR>' .
22 '<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
23 "\n" .
24 '<TR><TD BGCOLOR="' . $color[0] . '">' .
25 '<B><CENTER>' .
26 _("Viewing an image attachment") . " - ";
27if (isset($where) && isset($what)) {
28 // from a search
29 echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
5e9e90fd 30 '&amp;passed_id=' . $passed_id . '&amp;where=' . urlencode($where) .
31 '&amp;what=' . urlencode($what). '">' . _("View message") . '</a>';
5be9f195 32} else {
33 echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
5e9e90fd 34 '&amp;passed_id=' . $passed_id . '&amp;startMessage=' . $startMessage .
35 '&amp;show_more=0">' . _("View message") . '</a>';
5be9f195 36}
37
38$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
5e9e90fd 39 '&amp;mailbox=' . urlencode($mailbox) .
40 '&amp;passed_ent_id=' . $passed_ent_id . '&amp;absolute_dl=true';
5be9f195 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?>