Remove HTML from login src and add image template
[squirrelmail.git] / templates / default / read_display_images_inline.tpl
CommitLineData
3cb5a0bb 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 &copy; 1999-2006 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 **/
24extract($t);
25
26/** Begin template **/
27if (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 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
48 <a href="<?php echo $img['DownloadURL']; ?>"><?php echo _("Download"); ?></a>
49 <?php
50 }
51 ?>
52 </td>
53 <td>&nbsp;</td>
54 </tr>
55 <tr>
56 <td colspan="2" class="image">
57 <img src="<?php echo $img['DisplayURL']; ?>" />
58 </td>
59 </tr>
60 </table>
61 </td>
62 </tr>
63 <?php
64 }
65 ?>
66</table>
67</div>