2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays a list of server status variables
9 use PhpMyAdmin\Response
;
10 use PhpMyAdmin\Message
;
11 use PhpMyAdmin\Server\Status\Data
;
12 use PhpMyAdmin\Server\Status\Variables
;
14 require_once 'libraries/common.inc.php';
15 require_once 'libraries/server_common.inc.php';
16 require_once 'libraries/replication.inc.php';
19 * flush status variables if requested
21 if (isset($_POST['flush'])) {
22 $_flush_commands = array(
28 if (in_array($_POST['flush'], $_flush_commands)) {
29 $GLOBALS['dbi']->query('FLUSH ' . $_POST['flush'] . ';');
31 unset($_flush_commands);
34 $serverStatusData = new Data();
36 $response = Response
::getInstance();
37 $header = $response->getHeader();
38 $scripts = $header->getScripts();
39 $scripts->addFile('server_status_variables.js');
40 $scripts->addFile('vendor/jquery/jquery.tablesorter.js');
41 $scripts->addFile('server_status_sorter.js');
43 $response->addHTML('<div>');
44 $response->addHTML($serverStatusData->getMenuHtml());
45 if ($serverStatusData->dataLoaded
) {
46 $response->addHTML(Variables
::getHtmlForFilter($serverStatusData));
47 $response->addHTML(Variables
::getHtmlForLinkSuggestions($serverStatusData));
48 $response->addHTML(Variables
::getHtmlForVariablesList($serverStatusData));
52 __('Not enough privilege to view status variables.')
56 $response->addHTML('</div>');