move global include earlier..
[squirrelmail.git] / src / image.php
CommitLineData
7baf86a9 1<?php
895905c0 2
35586184 3/**
4 * image.php
5 *
76911253 6 * Copyright (c) 1999-2003 The SquirrelMail Project Team
35586184 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 */
7baf86a9 13
86725763 14/* Path for SquirrelMail required files. */
15define('SM_PATH','../');
16
17/* SquirrelMail required files. */
08185f2a 18require_once(SM_PATH . 'include/validate.php');
86725763 19require_once(SM_PATH . 'functions/date.php');
20require_once(SM_PATH . 'functions/page_header.php');
21require_once(SM_PATH . 'functions/html.php');
08185f2a 22require_once(SM_PATH . 'include/load_prefs.php');
7baf86a9 23
5be9f195 24displayPageHeader($color, 'None');
25
0b97a708 26/* globals */
0b97a708 27$mailbox = $_GET['mailbox'];
9b761dbd 28$passed_id = (int) $_GET['passed_id'];
24fc4905 29$ent_id = $_GET['ent_id'];
30$QUERY_STRING = $_SERVER['QUERY_STRING'];
0b97a708 31/* end globals */
32
ff9d4297 33echo '<BR>' .
34 '<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
35 "\n" .
36 '<TR><TD BGCOLOR="' . $color[0] . '">' .
37 '<B><CENTER>' .
38 _("Viewing an image attachment") . " - ";
39
da56720b 40$msg_url = 'read_body.php?' . $QUERY_STRING;
ff9d4297 41$msg_url = set_url_var($msg_url, 'ent_id', 0);
42echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
43
5be9f195 44
45$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
5e9e90fd 46 '&amp;mailbox=' . urlencode($mailbox) .
9b761dbd 47 '&amp;ent_id=' . urlencode($ent_id) . '&amp;absolute_dl=true';
ff9d4297 48
49echo '</b></td></tr>' . "\n" .
50 '<tr><td align=center><A HREF="' . $DownloadLink . '">' .
51 _("Download this as a file") .
52 '</A></B><BR>&nbsp;' . "\n" .
53 '</TD></TR></TABLE>' . "\n" .
54
55 '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' . "\n" .
56 '<TR><TD BGCOLOR="' . $color[4] . '">' .
57 '<img src="' . $DownloadLink . '">' .
58
59 '</TD></TR></TABLE>' . "\n";
60 '</body></html>' . "\n";
7baf86a9 61
62?>