--- phpMyEdit.class.1.154.php 2004-11-30 09:28:45.203125000 +0100 +++ phpMyEdit.class.php 2004-12-05 18:41:25.343750000 +0100 @@ -205,9 +205,11 @@ function copy_enabled() { return stristr($this->options, 'P') && $this->add_enabled(); } function tabs_enabled() { return $this->display['tabs'] && count($this->tabs) > 0; } function hidden($k) { return stristr($this->fdd[$k]['input'],'H'); } + function fileupload($k) { return stristr($this->fdd[$k]['input'],'F'); } function password($k) { return stristr($this->fdd[$k]['input'],'W'); } - function readonly($k) { return stristr($this->fdd[$k]['input'],'R') || $this->virtual($k); } - function virtual($k) { return stristr($this->fdd[$k]['input'],'V') && $this->col_has_sql($k); } + function readonly($k) { return stristr($this->fdd[$k]['input'],'R'); } + function virtual($k) { return stristr($this->fdd[$k]['input'],'V') + && ($this->col_has_sql($k) || $this->fileupload($k)); } function add_operation() { return $this->operation == $this->labels['Add'] && $this->add_enabled(); } function change_operation() { return $this->operation == $this->labels['Change'] && $this->change_enabled(); } @@ -879,7 +881,7 @@ if ($this->display['form']) { echo '
',"\n"; + echo ' enctype="multipart/form-data" action="',$page_name,'" name="'.$this->cgi['prefix']['sys'].'form">',"\n"; } return true; } /* }}} */ @@ -1096,7 +1098,7 @@ $size = isset($this->fdd[$k]['size']) ? $this->fdd[$k]['size'] : min($maxlen, 60); $size && $size_ml_props .= ' size="'.$size.'"'; $maxlen && $size_ml_props .= ' maxlength="'.$maxlen.'"'; - echo 'readonly($k) ? 'disabled ' : ''); echo 'name="',$this->cgi['prefix']['data'].$this->fds[$k],'" value="'; echo htmlspecialchars($row["qf$k"]),'" ',$size_ml_props,'>',"\n";