copyright update
[squirrelmail.git] / src / image.php
1 <?php
2
3 /**
4 * image.php
5 *
6 * This file shows an attached image
7 *
8 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id$
11 * @package squirrelmail
12 */
13
14 /**
15 * Path for SquirrelMail required files.
16 * @ignore
17 */
18 define('SM_PATH','../');
19
20 /* SquirrelMail required files. */
21 require_once(SM_PATH . 'include/validate.php');
22 require_once(SM_PATH . 'functions/global.php');
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');
26 require_once(SM_PATH . 'include/load_prefs.php');
27
28 displayPageHeader($color, 'None');
29
30 /* globals */
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);
37 /* end globals */
38
39 echo '<br />' .
40 '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
41 "\n" .
42 '<tr><td bgcolor="' . $color[0] . '">' .
43 '<b><center>' .
44 _("Viewing an image attachment") . " - ";
45
46 $msg_url = 'read_body.php?' . $QUERY_STRING;
47 $msg_url = set_url_var($msg_url, 'ent_id', 0);
48 echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
49
50
51 $DownloadLink = '../src/download.php?passed_id=' . $passed_id .
52 '&amp;mailbox=' . urlencode($mailbox) .
53 '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
54
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 />&nbsp;</td></tr></table>
60
61 <table border="0" cellspacing="0" cellpadding="2" align="center">
62 <tr><td bgcolor="<?php echo $color[4]; ?>">
63 <img src="<?php echo $DownloadLink; ?>" />
64
65 </td></tr></table>
66 </body></html>