Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
$db,
'sql_query' => $sql_query
);
if (preg_match('@^tbl_@', $GLOBALS['goto'])) {
$_url_params['table'] = $table;
}
$err_url = $GLOBALS['goto'] . PMA_generate_common_url($_url_params);
unset($_url_params);
/**
* Sets parameters for links
* where is this variable used?
* replace by PMA_generate_common_url($url_params);
*/
$url_query = PMA_generate_common_url($url_params, 'html', '');
/**
* get table information
* @todo should be done by a Table object
*/
require_once './libraries/tbl_info.inc.php';
/**
* Get comments for table fileds/columns
*/
$comments_map = array();
if ($GLOBALS['cfg']['ShowPropertyComments']) {
$comments_map = PMA_getComments($db, $table);
}
/**
* START REGULAR OUTPUT
*/
/**
* used in ./libraries/header.inc.php to load JavaScript library file
*/
$GLOBALS['js_include'][] = 'tbl_change.js';
/**
* HTTP and HTML headers
*/
require_once './libraries/header.inc.php';
/**
* Displays the query submitted and its result
*
* @todo where does $disp_message and $disp_query come from???
*/
if (! empty($disp_message)) {
if (! isset($disp_query)) {
$disp_query = null;
}
PMA_showMessage($disp_message, $disp_query);
}
/**
* Displays top menu links
*/
require_once './libraries/tbl_links.inc.php';
/**
* Get the analysis of SHOW CREATE TABLE for this table
* @todo should be handled by class Table
*/
$show_create_table = PMA_DBI_fetch_value(
'SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table),
0, 1);
$analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
unset($show_create_table);
/**
* Get the list of the fields of the current table
*/
PMA_DBI_select_db($db);
$table_fields = PMA_DBI_fetch_result('SHOW FIELDS FROM ' . PMA_backquote($table) . ';',
null, null, null, PMA_DBI_QUERY_STORE);
$rows = array();
if (isset($where_clause)) {
// when in edit mode load all selected rows from table
$insert_mode = false;
if (is_array($where_clause)) {
$where_clause_array = $where_clause;
} else {
$where_clause_array = array(0 => $where_clause);
}
$result = array();
$found_unique_key = false;
$where_clauses = array();
foreach ($where_clause_array as $key_id => $where_clause) {
$local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table) . ' WHERE ' . $where_clause . ';';
$result[$key_id] = PMA_DBI_query($local_query, null, PMA_DBI_QUERY_STORE);
$rows[$key_id] = PMA_DBI_fetch_assoc($result[$key_id]);
$where_clauses[$key_id] = str_replace('\\', '\\\\', $where_clause);
// No row returned
if (! $rows[$key_id]) {
unset($rows[$key_id], $where_clause_array[$key_id]);
PMA_showMessage($strEmptyResultSet, $local_query);
echo "\n";
require_once './libraries/footer.inc.php';
} else { // end if (no row returned)
$meta = PMA_DBI_get_fields_meta($result[$key_id]);
list($unique_condition, $tmp_clause_is_unique) = PMA_getUniqueCondition($result[$key_id], count($meta), $meta, $rows[$key_id], true);
if (! empty($unique_condition)) {
$found_unique_key = true;
}
unset($unique_condition, $tmp_clause_is_unique);
}
}
} else {
// no primary key given, just load first row - but what happens if table is empty?
$insert_mode = true;
$result = PMA_DBI_query('SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table) . ' LIMIT 1;', null, PMA_DBI_QUERY_STORE);
$rows = array_fill(0, $cfg['InsertRows'], false);
}
//
// retrieve keys into foreign fields, if any
$foreigners = PMA_getForeigners($db, $table);
/**
* 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 && PMA_USR_BROWSER_VER < 7)
? 'onpropertychange'
: 'onchange';
// Had to put the URI because when hosted on an https server,
// some browsers send wrongly this form to the http server.
if ($cfg['CtrlArrowsMoving']) {
?>
$db,
'table' => $table,
'goto' => $GLOBALS['goto'],
'err_url' => $err_url,
'sql_query' => $sql_query,
);
if (isset($where_clauses)) {
foreach ($where_clause_array as $key_id => $where_clause) {
$_form_params['where_clause[' . $key_id . ']'] = trim($where_clause);
}
}
if (isset($clause_is_unique)) {
$_form_params['clause_is_unique'] = $clause_is_unique;
}
?>
' . "\n";
}
/**
* Displays the footer
*/
require_once './libraries/footer.inc.php';
?>