information about administrative restrictions in bug_report plugin
[squirrelmail.git] / src / image.php
... / ...
CommitLineData
1<?php
2
3/**
4 * image.php
5 *
6 * This file shows an attached image
7 *
8 * @copyright &copy; 1999-2005 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 */
18define('SM_PATH','../');
19
20/* SquirrelMail required files. */
21require_once(SM_PATH . 'include/validate.php');
22require_once(SM_PATH . 'functions/global.php');
23require_once(SM_PATH . 'functions/date.php');
24require_once(SM_PATH . 'functions/page_header.php');
25require_once(SM_PATH . 'functions/html.php');
26require_once(SM_PATH . 'include/load_prefs.php');
27
28displayPageHeader($color, 'None');
29
30/* globals */
31if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
32 $passed_id = (int) $temp;
33}
34sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
35sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
36sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
37/* end globals */
38
39echo '<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);
48echo '<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>