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 14840 2020-01-07 07:42:38Z pdontthink $
  11.  * @package squirrelmail
  12.  */
  13.  
  14. /** This is the image page */
  15. define('PAGE_NAME''image');
  16.  
  17. /**
  18.  * Path for SquirrelMail required files.
  19.  * @ignore
  20.  */
  21. define('SM_PATH','../');
  22.  
  23. /* SquirrelMail required files. */
  24. require_once(SM_PATH 'include/validate.php');
  25. require_once(SM_PATH 'functions/global.php');
  26. require_once(SM_PATH 'functions/date.php');
  27. require_once(SM_PATH 'functions/page_header.php');
  28. require_once(SM_PATH 'functions/html.php');
  29. require_once(SM_PATH 'include/load_prefs.php');
  30.  
  31. displayPageHeader($color'None');
  32.  
  33. /* globals */
  34. if sqgetGlobalVar('passed_id'$tempSQ_GET) ) {
  35.   $passed_id = (int) $temp;
  36. }
  37. sqgetGlobalVar('mailbox',       $mailbox,       SQ_GET);
  38. sqgetGlobalVar('ent_id',        $ent_id,        SQ_GET);
  39. sqgetGlobalVar('QUERY_STRING',  $QUERY_STRING,  SQ_SERVER);
  40. /* end globals */
  41.  
  42. echo '<br />' 
  43.     '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
  44.     "\n" .
  45.     '<tr><td bgcolor="' $color[0'">' .
  46.     '<b><center>' .
  47.     _("Viewing an image attachment"" - ";
  48.  
  49. $msg_url 'read_body.php?' $QUERY_STRING;
  50. $msg_url set_url_var($msg_url'ent_id'0);
  51. echo '<a href="'.$msg_url.'">'_("View message"'</a>';
  52.  
  53.  
  54. $DownloadLink '../src/download.php?passed_id=' $passed_id .
  55.                '&amp;mailbox=' urlencode($mailbox
  56.                '&amp;ent_id=' urlencode($ent_id'&amp;absolute_dl=true';
  57. ?>
  58. </b></td></tr>
  59. <tr><td align="center">
  60. <a href="<?php echo $DownloadLink?>"><?php echo _("Download this as a file")?></a>
  61. <br />&nbsp;</td></tr></table>
  62.  
  63. <table border="0" cellspacing="0" cellpadding="2" align="center">
  64. <tr><td bgcolor="<?php echo $color[4]?>">
  65. <img src="<?php echo $DownloadLink?>" />
  66.  
  67. </td></tr></table>
  68. </body></html>

Documentation generated on Mon, 13 Jan 2020 04:24:43 +0100 by phpDocumentor 1.4.3