Source for file image.php

Documentation is available at image.php

  1. <?php
  2.  
  3. /**
  4.  * image.php
  5.  *
  6.  * This file shows an attached image
  7.  *
  8.  * @copyright 1999-2020 The SquirrelMail Project Team
  9.  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10.  * @version $Id: image.php 14845 2020-01-07 08:09:34Z pdontthink $
  11.  * @package squirrelmail
  12.  */
  13.  
  14. /** This is the image page */
  15. define('PAGE_NAME''image');
  16.  
  17. /**
  18.  * Include the SquirrelMail initialization file.
  19.  */
  20. require('../include/init.php');
  21.  
  22.  
  23. /* globals */
  24. sqgetGlobalVar('passed_id'$passed_idSQ_GETNULLSQ_TYPE_BIGINT);
  25. sqgetGlobalVar('mailbox',       $mailbox,       SQ_GET);
  26. sqgetGlobalVar('ent_id',        $ent_id,        SQ_GET);
  27. sqgetGlobalVar('QUERY_STRING',  $QUERY_STRING,  SQ_SERVER);
  28. /* end globals */
  29.  
  30. echo '<br />' .
  31.     '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
  32.     "\n" .
  33.     '<tr><td bgcolor="' $color[0'">' .
  34.     '<div style="text-align: center;"><b>' .
  35.     _("Viewing an image attachment"" - ";
  36.  
  37. $msg_url 'read_body.php?' $QUERY_STRING;
  38. $msg_url set_url_var($msg_url'ent_id'0);
  39. echo '<a href="'.$msg_url.'">'_("View message"'</a>';
  40.  
  41.  
  42. $DownloadLink '../src/download.php?passed_id=' $passed_id .
  43.                '&amp;mailbox=' urlencode($mailbox.
  44.                '&amp;ent_id=' urlencode($ent_id'&amp;absolute_dl=true';
  45.  
  46. ?>
  47. </b></div></td></tr>
  48. <tr><td align="center">
  49. <a href="<?php echo $DownloadLink?>"><?php echo _("Download this as a file")?></a>
  50. <br />&nbsp;</td></tr></table>
  51.  
  52. <table border="0" cellspacing="0" cellpadding="2" align="center">
  53. <tr><td bgcolor="<?php echo $color[4]?>">
  54. <img src="<?php echo $DownloadLink?>" />
  55.  
  56. </td></tr></table>
  57. <?php
  58. $oTemplate->display('footer.tpl');

Documentation generated on Mon, 13 Jan 2020 04:22:42 +0100 by phpDocumentor 1.4.3