X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fimage.php;h=a2ef223b5d73bbece7dbc8d3f1e7cf747ffec459;hb=5619673737450c926cf406d4aeb802d0544f52ed;hp=ca830b59422dae480e4488d6494b219264a2bdc3;hpb=8672576304f4da444b9b1e0e4ca81505af0267ec;p=squirrelmail.git
diff --git a/src/image.php b/src/image.php
index ca830b59..a2ef223b 100644
--- a/src/image.php
+++ b/src/image.php
@@ -3,31 +3,38 @@
/**
* image.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* This file shows an attached image
*
- * $Id$
+ * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
*/
-/* Path for SquirrelMail required files. */
-define('SM_PATH','../');
+/** This is the image page */
+define('PAGE_NAME', 'image');
+
+/**
+ * Include the SquirrelMail initialization file.
+ */
+require('../include/init.php');
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
-require_once(SM_PATH . 'functions/date.php');
-require_once(SM_PATH . 'functions/page_header.php');
-require_once(SM_PATH . 'functions/html.php');
-require_once(SM_PATH . 'src/load_prefs.php');
+displayPageHeader($color);
-displayPageHeader($color, 'None');
+/* globals */
+if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
+ $passed_id = (int) $temp;
+}
+sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
+sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
+sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
+/* end globals */
-echo '
' .
- '
' .
- '' .
+ ' | ' .
_("Viewing an image attachment") . " - ";
$msg_url = 'read_body.php?' . $QUERY_STRING;
@@ -36,20 +43,19 @@ echo ''. _("View message") . '';
$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
- '&mailbox=' . urlencode($mailbox) .
- '&ent_id=' . $ent_id . '&absolute_dl=true';
+ '&mailbox=' . urlencode($mailbox) .
+ '&ent_id=' . urlencode($ent_id) . '&absolute_dl=true';
-echo ' ' .
- _("Download this as a file") .
- ' | ' . "\n" . - ' |
' . - '' . +?> + |
+
+ |