- <?
- /**
- * @package form
- * @filesource
- * @see HTML_FORM_COMPONENT_PATH.'/Fileupload.php'
- * @copyright (c) http://Finn-Rasmussen.com
- * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
- * @author http://Finn-Rasmussen.com
- * @version 1.9
- * @since 21-oct-2005
- */
-
- /**
- * The required files
- */
- require_once(HTML_FORM_COMPONENT_PATH.'/Input.php');
-
- /**
- * Generates an INPUT element for a form, which is File upload
- * <code>
- * <input type="file" name="$name" class="$class" />
- * Usage:
- * $html = new Fileupload($name,$class,$onclick,$title,$tabindex);
- * print $html>getHtml();
- * Or
- * Fileupload::display($name,$class,$onclick,$title,$tabindex);
- * </code>
- * @package form
- */
-
- class Fileupload extends Input {
-
- /**
- * Constructor
- * @param String $name The name
- * @param String $class The class
- * @param String $onclick On click event for javascript
- * @param String $title The tooltip
- * @param String $tabindex The tabindex
- */
- function Fileupload($name, $class='',$onclick='',$title='',$tabindex='') {
- $this->Input('file',$name,'',$class,'','','','',$onclick,$title,$tabindex);
- }
-
- /**
- * Display html
- * <code>
- * Usage:
- * Fileupload::display($name,$class,$onclick,$title,$tabindex);
- * </code>
- * @static
- * @param String $name The name
- * @param String $class The class
- * @param String $onclick On click event for javascript
- * @param String $title The tooltip
- * @param String $tabindex The tabindex
- */
- function display($name='',$class='',$onclick='',$title='',$tabindex='') {
- $html = new Fileupload($name,$class,$onclick,$title,$tabindex);
- $html->addHtml();
- }
- }
- ?>