/** * Add recently used table and reload the navigation. * * @param string $db Database name where the table is located. * @param string $table The table name */ function PMA_addRecentTable($db, $table) { $tmp_result = PMA_RecentTable::getInstance()->add($db, $table); if ($tmp_result === true) { echo '<span class="hide" id="update_recent_tables"></span>'; } else { $error = $tmp_result; $error->display(); } }
unset($_GET[$each_drop]); } } unset($drops, $each_drop); // If we have a valid target, let's load that script instead if (!empty($_REQUEST['target']) && is_string($_REQUEST['target']) && !preg_match('/^index/', $_REQUEST['target']) && in_array($_REQUEST['target'], $goto_whitelist)) { include $_REQUEST['target']; exit; } /** * Check if it is an ajax request to reload the recent tables list. */ require_once 'libraries/RecentTable.class.php'; if ($GLOBALS['is_ajax_request'] && !empty($_REQUEST['recent_table'])) { $response = PMA_Response::getInstance(); $response->addJSON('options', PMA_RecentTable::getInstance()->getHtmlSelectOption()); exit; } if ($GLOBALS['PMA_Config']->isGitRevision()) { if (isset($_REQUEST['git_revision']) && $GLOBALS['is_ajax_request'] == true) { PMA_printGitRevision(); exit; } echo '<div id="is_git_revision"></div>'; } // Handles some variables that may have been sent by the calling script $GLOBALS['db'] = ''; $GLOBALS['table'] = ''; $show_query = '1'; // Any message to display? if (!empty($message)) {
/** * Add recently used table and reload the navigation. * * @param string $db Database name where the table is located. * @param string $table The table name * * @return string */ private function _addRecentTable($db, $table) { $retval = ''; if ($this->_menuEnabled && strlen($table) && $GLOBALS['cfg']['NumRecentTables'] > 0) { $tmp_result = PMA_RecentTable::getInstance()->add($db, $table); if ($tmp_result === true) { $params = array('ajax_request' => true, 'recent_table' => true); $url = 'index.php' . PMA_generate_common_url($params); $retval = '<a class="hide" id="update_recent_tables"'; $retval .= ' href="' . $url . '"></a>'; } else { $error = $tmp_result; $retval = $error->getDisplay(); } } return $retval; }
/** * Displays a drop-down choice of most recently used tables * * @return string HTML code for the Recent tables */ private function _recent() { $retval = ''; // display recently used tables if ($GLOBALS['cfg']['NumRecentTables'] > 0) { $retval .= '<!-- RECENT START -->'; $retval .= '<div id="recentTableList">'; $retval .= '<form method="post" '; $retval .= 'action="' . $GLOBALS['cfg']['DefaultTabTable'] . '">'; $retval .= PMA_URL_getHiddenInputs(array('db' => '', 'table' => '', 'server' => $GLOBALS['server'])); $retval .= PMA_RecentTable::getInstance()->getHtmlSelect(); $retval .= '</form>'; $retval .= '</div>'; $retval .= '<!-- RECENT END -->'; } return $retval; }
if (typeof(PMA_saveFrameSize) != "undefined" && typeof(PMA_saveFrameSize) == "function" ) { PMA_saveFrameSize(); } };' ); require 'libraries/navigation_header.inc.php'; // display recently used tables if ($GLOBALS['cfg']['LeftRecentTable'] > 0) { echo '<div id="recentTableList">' . "\n" .'<form method="post" action="index.php" target="_parent">' . "\n" .PMA_generate_common_hidden_inputs() . "\n" .PMA_RecentTable::getInstance()->getHtmlSelect() .'</form>' . "\n" .'</div>' . "\n"; } if (! $GLOBALS['server']) { // no server selected PMA_exitNavigationFrame(); } elseif (! count($GLOBALS['pma']->databases)) { // no database available, so we break here echo '<p>' . __('No databases') . '</p>'; PMA_exitNavigationFrame(); } elseif ($GLOBALS['cfg']['LeftFrameLight'] && count($GLOBALS['pma']->databases) > 1 ) { $list = $cfg['DisplayDatabasesList'];
<style type="text/css"> /* <![CDATA[ */ html { overflow-y: scroll; } /* ]]> */ </style> <![endif]--> </head> <body id="body_leftFrame"> <?php require './libraries/navigation_header.inc.php'; // display recently used tables if ($GLOBALS['cfg']['LeftRecentTable'] > 0) { echo '<div id="recentTableList">' . "\n" . '<form method="post" action="index.php" target="_parent">' . "\n" . PMA_generate_common_hidden_inputs() . "\n" . PMA_RecentTable::getInstance()->getHtmlSelect() . '<noscript>' . "\n" . '<input type="submit" name="Go" value="' . __('Go') . '" />' . "\n" . '</noscript>' . "\n" . '</form>' . "\n" . '</div>' . "\n"; } if (!$GLOBALS['server']) { // no server selected PMA_exitNavigationFrame(); } elseif (!count($GLOBALS['pma']->databases)) { // no database available, so we break here echo '<p>' . __('No databases') . '</p>'; PMA_exitNavigationFrame(); } elseif ($GLOBALS['cfg']['LeftFrameLight'] && count($GLOBALS['pma']->databases) > 1) { $list = $cfg['DisplayDatabasesList']; if ($list === 'auto') { if (empty($GLOBALS['db'])) { $list = true; } else { $list = false;
/** * Add recently used table and reload the navigation. * * @param string $db Database name where the table is located. * @param string $table The table name * * @return string */ private function _addRecentTable($db, $table) { $retval = ''; if (strlen($table) && $GLOBALS['cfg']['LeftRecentTable'] > 0) { $tmp_result = PMA_RecentTable::getInstance()->add($db, $table); if ($tmp_result === true) { $retval = '<span class="hide" id="update_recent_tables"></span>'; } else { $error = $tmp_result; $retval = $error->getDisplay(); } } return $retval; }