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