END; return $pString . "\n"; } // end a form function formEnd() { return "\n"; } // print form header with hidden action field for multi-part upload forms function formMultiHeader($action) { global $PHP_SELF; $pString = <<< END
END; return $pString . "\n"; } // print form footer with submit field function formSubmit($value = FALSE) { include_once("MESSAGES.php"); $messages = new MESSAGES(); if(!$value) $value = $messages->text("submit", "Submit"); else $value = $messages->text("submit", $value); $pString = <<< END END; return $pString . "\n"; } // print form reset button function formReset() { include_once("MESSAGES.php"); $messages = new MESSAGES(); $value = $messages->text("submit", "reset"); $pString = <<< END END; return $pString . "\n"; } // print hidden form input function hidden($name, $value) { $pString = <<< END END; return $pString . "\n"; } // print radio button function radioButton($label, $name, $value = FALSE, $checked = FALSE) { $checked ? $checked = "checked=\"checked\"" : ""; $pString = ''; if($label) $pString = "$label:
"; $pString .= <<< END END; return $pString . "\n"; } // print checkbox function checkbox($label, $name, $checked = FALSE) { $checked ? $checked = "checked=\"checked\"" : ""; $pString = ''; if($label) $pString = "$label:
"; $pString .= <<< END END; return $pString . "\n"; } // create select boxes for HTML forms // requires $name, $array and optional $size. // First OPTION is always SELECTED // optional $override allows the programmer to override the user set preferences for character limiting in select boxes function selectFBox($label, $name, $array, $size = 3, $override = FALSE) { include_once("FORMMISC.php"); $formMisc = new FORMMISC(); $pString = ''; if($label) $pString = "$label:
"; $pString .= "\n"; return $pString; } // create select boxes for HTML forms // requires $name, $array, selected value and optional $size. // 'selected value' is set SELECTED // optional $override allows the programmer to override the user set preferences for character limiting in select boxes function selectedBox($label, $name, $array, $select, $size = 3, $override = FALSE) { include_once("FORMMISC.php"); $formMisc = new FORMMISC(); $pString = ''; if($label) $pString = "$label:
"; $pString .= "\n"; return $pString; } // create select boxes form HTML forms // requires $name, $array and optional $size. // First entry is default selection. // OPTION VALUE is set so expects assoc. array where key holds this value // optional $override allows the programmer to override the user set preferences for character limiting in select boxes function selectFBoxValue($label, $name, $array, $size = 3, $override = FALSE) { include_once("FORMMISC.php"); $formMisc = new FORMMISC(); $pString = ''; if($label) $pString = "$label:
\n"; $pString .= "\n"; return $pString; } // create select boxes form HTML forms // requires $name, $array and optional $size. // $select is default selection. // OPTION VALUE is set so expects assoc. array where key holds this value // optional $override allows the programmer to override the user set preferences for character limiting in select boxes function selectedBoxValue($label, $name, $array, $select, $size = 3, $override = FALSE) { include_once("FORMMISC.php"); $formMisc = new FORMMISC(); $pString = ''; if($label) $pString = "$label:
\n"; $pString .= "\n"; return $pString; } // create select boxes form HTML forms // requires $name, $array and optional $size. // First entry is default selection. // OPTION VALUE is set so expects assoc. array where key holds this value. // MULTIPLE values may be selected // optional $override allows the programmer to override the user set preferences for character limiting in select boxes function selectFBoxValueMultiple($label, $name, $array, $size = 3, $override = FALSE) { include_once("FORMMISC.php"); $formMisc = new FORMMISC(); $pString = ''; if($label) $pString = "$label:
\n"; $name .= '[]'; $pString .= "\n"; return $pString; } // create select boxes form HTML forms // requires $name, $array, selected values (array of) and optional $size. // OPTION VALUE is set so expects assoc. array where key holds this value. // MULTIPLE values may be selected // optional $override allows the programmer to override the user set preferences for character limiting in select boxes function selectedBoxValueMultiple($label, $name, $array, $values, $size = 3, $override = FALSE) { include_once("FORMMISC.php"); $formMisc = new FORMMISC(); include_once("MESSAGES.php"); $messages = new MESSAGES(); $pString = ''; if($label) $pString = "$label:
\n"; $name .= '[]'; $pString .= "\n"; return $pString; } // password input type function passwordInput($label, $name, $value = FALSE, $size = 20, $maxLength = 255) { $pString = ''; if($label) $pString = "$label:
"; $pString .= <<< END END; return $pString . "\n"; } // text input type function textInput($label, $name, $value = FALSE, $size = 20, $maxLength = 255) { $pString = ''; if($label) $pString = "$label:
"; $pString .= <<< END END; return $pString . "\n"; } // textarea input type function textareaInput($label, $name, $value = FALSE, $cols = 30, $rows = 5) { $pString = ''; if($label) $pString = "$label:
"; $pString .= <<< END END; return $pString . "\n"; } // upload box function fileUpload($label, $name, $size = 20) { $pString = ''; if($label) $pString = "$label:
"; $pString .= <<< END END; return $pString . "\n"; } } ?>