Put sample .htaccess in all directories browser does not access directly
[squirrelmail.git] / templates / default / textarea.tpl
CommitLineData
b3c07fdc 1<?php
2
3/**
4 * textarea.tpl
5 *
6 * Template for constructing a textarea input tag.
7 *
8 * The following variables are available in this template:
9 * + $name - The name of the select input
10 * + $text - The initial value inside the textarea
11 * + $cols - The width of the textarea in characters
12 * + $rows - The height of the textarea in rows
13 * + $aAttribs - Any extra attributes: an associative array, where
14 * keys are attribute names, and values (which are
15 * optional and might be null) should be placed
16 * in double quotes as attribute values (optional;
17 * may not be present)
18 *
19 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
20 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
21 * @version $Id$
22 * @package squirrelmail
23 * @subpackage templates
24 */
25
26
27// retrieve the template vars
28//
29extract($t);
30
31
32if (isset($aAttribs['id'])) {
33 $label_open = '<label for="' . $aAttribs['id'] . '">';
34 $label_close = '</label>';
35} else {
36 $label_open = '';
37 $label_close = '';
38}
39
40
41echo '<textarea name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '"';
42foreach ($aAttribs as $key => $value) {
43 echo ' ' . $key . (is_null($value) ? '' : '="' . $value . '"');
44}
45echo '>' . $label_open . $text . $label_close . "</textarea>\n";
46
47