Initial Commit of AgileBill Open Source

This commit is contained in:
unknown
2008-11-26 14:50:40 -08:00
parent ae5a0fc25e
commit 02306ccc47
2954 changed files with 410976 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* File: function.html_bool
* Type: function
* Name: html_bool
* -------------------------------------------------------------
*/
function smarty_function_html_bool($params, &$smarty)
{
extract($params);
if(empty($id)) $id = $field;
if(empty($value)) $value = '1';
$extra=' ';
if(!empty($onclick)) $extra .= ' onClick="'.$onclick.'" ';
if($default == $value) $extra .= 'checked ';
$ret = '<input type="checkbox" name="'.$field.'" id="'.$id.'" value="'.$value.'"'.$extra.'/>';
return $ret;
}
?>