<?php
// $Id: formfile.php,v 1.4 2003/03/19 06:57:43 half-dead Exp $
// ------------------------------------------------------------------------- //
//               E-Xoops: Content Management for the Masses                  //
//                       < http://www.e-xoops.com >                          //
// ------------------------------------------------------------------------- //
// Original Author: Kazumi Ono
// Author Website : http://www.mywebaddons.com/ , http://www.myweb.ne.jp
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
if (!defined("EXOOPS_XOOPSFORMFILE_INCLUDED")) {
	define("EXOOPS_XOOPSFORMFILE_INCLUDED", 1);
include_once(XOOPS_ROOT_PATH."/class/xoopsform/formelement.php");
class XoopsFormFile extends XoopsFormElement {
	var $maxFileSize;
	function XoopsFormFile($caption, $name, $maxfilesize) {
		$this->setCaption($caption);
		$this->setName($name);
		$this->maxFileSize = intval($maxfilesize);
	}
//---------------------------------------------------------------------------------------//
/**
* Description
*
* @param type $var description
* @return type description
*/
function getMaxFileSize() {
	return $this->maxFileSize;
}
//---------------------------------------------------------------------------------------//
/**
* Description
*
* @param type $var description
* @return type description
*/
function render() {
	return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' /><input type='file' class='file' name='".$this->getName()."' id='".$this->getName()."'".$this->getExtra()." /><input type='hidden' name='xoops_upload_file[]' id='xoops_upload_file[]' value='".$this->getName()."' />";
}
//---------------------------------------------------------------------------------------//
} // END CLASS
} // END DEFINED
?>
