| version 1.80, 2003/05/02 17:55:47 |
version 1.81, 2003/05/12 22:30:22 |
|
|
| * http://www.platon.sk/projects/phpMyEdit/ |
* http://www.platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.79 2003/05/01 21:44:44 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.80 2003/05/02 17:55:47 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. |
|
|
| function copy_enabled() { return stristr($this->options, 'P') && $this->add_enabled(); } |
function copy_enabled() { return stristr($this->options, 'P') && $this->add_enabled(); } |
| function hidden($k) { return stristr($this->fdd[$k]['options'],'H'); } |
function hidden($k) { return stristr($this->fdd[$k]['options'],'H'); } |
| function password($k) { return stristr($this->fdd[$k]['options'],'W'); } |
function password($k) { return stristr($this->fdd[$k]['options'],'W'); } |
| function readonly($k) { return stristr($this->fdd[$k]['options'],'R') || $this->fdd[$k]['expression']; } |
function readonly($k) { return stristr($this->fdd[$k]['options'],'R') || $this->fdd[$k]['sql']; } |
| |
|
| function add_operation() { return $this->operation == $this->labels['Add'] && $this->add_enabled(); } |
function add_operation() { return $this->operation == $this->labels['Add'] && $this->add_enabled(); } |
| function change_operation() { return $this->operation == $this->labels['Change'] && $this->change_enabled(); } |
function change_operation() { return $this->operation == $this->labels['Change'] && $this->change_enabled(); } |
|
|
| || $this->change_operation()) { |
|| $this->change_operation()) { |
| $ret = 'PMEtable0.'.$this->fds[$field]; |
$ret = 'PMEtable0.'.$this->fds[$field]; |
| } else { |
} else { |
| if (isset($this->fdd[$field]['expression'])) { |
if (isset($this->fdd[$field]['sql'])) { |
| $ret = $this->fdd[$field]['expression']; |
$ret = $this->fdd[$field]['sql']; |
| } elseif ($this->fdd[$this->fds[$field]]['values']['description'] && ! $dont_desc) { |
} elseif ($this->fdd[$this->fds[$field]]['values']['description'] && ! $dont_desc) { |
| $desc = &$this->fdd[$this->fds[$field]]['values']['description']; |
$desc = &$this->fdd[$this->fds[$field]]['values']['description']; |
| if (is_array($desc) && is_array($desc['columns'])) { |
if (is_array($desc) && is_array($desc['columns'])) { |
| Line 1661 function phpMyEdit_form_control(theForm) |
|
| Line 1661 function phpMyEdit_form_control(theForm) |
|
| //$raw_sort_field = 'qf'.$field; |
//$raw_sort_field = 'qf'.$field; |
| $sort_field = $this->fqn($field); |
$sort_field = $this->fqn($field); |
| $sort_field_w = $this->fdd[$field]['name']; |
$sort_field_w = $this->fdd[$field]['name']; |
| $this->fdd[$field]['expression'] && $sort_field_w .= ' (expression)'; |
$this->fdd[$field]['sql'] && $sort_field_w .= ' (sql)'; |
| if ($desc) { |
if ($desc) { |
| $sort_field .= ' DESC'; |
$sort_field .= ' DESC'; |
| $sort_field_w .= ' '.$this->labels['descending']; |
$sort_field_w .= ' '.$this->labels['descending']; |