>
';
if ( 'both' === $GLOBALS['cfg']['PropertiesIconic'] ) {
$titles['Change'] .= $strChange;
}
} else {
$titles['Change'] = $strChange;
}
// Hidden forms and query frame interaction stuff
if ( ! empty( $query_history_latest ) && ! empty( $query_history_latest_db ) ) {
if ( $GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork'] ) {
PMA_setHistory((isset($query_history_latest_db) ? $query_history_latest_db : ''),
(isset($query_history_latest_table) ? $query_history_latest_table : ''),
$GLOBALS['cfg']['Server']['user'],
$query_history_latest );
}
$_input_query_history[$query_history_latest] = array(
'db' => $query_history_latest_db,
'table' => isset($query_history_latest_table) ? $query_history_latest_table : '',
);
$_sql_history[$query_history_latest] = array(
'db' => $query_history_latest_db,
'table' => isset($query_history_latest_table) ? $query_history_latest_table : '',
);
$sql_query = $query_history_latest;
$db = $query_history_latest_db;
$table = $query_history_latest_table;
} elseif ( ! empty( $query_history_latest ) ) {
$sql_query = $query_history_latest;
}
if (isset($sql_query)) {
$show_query = 1;
}
if ( $GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork'] ) {
$temp_history = PMA_getHistory( $GLOBALS['cfg']['Server']['user'] );
if (is_array($temp_history) && count($temp_history) > 0) {
foreach ($temp_history AS $history_nr => $history_array) {
if ( ! isset( $_sql_history[$history_array['sqlquery']] ) ) {
$_sql_history[$history_array['sqlquery']] = array(
'db' => $history_array['db'],
'table' => isset( $history_array['table'] ) ? $history_array['table'] : '',
);
}
}
}
} else {
if (isset($query_history) && is_array($query_history)) {
$current_index = count($query_history);
foreach ($query_history AS $query_no => $query_sql) {
if ( ! isset( $_input_query_history[$query_sql] ) ) {
$_input_query_history[$query_sql] = array(
'db' => $query_history_db[$query_no],
'table' => isset($query_history_table[$query_no]) ? $query_history_table[$query_no] : '',
);
$_sql_history[$query_sql] = array(
'db' => $query_history_db[$query_no],
'table' => isset( $query_history_table[$query_no] ) ? $query_history_table[$query_no] : '',
);
} // end if check if this item exists
} // end while print history
} // end if history exists
} // end if DB-based history
$url_query = PMA_generate_common_url(isset($db) ? $db : '', isset($table) ? $table : '');
if (!isset($goto)) {
$goto = '';
}
require_once './libraries/bookmark.lib.php';
if (isset($no_js) && $no_js) {
// ... we redirect to appropriate query sql page
// works only full if $db and $table is also stored/grabbed from $_COOKIE
if ( isset( $table ) && strlen($table) ) {
require './tbl_sql.php';
} elseif ( isset($db) && strlen($db) ) {
require './db_sql.php';
} else {
require './server_sql.php';
}
exit;
}
/**
* Defines the query to be displayed in the query textarea
*/
if ( ! empty( $show_query ) ) {
$query_to_display = $sql_query;
} else {
$query_to_display = '';
}
unset( $sql_query );
PMA_sqlQueryForm( $query_to_display, $querydisplay_tab );
// Hidden forms and query frame interaction stuff
if (isset($auto_commit) && $auto_commit == 'true') {
?>
0
&& ( $querydisplay_tab == 'history' || $querydisplay_tab == 'full' ) ) {
$tab = isset($querydisplay_tab) && $querydisplay_tab != 'full' ? 'sql' : 'full';
echo $strQuerySQLHistory . ':
' . "\n"
.'
' . "\n";
}
?>