2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays a list of server status variables
9 require_once 'libraries/common.inc.php';
10 require_once 'libraries/server_common.inc.php';
11 require_once 'libraries/ServerStatusData.class.php';
12 require_once 'libraries/server_status_variables.lib.php';
15 $GLOBALS['replication_info'] = array();
16 $GLOBALS['replication_info']['master']['status'] = false;
17 $GLOBALS['replication_info']['slave']['status'] = false;
19 include_once 'libraries/replication.inc.php';
20 include_once 'libraries/replication_gui.lib.php';
24 * flush status variables if requested
26 if (isset($_REQUEST['flush'])) {
27 $_flush_commands = array(
33 if (in_array($_REQUEST['flush'], $_flush_commands)) {
34 $GLOBALS['dbi']->query('FLUSH ' . $_REQUEST['flush'] . ';');
36 unset($_flush_commands);
39 $serverStatusData = new PMA_ServerStatusData();
41 $response = PMA_Response
::getInstance();
42 $header = $response->getHeader();
43 $scripts = $header->getScripts();
44 $scripts->addFile('server_status_variables.js');
45 $scripts->addFile('jquery/jquery.tablesorter.js');
46 $scripts->addFile('server_status_sorter.js');
48 $response->addHTML('<div>');
49 $response->addHTML($serverStatusData->getMenuHtml());
50 if ($serverStatusData->dataLoaded
) {
51 $response->addHTML(PMA_getHtmlForFilter($serverStatusData));
52 $response->addHTML(PMA_getHtmlForLinkSuggestions($serverStatusData));
53 $response->addHTML(PMA_getHtmlForVariablesList($serverStatusData));
57 __('Not enough privilege to view status variables.')
61 $response->addHTML('</div>');