| 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 |
| 10 | * + $class - CSS class name (optional; may not be present) |
| 11 | * + $alt - alternative link text |
| 12 | * (optional; may not be present) |
| 13 | * + $title - the image's title attribute value |
| 14 | * (optional; may not be present) |
| 15 | * + $width - the width the image should be shown in |
| 16 | * (optional; may not be present) |
| 17 | * + $height - the height the image should be shown in |
| 18 | * (optional; may not be present) |
| 19 | * + $align - the image's alignment attribute value |
| 20 | * (optional; may not be present) |
| 21 | * + $border - the image's border attribute value |
| 22 | * (optional; may not be present) |
| 23 | * + $hspace - the image's hspace attribute value |
| 24 | * (optional; may not be present) |
| 25 | * + $vspace - the image's vspace attribute value |
| 26 | * (optional; may not be present) |
| 27 | * + $onclick - onClick JavaScript handler (optional; may not be present) |
| 28 | * |
| 29 | * @copyright © 1999-2006 The SquirrelMail Project Team |
| 30 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
| 31 | * @version $Id$ |
| 32 | * @package squirrelmail |
| 33 | * @subpackage templates |
| 34 | */ |
| 35 | |
| 36 | |
| 37 | // retrieve the template vars |
| 38 | // |
| 39 | extract($t); |
| 40 | |
| 41 | |
| 42 | ?><img src="<?php echo $src ?>"<?php if (!empty($class)) echo ' class="' . $class . '"'; ?><?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 . '"'; ?> /> |