| version 1.3, 2006/06/21 18:14:04 |
version 1.4, 2006/09/16 23:01:13 |
|
|
| * http://platon.sk/projects/phpMyEdit/ |
* http://platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.167 2005/04/03 09:55:38 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.188 2006-09-08 16:30:31 michal 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 col_has_sql($k) { return isset($this->fdd[$k]['sql']); } |
function col_has_sql($k) { return isset($this->fdd[$k]['sql']); } |
| function col_has_sqlw($k) { return isset($this->fdd[$k]['sqlw']) && !$this->virtual($k); } |
function col_has_sqlw($k) { return isset($this->fdd[$k]['sqlw']) && !$this->virtual($k); } |
| function col_has_values($k) { return isset($this->fdd[$k]['values']) || isset($this->fdd[$k]['values2']); } |
function col_has_values($k) { return isset($this->fdd[$k]['values']) || isset($this->fdd[$k]['values2']); } |
| |
function col_has_php($k) { return isset($this->fdd[$k]['php']); } |
| function col_has_URL($k) { return isset($this->fdd[$k]['URL']) |
function col_has_URL($k) { return isset($this->fdd[$k]['URL']) |
| || isset($this->fdd[$k]['URLprefix']) || isset($this->fdd[$k]['URLpostfix']); } |
|| isset($this->fdd[$k]['URLprefix']) || isset($this->fdd[$k]['URLpostfix']); } |
| |
function col_has_multiple($k) |
| |
{ return $this->col_has_multiple_select($k) || $this->col_has_checkboxes($k); } |
| function col_has_multiple_select($k) |
function col_has_multiple_select($k) |
| { return $this->fdd[$k]['select'] == 'M' && ! $this->fdd[$k]['values']['table']; } |
{ return $this->fdd[$k]['select'] == 'M' && ! $this->fdd[$k]['values']['table']; } |
| |
function col_has_checkboxes($k) |
| |
{ return $this->fdd[$k]['select'] == 'C' && ! $this->fdd[$k]['values']['table']; } |
| |
function col_has_radio_buttons($k) |
| |
{ return $this->fdd[$k]['select'] == 'O' && ! $this->fdd[$k]['values']['table']; } |
| function col_has_datemask($k) |
function col_has_datemask($k) |
| { return isset($this->fdd[$k]['datemask']) || isset($this->fdd[$k]['strftimemask']); } |
{ return isset($this->fdd[$k]['datemask']) || isset($this->fdd[$k]['strftimemask']); } |
| |
|
|
|
| if (in_array('*', $m)) { |
if (in_array('*', $m)) { |
| continue; |
continue; |
| } |
} |
| if ($this->col_has_values($k) && $this->col_has_multiple_select($k)) { |
if ($this->col_has_values($k) && $this->col_has_multiple($k)) { |
| foreach (array_keys($m) as $key) { |
foreach (array_keys($m) as $key) { |
| $m[$key] = addslashes($m[$key]); |
$m[$key] = addslashes($m[$key]); |
| } |
} |
| Line 850 function '.$this->js['prefix'].'form_con |
|
| Line 857 function '.$this->js['prefix'].'form_con |
|
| echo ' |
echo ' |
| alert("'; |
alert("'; |
| if (isset($this->fdd[$k]['js']['hint'])) { |
if (isset($this->fdd[$k]['js']['hint'])) { |
| echo $this->fdd[$k]['js']['hint']; |
echo htmlspecialchars($this->fdd[$k]['js']['hint']); |
| } else { |
} else { |
| echo $this->labels['Please enter'],' ',$this->fdd[$k]['name'],'.'; |
echo $this->labels['Please enter'],' ',$this->fdd[$k]['name'],'.'; |
| } |
} |
| Line 949 function '.$this->js['prefix'].'filter_h |
|
| Line 956 function '.$this->js['prefix'].'filter_h |
|
| } |
} |
| $css_postfix = @$this->fdd[$k]['css']['postfix']; |
$css_postfix = @$this->fdd[$k]['css']['postfix']; |
| $css_class_name = $this->getCSSclass('input', null, 'next', $css_postfix); |
$css_class_name = $this->getCSSclass('input', null, 'next', $css_postfix); |
| |
$escape = isset($this->fdd[$k]['escape']) ? $this->fdd[$k]['escape'] : true; |
| echo '<tr class="',$this->getCSSclass('row', null, true, $css_postfix),'">',"\n"; |
echo '<tr class="',$this->getCSSclass('row', null, true, $css_postfix),'">',"\n"; |
| echo '<td class="',$this->getCSSclass('key', null, true, $css_postfix),'">'; |
echo '<td class="',$this->getCSSclass('key', null, true, $css_postfix),'">'; |
| echo $this->fdd[$k]['name'],'</td>',"\n"; |
echo $this->fdd[$k]['name'],'</td>',"\n"; |
| Line 957 function '.$this->js['prefix'].'filter_h |
|
| Line 965 function '.$this->js['prefix'].'filter_h |
|
| if ($this->col_has_values($k)) { |
if ($this->col_has_values($k)) { |
| $vals = $this->set_values($k); |
$vals = $this->set_values($k); |
| $selected = @$this->fdd[$k]['default']; |
$selected = @$this->fdd[$k]['default']; |
| $multiple = $this->col_has_multiple_select($k); |
$multiple = $this->col_has_multiple($k); |
| $readonly = $this->readonly($k); |
$readonly = $this->readonly($k); |
| $strip_tags = true; |
$strip_tags = true; |
| $escape = true; |
//$escape = true; |
| echo $this->htmlSelect($this->cgi['prefix']['data'].$this->fds[$k], $css_class_name, |
if ($this->col_has_checkboxes($k) || $this->col_has_radio_buttons($k)) { |
| $vals, $selected, $multiple, $readonly, $strip_tags, $escape); |
echo $this->htmlRadioCheck($this->cgi['prefix']['data'].$this->fds[$k], |
| |
$css_class_name, $vals, $selected, $multiple, $readonly, |
| |
$strip_tags, $escape); |
| |
} else { |
| |
echo $this->htmlSelect($this->cgi['prefix']['data'].$this->fds[$k], |
| |
$css_class_name, $vals, $selected, $multiple, $readonly, |
| |
$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 '<textarea class="',$css_class_name,'" name="',$this->cgi['prefix']['data'].$this->fds[$k],'"'; |
| echo ($this->readonly($k) ? ' disabled' : ''); |
echo ($this->readonly($k) ? ' disabled="disabled"' : ''); |
| if (intval($this->fdd[$k]['textarea']['rows']) > 0) { |
if (intval($this->fdd[$k]['textarea']['rows']) > 0) { |
| echo ' rows="',$this->fdd[$k]['textarea']['rows'],'"'; |
echo ' rows="',$this->fdd[$k]['textarea']['rows'],'"'; |
| } |
} |
| Line 977 function '.$this->js['prefix'].'filter_h |
|
| Line 992 function '.$this->js['prefix'].'filter_h |
|
| } else { |
} else { |
| echo ' wrap="virtual"'; |
echo ' wrap="virtual"'; |
| } |
} |
| echo '>',htmlspecialchars($this->fdd[$k]['default']),'</textarea>',"\n"; |
echo '>'; |
| |
if($escape) echo htmlspecialchars($this->fdd[$k]['default']); |
| |
else echo $this->fdd[$k]['default']; |
| |
echo '</textarea>',"\n"; |
| |
} elseif ($this->col_has_php($k)) { |
| |
echo include($this->fdd[$k]['php']); |
| } else { |
} else { |
| // Simple edit box required |
// Simple edit box required |
| $size_ml_props = ''; |
$size_ml_props = ''; |
| Line 987 function '.$this->js['prefix'].'filter_h |
|
| Line 1007 function '.$this->js['prefix'].'filter_h |
|
| $maxlen && $size_ml_props .= ' maxlength="'.$maxlen.'"'; |
$maxlen && $size_ml_props .= ' maxlength="'.$maxlen.'"'; |
| echo '<input class="',$css_class_name,'" '; |
echo '<input class="',$css_class_name,'" '; |
| echo ($this->password($k) ? 'type="password"' : 'type="text"'); |
echo ($this->password($k) ? 'type="password"' : 'type="text"'); |
| echo ($this->readonly($k) ? ' disabled' : ''); |
echo ($this->readonly($k) ? ' disabled="disabled"' : ''); |
| echo ' name="',$this->cgi['prefix']['data'].$this->fds[$k],'"'; |
echo ' name="',$this->cgi['prefix']['data'].$this->fds[$k],'"'; |
| echo $size_ml_props,' value="'; |
echo $size_ml_props,' value="'; |
| echo htmlspecialchars($this->fdd[$k]['default']),'" />'; |
if($escape) echo htmlspecialchars($this->fdd[$k]['default']); |
| |
else echo $this->fdd[$k]['default']; |
| |
echo '" />'; |
| } |
} |
| echo '</td>',"\n"; |
echo '</td>',"\n"; |
| if ($this->guidance) { |
if ($this->guidance) { |
| Line 1078 function '.$this->js['prefix'].'filter_h |
|
| Line 1100 function '.$this->js['prefix'].'filter_h |
|
| } |
} |
| } /* }}} */ |
} /* }}} */ |
| |
|
| function display_change_field($row, $k) /* {{{ */ |
function display_change_field($row, $k) /* {{{ */ |
| { |
{ |
| $css_postfix = @$this->fdd[$k]['css']['postfix']; |
$css_postfix = @$this->fdd[$k]['css']['postfix']; |
| $css_class_name = $this->getCSSclass('input', null, true, $css_postfix); |
$css_class_name = $this->getCSSclass('input', null, true, $css_postfix); |
| |
$escape = isset($this->fdd[$k]['escape']) ? $this->fdd[$k]['escape'] : true; |
| echo '<td class="',$this->getCSSclass('value', null, true, $css_postfix),'"'; |
echo '<td class="',$this->getCSSclass('value', null, true, $css_postfix),'"'; |
| echo $this->getColAttributes($k),">\n"; |
echo $this->getColAttributes($k),">\n"; |
| if ($this->col_has_values($k)) { |
if ($this->col_has_values($k)) { |
| $vals = $this->set_values($k); |
$vals = $this->set_values($k); |
| $multiple = $this->col_has_multiple_select($k); |
$multiple = $this->col_has_multiple($k); |
| $readonly = $this->readonly($k); |
$readonly = $this->readonly($k); |
| $strip_tags = true; |
$strip_tags = true; |
| $escape = true; |
//$escape = true; |
| echo $this->htmlSelect($this->cgi['prefix']['data'].$this->fds[$k], $css_class_name, |
if ($this->col_has_checkboxes($k) || $this->col_has_radio_buttons($k)) { |
| $vals, $row["qf$k"], $multiple, $readonly, $strip_tags, $escape); |
echo $this->htmlRadioCheck($this->cgi['prefix']['data'].$this->fds[$k], |
| |
$css_class_name, $vals, $row["qf$k"], $multiple, $readonly, |
| |
$strip_tags, $escape); |
| |
} else { |
| |
echo $this->htmlSelect($this->cgi['prefix']['data'].$this->fds[$k], |
| |
$css_class_name, $vals, $row["qf$k"], $multiple, $readonly, |
| |
$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 '<textarea class="',$css_class_name,'" name="',$this->cgi['prefix']['data'].$this->fds[$k],'"'; |
| echo ($this->readonly($k) ? ' disabled' : ''); |
echo ($this->readonly($k) ? ' disabled="disabled"' : ''); |
| if (intval($this->fdd[$k]['textarea']['rows']) > 0) { |
if (intval($this->fdd[$k]['textarea']['rows']) > 0) { |
| echo ' rows="',$this->fdd[$k]['textarea']['rows'],'"'; |
echo ' rows="',$this->fdd[$k]['textarea']['rows'],'"'; |
| } |
} |
| Line 1106 function '.$this->js['prefix'].'filter_h |
|
| Line 1136 function '.$this->js['prefix'].'filter_h |
|
| } else { |
} else { |
| echo ' wrap="virtual"'; |
echo ' wrap="virtual"'; |
| } |
} |
| echo '>',htmlspecialchars($row["qf$k"]),'</textarea>',"\n"; |
echo '>'; |
| |
if($escape) echo htmlspecialchars($row["qf$k"]); |
| |
else echo $row["qf$k"]; |
| |
echo '</textarea>',"\n"; |
| |
} elseif ($this->col_has_php($k)) { |
| |
echo include($this->fdd[$k]['php']); |
| } else { |
} else { |
| $size_ml_props = ''; |
$size_ml_props = ''; |
| $maxlen = intval($this->fdd[$k]['maxlen']); |
$maxlen = intval($this->fdd[$k]['maxlen']); |
| Line 1114 function '.$this->js['prefix'].'filter_h |
|
| Line 1149 function '.$this->js['prefix'].'filter_h |
|
| $size && $size_ml_props .= ' size="'.$size.'"'; |
$size && $size_ml_props .= ' size="'.$size.'"'; |
| $maxlen && $size_ml_props .= ' maxlength="'.$maxlen.'"'; |
$maxlen && $size_ml_props .= ' maxlength="'.$maxlen.'"'; |
| echo '<input class="',$css_class_name,'" type="text" '; |
echo '<input class="',$css_class_name,'" type="text" '; |
| echo ($this->readonly($k) ? 'disabled ' : ''); |
echo ($this->readonly($k) ? 'disabled="disabled" ' : ''); |
| echo 'name="',$this->cgi['prefix']['data'].$this->fds[$k],'" value="'; |
echo 'name="',$this->cgi['prefix']['data'].$this->fds[$k],'" value="'; |
| echo htmlspecialchars($row["qf$k"]),'" ',$size_ml_props,' />',"\n"; |
if($escape) echo htmlspecialchars($row["qf$k"]); |
| |
else echo $row["qf$k"]; |
| |
echo '" />',"\n"; |
| } |
} |
| echo '</td>',"\n"; |
echo '</td>',"\n"; |
| } /* }}} */ |
} /* }}} */ |
| Line 1132 function '.$this->js['prefix'].'filter_h |
|
| Line 1169 function '.$this->js['prefix'].'filter_h |
|
| $size && $size_ml_props .= ' size="'.$size.'"'; |
$size && $size_ml_props .= ' size="'.$size.'"'; |
| $maxlen && $size_ml_props .= ' maxlength="'.$maxlen.'"'; |
$maxlen && $size_ml_props .= ' maxlength="'.$maxlen.'"'; |
| echo '<input class="',$this->getCSSclass('value', null, true, $css_postfix),'" type="password" '; |
echo '<input class="',$this->getCSSclass('value', null, true, $css_postfix),'" type="password" '; |
| echo ($this->readonly($k) ? 'disabled ' : ''); |
echo ($this->readonly($k) ? 'disabled="disabled" ' : ''); |
| echo 'name="',$this->cgi['prefix']['data'].$this->fds[$k],'" value="'; |
echo 'name="',$this->cgi['prefix']['data'].$this->fds[$k],'" value="'; |
| echo htmlspecialchars($row["qf$k"]),'" ',$size_ml_props,' />',"\n"; |
echo htmlspecialchars($row["qf$k"]),'" ',$size_ml_props,' />',"\n"; |
| echo '</td>',"\n"; |
echo '</td>',"\n"; |
| Line 1301 function '.$this->js['prefix'].'filter_h |
|
| Line 1338 function '.$this->js['prefix'].'filter_h |
|
| $escape = false; |
$escape = false; |
| } |
} |
| } |
} |
| |
} elseif (isset($this->fdd[$k]['values2'][$row["qf$k"]])) { |
| |
$value = $this->fdd[$k]['values2'][$row["qf$k"]]; |
| } else { |
} else { |
| $value = $row["qf$k"]; |
$value = $row["qf$k"]; |
| } |
} |
| Line 1327 function '.$this->js['prefix'].'filter_h |
|
| Line 1366 function '.$this->js['prefix'].'filter_h |
|
| if (@$this->fdd[$k]['mask']) { |
if (@$this->fdd[$k]['mask']) { |
| $value = sprintf($this->fdd[$k]['mask'], $value); |
$value = sprintf($this->fdd[$k]['mask'], $value); |
| } |
} |
| |
if ($this->col_has_php($k)) { |
| |
return include($this->fdd[$k]['php']); |
| |
} |
| if ($this->col_has_URL($k)) { |
if ($this->col_has_URL($k)) { |
| return $this->urlDisplay($k, $original_value, $value, $css, $key_rec); |
return $this->urlDisplay($k, $original_value, $value, $css, $key_rec); |
| } |
} |
| Line 1353 function '.$this->js['prefix'].'filter_h |
|
| Line 1395 function '.$this->js['prefix'].'filter_h |
|
| { |
{ |
| // Note that <input disabled> isn't valid HTML, but most browsers support it |
// Note that <input disabled> isn't valid HTML, but most browsers support it |
| if($disabled == -1) return; |
if($disabled == -1) return; |
| $markdisabled = $disabled ? ' disabled' : ''; |
$markdisabled = $disabled ? ' disabled="disabled"' : ''; |
| $ret = '<input'.$markdisabled.' type="submit" class="'.$css_class_name |
$ret = '<input'.$markdisabled.' type="submit" class="'.$css_class_name |
| .'" name="'.$this->cgi['prefix']['sys'].ltrim($markdisabled).$name |
.'" name="'.$this->cgi['prefix']['sys'].ltrim($markdisabled).$name |
| .'" value="'.(isset($this->labels[$label]) ? $this->labels[$label] : $label); |
.'" value="'.(isset($this->labels[$label]) ? $this->labels[$label] : $label); |
| if ($js_validation) { |
if ($js_validation) { |
| $ret .= '" onClick="return '.$this->js['prefix'].'form_control(this.form);'; |
$ret .= '" onclick="return '.$this->js['prefix'].'form_control(this.form);'; |
| } |
} |
| $ret .='"'; |
$ret .='"'; |
| if(isset($js)) $ret .= ' '.$js; |
if(isset($js)) $ret .= ' '.$js; |
| Line 1401 function '.$this->js['prefix'].'filter_h |
|
| Line 1443 function '.$this->js['prefix'].'filter_h |
|
| * @param readonly bool for readonly/disabled selection |
* @param readonly bool for readonly/disabled selection |
| * @param strip_tags bool for stripping tags from values |
* @param strip_tags bool for stripping tags from values |
| * @param escape bool for HTML escaping values |
* @param escape bool for HTML escaping values |
| * @param js string to be in the <select >, ususally onChange='..'; |
* @param js string to be in the <select >, ususally onchange='..'; |
| */ |
*/ |
| function htmlSelect($name, $css, $kv_array, $selected = null, /* ...) {{{ */ |
function htmlSelect($name, $css, $kv_array, $selected = null, /* ...) {{{ */ |
| /* booleans: */ $multiple = false, $readonly = false, $strip_tags = false, $escape = true, $js = NULL) |
/* booleans: */ $multiple = false, $readonly = false, $strip_tags = false, $escape = true, $js = NULL) |
| Line 1413 function '.$this->js['prefix'].'filter_h |
|
| Line 1455 function '.$this->js['prefix'].'filter_h |
|
| $selected = explode(',', $selected); |
$selected = explode(',', $selected); |
| } |
} |
| } |
} |
| $ret .= '"'.($readonly ? ' disabled' : '').$js.'>'."\n"; |
$ret .= '"'.($readonly ? ' disabled="disabled"' : '').$js.'>'."\n"; |
| if (! is_array($selected)) { |
if (! is_array($selected)) { |
| $selected = $selected === null ? array() : array($selected); |
$selected = $selected === null ? array() : array($selected); |
| } |
} |
| Line 1422 function '.$this->js['prefix'].'filter_h |
|
| Line 1464 function '.$this->js['prefix'].'filter_h |
|
| $ret .= '<option value="'.htmlspecialchars($key).'"'; |
$ret .= '<option value="'.htmlspecialchars($key).'"'; |
| if ((! $found || $multiple) && in_array((string) $key, $selected, 1) |
if ((! $found || $multiple) && in_array((string) $key, $selected, 1) |
| || (count($selected) == 0 && ! $found && ! $multiple)) { |
|| (count($selected) == 0 && ! $found && ! $multiple)) { |
| $ret .= ' selected'; |
$ret .= ' selected="selected"'; |
| $found = true; |
$found = true; |
| } |
} |
| $strip_tags && $value = strip_tags($value); |
$strip_tags && $value = strip_tags($value); |
| Line 1433 function '.$this->js['prefix'].'filter_h |
|
| Line 1475 function '.$this->js['prefix'].'filter_h |
|
| return $ret; |
return $ret; |
| } /* }}} */ |
} /* }}} */ |
| |
|
| |
/** |
| |
* Creates HTML checkboxes or radio buttons |
| |
* |
| |
* @param name element name |
| |
* @param css CSS class name |
| |
* @param kv_array key => value array |
| |
* @param selected selected key (it can be single string, array of |
| |
* keys or multiple values separated by comma) |
| |
* @param multiple bool for multiple selection (checkboxes) |
| |
* @param readonly bool for readonly/disabled selection |
| |
* @param strip_tags bool for stripping tags from values |
| |
* @param escape bool for HTML escaping values |
| |
* @param js string to be in the <select >, ususally onchange='..'; |
| |
*/ |
| |
function htmlRadioCheck($name, $css, $kv_array, $selected = null, /* ...) {{{ */ |
| |
/* booleans: */ $multiple = false, $readonly = false, $strip_tags = false, $escape = true, $js = NULL) |
| |
{ |
| |
$ret = ''; |
| |
if ($multiple) { |
| |
if (! is_array($selected) && $selected !== null) { |
| |
$selected = explode(',', $selected); |
| |
} |
| |
} |
| |
if (! is_array($selected)) { |
| |
$selected = $selected === null ? array() : array($selected); |
| |
} |
| |
$found = false; |
| |
foreach ($kv_array as $key => $value) { |
| |
$ret .= '<input type="'.($multiple ? 'checkbox' : 'radio').'" name="'; |
| |
$ret .= htmlspecialchars($name).'[]" value="'.htmlspecialchars($key).'"'; |
| |
if ((! $found || $multiple) && in_array((string) $key, $selected, 1) |
| |
|| (count($selected) == 0 && ! $found && ! $multiple)) { |
| |
$ret .= ' checked'; |
| |
$found = true; |
| |
} |
| |
if ($readonly) { |
| |
$ret .= ' disabled="disabled"'; |
| |
} |
| |
$strip_tags && $value = strip_tags($value); |
| |
$escape && $value = htmlspecialchars($value); |
| |
$ret .= '>'.$value.'<br>'."\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. |
| * |
* |
| Line 1779 function '.$this->js['prefix'].'filter_h |
|
| Line 1866 function '.$this->js['prefix'].'filter_h |
|
| } |
} |
| if ($name == 'savedelete') { |
if ($name == 'savedelete') { |
| $enabled = $this->delete_enabled(); |
$enabled = $this->delete_enabled(); |
| $js = 'onClick="return confirm(\''.$this->labels['Delete'].' ?\');"'; |
$js = 'onclick="return confirm(\''.$this->labels['Delete'].' ?\');"'; |
| return $this->htmlSubmit('savedelete', 'Delete', |
return $this->htmlSubmit('savedelete', 'Delete', |
| $this->getCSSclass('save', $position), false, $enabled ? 0 : $disabled, $js); |
$this->getCSSclass('save', $position), false, $enabled ? 0 : $disabled, $js); |
| } |
} |
| Line 1815 function '.$this->js['prefix'].'filter_h |
|
| Line 1902 function '.$this->js['prefix'].'filter_h |
|
| $ret .= ' name="'.$this->cgi['prefix']['sys'].'navpn'.$position.'" value="'.($current_page+1).'"'; |
$ret .= ' name="'.$this->cgi['prefix']['sys'].'navpn'.$position.'" value="'.($current_page+1).'"'; |
| $ret .= ' size="'.(strlen($total_pages)+1).'" maxlength="'.(strlen($total_pages)+1).'"'; |
$ret .= ' size="'.(strlen($total_pages)+1).'" maxlength="'.(strlen($total_pages)+1).'"'; |
| // TODO some js here.... on enter submit, on click erase ?... |
// TODO some js here.... on enter submit, on click erase ?... |
| $ret .=' onKeyPress="return PE_filter_handler(this.form, event);" />'; |
$ret .=' oneypress="return PE_filter_handler(this.form, event);" />'; |
| return $ret; |
return $ret; |
| } |
} |
| if ($name == 'goto_combo') { |
if ($name == 'goto_combo') { |
| Line 1825 function '.$this->js['prefix'].'filter_h |
|
| Line 1912 function '.$this->js['prefix'].'filter_h |
|
| for ($i = 0; $i < $total_pages; $i++) { |
for ($i = 0; $i < $total_pages; $i++) { |
| $kv_array[$this->inc * $i] = $i + 1; |
$kv_array[$this->inc * $i] = $i + 1; |
| } |
} |
| // TODO: add onChange="return this.form.submit();" DONE ??? |
// TODO: add onchange="return this.form.submit();" DONE ??? |
| return $this->htmlSelect($this->cgi['prefix']['sys'].ltrim($disabledgoto).'navfm'.$position, |
return $this->htmlSelect($this->cgi['prefix']['sys'].ltrim($disabledgoto).'navfm'.$position, |
| $this->getCSSclass('goto', $position), $kv_array, (string)$this->fm, false, $disabledgoto, |
$this->getCSSclass('goto', $position), $kv_array, (string)$this->fm, false, $disabledgoto, |
| false, true, 'onChange="return this.form.submit();"'); |
false, true, 'onchange="return this.form.submit();"'); |
| } |
} |
| if ($name == 'goto') { |
if ($name == 'goto') { |
| return $this->htmlSubmit('navop', 'Go to', $this->getCSSclass('goto', $position), |
return $this->htmlSubmit('navop', 'Go to', $this->getCSSclass('goto', $position), |
| Line 2115 function '.$this->js['prefix'].'filter_h |
|
| Line 2202 function '.$this->js['prefix'].'filter_h |
|
| } |
} |
| echo '<input class="',$css_class_name,'" value="',htmlspecialchars(@$m); |
echo '<input class="',$css_class_name,'" value="',htmlspecialchars(@$m); |
| echo '" type="text" name="'.$this->cgi['prefix']['sys'].'qf'.$k.'"',$size_ml_props; |
echo '" type="text" name="'.$this->cgi['prefix']['sys'].'qf'.$k.'"',$size_ml_props; |
| echo ' onKeyPress="return '.$this->js['prefix'].'filter_handler(this.form, event);" />'; |
echo ' onkeypress="return '.$this->js['prefix'].'filter_handler(this.form, event);" />'; |
| } else { |
} else { |
| echo ' '; |
echo ' '; |
| } |
} |
| Line 3223 function '.$this->js['prefix'].'filter_h |
|
| Line 3310 function '.$this->js['prefix'].'filter_h |
|
| * }}} */ |
* }}} */ |
| |
|
| ?> |
?> |
| |
|