| version 1.168, 2006/01/22 21:43:59 |
version 1.169, 2006/01/24 16:19:43 |
|
|
| |
|
| <?php |
<?php |
| |
|
| /* |
/* |
|
|
| echo "</pre>\n"; |
echo "</pre>\n"; |
| } else { |
} else { |
| echo 'debug_var()::<i>',htmlspecialchars($name),'</i>'; |
echo 'debug_var()::<i>',htmlspecialchars($name),'</i>'; |
| echo '::<b>',htmlspecialchars($val),'</b>::',"<br>\n"; |
echo '::<b>',htmlspecialchars($val),'</b>::',"<br />\n";
|
| } |
} |
| } /* }}} */ |
} /* }}} */ |
| |
|
|
|
| global $debug_query; |
global $debug_query; |
| if ($debug_query || $debug) { |
if ($debug_query || $debug) { |
| $line = intval($line); |
$line = intval($line); |
| echo '<h4>MySQL query at line ',$line,'</h4>',htmlspecialchars($qry),'<hr>',"\n"; |
echo '<h4>MySQL query at line ',$line,'</h4>',htmlspecialchars($qry),'<hr />',"\n";
|
| } |
} |
| if (isset($this->db)) { |
if (isset($this->db)) { |
| $ret = @mysql_db_query($this->db, $qry, $this->dbh); |
$ret = @mysql_db_query($this->db, $qry, $this->dbh); |
|
|
| } |
} |
| if (! $ret) { |
if (! $ret) { |
| echo '<h4>MySQL error ',mysql_errno($this->dbh),'</h4>'; |
echo '<h4>MySQL error ',mysql_errno($this->dbh),'</h4>'; |
| echo htmlspecialchars(mysql_error($this->dbh)),'<hr>',"\n"; |
echo htmlspecialchars(mysql_error($this->dbh)),'<hr />',"\n";
|
| } |
} |
| return $ret; |
return $ret; |
| } /* }}} */ |
} /* }}} */ |
| Line 888 function '.$this->js['prefix'].'filter_h |
|
| Line 887 function '.$this->js['prefix'].'filter_h |
|
| } |
} |
| |
|
| if ($this->display['form']) { |
if ($this->display['form']) { |
| echo '<form class="',$this->getCSSclass('form'),'" method="POST"'; |
echo '<form class="',$this->getCSSclass('form'),'" method="post"';
|
| echo ' action="',$page_name,'" name="'.$this->cgi['prefix']['sys'].'form">',"\n"; |
echo ' action="',$page_name,'" name="'.$this->cgi['prefix']['sys'].'form">',"\n"; |
| } |
} |
| return true; |
return true; |
| Line 906 function '.$this->js['prefix'].'filter_h |
|
| Line 905 function '.$this->js['prefix'].'filter_h |
|
| if (! is_array($this->tabs)) { |
if (! is_array($this->tabs)) { |
| return false; |
return false; |
| } |
} |
| echo '<table class="',$this->getCSSclass('tab', $position),'">',"\n"; |
echo '<table summary="labels" class="',$this->getCSSclass('tab', $position),'">',"\n";
|
| echo '<tr class="',$this->getCSSclass('tab', $position),'">',"\n"; |
echo '<tr class="',$this->getCSSclass('tab', $position),'">',"\n"; |
| for ($i = ($this->tabs[0] == 'PMEtab0' ? 1 : 0); $i < count($this->tabs); $i++) { |
for ($i = ($this->tabs[0] == 'PMEtab0' ? 1 : 0); $i < count($this->tabs); $i++) { |
| $css_class_name = $this->getCSSclass($i != $this->cur_tab ? 'tab' : 'tab-selected', $position); |
$css_class_name = $this->getCSSclass($i != $this->cur_tab ? 'tab' : 'tab-selected', $position); |
| Line 984 function '.$this->js['prefix'].'filter_h |
|
| Line 983 function '.$this->js['prefix'].'filter_h |
|
| echo ($this->readonly($k) ? ' disabled' : ''); |
echo ($this->readonly($k) ? ' 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']),'">'; |
echo htmlspecialchars($this->fdd[$k]['default']),'" />';
|
| } |
} |
| echo '</td>',"\n"; |
echo '</td>',"\n"; |
| if ($this->guidance) { |
if ($this->guidance) { |
| Line 1110 function '.$this->js['prefix'].'filter_h |
|
| Line 1109 function '.$this->js['prefix'].'filter_h |
|
| 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 ' : ''); |
| 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 1128 function '.$this->js['prefix'].'filter_h |
|
| Line 1127 function '.$this->js['prefix'].'filter_h |
|
| 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 ' : ''); |
| 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 1355 function '.$this->js['prefix'].'filter_h |
|
| Line 1354 function '.$this->js['prefix'].'filter_h |
|
| } |
} |
| $ret .='"'; |
$ret .='"'; |
| if(isset($js)) $ret .= ' '.$js; |
if(isset($js)) $ret .= ' '.$js; |
| $ret .= '>'; |
$ret .= ' />';
|
| return $ret; |
return $ret; |
| } /* }}} */ |
} /* }}} */ |
| |
|
| Line 1379 function '.$this->js['prefix'].'filter_h |
|
| Line 1378 function '.$this->js['prefix'].'filter_h |
|
| function htmlHidden($name, $value) /* {{{ */ |
function htmlHidden($name, $value) /* {{{ */ |
| { |
{ |
| return '<input type="hidden" name="'.htmlspecialchars($name) |
return '<input type="hidden" name="'.htmlspecialchars($name) |
| .'" value="'.htmlspecialchars($value).'"/>'."\n"; |
.'" value="'.htmlspecialchars($value).'" />'."\n";
|
| } /* }}} */ |
} /* }}} */ |
| |
|
| /** |
/** |
| Line 1434 function '.$this->js['prefix'].'filter_h |
|
| Line 1433 function '.$this->js['prefix'].'filter_h |
|
| * if null, empty values will be skipped |
* if null, empty values will be skipped |
| * @return get HTML code of original varaibles |
* @return get HTML code of original varaibles |
| */ |
*/ |
| function get_origvars_html($origvars, $method = 'POST', $default_value = '') /* {{{ */ |
function get_origvars_html($origvars, $method = 'post', $default_value = '') /* {{{ */
|
| { |
{ |
| $ret = ''; |
$ret = ''; |
| $method = strtoupper($method); |
$method = strtoupper($method); |
| Line 1684 function '.$this->js['prefix'].'filter_h |
|
| Line 1683 function '.$this->js['prefix'].'filter_h |
|
| { |
{ |
| if (($but_str = $this->display_buttons($position)) === null) |
if (($but_str = $this->display_buttons($position)) === null) |
| return; |
return; |
| if($position == 'down') echo '<hr class="'.$this->getCSSclass('hr', 'down').'">'."\n"; |
if($position == 'down') echo '<hr class="'.$this->getCSSclass('hr', 'down').'" />'."\n";
|
| echo '<table class="',$this->getCSSclass('navigation', $position),'">',"\n"; |
echo '<table summary="navigation" class="',$this->getCSSclass('navigation', $position),'">',"\n";
|
| echo '<tr class="',$this->getCSSclass('navigation', $position),'">',"\n"; |
echo '<tr class="',$this->getCSSclass('navigation', $position),'">',"\n"; |
| echo '<td class="',$this->getCSSclass('buttons', $position),'">',"\n"; |
echo '<td class="',$this->getCSSclass('buttons', $position),'">',"\n"; |
| echo $but_str,'</td>',"\n"; |
echo $but_str,'</td>',"\n"; |
| Line 1709 function '.$this->js['prefix'].'filter_h |
|
| Line 1708 function '.$this->js['prefix'].'filter_h |
|
| echo ' ',$this->labels['Records'],': ',$this->total_recs; |
echo ' ',$this->labels['Records'],': ',$this->total_recs; |
| if($this->display['num_pages'] || $this->display['num_records']) echo '</td>'; |
if($this->display['num_pages'] || $this->display['num_records']) echo '</td>'; |
| echo '</tr></table>',"\n"; |
echo '</tr></table>',"\n"; |
| if($position == 'up') echo '<hr class="'.$this->getCSSclass('hr', 'up').'">'."\n"; |
if($position == 'up') echo '<hr class="'.$this->getCSSclass('hr', 'up').'" />'."\n";
|
| } /* }}} */ |
} /* }}} */ |
| |
|
| /* |
/* |
| Line 1721 function '.$this->js['prefix'].'filter_h |
|
| Line 1720 function '.$this->js['prefix'].'filter_h |
|
| return; |
return; |
| if ($position == 'down') { |
if ($position == 'down') { |
| if ($this->tabs_enabled()) $this->display_tab_labels('down'); |
if ($this->tabs_enabled()) $this->display_tab_labels('down'); |
| echo '<hr class="',$this->getCSSclass('hr', 'down'),'">',"\n"; |
echo '<hr class="',$this->getCSSclass('hr', 'down'),'" />',"\n";
|
| } |
} |
| echo '<table class="',$this->getCSSclass('navigation', $position),'">',"\n"; |
echo '<table summary="navigation" class="',$this->getCSSclass('navigation', $position),'">',"\n";
|
| echo '<tr class="',$this->getCSSclass('navigation', $position),'">',"\n"; |
echo '<tr class="',$this->getCSSclass('navigation', $position),'">',"\n"; |
| echo '<td class="',$this->getCSSclass('buttons', $position),'">',"\n"; |
echo '<td class="',$this->getCSSclass('buttons', $position),'">',"\n"; |
| echo $but_str,'</td>',"\n"; |
echo $but_str,'</td>',"\n"; |
| // Message is now written here |
// Message is now written here |
| echo '</td>',"\n"; |
//echo '</td>',"\n";
|
| if (strlen(@$this->message) > 0) { |
if (strlen(@$this->message) > 0) { |
| echo '<td class="',$this->getCSSclass('message', $position),'">',$this->message,'</td>',"\n"; |
echo '<td class="',$this->getCSSclass('message', $position),'">',$this->message,'</td>',"\n"; |
| } |
} |
| if ($position == 'up') { |
if ($position == 'up') { |
| if ($this->tabs_enabled()) $this->display_tab_labels('up'); |
if ($this->tabs_enabled()) $this->display_tab_labels('up'); |
| echo '<hr class="',$this->getCSSclass('hr', 'up'),'">',"\n"; |
echo '<hr class="',$this->getCSSclass('hr', 'up'),'" />',"\n";
|
| } |
} |
| echo '</tr></table>',"\n"; |
echo '</tr></table>',"\n"; |
| } /* }}} */ |
} /* }}} */ |
| Line 1805 function '.$this->js['prefix'].'filter_h |
|
| Line 1804 function '.$this->js['prefix'].'filter_h |
|
| $ret .= ' name="navpn'.$position.'" value="'.($current_page+1).'"'; |
$ret .= ' name="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 .='>'; |
$ret .=' />';
|
| return $ret; |
return $ret; |
| } |
} |
| if ($name == 'goto_combo') { |
if ($name == 'goto_combo') { |
| Line 1882 function '.$this->js['prefix'].'filter_h |
|
| Line 1881 function '.$this->js['prefix'].'filter_h |
|
| if (0) { // DEBUG |
if (0) { // DEBUG |
| echo 'qfn vs. prev_qfn comparsion '; |
echo 'qfn vs. prev_qfn comparsion '; |
| echo '[<b>',htmlspecialchars($this->qfn),'</b>]'; |
echo '[<b>',htmlspecialchars($this->qfn),'</b>]'; |
| echo '[<b>',htmlspecialchars($this->prev_qfn),'</b>]<br>'; |
echo '[<b>',htmlspecialchars($this->prev_qfn),'</b>]<br />';
|
| echo 'comparsion <u>',($this->qfn == $this->prev_qfn ? 'proved' : 'failed'),'</u>'; |
echo 'comparsion <u>',($this->qfn == $this->prev_qfn ? 'proved' : 'failed'),'</u>'; |
| echo '<hr>'; |
echo '<hr />';
|
| } |
} |
| /* |
/* |
| * If user is allowed to Change/Delete records, we need an extra column |
* If user is allowed to Change/Delete records, we need an extra column |
| Line 2106 function '.$this->js['prefix'].'filter_h |
|
| Line 2105 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 2204 function '.$this->js['prefix'].'filter_h |
|
| Line 2203 function '.$this->js['prefix'].'filter_h |
|
| echo '<a class="',$css_class_name,'" href="',$viewQuery,'"><img class="'; |
echo '<a class="',$css_class_name,'" href="',$viewQuery,'"><img class="'; |
| echo $css_class_name,'" src="',$this->url['images']; |
echo $css_class_name,'" src="',$this->url['images']; |
| echo 'pme-view.png" height="15" width="16" border="0" '; |
echo 'pme-view.png" height="15" width="16" border="0" '; |
| echo 'alt="',$viewTitle,'" title="',$viewTitle,'"></a>'; |
echo 'alt="',$viewTitle,'" title="',$viewTitle,'" /></a>';
|
| } |
} |
| if ($this->change_enabled()) { |
if ($this->change_enabled()) { |
| $printed_out && print(' '); |
$printed_out && print(' '); |
| Line 2212 function '.$this->js['prefix'].'filter_h |
|
| Line 2211 function '.$this->js['prefix'].'filter_h |
|
| echo '<a class="',$css_class_name,'" href="',$changeQuery,'"><img class="'; |
echo '<a class="',$css_class_name,'" href="',$changeQuery,'"><img class="'; |
| echo $css_class_name,'" src="',$this->url['images']; |
echo $css_class_name,'" src="',$this->url['images']; |
| echo 'pme-change.png" height="15" width="16" border="0" '; |
echo 'pme-change.png" height="15" width="16" border="0" '; |
| echo 'alt="',$changeTitle,'" title="',$changeTitle,'"></a>'; |
echo 'alt="',$changeTitle,'" title="',$changeTitle,'" /></a>';
|
| } |
} |
| if ($this->copy_enabled()) { |
if ($this->copy_enabled()) { |
| $printed_out && print(' '); |
$printed_out && print(' '); |
| Line 2220 function '.$this->js['prefix'].'filter_h |
|
| Line 2219 function '.$this->js['prefix'].'filter_h |
|
| echo '<a class="',$css_class_name,'" href="',$copyQuery,'"><img class="'; |
echo '<a class="',$css_class_name,'" href="',$copyQuery,'"><img class="'; |
| echo $css_class_name,'" src="',$this->url['images']; |
echo $css_class_name,'" src="',$this->url['images']; |
| echo 'pme-copy.png" height="15" width="16" border="0" '; |
echo 'pme-copy.png" height="15" width="16" border="0" '; |
| echo 'alt="',$copyTitle,'" title="',$copyTitle,'"></a>'; |
echo 'alt="',$copyTitle,'" title="',$copyTitle,'" /></a>';
|
| } |
} |
| if ($this->delete_enabled()) { |
if ($this->delete_enabled()) { |
| $printed_out && print(' '); |
$printed_out && print(' '); |
| Line 2228 function '.$this->js['prefix'].'filter_h |
|
| Line 2227 function '.$this->js['prefix'].'filter_h |
|
| echo '<a class="',$css_class_name,'" href="',$deleteQuery,'"><img class="'; |
echo '<a class="',$css_class_name,'" href="',$deleteQuery,'"><img class="'; |
| echo $css_class_name,'" src="',$this->url['images']; |
echo $css_class_name,'" src="',$this->url['images']; |
| echo 'pme-delete.png" height="15" width="16" border="0" '; |
echo 'pme-delete.png" height="15" width="16" border="0" '; |
| echo 'alt="',$deleteTitle,'" title="',$deleteTitle,'"></a>'; |
echo 'alt="',$deleteTitle,'" title="',$deleteTitle,'" /></a>';
|
| } |
} |
| } |
} |
| if ($this->nav_text_links()) { |
if ($this->nav_text_links()) { |
| Line 2267 function '.$this->js['prefix'].'filter_h |
|
| Line 2266 function '.$this->js['prefix'].'filter_h |
|
| echo ' checked'; |
echo ' checked'; |
| $first = false; |
$first = false; |
| } |
} |
| echo '></td>',"\n"; |
echo ' /></td>',"\n";
|
| } |
} |
| } elseif ($this->filter_enabled()) { |
} elseif ($this->filter_enabled()) { |
| echo '<td class="',$css_class_name,'" colspan=',$sys_cols,'> </td>',"\n"; |
echo '<td class="',$css_class_name,'" colspan=',$sys_cols,'> </td>',"\n"; |
| Line 2388 function '.$this->js['prefix'].'filter_h |
|
| Line 2387 function '.$this->js['prefix'].'filter_h |
|
| $this->display_copy_change_delete_record(); |
$this->display_copy_change_delete_record(); |
| } |
} |
| echo '</table>',"\n"; |
echo '</table>',"\n"; |
| |
if ($this->tabs_enabled()) {
|
| echo '</div>',"\n"; |
echo '</div>',"\n"; |
| |
}
|
| $this->display_record_buttons('down'); |
$this->display_record_buttons('down'); |
| |
|
| $this->form_end(); |
$this->form_end(); |
| Line 2871 function '.$this->js['prefix'].'filter_h |
|
| Line 2871 function '.$this->js['prefix'].'filter_h |
|
| { |
{ |
| echo '<h1>phpMyEdit error: ',htmlspecialchars($message),'</h1>',"\n"; |
echo '<h1>phpMyEdit error: ',htmlspecialchars($message),'</h1>',"\n"; |
| if ($additional_info != '') { |
if ($additional_info != '') { |
| echo '<hr>',htmlspecialchars($additional_info); |
echo '<hr />',htmlspecialchars($additional_info);
|
| } |
} |
| return false; |
return false; |
| } /* }}} */ |
} /* }}} */ |