# # fields definitions for this table # if (defined('EDIT_TABLE_NAME')) { global $_TBL_DEFS, $_T_TBL_DEFS, $_FLD_DEFS, $_T_FLD_DEFS, $_FIELDS, $_T_FIELDS; $_T_TBL_DEFS = 0; $_TBL_DEFS = get_table_defs(EDIT_TABLE_NAME); if (is_array($_TBL_DEFS)) { $_T_TBL_DEFS = count($_TBL_DEFS); } $_T_FLD_DEFS = 0; $_FLD_DEFS = get_fields_defs(EDIT_TABLE_NAME); if (is_array($_FLD_DEFS)) { $_T_FLD_DEFS = count($_FLD_DEFS); } $_FIELDS = table_get_fields(MAINSITE_DB, EDIT_TABLE_NAME); $_T_FIELDS = count($_FIELDS); $i = 0; $autoincrement = ''; $table_key = ''; # 0.0.4 $isLAST_USER = false; # 0.0.2 //while($i<$_T_FIELDS && $table_key=='') # 0.0.2 while ($i < $_T_FIELDS) { # let's get the autoincremented field, usually the record ID (or, as I use to call it, the RRN -- Relative Record Number) # # # 0.0.4: BEG #------------- if ($_FIELDS[$i]['Extra'] == 'auto_increment') {
} exit; break; # #--------------------------- # #--------------------------- case 'fields_list': #--------------------------- # # 0: table # 1: field to link to # 2: number of the input/hidden field # 3: field to use for the description # $fields = table_get_fields(MAINSITE_DB, $parms[0]); $t = count($fields); //var_dump($fields); //echo $parms[0].'|'.$parms[1]; if ($t == 0) { echo '<div class="error"><p>' . __('No fields found in this table', MED_LOCALE) . '</p></div>'; } else { echo '<div class="updated">' . '<table width="100%" style="border:1px;" cellspacing="4">'; for ($i = 0; $i < $t; $i++) { //echo($fields[$i]['Field'].'=='.$parms[1]); if (substr($fields[$i]['Field'], 0, 5) != 'LAST_') { $background = 'transparent'; if ($fields[$i]['Field'] == $parms[1]) { $background = '#ddd'; $js = 'document.getElementById(\'__referencedID_' . $parms[2] . '\').value=\'' . $fields[$i]['Field'] . '\';'; }