Tyler: This is not very original but should do the trick
[squirrelmail.git] / src / image.php
CommitLineData
7baf86a9 1<?php
895905c0 2
2d367c68 3 /**
4 ** image.php
5 **
895905c0 6 ** Copyright (c) 1999-2001 The SquirrelMail development team
2d367c68 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
14 require_once('../src/validate.php');
15 require_once('../functions/date.php');
16 require_once('../functions/page_header.php');
17 require_once('../src/load_prefs.php');
18
19
20 displayPageHeader($color, 'None');
21
22 echo '<BR>' .
23 '<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
24 "\n" .
25 '<TR><TD BGCOLOR="' . $color[0] . '">' .
26 '<B><CENTER>' .
27 _("Viewing an image attachment") . " - ";
28 if (isset($where) && isset($what)) {
29 // from a search
30 echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
31 '&passed_id=' . $passed_id . '&where=' . urlencode($where) .
32 '&what=' . urlencode($what). '">' . _("View message") . '</a>';
33 } else {
34 echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
35 '&passed_id=' . $passed_id . '&startMessage=' . $startMessage .
36 '&show_more=0">' . _("View message") . '</a>';
37 }
38
39 $DownloadLink = '../src/download.php?passed_id=' . $passed_id .
40 '&mailbox=' . urlencode($mailbox) .
41 '&passed_ent_id=' . $passed_ent_id . '&absolute_dl=true';
42
43 echo '</b></td></tr>' . "\n" .
44 '<tr><td align=center><A HREF="' . $DownloadLink . '">' .
45 _("Download this as a file") .
46 '</A></B><BR>&nbsp;' . "\n" .
47 '</TD></TR></TABLE>' . "\n" .
48
49 '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' . "\n" .
50 '<TR><TD BGCOLOR="' . $color[4] . '">' .
51 '<img src="' . $DownloadLink . '">' .
52
53 '</TD></TR></TABLE>' . "\n";
54 '</body></html>' . "\n";
55
56?>