noalyss  Version-6.9.1.8
 All Data Structures Namespaces Files Functions Variables Pages
class_itextarea.php
Go to the documentation of this file.
1 <?php
2 /*
3  * This file is part of NOALYSS.
4  *
5  * NOALYSS is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * NOALYSS is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with NOALYSS; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 
20 // Copyright Author Dany De Bontridder danydb@aevalys.eu
21 
22 /*!\file
23  * \brief Html Input
24  */
25 require_once NOALYSS_INCLUDE.'/lib/class_html_input.php';
26 class ITextarea extends HtmlInput
27 {
28  /*!\brief show the html input of the widget*/
29  public function input($p_name=null,$p_value=null)
30  {
31  $this->name=($p_name==null)?$this->name:$p_name;
32  $this->value=($p_value==null)?$this->value:$p_value;
33  if ( !isset ($this->style )) $this->style=' class="itextarea" ';
34  $this->id=($this->id=="")?$this->name:$this->id;
35 
36  if ( $this->readOnly==true) return $this->display();
37 
38  $r="";
39  $r.='<TEXTAREA '.$this->style.' name="'.$this->name.'" id="'.$this->id.'"';
40  $r.='>';
42 
43  $r.="</TEXTAREA>";
44  return $r;
45  }
46 
47 
48  /*!\brief print in html the readonly value of the widget*/
49  public function display()
50  {
51  $r='<p>';
52  $r.=h($this->value);
53  $r.=sprintf('<input type="hidden" name="%s" value="%s">',
54  $this->name,h($this->value));
55  $r.='</p>';
56 
57  }
58  static public function test_me()
59  {
60  }
61 }
$opd_description style
display()
print in html the readonly value of the widget
for($e=0;$e< count($array);$e++) $desc readOnly
input($p_name=null, $p_value=null)
show the html input of the widget
$from_poste name
h($p_string)
to protect again bad characters which can lead to a cross scripting attack the string to be diplayed ...
Definition: ac_common.php:38
class widget This class is used to create all the HTML INPUT TYPE and some specials which works with ...
static test_me()