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$ |
12 | */ |
7baf86a9 |
13 | |
86725763 |
14 | /* Path for SquirrelMail required files. */ |
15 | define('SM_PATH','../'); |
16 | |
17 | /* SquirrelMail required files. */ |
08185f2a |
18 | require_once(SM_PATH . 'include/validate.php'); |
1e12d1ff |
19 | require_once(SM_PATH . 'functions/global.php'); |
86725763 |
20 | require_once(SM_PATH . 'functions/date.php'); |
21 | require_once(SM_PATH . 'functions/page_header.php'); |
22 | require_once(SM_PATH . 'functions/html.php'); |
08185f2a |
23 | require_once(SM_PATH . 'include/load_prefs.php'); |
7baf86a9 |
24 | |
5be9f195 |
25 | displayPageHeader($color, 'None'); |
26 | |
0b97a708 |
27 | /* globals */ |
1e12d1ff |
28 | if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) { |
29 | $passed_id = (int) $temp; |
30 | } |
31 | sqgetGlobalVar('mailbox', $mailbox, SQ_GET); |
32 | sqgetGlobalVar('ent_id', $ent_id, SQ_GET); |
33 | sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER); |
0b97a708 |
34 | /* end globals */ |
35 | |
ff9d4297 |
36 | echo '<BR>' . |
37 | '<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' . |
38 | "\n" . |
39 | '<TR><TD BGCOLOR="' . $color[0] . '">' . |
40 | '<B><CENTER>' . |
41 | _("Viewing an image attachment") . " - "; |
42 | |
da56720b |
43 | $msg_url = 'read_body.php?' . $QUERY_STRING; |
ff9d4297 |
44 | $msg_url = set_url_var($msg_url, 'ent_id', 0); |
45 | echo '<a href="'.$msg_url.'">'. _("View message") . '</a>'; |
46 | |
5be9f195 |
47 | |
48 | $DownloadLink = '../src/download.php?passed_id=' . $passed_id . |
5e9e90fd |
49 | '&mailbox=' . urlencode($mailbox) . |
9b761dbd |
50 | '&ent_id=' . urlencode($ent_id) . '&absolute_dl=true'; |
ff9d4297 |
51 | |
52 | echo '</b></td></tr>' . "\n" . |
53 | '<tr><td align=center><A HREF="' . $DownloadLink . '">' . |
54 | _("Download this as a file") . |
55 | '</A></B><BR> ' . "\n" . |
56 | '</TD></TR></TABLE>' . "\n" . |
57 | |
58 | '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' . "\n" . |
59 | '<TR><TD BGCOLOR="' . $color[4] . '">' . |
60 | '<img src="' . $DownloadLink . '">' . |
61 | |
62 | '</TD></TR></TABLE>' . "\n"; |
63 | '</body></html>' . "\n"; |
7baf86a9 |
64 | |
65 | ?> |