version 1.44, 2003/01/12 14:58:38 |
version 1.45, 2003/01/15 22:19:08 |
|
|
* http://www.platon.sk/projects/phpMyEdit/ |
* http://www.platon.sk/projects/phpMyEdit/ |
*/ |
*/ |
|
|
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.43 2003/01/03 14:33:36 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.44 2003/01/12 14:58:38 nepto Exp $ */ |
|
|
/* phpMyEdit intro {{{ */ |
/* phpMyEdit intro {{{ */ |
/* |
/* |
|
|
if (is_numeric($k)) { |
if (is_numeric($k)) { |
$k = $this->fds[$k]; |
$k = $this->fds[$k]; |
} |
} |
$options = $this->fdd[$k]['options']; |
$options = @$this->fdd[$k]['options']; |
|
|
if (! isset($options)) |
if (! isset($options)) |
return true; |
return true; |
Line 1274 function phpMyEdit_form_control(theForm) |
|
Line 1274 function phpMyEdit_form_control(theForm) |
|
|
|
function get_cgi_var($name, $default_value = null) /* {{{ */ |
function get_cgi_var($name, $default_value = null) /* {{{ */ |
{ |
{ |
//echo 'get_cgi_var(): requested: '.htmlspecialchars($name).'<br>'; |
|
if (isset($this) && isset($this->cgi['overwrite'][$name])) { |
if (isset($this) && isset($this->cgi['overwrite'][$name])) { |
return $this->cgi['overwrite'][$name]; |
return $this->cgi['overwrite'][$name]; |
} |
} |
global $HTTP_GET_VARS; |
|
$var = $HTTP_GET_VARS[$name]; |
|
|
|
|
global $HTTP_GET_VARS; |
|
$var = @$HTTP_GET_VARS[$name]; |
if (! isset($var)) { |
if (! isset($var)) { |
global $HTTP_POST_VARS; |
global $HTTP_POST_VARS; |
$var = $HTTP_POST_VARS[$name]; |
$var = @$HTTP_POST_VARS[$name]; |
} |
} |
|
|
if (isset($var)) { |
if (isset($var)) { |
if (is_array($var)) { |
if (is_array($var)) { |
foreach (array_keys($var) as $key) { |
foreach (array_keys($var) as $key) { |
Line 1295 function phpMyEdit_form_control(theForm) |
|
Line 1293 function phpMyEdit_form_control(theForm) |
|
$var = stripslashes($var); |
$var = stripslashes($var); |
} |
} |
} else { |
} else { |
$var = $default_value; |
$var = @$default_value; |
} |
} |
|
|
if (isset($this) && $var === null && isset($this->cgi['append'][$name])) { |
if (isset($this) && $var === null && isset($this->cgi['append'][$name])) { |
return $this->cgi['append'][$name]; |
return $this->cgi['append'][$name]; |
} |
} |
|
|
return $var; |
return $var; |
} /* }}} */ |
} /* }}} */ |
|
|
Line 2590 function phpMyEdit_form_control(theForm) |
|
Line 2587 function phpMyEdit_form_control(theForm) |
|
if ($this->displayed[$field_num] = $this->displayed($field_num)) { |
if ($this->displayed[$field_num] = $this->displayed($field_num)) { |
$num_fields_displayed++; |
$num_fields_displayed++; |
} |
} |
/* I *really* want to know what does this foreach() do! |
if (is_array(@$aval['values']) && (! @$aval['values']['table'])) { |
-- Nepto [17/10/2002] */ |
|
if (is_array($aval['values']) && (! $aval['values']['table'])) { |
|
$values = array(); |
$values = array(); |
foreach ($aval['values'] as $val) { |
foreach ($aval['values'] as $val) { |
$values[$val] = $val; |
$values[$val] = $val; |
Line 2600 function phpMyEdit_form_control(theForm) |
|
Line 2595 function phpMyEdit_form_control(theForm) |
|
$aval['values'] = $values; |
$aval['values'] = $values; |
} |
} |
$this->fdd[$field_num] = $aval; |
$this->fdd[$field_num] = $aval; |
$aval['help'] && $this->guidance = true; |
@$aval['help'] && $this->guidance = true; |
$field_num++; |
$field_num++; |
} |
} |
if (0) { |
if (0) { |
Line 2831 function phpMyEdit_form_control(theForm) |
|
Line 2826 function phpMyEdit_form_control(theForm) |
|
$this->notify = @$opts['notify']; |
$this->notify = @$opts['notify']; |
$this->logtable = @$opts['logtable']; |
$this->logtable = @$opts['logtable']; |
$this->page_name = $this->tb; |
$this->page_name = $this->tb; |
$opts['page_name'] && $this->page_name = $opts['page_name']; |
isset($opts['page_name']) && $this->page_name = $opts['page_name']; |
|
|
// alternate row background colors |
// alternate row background colors |
/* What's this?! |
/* What's this?! |
Line 2858 function phpMyEdit_form_control(theForm) |
|
Line 2853 function phpMyEdit_form_control(theForm) |
|
} |
} |
|
|
// language labels (must go after navigation) |
// language labels (must go after navigation) |
$this->labels = $this->make_language_labels($opts['language'] |
$this->labels = $this->make_language_labels(isset($opts['language']) |
? $opts['language'] : $this->get_server_var('HTTP_ACCEPT_LANGUAGE')); |
? $opts['language'] : $this->get_server_var('HTTP_ACCEPT_LANGUAGE')); |
|
|
// CGI variables |
// CGI variables |
$this->cgi['append'] = $opts['cgi']['append']; |
$this->cgi['append'] = @$opts['cgi']['append']; |
$this->cgi['overwrite'] = $opts['cgi']['overwrite']; |
$this->cgi['overwrite'] = @$opts['cgi']['overwrite']; |
$this->cgi['persist'] = ''; |
$this->cgi['persist'] = ''; |
if (@is_array($opts['cgi']['persist'])) { |
if (@is_array($opts['cgi']['persist'])) { |
foreach ($opts['cgi']['persist'] as $key => $val) { |
foreach ($opts['cgi']['persist'] as $key => $val) { |