Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 require_once('class_html_input.php');
00026 class IText extends HtmlInput
00027 {
00028 function __construct($name='',$value='',$p_id="")
00029 {
00030 parent::__construct($name,$value,$p_id);
00031 $this->style=' class="input_text" ';
00032 }
00033
00034 public function input($p_name=null,$p_value=null)
00035 {
00036 $this->name=($p_name==null)?$this->name:$p_name;
00037 $this->value=($p_value==null)?$this->value:$p_value;
00038 if ( $this->readOnly==true) return $this->display();
00039 $this->id=($this->id=="")?$this->name:$this->id;
00040
00041 $t= ((isset($this->title)))?'title="'.$this->title.'" ':' ';
00042
00043 $extra=(isset($this->extra))?$this->extra:"";
00044
00045 $this->value=str_replace('"','',$this->value);
00046 if ( ! isset ($this->css_size))
00047 {
00048 $r='<INPUT '.$this->style.' TYPE="TEXT" id="'.
00049 $this->id.'"'.$t.
00050 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '.
00051 'SIZE="'.$this->size.'" '.$this->javascript." $this->extra >";
00052
00053 } else {
00054 $r='<INPUT '.$this->style.' TYPE="TEXT" id="'.
00055 $this->id.'"'.$t.
00056 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '.
00057 ' style="width:'.$this->css_size.';" '.$this->javascript." $this->extra >";
00058
00059 }
00060
00061 if ( $this->table == 1 ) $r='<td>'.$r.'</td>';
00062
00063 return $r;
00064
00065 }
00066
00067 public function display()
00068 {
00069 $t= ((isset($this->title)))?'title="'.$this->title.'" ':' ';
00070
00071 $extra=(isset($this->extra))?$this->extra:"";
00072
00073 $readonly=" readonly ";
00074 $this->value=str_replace('"','',$this->value);
00075 $this->style=' class="input_text_ro" ';
00076 if ( ! isset ($this->css_size))
00077 {
00078 $r='<INPUT '.$this->style.' TYPE="TEXT" id="'.
00079 $this->id.'"'.$t.
00080 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '.
00081 'SIZE="'.$this->size.'" '.$this->javascript." $readonly $this->extra >";
00082 } else {
00083 $r='<INPUT '.$this->style.' TYPE="TEXT" id="'.
00084 $this->id.'"'.$t.
00085 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '.
00086 ' style="width:'.$this->css_size.'" '.$this->javascript." $readonly $this->extra >";
00087 }
00088
00089
00090 if ( $this->table == 1 ) $r='<td>'.$r.'</td>';
00091
00092 return $r;
00093
00094 }
00095 static public function test_me()
00096 {
00097 }
00098 }