Add id attribute to hyperlink and image templates
[squirrelmail.git] / templates / default / image.tpl
CommitLineData
efb5bde8 1<?php
2
3/**
4 * image.tpl
5 *
6 * Template for constructing an image.
7 *
8 * The following variables are available in this template:
9 * + $src - the image source path
522a2253 10 * + $id - ID name (optional; may not be present)
efb5bde8 11 * + $class - CSS class name (optional; may not be present)
12 * + $alt - alternative link text
13 * (optional; may not be present)
14 * + $title - the image's title attribute value
15 * (optional; may not be present)
16 * + $width - the width the image should be shown in
17 * (optional; may not be present)
18 * + $height - the height the image should be shown in
19 * (optional; may not be present)
20 * + $align - the image's alignment attribute value
21 * (optional; may not be present)
22 * + $border - the image's border attribute value
23 * (optional; may not be present)
24 * + $hspace - the image's hspace attribute value
25 * (optional; may not be present)
26 * + $vspace - the image's vspace attribute value
27 * (optional; may not be present)
28 * + $onclick - onClick JavaScript handler (optional; may not be present)
29 *
30 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
31 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
32 * @version $Id$
33 * @package squirrelmail
34 * @subpackage templates
35 */
36
37
38// retrieve the template vars
39//
40extract($t);
41
42
522a2253 43?><img src="<?php echo $src ?>"<?php if (!empty($class)) echo ' class="' . $class . '"'; ?><?php if (!empty($id)) echo ' id="' . $id . '"'; ?><?php if (!empty($alt)) echo ' alt="' . $alt . '"'; ?><?php if (!empty($title)) echo ' title="' . $title . '"'; ?><?php if (!empty($onclick)) echo ' onclick="' . $onclick . '"'; ?><?php if (!empty($width)) echo ' width="' . $width . '"'; ?><?php if (!empty($height)) echo ' height="' . $height . '"'; ?><?php if (!empty($align)) echo ' align="' . $align . '"'; ?><?php if (!empty($border)) echo ' border="' . $border . '"'; ?><?php if (!empty($hspace)) echo ' hspace="' . $hspace . '"'; ?><?php if (!empty($vspace)) echo ' vspace="' . $vspace . '"'; ?> />