$b) { $out[] = ' '; } return join('', $out); } //------------------------------------------------------------- function yesnoRadio($field, $var, $tabindex = '', $id = '') { $vals = array( '0' => gTxt('no'), '1' => gTxt('yes') ); return radioSet ($vals, $field, $var, $tabindex, $id); } //------------------------------------------------------------- function onoffRadio($field, $var, $tabindex = '', $id = '') { $vals = array( '0' => gTxt('off'), '1' => gTxt('on') ); return radioSet ($vals, $field, $var, $tabindex, $id); } //------------------------------------------------------------- function selectInput($name = '', $array = '', $value = '', $blank_first = '', $onchange = '', $select_id = '', $check_type = false) { $out = array(); $selected = false; foreach ($array as $avalue => $alabel) { if ($check_type) { if ($avalue === $value || $alabel === $value) { $sel = ' selected="selected"'; $selected = true; } else { $sel = ''; } } else { if ($avalue == $value || $alabel == $value) { $sel = ' selected="selected"'; $selected = true; } else { $sel = ''; } } $out[] = n.t.''; } return ''; } //------------------------------------------------------------- function treeSelectInput($select_name = '', $array = '', $value = '', $select_id = '', $truncate = 0) { $out = array(); $selected = false; foreach ($array as $a) { if ($a['name'] == 'root') { continue; } extract($a); if ($name == $value) { $sel = ' selected="selected"'; $selected = true; } else { $sel = ''; } $sp = str_repeat(sp.sp, $level); if (($truncate > 3) && (strlen(utf8_decode($title)) > $truncate)) { $htmltitle = ' title="'.htmlspecialchars($title).'"'; $title = preg_replace('/^(.{0,'.($truncate - 3).'}).*$/su','$1',$title); $hellip = '…'; } else { $htmltitle = $hellip = ''; } $out[] = n.t.''; } return n.''; } //------------------------------------------------------------- function fInput($type, // generic form input $name, $value, $class='', $title='', $onClick='', $size='', $tab='', $id='', $disabled = false) { $o = ''; return join('', $o); } //------------------------------------------------------------- function checkbox2($name, $value, $tabindex = '', $id = '') { $o[] = ''; return join('', $o); } //------------------------------------------------------------- function radio($name, $value, $checked = '1', $id = '', $tabindex = '') { $o[] = ''; return join('', $o); } //------------------------------------------------------------- function form($contents, $style = '', $onsubmit = '', $method = 'post', $class = '', $fragment = '') { return n.'
'.n; } // ------------------------------------------------------------- function fetch_editable($name,$event,$identifier,$id) { $q = fetch($name,'txp_'.$event,$identifier,$id); return htmlspecialchars($q); } //------------------------------------------------------------- function text_area($name, $h, $w, $thing = '', $id = '') { $id = ($id) ? ' id="'.$id.'"' : ''; return ''; } //------------------------------------------------------------- function type_select($options) { return ''.n; } //------------------------------------------------------------- function type_options($array) { foreach($array as $a=>$b) { $out[] = t.''.n; } return join('',$out); } //------------------------------------------------------------- function radio_list($name, $values, $current_val='', $hilight_val='') { // $values is an array of value => label pairs foreach ($values as $k => $v) { $id = $name.'-'.$k; $out[] = n.t.'