Probably the problem with php 4.1 is a register/unregister order. This
[squirrelmail.git] / src / image.php
CommitLineData
7baf86a9 1<?php
895905c0 2
35586184 3/**
4 * image.php
5 *
15e6162e 6 * Copyright (c) 1999-2002 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
35586184 14/*****************************************************************/
15/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/
16/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/
17/*** + Base level indent should begin at left margin, as ***/
18/*** the require_once below looks. ***/
19/*** + All identation should consist of four space blocks ***/
20/*** + Tab characters are evil. ***/
21/*** + all comments should use "slash-star ... star-slash" ***/
22/*** style -- no pound characters, no slash-slash style ***/
23/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/
24/*** ALWAYS USE { AND } CHARACTERS!!! ***/
25/*** + Please use ' instead of ", when possible. Note " ***/
26/*** should always be used in _( ) function calls. ***/
27/*** Thank you for your help making the SM code more readable. ***/
28/*****************************************************************/
7baf86a9 29
35586184 30require_once('../src/validate.php');
31require_once('../functions/date.php');
32require_once('../functions/page_header.php');
33require_once('../src/load_prefs.php');
7baf86a9 34
35 displayPageHeader($color, 'None');
36
37 echo '<BR>' .
38 '<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' .
39 "\n" .
40 '<TR><TD BGCOLOR="' . $color[0] . '">' .
41 '<B><CENTER>' .
42 _("Viewing an image attachment") . " - ";
43 if (isset($where) && isset($what)) {
44 // from a search
45 echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
46 '&passed_id=' . $passed_id . '&where=' . urlencode($where) .
47 '&what=' . urlencode($what). '">' . _("View message") . '</a>';
48 } else {
49 echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
50 '&passed_id=' . $passed_id . '&startMessage=' . $startMessage .
51 '&show_more=0">' . _("View message") . '</a>';
52 }
53
54 $DownloadLink = '../src/download.php?passed_id=' . $passed_id .
55 '&mailbox=' . urlencode($mailbox) .
56 '&passed_ent_id=' . $passed_ent_id . '&absolute_dl=true';
57
58 echo '</b></td></tr>' . "\n" .
59 '<tr><td align=center><A HREF="' . $DownloadLink . '">' .
60 _("Download this as a file") .
61 '</A></B><BR>&nbsp;' . "\n" .
62 '</TD></TR></TABLE>' . "\n" .
63
64 '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>' . "\n" .
65 '<TR><TD BGCOLOR="' . $color[4] . '">' .
66 '<img src="' . $DownloadLink . '">' .
67
68 '</TD></TR></TABLE>' . "\n";
69 '</body></html>' . "\n";
70
71?>