| version 1.204, 2007/09/16 12:57:07 |
version 1.205, 2007/09/22 12:11:50 |
|
|
| * http://platon.sk/projects/phpMyEdit/ |
* http://platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.203 2007-09-12 15:02:46 michal Exp $ */ |
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.204 2007-09-16 12:57:07 nepto Exp $ */ |
| |
|
| /* This is a generic table editing program. The table and fields to be |
/* This is a generic table editing program. The table and fields to be |
| edited are defined in the calling program. |
edited are defined in the calling program. |
| Line 1044 function '.$this->js['prefix'].'filter_h |
|
| Line 1044 function '.$this->js['prefix'].'filter_h |
|
| $strip_tags, $escape); |
$strip_tags, $escape); |
| } |
} |
| } elseif (isset ($this->fdd[$k]['textarea'])) { |
} elseif (isset ($this->fdd[$k]['textarea'])) { |
| echo '<textarea class="',$css_class_name,'" name="',$this->cgi['prefix']['data'].$this->fds[$k],'"'; |
echo $this->htmlTextarea($this->cgi['prefix']['data'].$this->fds[$k], $css_class_name, $k, $this->fdd[$k]['default']); |
| echo ($this->readonly($k) ? ' disabled' : ''); |
|
| if (intval($this->fdd[$k]['textarea']['rows']) > 0) { |
|
| echo ' rows="',$this->fdd[$k]['textarea']['rows'],'"'; |
|
| } |
|
| if (intval($this->fdd[$k]['textarea']['cols']) > 0) { |
|
| echo ' cols="',$this->fdd[$k]['textarea']['cols'],'"'; |
|
| } |
|
| if (isset($this->fdd[$k]['textarea']['wrap'])) { |
|
| echo ' wrap="',$this->fdd[$k]['textarea']['wrap'],'"'; |
|
| } else { |
|
| echo ' wrap="virtual"'; |
|
| } |
|
| echo '>'; |
|
| if($escape) echo htmlspecialchars($this->fdd[$k]['default']); |
|
| else echo $this->fdd[$k]['default']; |
|
| echo '</textarea>',"\n"; |
|
| } elseif ($this->col_has_php($k)) { |
} elseif ($this->col_has_php($k)) { |
| echo include($this->fdd[$k]['php']); |
echo include($this->fdd[$k]['php']); |
| } else { |
} else { |
| Line 1192 function '.$this->js['prefix'].'filter_h |
|
| Line 1176 function '.$this->js['prefix'].'filter_h |
|
| $strip_tags, $escape); |
$strip_tags, $escape); |
| } |
} |
| } elseif (isset($this->fdd[$k]['textarea'])) { |
} elseif (isset($this->fdd[$k]['textarea'])) { |
| echo '<textarea class="',$css_class_name,'" name="',$this->cgi['prefix']['data'].$this->fds[$k],'"'; |
echo $this->htmlTextarea($this->cgi['prefix']['data'].$this->fds[$k], $css_class_name, $k, $row["qf$k"]); |
| echo ($this->readonly($k) ? ' disabled' : ''); |
|
| if (intval($this->fdd[$k]['textarea']['rows']) > 0) { |
|
| echo ' rows="',$this->fdd[$k]['textarea']['rows'],'"'; |
|
| } |
|
| if (intval($this->fdd[$k]['textarea']['cols']) > 0) { |
|
| echo ' cols="',$this->fdd[$k]['textarea']['cols'],'"'; |
|
| } |
|
| if (isset($this->fdd[$k]['textarea']['wrap'])) { |
|
| echo ' wrap="',$this->fdd[$k]['textarea']['wrap'],'"'; |
|
| } else { |
|
| echo ' wrap="virtual"'; |
|
| } |
|
| echo '>'; |
|
| if($escape) echo htmlspecialchars($row["qf$k"]); |
|
| else echo $row["qf$k"]; |
|
| echo '</textarea>',"\n"; |
|
| } elseif ($this->col_has_php($k)) { |
} elseif ($this->col_has_php($k)) { |
| echo include($this->fdd[$k]['php']); |
echo include($this->fdd[$k]['php']); |
| } else { |
} else { |
| Line 1600 function '.$this->js['prefix'].'filter_h |
|
| Line 1568 function '.$this->js['prefix'].'filter_h |
|
| return $ret; |
return $ret; |
| } /* }}} */ |
} /* }}} */ |
| |
|
| |
function htmlTextarea($name, $css, $k, $value = null, $js = NULL) |
| |
{ |
| |
$ret = '<textarea class="'.$css.'" name="'.$name.'"'; |
| |
$ret .= ($this->readonly($k) ? ' disabled' : ''); |
| |
if (intval($this->fdd[$k]['textarea']['rows']) > 0) { |
| |
$ret .= ' rows="'.$this->fdd[$k]['textarea']['rows'].'"'; |
| |
} |
| |
if (intval($this->fdd[$k]['textarea']['cols']) > 0) { |
| |
$ret .= ' cols="'.$this->fdd[$k]['textarea']['cols'].'"'; |
| |
} |
| |
if (isset($this->fdd[$k]['textarea']['wrap'])) { |
| |
$ret .= ' wrap="'.$this->fdd[$k]['textarea']['wrap'].'"'; |
| |
} else { |
| |
$ret .= ' wrap="virtual"'; |
| |
} |
| |
$ret .= '>'; |
| |
if($escape) $ret .= htmlspecialchars($value); |
| |
else $ret .= $value; |
| |
$ret .= '</textarea>'."\n"; |
| |
return $ret; |
| |
} /* }}} */ |
| |
|
| /** |
/** |
| * Returns original variables HTML code for use in forms or links. |
* Returns original variables HTML code for use in forms or links. |
| * |
* |