Source for file image.php

Documentation is available at image.php

  1. <?php
  2. /**
  3. * image.php
  4. *
  5. * This file shows an attached image
  6. *
  7. * @copyright 1999-2020 The SquirrelMail Project Team
  8. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  9. * @version $Id: image.php 14840 2020年01月07日 07:42:38Z pdontthink $
  10. * @package squirrelmail
  11. */
  12. /** This is the image page */
  13. define ('PAGE_NAME', 'image');
  14. /**
  15. * Path for SquirrelMail required files.
  16. * @ignore
  17. */
  18. define ('SM_PATH','../');
  19. /* SquirrelMail required files. */
  20. require_once(SM_PATH . 'include/validate.php');
  21. require_once(SM_PATH . 'functions/global.php');
  22. require_once(SM_PATH . 'functions/date.php');
  23. require_once(SM_PATH . 'functions/page_header.php');
  24. require_once(SM_PATH . 'functions/html.php');
  25. require_once(SM_PATH . 'include/load_prefs.php');
  26. displayPageHeader ($color, 'None');
  27. /* globals */
  28. if ( sqgetGlobalVar ('passed_id', $temp, SQ_GET ) ) {
  29. $passed_id = (int) $temp;
  30. }
  31. sqgetGlobalVar ('mailbox', $mailbox, SQ_GET );
  32. sqgetGlobalVar ('ent_id', $ent_id, SQ_GET );
  33. sqgetGlobalVar ('QUERY_STRING', $QUERY_STRING, SQ_SERVER );
  34. /* end globals */
  35. echo '<br />' .
  36. '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' .
  37. "\n" .
  38. '<tr><td bgcolor="' . $color[0] . '">' .
  39. '<b><center>' .
  40. _ ("Viewing an image attachment") . " - ";
  41. $msg_url = 'read_body.php?' . $QUERY_STRING;
  42. $msg_url = set_url_var ($msg_url, 'ent_id', 0);
  43. echo '<a href="'.$msg_url.'">'. _ ("View message") . '</a>';
  44. $DownloadLink = '../src/download.php?passed_id=' . $passed_id .
  45. '&amp;mailbox=' . urlencode ($mailbox) .
  46. '&amp;ent_id=' . urlencode ($ent_id) . '&amp;absolute_dl=true';
  47. ?>
  48. </b></td></tr>
  49. <tr><td align="center">
  50. <a href="<?php echo $DownloadLink; ?>"><?php echo _ ("Download this as a file"); ?></a>
  51. <br />&nbsp;</td></tr></table>
  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. </td></tr></table>
  56. </body></html>

Documentation generated on 2020年1月13日 04:24:43 +0100 by phpDocumentor 1.4.3

AltStyle によって変換されたページ (->オリジナル) /