fix for export to windows, take 2.
[openemr.git] / phpmyadmin / server_status_variables.php
blobfe93501e1c302f19fab4e67f12ff2b54489da559
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 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';
14 if (PMA_DRIZZLE) {
15 $server_master_status = false;
16 $server_slave_status = false;
17 } else {
18 include_once 'libraries/replication.inc.php';
19 include_once 'libraries/replication_gui.lib.php';
22 /**
23 * flush status variables if requested
25 if (isset($_REQUEST['flush'])) {
26 $_flush_commands = array(
27 'STATUS',
28 'TABLES',
29 'QUERY CACHE',
32 if (in_array($_REQUEST['flush'], $_flush_commands)) {
33 $GLOBALS['dbi']->query('FLUSH ' . $_REQUEST['flush'] . ';');
35 unset($_flush_commands);
38 $ServerStatusData = new PMA_ServerStatusData();
40 $response = PMA_Response::getInstance();
41 $header = $response->getHeader();
42 $scripts = $header->getScripts();
43 $scripts->addFile('server_status_variables.js');
44 $scripts->addFile('jquery/jquery.tablesorter.js');
45 $scripts->addFile('server_status_sorter.js');
47 $response->addHTML('<div>');
48 $response->addHTML($ServerStatusData->getMenuHtml());
49 $response->addHTML(PMA_getHtmlForFilter($ServerStatusData));
50 $response->addHTML(PMA_getHtmlForLinkSuggestions($ServerStatusData));
51 $response->addHTML(PMA_getHtmlForVariablesList($ServerStatusData));
52 $response->addHTML('</div>');
54 exit;