X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fimage.php;h=23d0a01dc1bc2c9387ab9234f3441a271daa5abf;hb=870ffc40786e9a810e9a8cd228ec5117e70cdaed;hp=b27a47244774da1e023e144bad29483da5faf15a;hpb=76911253eb850bacde3d86c8cb7b4af072e67ebe;p=squirrelmail.git
diff --git a/src/image.php b/src/image.php
index b27a4724..23d0a01d 100644
--- a/src/image.php
+++ b/src/image.php
@@ -3,60 +3,57 @@
/**
* image.php
*
- * Copyright (c) 1999-2003 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-2009 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');
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/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 . 'include/load_prefs.php');
+/**
+ * Include the SquirrelMail initialization file.
+ */
+require('../include/init.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/* globals */
-$mailbox = $_GET['mailbox'];
-$passed_id = (int) $_GET['passed_id'];
-$ent_id = $_GET['ent_id'];
-$QUERY_STRING = $_SERVER['QUERY_STRING'];
+sqgetGlobalVar('passed_id', $passed_id, SQ_GET, NULL, SQ_TYPE_BIGINT);
+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?' . urlencode(strip_tags(urldecode($QUERY_STRING)));
+$msg_url = 'read_body.php?' . $QUERY_STRING;
$msg_url = set_url_var($msg_url, 'ent_id', 0);
echo ''. _("View message") . '';
$DownloadLink = '../src/download.php?passed_id=' . $passed_id .
- '&mailbox=' . urlencode($mailbox) .
+ '&mailbox=' . urlencode($mailbox) .
'&ent_id=' . urlencode($ent_id) . '&absolute_dl=true';
-echo ' ' .
- _("Download this as a file") .
- ' | ' . "\n" . - ' |
' . - '' . +?> + |
+
+ |