*/
function tpl_function_html_input($params, &$tpl)
{
require_once("shared.escape_chars.php");
$name = null;
$value = '';
$password = false;
$extra = '';
foreach($params as $_key => $_value)
{
switch($_key)
{
case 'name':
case 'value':
$$_key = $_value;
break;
case 'password':
$$_key = true;
break;
default:
if(!is_array($_key))
{
$extra .= ' ' . $_key . '="' . tpl_escape_chars($_value) . '"';
}
else
{
throw new Template_Exception("html_input: attribute '$_key' cannot be an array", $tpl);
}
}
}
if (!isset($name) || empty($name))
{
throw new Template_Exception("html_input: missing 'name' parameter", $tpl);
return;
}
$toReturn = '';
return $toReturn;
}
?>