drop obsolte .cvsignore files, these are now svn:ignore properties
[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-2007 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 * Include the SquirrelMail initialization file.
16 */
17 require('../include/init.php');
18
19 displayPageHeader($color, 'None');
20
21 /* globals */
22 if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
23 $passed_id = (int) $temp;
24 }
25 sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
26 sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
27 sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
28 /* end globals */
29
30 echo '<br />' .
31 '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
32 "\n" .
33 '<tr><td bgcolor="' . $color[0] . '">' .
34 '<div style="text-align: center;"><b>' .
35 _("Viewing an image attachment") . " - ";
36
37 $msg_url = 'read_body.php?' . $QUERY_STRING;
38 $msg_url = set_url_var($msg_url, 'ent_id', 0);
39 echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
40
41
42 $DownloadLink = '../src/download.php?passed_id=' . $passed_id .
43 '&amp;mailbox=' . urlencode($mailbox) .
44 '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
45
46 ?>
47 </b></div></td></tr>
48 <tr><td align="center">
49 <a href="<?php echo $DownloadLink; ?>"><?php echo _("Download this as a file"); ?></a>
50 <br />&nbsp;</td></tr></table>
51
52 <table border="0" cellspacing="0" cellpadding="2" align="center">
53 <tr><td bgcolor="<?php echo $color[4]; ?>">
54 <img src="<?php echo $DownloadLink; ?>" />
55
56 </td></tr></table>
57 <?php
58 $oTemplate->display('footer.tpl');