<?php
// $Id: formfile.php,v 1.1 2004/07/11 10:27:19 Farsus Exp $
// -------------------------------------------------------------------------//
//			                 RUNCMS                                         //
//                                                                          //
//	 reliable - Unique - Nocost &  Simplicity & ease off use                //
//                       < http://www.runcms.org >                          //
// -------------------------------------------------------------------------//
// 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
?>
