| | |
| | | { |
| | | protected $tagname; |
| | | protected $attrib = array(); |
| | | protected $allowed; |
| | | protected $allowed = array(); |
| | | protected $content; |
| | | |
| | | public static $common_attrib = array('id','class','style','title','align'); |
| | |
| | | */ |
| | | public function show() |
| | | { |
| | | return self::tag($this->tagname, $this->attrib, $this->content, $this->allowed); |
| | | return self::tag($this->tagname, $this->attrib, $this->content, array_merge(self::$common_attrib, $this->allowed)); |
| | | } |
| | | |
| | | /****** STATIC METHODS *******/ |
| | |
| | | { |
| | | protected $tagname = 'input'; |
| | | protected $type = 'text'; |
| | | protected $allowed = array('type','name','value','size','tabindex','autocomplete','checked'); |
| | | |
| | | public function __construct($attrib = array()) |
| | | { |
| | |
| | | class html_textarea extends html |
| | | { |
| | | protected $tagname = 'textarea'; |
| | | protected $allowed_attrib = array('name','rows','cols','wrap','tabindex'); |
| | | protected $allowed = array('name','rows','cols','wrap','tabindex'); |
| | | |
| | | /** |
| | | * Get HTML code for this object |
| | |
| | | $value = Q($value, 'strict', false); |
| | | } |
| | | |
| | | return self::tag($this->tagname, $this->attrib, $value, array_merge(self::$common_attrib, $this->allowed_attrib)); |
| | | return self::tag($this->tagname, $this->attrib, $value, array_merge(self::$common_attrib, $this->allowed)); |
| | | } |
| | | } |
| | | |