| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * image.php |
| 5 | * |
| 6 | * Copyright (c) 1999-2002 The SquirrelMail Project Team |
| 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 | */ |
| 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 | require_once('../functions/html.php'); |
| 19 | |
| 20 | displayPageHeader($color, 'None'); |
| 21 | |
| 22 | if (isset($where) && isset($what)) { |
| 23 | // from a search |
| 24 | $ViewMessageLink = '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) . |
| 25 | '&passed_id=' . $passed_id . '&where=' . urlencode($where) . |
| 26 | '&what=' . urlencode($what). '">' . _("View message") . '</a>'; |
| 27 | } else { |
| 28 | $ViewMessageLink = '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) . |
| 29 | '&passed_id=' . $passed_id . '&startMessage=' . $startMessage . |
| 30 | '&show_more=0">' . _("View message") . '</a>'; |
| 31 | } |
| 32 | |
| 33 | $DownloadLink = '../src/download.php?passed_id=' . $passed_id . |
| 34 | '&mailbox=' . urlencode($mailbox) . |
| 35 | '&passed_ent_id=' . $passed_ent_id . '&absolute_dl=true'; |
| 36 | |
| 37 | echo '<br>' . |
| 38 | html_tag( 'table', |
| 39 | html_tag( 'tr', |
| 40 | html_tag( 'td', |
| 41 | '<b>' . |
| 42 | _("Viewing an image attachment") . ' - ' . |
| 43 | $ViewMessageLink . '</b>' , |
| 44 | 'center', $color[0] ) |
| 45 | ) . |
| 46 | html_tag( 'tr', |
| 47 | html_tag( 'td', |
| 48 | '<a href="' . $DownloadLink . '">' . |
| 49 | _("Download this as a file") . |
| 50 | '</a><br> ' . "\n" , |
| 51 | 'center' ) |
| 52 | ) , |
| 53 | 'center', '', 'border="0" width="100%" cellspacing="0" cellpadding="2"' ) . |
| 54 | |
| 55 | html_tag( 'table', |
| 56 | html_tag( 'tr', |
| 57 | html_tag( 'td', |
| 58 | '<img src="' . $DownloadLink . '">' |
| 59 | , 'left', $color[4] ) |
| 60 | ) |
| 61 | , 'center', '', 'border="0" cellspacing="0" cellpadding="2"' ); |
| 62 | |
| 63 | ?> |