Plot functionality using Hihcharts
[phpmyadmin/ammaryasirr.git] / server_variables.php
blob00c8a85ca5bce1a8d32f75a3a9e6cf5cc9b42010
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package phpMyAdmin
6 */
8 /**
9 * no need for variables importing
10 * @ignore
12 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
13 define('PMA_NO_VARIABLES_IMPORT', true);
15 require_once './libraries/common.inc.php';
17 $GLOBALS['js_include'][] = 'server_variables.js';
19 /**
20 * Does the common work
22 require './libraries/server_common.inc.php';
25 /**
26 * Displays the links
28 require './libraries/server_links.inc.php';
31 /**
32 * Required to display documentation links
34 require './libraries/server_variables_doc.php';
36 /**
37 * Displays the sub-page heading
39 echo '<h2>' . "\n"
40 . ($cfg['MainPageIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_vars.png" width="16" height="16" alt="" />' : '')
41 . '' . __('Server variables and settings') . "\n"
42 . PMA_showMySQLDocu('server_system_variables','server_system_variables')
43 . '</h2>' . "\n";
46 /**
47 * Sends the queries and buffers the results
49 $serverVars = PMA_DBI_fetch_result('SHOW SESSION VARIABLES;', 0, 1);
50 $serverVarsGlobal = PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES;', 0, 1);
53 /**
54 * Displays the page
57 <fieldset id="tableFilter" style="display:none;">
58 <legend>Filters</legend>
59 <div class="formelement">
60 <label for="filterText">Containing the word:</label>
61 <input name="filterText" type="text" id="filterText" style="vertical-align: baseline;" />
62 </div>
63 </fieldset>
64 <table class="data filteredData">
65 <thead>
66 <tr><th><?php echo __('Variable'); ?></th>
67 <th>
68 <?php
69 echo __('Session value') . ' / ' . __('Global value');
71 </th>
72 <th><?php echo __('Documentation'); ?></th>
73 </tr>
74 </thead>
75 <tbody>
76 <?php
77 $odd_row = true;
78 foreach ($serverVars as $name => $value) {
80 <tr class="noclick <?php
81 echo $odd_row ? 'odd' : 'even';
82 if ($serverVarsGlobal[$name] !== $value) {
83 echo ' marked';
85 ?>">
86 <th nowrap="nowrap">
87 <?php echo htmlspecialchars(str_replace('_', ' ', $name)); ?></th>
88 <td class="value"><?php
89 if (strlen($value) < 16 && is_numeric($value)) {
90 echo PMA_formatNumber($value, 0);
91 $is_numeric = true;
92 } else {
93 echo htmlspecialchars($value);
94 $is_numeric = false;
96 ?></td>
97 <td class="value"><?php
98 if (isset($VARIABLE_DOC_LINKS[$name])) // To display variable documentation link
99 echo PMA_showMySQLDocu($VARIABLE_DOC_LINKS[$name][1], $VARIABLE_DOC_LINKS[$name][1], false, $VARIABLE_DOC_LINKS[$name][2] . '_' . $VARIABLE_DOC_LINKS[$name][0]);
100 ?></td>
101 <?php
102 if ($serverVarsGlobal[$name] !== $value) {
104 </tr>
105 <tr class="noclick <?php
106 echo $odd_row ? 'odd' : 'even';
107 ?> marked">
108 <td>(<?php echo __('Global value'); ?>)</td>
109 <td class="value"><?php
110 if ($is_numeric) {
111 echo PMA_formatNumber($serverVarsGlobal[$name], 0);
112 } else {
113 echo htmlspecialchars($serverVarsGlobal[$name]);
115 ?></td>
116 <td class="value"></td>
117 <?php } ?>
118 </tr>
119 <?php
120 $odd_row = !$odd_row;
123 </tbody>
124 </table>
125 <?php
129 * Sends the footer
131 require './libraries/footer.inc.php';