2 /* vim: set expandtab sw=4 ts=4 sts=4: */
9 * no need for variables importing
12 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
13 define('PMA_NO_VARIABLES_IMPORT', true);
15 require_once './libraries/common.inc.php';
18 * Does the common work
20 require './libraries/server_common.inc.php';
26 require './libraries/server_links.inc.php';
30 * Required to display documentation links
32 require './libraries/server_variables_doc.php';
35 * Displays the sub-page heading
38 . ($cfg['MainPageIconic'] ?
'<img class="icon" src="' . $pmaThemeImage . 's_vars.png" width="16" height="16" alt="" />' : '')
39 . '' . __('Server variables and settings') . "\n"
40 . PMA_showMySQLDocu('server_system_variables','server_system_variables')
45 * Sends the queries and buffers the results
47 $serverVars = PMA_DBI_fetch_result('SHOW SESSION VARIABLES;', 0, 1);
48 $serverVarsGlobal = PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES;', 0, 1);
57 <tr
><th
><?php
echo __('Variable'); ?
></th
>
60 echo __('Session value') . ' / ' . __('Global value');
63 <th
><?php
echo __('Documentation'); ?
></th
>
69 foreach ($serverVars as $name => $value) {
71 <tr
class="noclick <?php
72 echo $odd_row ? 'odd' : 'even';
73 if ($serverVarsGlobal[$name] !== $value) {
78 <?php
echo htmlspecialchars(str_replace('_', ' ', $name)); ?
></th
>
79 <td
class="value"><?php
80 if (strlen($value) < 16 && is_numeric($value)) {
81 echo PMA_formatNumber($value, 0);
84 echo htmlspecialchars($value);
88 <td
class="value"><?php
89 if (isset($VARIABLE_DOC_LINKS[$name])) // To display variable documentation link
90 echo PMA_showMySQLDocu($VARIABLE_DOC_LINKS[$name][1], $VARIABLE_DOC_LINKS[$name][1], false, $VARIABLE_DOC_LINKS[$name][2] . '_' . $VARIABLE_DOC_LINKS[$name][0]);
93 if ($serverVarsGlobal[$name] !== $value) {
97 echo $odd_row ? 'odd' : 'even';
99 <td
>(<?php
echo __('Global value'); ?
>)</td
>
100 <td
class="value"><?php
102 echo PMA_formatNumber($serverVarsGlobal[$name], 0);
104 echo htmlspecialchars($serverVarsGlobal[$name]);
107 <td
class="value"></td
>
111 $odd_row = !$odd_row;
122 require './libraries/footer.inc.php';