X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fimage.php;h=87423e80ca94ad821a0215fdd07ef5e3fa1fc6e0;hb=64033e1c54e52d462f6dbb93c3bb06a5c0050865;hp=5702e44809cc15b04d7f97097f272de8fa63e096;hpb=da56720bb91cda99fc9ff65561b5c771969788a6;p=squirrelmail.git
diff --git a/src/image.php b/src/image.php
index 5702e448..87423e80 100644
--- a/src/image.php
+++ b/src/image.php
@@ -3,38 +3,35 @@
/**
* 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-2006 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','../');
-
-/* 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');
/* globals */
-$mailbox = $_GET['mailbox'];
-$passed_id = (int) $_GET['passed_id'];
-$ent_id = $_GET['ent_id'];
-$QUERY_STRING = $_SERVER['QUERY_STRING'];
+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;
@@ -43,20 +40,19 @@ 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" . - ' |
' . - '' . +?> + |
+
+ |