dropDatabasesAction();
return;
}
require_once 'libraries/server_common.inc.php';
require_once 'libraries/replication.inc.php';
require_once 'libraries/build_html_for_db.lib.php';
$header = $this->response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('server_databases.js');
$this->_setSortDetails();
$this->_dbstats = empty($_REQUEST['dbstats']) ? false : true;
$this->_pos = empty($_REQUEST['pos']) ? 0 : (int) $_REQUEST['pos'];
/**
* Displays the sub-page heading
*/
$header_type = $this->_dbstats ? "database_statistics" : "databases";
$this->response->addHTML(PMA_getHtmlForSubPageHeader($header_type));
/**
* Displays For Create database.
*/
$html = '';
if ($GLOBALS['cfg']['ShowCreateDb']) {
$html .= '
';
reset($this->_databases);
$first_database = current($this->_databases);
// table col order
$column_order = PMA_getColumnOrder();
$_url_params = array(
'pos' => $this->_pos,
'dbstats' => $this->_dbstats,
'sort_by' => $this->_sort_by,
'sort_order' => $this->_sort_order,
);
$html .= Util::getListNavigator(
$this->_database_count, $this->_pos, $_url_params,
'server_databases.php', 'frame_content', $GLOBALS['cfg']['MaxDbList']
);
$_url_params['pos'] = $this->_pos;
$html .= '
';
$html .= '
';
return $html;
}
/**
* Returns the html for Table footer buttons
*
* @return string
*/
private function _getHtmlForTableFooterButtons()
{
if (! $GLOBALS['is_superuser']
&& ! $GLOBALS['cfg']['AllowUserDropDatabase']
) {
return '';
}
$html = Util::getWithSelected(
$GLOBALS['pmaThemeImage'], $GLOBALS['text_dir'], "dbStatsForm"
);
$html .= Util::getButtonOrImage(
'',
'mult_submit' . ' ajax',
'drop_selected_dbs',
__('Drop'), 'b_deltbl.png'
);
return $html;
}
/**
* Returns the html for Table footer
*
* @param string $column_order column order
* @param array $replication_types replication types
* @param string $first_database First database
*
* @return string
*/
private function _getHtmlForTableFooter(
$column_order,
$replication_types, $first_database
) {
$html = '