7baf86a9 |
1 | <?php |
895905c0 |
2 | |
35586184 |
3 | /** |
4 | * image.php |
5 | * |
35586184 |
6 | * This file shows an attached image |
7 | * |
4b4abf93 |
8 | * @copyright © 1999-2005 The SquirrelMail Project Team |
9 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
30967a1e |
10 | * @version $Id$ |
8f6f9ba5 |
11 | * @package squirrelmail |
35586184 |
12 | */ |
7baf86a9 |
13 | |
30967a1e |
14 | /** |
15 | * Path for SquirrelMail required files. |
16 | * @ignore |
17 | */ |
86725763 |
18 | define('SM_PATH','../'); |
19 | |
20 | /* SquirrelMail required files. */ |
08185f2a |
21 | require_once(SM_PATH . 'include/validate.php'); |
1e12d1ff |
22 | require_once(SM_PATH . 'functions/global.php'); |
86725763 |
23 | require_once(SM_PATH . 'functions/date.php'); |
24 | require_once(SM_PATH . 'functions/page_header.php'); |
25 | require_once(SM_PATH . 'functions/html.php'); |
08185f2a |
26 | require_once(SM_PATH . 'include/load_prefs.php'); |
7baf86a9 |
27 | |
5be9f195 |
28 | displayPageHeader($color, 'None'); |
29 | |
0b97a708 |
30 | /* globals */ |
1e12d1ff |
31 | if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) { |
32 | $passed_id = (int) $temp; |
33 | } |
34 | sqgetGlobalVar('mailbox', $mailbox, SQ_GET); |
35 | sqgetGlobalVar('ent_id', $ent_id, SQ_GET); |
36 | sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER); |
0b97a708 |
37 | /* end globals */ |
38 | |
91e0dccc |
39 | echo '<br />' . |
796f91d9 |
40 | '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' . |
ff9d4297 |
41 | "\n" . |
796f91d9 |
42 | '<tr><td bgcolor="' . $color[0] . '">' . |
43 | '<b><center>' . |
ff9d4297 |
44 | _("Viewing an image attachment") . " - "; |
45 | |
da56720b |
46 | $msg_url = 'read_body.php?' . $QUERY_STRING; |
ff9d4297 |
47 | $msg_url = set_url_var($msg_url, 'ent_id', 0); |
48 | echo '<a href="'.$msg_url.'">'. _("View message") . '</a>'; |
49 | |
5be9f195 |
50 | |
51 | $DownloadLink = '../src/download.php?passed_id=' . $passed_id . |
91e0dccc |
52 | '&mailbox=' . urlencode($mailbox) . |
9b761dbd |
53 | '&ent_id=' . urlencode($ent_id) . '&absolute_dl=true'; |
a2b193bc |
54 | |
796f91d9 |
55 | ?> |
56 | </b></td></tr> |
57 | <tr><td align="center"> |
58 | <a href="<?php echo $DownloadLink; ?>"><?php echo _("Download this as a file"); ?></a> |
59 | <br /> </td></tr></table> |
ff9d4297 |
60 | |
796f91d9 |
61 | <table border="0" cellspacing="0" cellpadding="2" align="center"> |
62 | <tr><td bgcolor="<?php echo $color[4]; ?>"> |
63 | <img src="<?php echo $DownloadLink; ?>" /> |
7baf86a9 |
64 | |
796f91d9 |
65 | </td></tr></table> |
91e0dccc |
66 | </body></html> |