$js_events[] = array('event' => 'load', 'function' => 'PMA_querywindowSetFocus'); } /** * start HTTP/HTML output */ require_once 'libraries/header_http.inc.php'; require_once 'libraries/header_meta_style.inc.php'; require_once 'libraries/header_scripts.inc.php'; ?> </head> <body id="bodyquerywindow"> <div id="querywindowcontainer"> <?php if ($tabs) { echo PMA_generateHtmlTabs($tabs, array()); unset($tabs); } PMA_sqlQueryForm($query_to_display, $querydisplay_tab); // Hidden forms and query frame interaction stuff $_sql_history = PMA_getHistory($GLOBALS['cfg']['Server']['user']); if (!empty($_sql_history) && ($querydisplay_tab == 'history' || $querydisplay_tab == 'full')) { $tab = $querydisplay_tab != 'full' ? 'sql' : 'full'; echo __('SQL history') . ':<br />' . '<ul>'; foreach ($_sql_history as $query) { echo '<li>' . "\n"; // edit link $url_params = array('querydisplay_tab' => $tab, 'sql_query' => $query['sqlquery'], 'db' => $query['db'], 'table' => $query['table']); echo '<a href="querywindow.php' . PMA_generate_common_url($url_params) . '">' . $titles['Change'] . '</a>'; // execute link $url_params['auto_commit'] = 'true';
$err_url = $goto . '?' . PMA_generate_common_url($db, $table); // Gets the list and number of fields list($fields_list, $fields_type, $fields_collation, $fields_null, $geom_column_present) = PMA_tbl_getFields($db, $table); $fields_cnt = count($fields_list); // retrieve keys into foreign fields, if any // check also foreigners even if relwork is FALSE (to get // foreign keys from innodb) $foreigners = PMA_getForeigners($db, $table); ?> <fieldset id="fieldset_subtab"> <?php $url_params = array(); $url_params['db'] = $db; $url_params['table'] = $table; echo PMA_generateHtmlTabs(PMA_tbl_getSubTabs(), $url_params, 'topmenu2'); ?> <form method="post" action="tbl_select.php" name="insertForm" id="tbl_search_form" <?php echo $GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''; ?> > <?php echo PMA_generate_common_hidden_inputs($db, $table); ?> <input type="hidden" name="goto" value="<?php echo $goto; ?> " /> <input type="hidden" name="back" value="tbl_select.php" />
/** * Returns the menu as HTML * * @return string HTML formatted menubar */ private function _getMenu() { $tabs = ''; $url_params = array('db' => $this->_db); if (strlen($this->_table)) { $tabs = $this->_getTableTabs(); $url_params['table'] = $this->_table; } else { if (strlen($this->_db)) { $tabs = $this->_getDbTabs(); } else { $tabs = $this->_getServerTabs(); } } return PMA_generateHtmlTabs($tabs, $url_params); }