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

Documentation generated on Sat, 07 Oct 2006 16:31:35 +0300 by phpDocumentor 1.3.0RC6