XOOPS RMCommon Utilities
2.1.8.91RC
Main Page
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
file.class.php
Go to the documentation of this file.
1
<?php
2
// $Id: file.class.php 825 2011-12-09 00:06:11Z i.bitcero $
3
// --------------------------------------------------------------
4
// Red México Common Utilities
5
// A framework for Red México Modules
6
// Author: Eduardo Cortés <i.bitcero@gmail.com>
7
// Email: i.bitcero@gmail.com
8
// License: GPL 2.0
9
// --------------------------------------------------------------
10
15
class
RMFormFile
extends
RMFormElement
16
{
17
private
$_size
= 30;
18
private
$_limit
= 0;
26
public
function
__construct
($caption, $name, $size=30,
$limit
=0){
27
$this->_size = $size;
28
$this->
setCaption
($caption);
29
$this->
setName
($name);
30
$this->_limit =
$limit
;
31
}
36
public
function
setSize
($size){
37
if
($size > 0){ $this->_size = $size; }
38
}
43
public
function
getSize
(){
44
return
$this->_size
;
45
}
50
public
function
render
(){
51
$ret
=
'<input type="file" name="'
.$this->getName().
'" id="'
.$this->
id
().
'" size="'
.$this->_size.
'" '
;
52
if
($this->
getClass
()!=
''
){
53
$ret
.=
"class='"
.$this->getClass().
"' "
;
54
}
55
$ret
.= $this->
getExtra
().
" />"
;
56
if
($this->_limit>0){
57
$ret
.=
'<input type="hidden" name="MAX_FILE_SIZE" value="'
.$this->_limit.
'" />'
;
58
}
59
return
$ret
;
60
}
61
}
62
63
?>
L:
XOOPS_Allure
SVN_XOOPS2
RMC
rmcommon
trunk
rmcommon
class
fields
file.class.php
Generated on Sun Mar 17 2013 20:41:05 for XOOPS RMCommon Utilities by
1.8.3.1