| 1 | <?php |
| 2 | /** |
| 3 | * read_display_images_inline.tpl |
| 4 | * |
| 5 | * Template for displaying attached images inline, when desired by the user. |
| 6 | * |
| 7 | * The following variables are available in this template: |
| 8 | * $images - array containing all the images to be displayed. Each element |
| 9 | * is an array representing an image and contains the following elements: |
| 10 | * $im['Name'] - The name of the attached image |
| 11 | * $im['DisplayURL'] - URL for use with src attribute of img tag to display the image |
| 12 | * $im['DownloadURL'] - URL to download the image. |
| 13 | * |
| 14 | * @copyright 1999-2021 The SquirrelMail Project Team |
| 15 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
| 16 | * @version $Id$ |
| 17 | * @package squirrelmail |
| 18 | * @subpackage templates |
| 19 | */ |
| 20 | |
| 21 | /** add required includes **/ |
| 22 | |
| 23 | /** extract template variables **/ |
| 24 | extract($t); |
| 25 | |
| 26 | /** Begin template **/ |
| 27 | if (count($images) == 0) { |
| 28 | # If we don't have any images, don't do anything |
| 29 | return ''; |
| 30 | } |
| 31 | |
| 32 | ?> |
| 33 | <div class="readInlineImages"> |
| 34 | <table cellspacing="0" class="table_blank"> |
| 35 | <?php |
| 36 | foreach ($images as $img) { |
| 37 | ?> |
| 38 | <tr> |
| 39 | <td> |
| 40 | <table cellspacing="0"> |
| 41 | <tr> |
| 42 | <td class="header5"> |
| 43 | <small><?php echo $img['Name']; ?></small> |
| 44 | <?php |
| 45 | if (!empty($img['DownloadURL'])) { |
| 46 | ?> |
| 47 | |
| 48 | <a href="<?php echo $img['DownloadURL']; ?>"><?php echo _("Download"); ?></a> |
| 49 | <?php |
| 50 | } |
| 51 | ?> |
| 52 | </td> |
| 53 | </tr> |
| 54 | <tr> |
| 55 | <td class="image"> |
| 56 | <table cellpadding="0" cellspacing="0" class="imageWrapper"> |
| 57 | <tr> |
| 58 | <td> |
| 59 | <img src="<?php echo $img['DisplayURL']; ?>" /> |
| 60 | </td> |
| 61 | </tr> |
| 62 | </table> |
| 63 | </td> |
| 64 | </tr> |
| 65 | </table> |
| 66 | </td> |
| 67 | </tr> |
| 68 | <?php |
| 69 | } |
| 70 | ?> |
| 71 | </table> |
| 72 | </div> |