function check_value($name)
{
- return (empty($_POST[$name]) ? 0 : 1);
+ if (is_array($name)) {
+ $ret = array();
+ foreach($name as $key)
+ $ret[$key] = check_value($key);
+ return $ret;
+ } else
+ return (empty($_POST[$name]) ? 0 : 1);
}
function checkbox($label, $name, $value=null, $submit_on_change=false, $title=false)
function password_row($label, $name, $value)
{
echo "<tr><td class='label'>$label</td>";
- label_cell("<input type='password' name='$name' size=20 maxlength=20 value='$value' >");
+ label_cell("<input type='password' name='$name' size=32 maxlength=32 value='$value' >");
echo "</tr>\n";
}
label_cell($list."<input name='".$name."' "
.(check_edit_access($name) ? '' : 'disabled ')
- ."value='".@$_POST[$name]."' size=10 maxlength=35>");
+ ."value='".@$_POST[$name]."' size=16 maxlength=35>");
}
else // just wildcard ref field (e.g. for global inquires)
{
//-----------------------------------------------------------------------------------
-function textarea_cells($label, $name, $value, $cols, $rows, $title = null, $params="")
+function textarea_cells($label, $name, $value, $cols, $rows, $max=255, $title = null, $params="")
{
global $Ajax;
$value = (!isset($_POST[$name]) ? "" : $_POST[$name]);
echo "<td><textarea name='$name' cols='$cols' rows='$rows'"
.($title ? " title='$title'" : '')
+ .($max ? " maxlength=$max" : '')
.">$value</textarea></td>\n";
$Ajax->addUpdate($name, $name, $value);
}
-function textarea_row($label, $name, $value, $cols, $rows, $title=null, $params="")
+function textarea_row($label, $name, $value, $cols, $rows, $max=255, $title=null, $params="")
{
echo "<tr><td class='label'>$label</td>";
- textarea_cells(null, $name, $value, $cols, $rows, $title, $params);
+ textarea_cells(null, $name, $value, $cols, $rows, $max, $title, $params);
echo "</tr>\n";
}