'; /** * Get the list of the fields of the current table */ PMA_mysql_select_db($db); $table_def = PMA_mysql_query('SHOW FIELDS FROM ' . PMA_backquote($table)); if (isset($primary_key)) { if (is_array($primary_key)) { $primary_key_array = $primary_key; } else { $primary_key_array = array(0 => $primary_key); } $row = array(); $result = array(); foreach($primary_key_array AS $rowcount => $primary_key) { $local_query = 'SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $primary_key; $result[$rowcount] = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); $row[$rowcount] = PMA_mysql_fetch_array($result[$rowcount]); $primary_keys[$rowcount] = $primary_key; // No row returned if (!$row[$rowcount]) { unset($row[$rowcount]); unset($primary_key_array[$rowcount]); $goto_cpy = $goto; $goto = 'tbl_properties.php?' . PMA_generate_common_url($db, $table) . '&$show_query=1' . '&sql_query=' . urlencode($local_query); if (isset($sql_query)) { $sql_query_cpy = $sql_query; unset($sql_query); } $sql_query = $local_query; PMA_showMessage($strEmptyResultSet); $goto = $goto_cpy; unset($goto_cpy); if (isset($sql_query_cpy)) { $sql_query = $sql_query_cpy; unset($sql_query_cpy); } } // end if (no record returned) } } else { $local_query = 'SELECT * FROM ' . PMA_backquote($table) . ' LIMIT 1'; $result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url); unset($row); } // // retrieve keys into foreign fields, if any $cfgRelation = PMA_getRelationsParam(); $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE); /** * Displays the form */ // loic1: autocomplete feature of IE kills the "onchange" event handler and it // must be replaced by the "onpropertychange" one in this case $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) ? 'onpropertychange' : 'onchange'; // Had to put the URI because when hosted on an https server, // some browsers send wrongly this form to the http server. ?>
> '; } else { $iconic_spacer = ''; } $titles['Browse'] = $iconic_spacer . '' . $strBrowseForeignValues . ''; if ($propicon == 'both') { $titles['Browse'] .= ' ' . $strBrowseForeignValues . ''; } } else { $titles['Browse'] = $strBrowseForeignValues; } // Set if we passed the first timestamp field $timestamp_seen = 0; $fields_cnt = mysql_num_rows($table_def); // Set a flag here because the 'if' would not be valid in the loop // if we set a value in some field $insert_mode = (!isset($row) ? TRUE : FALSE); $loop_array = (isset($row) ? $row : array(0 => FALSE)); while ($trow = PMA_mysql_fetch_array($table_def)) { $trow_table_def[] = $trow; } $o_rows = 0; foreach($loop_array AS $vrowcount => $vrow) { if ($vrow === FALSE) { unset($vrow); } $vresult = (isset($result) && is_array($result) && isset($result[$vrowcount]) ? $result[$vrowcount] : $result); ?> ' . $strFunction . '' . "\n"; } ?> and instead, // but it didn't worked because of the ) if ((($i % 15) == 0) && ($i != 0)) { ?> date('Y-m-d H:i:s', time())); } } // UPDATE case with an empty and not NULL value under PHP4 else if (empty($vrow[$rowfield]) && is_null($vrow[$rowfield])) { $vrow[$rowfield] = date('Y-m-d H:i:s', time()); } // end if... else if... } $len = (preg_match('@float|double@', $row_table_def['Type'])) ? 100 : @mysql_field_len($vresult, $i); $first_timestamp = 0; $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?> '; } else { // loic1: display default values if (!isset($row_table_def['Default'])) { $row_table_def['Default'] = ''; $real_null_value = TRUE; $data = ''; //$data = 'NULL'; } else { $data = $row_table_def['Default']; } $special_chars = htmlspecialchars($row_table_def['Default']); $backup_field = ''; } // The function column // ------------------- // Change by Bernard M. Piller // We don't want binary data to be destroyed // Note: from the MySQL manual: "BINARY doesn't affect how the column is // stored or retrieved" so it does not mean that the contents is // binary if ($cfg['ShowFunctionFields']) { if (($cfg['ProtectBinary'] && $is_blob) || ($cfg['ProtectBinary'] == 'all' && $is_binary)) { echo ' ' . "\n"; } else if (strstr($row_table_def['True_Type'], 'enum') || strstr($row_table_def['True_Type'], 'set')) { echo ' ' . "\n"; } else { ?> ' . "\n"; if (!(($cfg['ProtectBinary'] && $is_blob) || ($cfg['ProtectBinary'] == 'all' && $is_binary)) && $row_table_def['Null'] == 'YES') { echo ' 20) { $onclick .= '1, '; } else { $onclick .= '2, '; } } else if (strstr($row_table_def['True_Type'], 'set')) { $onclick .= '3, '; } else if ($foreigners && isset($foreigners[$field])) { $onclick .= '4, '; } else { $onclick .= '5, '; } $onclick .= '\'' . urlencode($field) . '\', \'' . md5($field) . '\', \'' . $vkey . '\'); this.checked = true}; return true" />' . "\n"; echo $onclick; } else { echo '  ' . "\n"; } echo ' ' . "\n"; // The value column (depends on type) // ---------------- require('./libraries/get_foreign.lib.php'); if (isset($foreign_link) && $foreign_link == true) { ?> 32000) { echo ' ' . "\n"; } } else if ($type == 'enum') { $enum = PMA_getEnumSetOptions($row_table_def['Type']); $enum_cnt = count($enum); ?> // We don't want binary data destroyed else if ($is_binary || $is_blob) { if (($cfg['ProtectBinary'] && $is_blob) || ($cfg['ProtectBinary'] == 'all' && $is_binary)) { echo "\n"; ?> '; } // end else if ( binary or blob) else { // For char or varchar, respect the maximum length (M); for other // types (int or float), the length is not a limit on the values that // can be entered, so let's be generous (20) (we could also use the // real limits for each numeric type) if ($is_char) { $fieldsize = (($len > 40) ? 40 : $len); $maxlength = $len; } else { $fieldsize = $maxlength = 20; } // end if... else... echo "\n"; ?>
'; } // end foreach on multi-edit ?>
 
align="center" bgcolor=""> > ' . $strBinary . '-- ="return unNullify('', '')" tabindex="" id="field__3" value="" />  
' . $strTextAreaLength . ' 20) { echo "\n"; ?> ' . "\n"; echo ' ' . "\n"; } // end for } // end else echo "\n"; ?> 40) ? 40 : $len); $maxlength = $len; } echo "\n"; ?> ="return unNullify('', '')" tabindex="" id="field__3" />  '; // find maximum upload size, based on field type $max_field_sizes = array( 'tinyblob' => '256', 'blob' => '65536', 'mediumblob' => '16777216', 'longblob' => '4294967296'); // yeah, really $this_field_max_size = $max_upload_size; // from PHP max if ($this_field_max_size > $max_field_sizes[$type]) { $this_field_max_size = $max_field_sizes[$type]; } echo PMA_displayMaximumUploadSize($this_field_max_size) . "\n"; echo ' ' . PMA_generateHiddenMaxFileSize($this_field_max_size) . "\n"; } if (!empty($cfg['UploadDir'])) { if (substr($cfg['UploadDir'], -1) != '/') { $cfg['UploadDir'] .= '/'; } if ($handle = @opendir($cfg['UploadDir'])) { $is_first = 0; while ($file = @readdir($handle)) { if (is_file($cfg['UploadDir'] . $file) && !PMA_checkFileExtensions($file, '.sql')) { if ($is_first == 0) { echo "
\n"; echo ' ' . $strOr . '' . ' ' . $strWebServerUploadDirectory . ' :
' . "\n"; echo ' ' . "\n"; } // end if (isfirst > 0) @closedir($handle); } else { echo ' ' . $strError . '
' . "\n"; echo ' ' . $strWebServerUploadDirectoryError . "\n"; } } // end if (web-server upload directory) echo '
="return unNullify('', '')" tabindex="" id="field__3" />

      
   -- --    tabindex="" />
      
tabindex="" />