Translated using Weblate (French)
[phpmyadmin.git] / server_status_variables.php
blob331c08576c1674b3f871218ad3c77bcd2592d81f
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Displays a list of server status variables
6 * @package PhpMyAdmin
7 */
9 use PMA\libraries\Message;
10 use PMA\libraries\ServerStatusData;
12 require_once 'libraries/common.inc.php';
13 require_once 'libraries/server_common.inc.php';
14 require_once 'libraries/server_status_variables.lib.php';
15 require_once 'libraries/replication.inc.php';
16 require_once 'libraries/replication_gui.lib.php';
18 /**
19 * flush status variables if requested
21 if (isset($_REQUEST['flush'])) {
22 $_flush_commands = array(
23 'STATUS',
24 'TABLES',
25 'QUERY CACHE',
28 if (in_array($_REQUEST['flush'], $_flush_commands)) {
29 $GLOBALS['dbi']->query('FLUSH ' . $_REQUEST['flush'] . ';');
31 unset($_flush_commands);
34 $serverStatusData = new ServerStatusData();
36 $response = PMA\libraries\Response::getInstance();
37 $header = $response->getHeader();
38 $scripts = $header->getScripts();
39 $scripts->addFile('server_status_variables.js');
40 $scripts->addFile('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(PMA_getHtmlForFilter($serverStatusData));
47 $response->addHTML(PMA_getHtmlForLinkSuggestions($serverStatusData));
48 $response->addHTML(PMA_getHtmlForVariablesList($serverStatusData));
49 } else {
50 $response->addHTML(
51 Message::error(
52 __('Not enough privilege to view status variables.')
53 )->getDisplay()
56 $response->addHTML('</div>');
58 exit;