| version 1.2, 2002/07/31 15:43:48 |
version 1.3, 2002/08/07 19:32:01 |
|
|
| */ |
*/ |
| /* }}} */ |
/* }}} */ |
| |
|
| if (@include("timer.class")) |
if (@require_once dirname(__FILE__).'/timer.class') { |
| $timer = new timerClass(); |
$timer = new timerClass(); |
| |
} |
| |
|
| function debug_var($name,$val) |
function debug_var($name,$val) |
| { |
{ |
| Line 140 class phpMyEdit { |
|
| Line 141 class phpMyEdit { |
|
| function myquery($qry, $line = 0) /* {{{ */ |
function myquery($qry, $line = 0) /* {{{ */ |
| { |
{ |
| global $debug_query; |
global $debug_query; |
| if ($debug_query) |
if ($debug_query) { |
| echo "<h4>qry at $line: $qry</h4>\n"; |
$line = intval($line); |
| |
echo '<h4>qry at '.$line.': '.htmlspecialchars($qry).'</h4><hr>'."\n"; |
| |
} |
| $this->elog("qry: $qry",$line); |
$this->elog("qry: $qry",$line); |
| $ret = @mysql_db_query($this->db,$qry); |
$ret = @mysql_db_query($this->db,$qry); |
| if (! $ret) { |
if (! $ret) { |
| Line 385 class phpMyEdit { |
|
| Line 388 class phpMyEdit { |
|
| } /* }}} */ |
} /* }}} */ |
| |
|
| /* |
/* |
| |
* get_cgi_var() |
| |
*/ |
| |
function get_cgi_var($name, $default_value = null) |
| |
{ |
| |
global $HTTP_GET_VARS; |
| |
$var = $HTTP_GET_VARS[$name]; |
| |
|
| |
if (! isset($var)) { |
| |
global $HTTP_POST_VARS; |
| |
$var = $HTTP_POST_VARS[$name]; |
| |
} |
| |
|
| |
if (isset($var)) { |
| |
$var = stripslashes($var); |
| |
} else { |
| |
$var = $default_value; |
| |
} |
| |
|
| |
return $var; |
| |
} |
| |
|
| |
/* |
| * functions for get/post/query args |
* functions for get/post/query args |
| */ |
*/ |
| |
|
| Line 408 class phpMyEdit { |
|
| Line 433 class phpMyEdit { |
|
| |
|
| for ($k = 0; $k < $this->num_fds; $k++) { |
for ($k = 0; $k < $this->num_fds; $k++) { |
| // get the field name and value |
// get the field name and value |
| $l = 'qf'.$k; |
$l = 'qf'.$k; |
| $lc = 'qf'.$k.'_comp'; |
$lc = 'qf'.$k.'_comp'; |
| global $$l,$$lc; |
// TODO: REMOVE ME |
| |
//global $$l,$$lc; |
| |
$$l = $this->get_cgi_var($l); |
| |
$$lc = $this->get_cgi_var($lc); |
| $m = $this->web2plain($$l); |
$m = $this->web2plain($$l); |
| // get the comparison operator for numeric/date types |
// get the comparison operator for numeric/date types |
| $mc = $this->web2plain($$lc); |
$mc = $this->web2plain($$lc); |
| Line 454 class phpMyEdit { |
|
| Line 482 class phpMyEdit { |
|
| } elseif ($this->col_is_number($k) && ($$lc != '')) { |
} elseif ($this->col_is_number($k) && ($$lc != '')) { |
| if ($$lc != '') { |
if ($$lc != '') { |
| $qo[$this->fqn($k)] = |
$qo[$this->fqn($k)] = |
| Array( 'oper' => $mc, 'value' => $afilter); |
Array('oper' => $mc, 'value' => $afilter); |
| } |
} |
| } elseif ($this->col_is_date($k)) { |
} elseif ($this->col_is_date($k)) { |
| #if ($$lc != '') { |
#if ($$lc != '') { |
| Line 493 class phpMyEdit { |
|
| Line 521 class phpMyEdit { |
|
| |
|
| function gather_get_vars() /* {{{ */ |
function gather_get_vars() /* {{{ */ |
| { |
{ |
| global $QUERY_STRING; |
global $HTTP_SERVER_VARS; |
| $vals = Array(); |
$vals = Array(); |
| $parts = split('&',$QUERY_STRING); |
$parts = split('&',$HTTP_SERVER_VARS['QUERY_STRING']); |
| if (count($parts) > 0) { |
if (count($parts) > 0) { |
| foreach ($parts as $part) { |
foreach ($parts as $part) { |
| list($key,$val) = split('=',$part,2); |
list($key,$val) = split('=',$part,2); |
| Line 527 class phpMyEdit { |
|
| Line 555 class phpMyEdit { |
|
| * type functions |
* type functions |
| */ |
*/ |
| |
|
| function col_is_date($k) { return in_array($this->fdd[$k]['type'],$this->dateTypes ); } |
function col_is_date($k) { return in_array($this->fdd[$k]['type'], $this->dateTypes ); } |
| function col_is_number($k) { return in_array($this->fdd[$k]['type'],$this->numberTypes); } |
function col_is_number($k) { return in_array($this->fdd[$k]['type'], $this->numberTypes); } |
| function col_is_string($k) { return in_array($this->fdd[$k]['type'],$this->stringTypes); } |
function col_is_string($k) { return in_array($this->fdd[$k]['type'], $this->stringTypes); } |
| function col_is_set($k) { return ($this->fdd[$k]['type']=='set'); } |
function col_is_set($k) { return ($this->fdd[$k]['type'] == 'set'); } |
| |
|
| /* |
/* |
| * functions for indicating whether operations are enabled |
* functions for indicating whether operations are enabled |
|
|
| echo ' </td>'."\n"; |
echo ' </td>'."\n"; |
| } // display_change_field($row, $k) /* }}} */ |
} // display_change_field($row, $k) /* }}} */ |
| |
|
| |
|
| function htmlHidden($name,$value) /* {{{ */ |
function htmlHidden($name,$value) /* {{{ */ |
| { |
{ |
| return '<input type=hidden name="'.$name.'" value="'.$value.'">'."\n"; |
return '<input type=hidden name="'.htmlspecialchars($name) |
| |
.'" value="'.htmlspecialchars($value).'">'."\n"; |
| } /* }}} */ |
} /* }}} */ |
| |
|
| function htmlSelect($var,$kv_array,$selected,$multiple=false,$nat_sort=false) /* {{{ */ |
function htmlSelect($var,$kv_array,$selected,$multiple=false,$nat_sort=false) /* {{{ */ |
|
|
| uasort($kv_array,"strnatcasecmp"); |
uasort($kv_array,"strnatcasecmp"); |
| if (! is_array($selected)) |
if (! is_array($selected)) |
| $selected = Array($selected); |
$selected = Array($selected); |
| $ret = '<select name="'.$var; |
$ret = '<select name="'.htmlspecialchars($var); |
| if ($multiple != '') |
if ($multiple != '') |
| $ret .= '[]" multiple size="'.$this->multiple; |
$ret .= '[]" multiple size="'.$this->multiple; |
| $ret .= '">'."\n"; |
$ret .= '">'."\n"; |
|
|
| |
|
| $found = false; |
$found = false; |
| foreach ($kv_array as $key=>$value) { |
foreach ($kv_array as $key=>$value) { |
| $ret .= '<option value="'.$key.'"'; |
$ret .= '<option value="'.htmlspecialchars($key).'"'; |
| if ( ( ! $found || $multiple) && is_numeric(array_search($key,$selected))) |
if ( ( ! $found || $multiple) && is_numeric(array_search($key,$selected))) |
| { |
{ |
| $ret .= ' SELECTED'; |
$ret .= ' selected'; |
| $found = true; |
$found = true; |
| } |
} |
| $ret .= ">".urldecode($value)."\n"; |
$ret .= '>'.htmlspecialchars(urldecode($value)).'</option>'."\n"; |
| //debug_var("array search $key",is_numeric(array_search($key,$selected))); |
//debug_var("array search $key",is_numeric(array_search($key,$selected))); |
| } |
} |
| $ret .= '</select>'; |
$ret .= '</select>'; |
|
|
| */ |
*/ |
| function list_table() /* {{{ */ |
function list_table() /* {{{ */ |
| { |
{ |
| global $PHP_SELF; |
global $HTTP_SERVER_VARS; |
| |
$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; |
| // Process any navigation buttons |
// Process any navigation buttons |
| |
|
| //if (!isset ($this->fm)) |
//if (!isset ($this->fm)) |
|
|
| } |
} |
| } |
} |
| if ($this->next == $this->labels['Next']) { // Next |
if ($this->next == $this->labels['Next']) { // Next |
| $this->fm = $this->fm + $this->inc; |
$this->fm += $this->inc; |
| } |
} |
| |
|
| // Process filters |
// Process filters |
|
|
| /* |
/* |
| * Set up the URLs which allow sorting by clicking on column headings |
* Set up the URLs which allow sorting by clicking on column headings |
| */ |
*/ |
| $prev_qfn = $this->qfn; |
$prev_qfn = $this->qfn; |
| $this->qfn = ''; |
$this->qfn = ''; |
| for ($k = 0; $k < $this->num_fds; $k++) { |
for ($k = 0; $k < $this->num_fds; $k++) { |
| $l = 'qf'.$k; |
$l = 'qf'.$k; |
|
|
| } |
} |
| } |
} |
| } |
} |
| echo ' <input type="hidden" name="qfn" value="'.$this->qfn.'" />'."\n"; |
echo ' <input type="hidden" name="qfn" value="'.htmlspecialchars($this->qfn).'" />'."\n"; |
| |
|
| // if sort sequence has changed, restart listing |
// if sort sequence has changed, restart listing |
| if ($this->qfn != $prev_qfn) { |
if ($this->qfn != $prev_qfn) { |
| $this->fm = 0; |
$this->fm = 0; |
| |
//var_dump($this->qfn); |
| |
//var_dump($prev_qfn); |
| } |
} |
| |
|
| echo ' <input type="hidden" name="fm" value="'.$this->fm.'" />'."\n"; |
echo ' <input type="hidden" name="fm" value="'.$this->fm.'" />'."\n"; |
|
|
| * Each row of the HTML table is one record from the SQL Query |
* Each row of the HTML table is one record from the SQL Query |
| */ |
*/ |
| //echo "<h4>".$this->query_make($qparts)."</h4>\n"; |
//echo "<h4>".$this->query_make($qparts)."</h4>\n"; |
| $res = $this->myquery($this->query_make($qparts),__LINE__); |
$res = $this->myquery($this->query_make($qparts),__LINE__); |
| $first = true; |
$first = true; |
| $eot = $this->inc; |
$eot = $this->inc; |
| $rowCount = 0; |
$rowCount = 0; |
| |
|
| if ($this->actionStyle == 'link' || $this->actionStyle == 'graphic') { |
if ($this->actionStyle == 'link' || $this->actionStyle == 'graphic') { |
|
|
| $qpdel[] = 'operation=Delete'; |
$qpdel[] = 'operation=Delete'; |
| $qpdelStr = '?'.join('&',$qpdel); |
$qpdelStr = '?'.join('&',$qpdel); |
| } |
} |
| |
|
| while ($row = mysql_fetch_array ($res)) { |
while ($row = mysql_fetch_array ($res)) { |
| $key_rec = $row[$this->key_num]; |
$key_rec = $row[$this->key_num]; |
| $qviewStr = $qpviewStr .'&rec='.$key_rec; |
$qviewStr = $qpviewStr .'&rec='.$key_rec; |
|
|
| echo '<input type="radio" name="rec" value="'.$row[$this->key_num].'"'; |
echo '<input type="radio" name="rec" value="'.$row[$this->key_num].'"'; |
| if ($first) { |
if ($first) { |
| echo ' checked'; |
echo ' checked'; |
| |
$first = false; |
| } |
} |
| echo '/>'; |
echo ' />'; |
| } elseif ($this->actionStyle == 'graphic') { |
} elseif ($this->actionStyle == 'graphic') { |
| if ($this->view_enabled()) echo "<a class=\"pme_a_t\" href=\"".$this->page_name."$qviewStr\"><img src=\"".$this->url['images']."pme-view.gif\" height=15 width=16 border=none alt=\"".$this->labels['Display']."\"></a> "; |
if ($this->view_enabled()) echo "<a class=\"pme_a_t\" href=\"".$this->page_name."$qviewStr\"><img src=\"".$this->url['images']."pme-view.gif\" height=15 width=16 border=none alt=\"".$this->labels['Display']."\"></a> "; |
| if ($this->change_enabled()) echo "<a class=\"pme_a_t\" href=\"".$this->page_name."$qchangeStr\"><img src=\"".$this->url['images']."pme-change.gif\" height=15 width=16 border=none alt=\"".$this->labels['Change']."\"></a> "; |
if ($this->change_enabled()) echo "<a class=\"pme_a_t\" href=\"".$this->page_name."$qchangeStr\"><img src=\"".$this->url['images']."pme-change.gif\" height=15 width=16 border=none alt=\"".$this->labels['Change']."\"></a> "; |
|
|
| if ($this->copy_enabled() ) echo "<a class=\"pme_a_t\" href=\"".$this->page_name."$qcopyStr\">C</a> "; |
if ($this->copy_enabled() ) echo "<a class=\"pme_a_t\" href=\"".$this->page_name."$qcopyStr\">C</a> "; |
| if ($this->delete_enabled()) echo "<a class=\"pme_a_t\" href=\"".$this->page_name."$qdelStr\">D</a> "; |
if ($this->delete_enabled()) echo "<a class=\"pme_a_t\" href=\"".$this->page_name."$qdelStr\">D</a> "; |
| } |
} |
| $first = false; |
|
| } elseif ($this->filter_enabled()) { |
} elseif ($this->filter_enabled()) { |
| echo ' '; |
echo ' '; |
| } |
} |
|
|
| |
|
| // put some conveniences in the namespace for the user |
// put some conveniences in the namespace for the user |
| // to be able to use in the URL string |
// to be able to use in the URL string |
| $key = $row[$this->key_num]; |
$key = $row[$this->key_num]; |
| $name = $this->fds[$k]; |
$name = $this->fds[$k]; |
| $value = $row[$k]; |
$value = $row[$k]; |
| $page = $this->page_name; |
$page = $this->page_name; |
| $urlquery = $urlqueryproto."&rec=$key"; |
$urlquery = $urlqueryproto."&rec=$key"; |
| // remember that $row is a mysql_fetch_array, so it contains all fields |
// remember that $row is a mysql_fetch_array, so it contains all fields |
| //debug_var('URL',$this->fdd[$k]); |
//debug_var('URL',$this->fdd[$k]); |
| //debug_var('urlquery',$urlquery); |
//debug_var('urlquery',$urlquery); |
| // it's built, now eval it |
// it's built, now eval it |
| $urlstr = eval('return "'.$urlquery.'";'); |
$urlstr = eval('return "'.$urlquery.'";'); |
| //debug_var('urlstr',$urlstr); |
//debug_var('urlstr',$urlstr); |
| $urllink = eval('return '.$this->fdd[$k]['URL'].';'); |
$urllink = eval('return "'.$this->fdd[$k]['URL'].'";'); |
| $urldisp = isset($this->fdd[$k]['URLdisp']) |
$urldisp = isset($this->fdd[$k]['URLdisp']) |
| ? eval('return '.$this->fdd[$k]['URLdisp'].';') |
? eval('return "'.$this->fdd[$k]['URLdisp'].'";') |
| : $value; |
: $value; |
| $target = isset($this->fdd[$k]['URLtarget']) |
$target = isset($this->fdd[$k]['URLtarget']) |
| ? 'target="'. $this->fdd[$k]['URLtarget'] . '" ' |
? 'target="'.htmlspecialchars($this->fdd[$k]['URLtarget']).'" ' |
| : ''; |
: ''; |
| |
$urllink = htmlspecialchars($urllink); |
| |
$urldisp = htmlspecialchars($urldisp); |
| echo '<a '.$target.'class="pme_a_u" href="'.$urllink.'">'.$urldisp.'</a>'; |
echo '<a '.$target.'class="pme_a_u" href="'.$urllink.'">'.$urldisp.'</a>'; |
| } elseif (isset($this->fdd[$k]['datemask'])) { |
} elseif (isset($this->fdd[$k]['datemask'])) { |
| // display date according to a mask if any |
// display date according to a mask if any |
|
|
| */ |
*/ |
| function do_add_record() /* {{{ */ |
function do_add_record() /* {{{ */ |
| { |
{ |
| global $REMOTE_USER, $REMOTE_ADDR; |
global $HTTP_SERVER_VARS; |
| $tib = true; |
$REMOTE_USER = $HTTP_SERVER_VARS['REMOTE_USER']; |
| |
$REMOTE_ADDR = $HTTP_SERVER_VARS['REMOTE_ADDR']; |
| |
$tib = true; |
| // check for a before-add trigger |
// check for a before-add trigger |
| if (isset($this->triggers['insert']['before'])) { |
if (isset($this->triggers['insert']['before'])) { |
| $tib = include($this->triggers['insert']['before']); |
$tib = include($this->triggers['insert']['before']); |
|
|
| $vals[$k] = 'from_unixtime('.$this->mdate_getFromPost($k).')'; |
$vals[$k] = 'from_unixtime('.$this->mdate_getFromPost($k).')'; |
| } else // continued on next line |
} else // continued on next line |
| */ |
*/ |
| if ($this->col_is_set($k) && $fn != '') { |
/* Old Jim code: $this->col_is_set($k) && $fn != ''*/ |
| |
if (is_array($fn)) { |
| $vals[$k] = "'".addslashes($this->encode($this->fdd[$k],join(',',$fn)))."'"; |
$vals[$k] = "'".addslashes($this->encode($this->fdd[$k],join(',',$fn)))."'"; |
| } else { |
} else { |
| $vals[$k] = "'".addslashes($this->encode($this->fdd[$k],$fn))."'"; |
$vals[$k] = "'".addslashes($this->encode($this->fdd[$k],$fn))."'"; |
|
|
| |
|
| function do_change_record() /* {{{ */ |
function do_change_record() /* {{{ */ |
| { |
{ |
| global $REMOTE_USER, $REMOTE_ADDR; |
global $HTTP_SERVER_VARS; |
| $tub = true; |
$REMOTE_USER = $HTTP_SERVER_VARS['REMOTE_USER']; |
| |
$REMOTE_ADDR = $HTTP_SERVER_VARS['REMOTE_ADDR']; |
| |
$tub = true; |
| // check for a before-add trigger |
// check for a before-add trigger |
| if (isset($this->triggers['update']['before'])) { |
if (isset($this->triggers['update']['before'])) { |
| $tub = include($this->triggers['update']['before']); |
$tub = include($this->triggers['update']['before']); |
|
|
| $fn = date(str_replace('%','',$this->mdate_masks[$type]),$this->mdate_getFromPost($k)); |
$fn = date(str_replace('%','',$this->mdate_masks[$type]),$this->mdate_getFromPost($k)); |
| } |
} |
| */ |
*/ |
| if ($this->col_is_set($k) && $fn != '') { |
/* Old Jim code: $this->col_is_set($k) && $fn != ''*/ |
| |
if (is_array($fn)) { |
| $newValue = addslashes($this->encode($this->fdd[$k],join(',',$fn))); |
$newValue = addslashes($this->encode($this->fdd[$k],join(',',$fn))); |
| } else { |
} else { |
| $newValue = addslashes($this->encode($this->fdd[$k],$fn)); |
$newValue = addslashes($this->encode($this->fdd[$k],$fn)); |
| Line 2351 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| Line 2391 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| $this->key_delim = '"'; |
$this->key_delim = '"'; |
| } else { |
} else { |
| $this->key_delim = ''; |
$this->key_delim = ''; |
| |
$this->rec = intval($this->rec); // Fixed #523390 [7/8/2002] [1/2] |
| } |
} |
| |
|
| $this->gather_query_opts(); |
$this->gather_query_opts(); |
| Line 2440 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| Line 2481 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| */ |
*/ |
| function phpMyEdit($opts) /* {{{ */ |
function phpMyEdit($opts) /* {{{ */ |
| { |
{ |
| |
global $HTTP_SERVER_VARS; |
| |
|
| |
/* |
| |
* Creating directory variables |
| |
*/ |
| |
$this->dir['root'] = dirname(__FILE__) |
| |
. (strlen(dirname(__FILE__)) > 0 ? '/' : ''); |
| |
$this->dir['lang'] = $this->dir['root'].'lang/'; |
| |
|
| |
/* |
| |
* Creting URL variables |
| |
*/ |
| |
$this->url['images'] = 'images/'; |
| |
|
| /* |
/* |
| * Instance class variables |
* Instance class variables |
| */ |
*/ |
| Line 2462 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| Line 2517 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| if ($opts['language']) { |
if ($opts['language']) { |
| $this->labels = $this->make_language_labels($opts['language']); |
$this->labels = $this->make_language_labels($opts['language']); |
| } else { |
} else { |
| global $HTTP_POST_VARS; |
$this->labels = $this->make_language_labels($HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE']); |
| $this->labels = $this->make_language_labels($HTTP_POST_VARS['HTTP_ACCEPT_LANGUAGE']); |
|
| } |
} |
| $this->filters = $opts['filters']; |
$this->filters = $opts['filters']; |
| $this->default_sort_columns = $opts['default_sort_columns']; |
$this->default_sort_columns = $opts['default_sort_columns']; |
| Line 2475 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| Line 2529 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| if ($opts['page_name']) |
if ($opts['page_name']) |
| $this->page_name = $opts['page_name']; |
$this->page_name = $opts['page_name']; |
| |
|
| // alternate row background colors |
// alternate row background colors |
| if (isset($opts['bgcolorOdd'])) |
if (isset($opts['bgcolorOdd'])) { |
| $this->bgcolorOdd = 'White'; |
$this->bgcolorOdd = 'White'; |
| else |
} else { |
| $this->bgcolorOdd = $opts['bgcolorOdd']; |
$this->bgcolorOdd = $opts['bgcolorOdd']; |
| if (isset($opts['bgColorEven'])) |
} |
| |
if (isset($opts['bgColorEven'])) { |
| $this->bgcolorEven = 'Silver'; |
$this->bgcolorEven = 'Silver'; |
| else |
} else { |
| $this->bgcolorEven = $opts['bgcolorEven']; |
$this->bgcolorEven = $opts['bgcolorEven']; |
| |
} |
| |
|
| // e-mail notification |
// e-mail notification |
| if (isset($opts['notify'])) { |
if (isset($opts['notify'])) { |
| $this->notify = $opts['notify']; |
$this->notify = $opts['notify']; |
| } |
} |
| |
|
| // whether to display 'Add', 'Update', 'Delete' buttons or to put |
// whether to display 'Add', 'Update', 'Delete' buttons or to put |
| // hyperlinks next to the rows |
// hyperlinks next to the rows |
| $this->actionStyle = 'button'; |
$this->actionStyle = 'button'; |
| if (isset($opts['actionStyle']) && $opts['actionStyle'] == 'link') { |
if (isset($opts['actionStyle']) && $opts['actionStyle'] == 'link') { |
| $this->actionStyle = 'link'; |
$this->actionStyle = 'link'; |
| } |
} elseif (isset($opts['actionStyle']) && $opts['actionStyle'] == 'graphic') { |
| elseif (isset($opts['actionStyle']) && $opts['actionStyle'] == 'graphic') { |
|
| $this->actionStyle = 'graphic'; |
$this->actionStyle = 'graphic'; |
| } |
} |
| /* |
/* |
| * Find the URL to post forms |
* Find the URL to post forms |
| */ |
*/ |
| |
|
| global $HTTP_SERVER_VARS; |
$this->page_name = basename($HTTP_SERVER_VARS['PHP_SELF']); |
| $this->page_name = basename($HTTP_SERVER_VARS["PHP_SELF"]); |
|
| |
|
| /* |
/* |
| * form variables all around |
* form variables all around |
| */ |
*/ |
| global $operation, $apply, $fl, $fm, $sfn, $qfn, $sw, $rec, $prev, $next; |
//global $operation, $apply, $fl, $fm, $sfn, $qfn, $sw, $rec, $prev, $next; |
| global $saveadd, $moreadd, $savechange, $savedelete; |
//global $saveadd, $moreadd, $savechange, $savedelete; |
| $this->operation = $operation; |
|
| $this->apply = $apply; |
$this->operation = $this->get_cgi_var('operation'); |
| $this->fl = $fl; |
$this->apply = $this->get_cgi_var('apply'); |
| $this->fm = (int)$fm; |
$this->fl = $this->get_cgi_var('fl'); |
| |
$this->fm = intval($this->get_cgi_var('fm')); |
| $this->sort_asc = (substr ($sfn, 0, 1) != '-'); |
|
| //debug_var('this->sort_asc',$this->sort_asc); |
$this->sfn = $this->get_cgi_var('sfn'); |
| //debug_var('sfn',$sfn); |
$this->sort_asc = $this->sfn[0] != '-'; |
| //debug_var('int sfn',(int)$sfn); |
$this->sfn = abs(intval($this->sfn)); |
| //debug_var('abs int sfn',abs((int)$sfn)); |
|
| if (isset($sfn)) |
//$this->qfn = intval($this->get_cgi_var('qfn')); |
| $this->sfn = abs((int)$sfn); |
$this->qfn = ''; |
| |
$this->sw = $this->get_cgi_var('sw'); |
| $this->qfn = (int)$qfn; |
$this->rec = $this->get_cgi_var('rec', ''); // Fixed #523390 [7/8/2002] [2/2] |
| $this->sw = $sw; |
$this->prev = $this->get_cgi_var('prev'); |
| $this->rec = $rec; |
$this->next = $this->get_cgi_var('next'); |
| $this->prev = $prev; |
$this->saveadd = $this->get_cgi_var('saveadd'); |
| $this->next = $next; |
$this->moreadd = $this->get_cgi_var('moreadd'); |
| $this->saveadd = $saveadd; |
$this->savechange = $this->get_cgi_var('savechange'); |
| $this->moreadd = $moreadd; |
$this->savedelete = $this->get_cgi_var('savedelete'); |
| $this->savechange = $savechange; |
|
| $this->savedelete = $savedelete; |
|
| |
|
| /* |
/* |
| * Extract SQL Field Names and number of fields |
* Extract SQL Field Names and number of fields |
| Line 2540 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| Line 2592 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| $this->guidance = false; |
$this->guidance = false; |
| $field_num = 0; |
$field_num = 0; |
| $num_fields_displayed = 0; |
$num_fields_displayed = 0; |
| foreach ($this->fdd as $akey => $aval) |
foreach ($this->fdd as $akey => $aval) { |
| { |
|
| $this->fds[] = $akey; |
$this->fds[] = $akey; |
| if ($sfn == '' && $akey == $sort_field) { |
if ($sfn == '' && $akey == $sort_field) { |
| $this->sfn = $field_num; |
$this->sfn = $field_num; |
| Line 2606 $this->months_long = Array( |
|
| Line 2657 $this->months_long = Array( |
|
| 'October'=>10,'November'=>11,'December'=>12); |
'October'=>10,'November'=>11,'December'=>12); |
| $this->months_long_keys = array_keys($this->months_long); |
$this->months_long_keys = array_keys($this->months_long); |
| |
|
| $this->dir = dirname(__FILE__) |
|
| . (strlen(dirname(__FILE__)) > 0 ? '/' : ''); |
|
| $this->url['images'] = 'images/'; |
|
| |
|
| |
|
| // Call to Action |
// Call to Action |
| // Moved this from the setup.php generated file to here |
// Moved this from the setup.php generated file to here |