0177059f |
1 | <?php |
2 | |
3 | /** |
4 | * label.tpl |
5 | * |
6 | * Template for constructing a label tag. |
7 | * |
8 | * The following variables are available in this template: |
9 | * + $for - the ID to which the label applies (optional; may not be present) |
10 | * + $text - text (or other code) that goes inside the label |
11 | * + $aAttribs - Any extra attributes: an associative array, where |
12 | * keys are attribute names, and values (which are |
13 | * optional and might be null) should be placed |
14 | * in double quotes as attribute values (optional; |
15 | * may not be present) |
16 | * |
17 | * @copyright © 1999-2006 The SquirrelMail Project Team |
18 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
19 | * @version $Id$ |
20 | * @package squirrelmail |
21 | * @subpackage templates |
22 | */ |
23 | |
24 | |
25 | // retrieve the template vars |
26 | // |
27 | extract($t); |
28 | |
29 | |
30 | echo '<label'; |
31 | if (!empty($for)) echo ' for="' . $for . '"'; |
32 | foreach ($aAttribs as $key => $value) { |
33 | echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"'); |
34 | } |
35 | echo '>' . $text . '</label>'; |
36 | |
37 | |