X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fimage.php;h=f8b956fb282abf84607c90eaba01c06482a0c1c6;hb=9a186afeace97d007378a097c996f3e13691b144;hp=33b8efaf148951e2b2b16ee55acb8b95196e6e07;hpb=0b97a708e71c931153cd1ceee1495c9f4e1e209b;p=squirrelmail.git diff --git a/src/image.php b/src/image.php index 33b8efaf..f8b956fb 100644 --- a/src/image.php +++ b/src/image.php @@ -3,19 +3,23 @@ /** * 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-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. */ +/** + * Path for SquirrelMail required files. + * @ignore + */ define('SM_PATH','../'); /* SquirrelMail required files. */ -require_once(SM_PATH . 'include/validate.php'); +include_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/global.php'); require_once(SM_PATH . 'functions/date.php'); require_once(SM_PATH . 'functions/page_header.php'); require_once(SM_PATH . 'functions/html.php'); @@ -24,17 +28,19 @@ require_once(SM_PATH . 'include/load_prefs.php'); displayPageHeader($color, 'None'); /* globals */ - -$mailbox = $_GET['mailbox']; -$passed_id = $_GET['passed_id']; - +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 '
' . - '' . +echo '
' . + '
' . "\n" . - '' . "\n" . - '
' . - '
' . + '
' . + '
' . _("Viewing an image attachment") . " - "; $msg_url = 'read_body.php?' . $QUERY_STRING; @@ -43,20 +49,20 @@ 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" . - '
' . "\n" . - - '' . "\n" . - ' +
' . - '' . +?> +
+ +
 
- '' . "\n"; - '' . "\n"; + +
+ -?> +
+display('footer.tpl'); +?> \ No newline at end of file