bug #3033063 [core] Navi gets wrong db name
[phpmyadmin/tyronm.git] / server_variables.php
blob4c25690e851d8a94a6020ab0095885da1a6a5170
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 * @package phpMyAdmin
7 */
9 /**
10 * no need for variables importing
11 * @ignore
13 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
14 define('PMA_NO_VARIABLES_IMPORT', true);
16 require_once './libraries/common.inc.php';
18 /**
19 * Does the common work
21 require './libraries/server_common.inc.php';
24 /**
25 * Displays the links
27 require './libraries/server_links.inc.php';
30 /**
31 * Displays the sub-page heading
33 echo '<h2>' . "\n"
34 . ($cfg['MainPageIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_vars.png" width="16" height="16" alt="" />' : '')
35 . '' . $strServerVars . "\n"
36 . '</h2>' . "\n";
39 /**
40 * Sends the queries and buffers the results
42 $serverVars = PMA_DBI_fetch_result('SHOW SESSION VARIABLES;', 0, 1);
43 $serverVarsGlobal = PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES;', 0, 1);
46 /**
47 * Displays the page
50 <table class="data">
51 <thead>
52 <tr><th><?php echo $strVar; ?></th>
53 <th>
54 <?php
55 echo $strSessionValue . ' / ' . $strGlobalValue;
57 </th>
58 </tr>
59 </thead>
60 <tbody>
61 <?php
62 $odd_row = true;
63 foreach ($serverVars as $name => $value) {
65 <tr class="<?php
66 echo $odd_row ? 'odd' : 'even';
67 if ($serverVarsGlobal[$name] !== $value) {
68 echo ' marked';
70 ?>">
71 <th nowrap="nowrap">
72 <?php echo htmlspecialchars(str_replace('_', ' ', $name)); ?></th>
73 <td class="value"><?php
74 if (strlen($value) < 16 && is_numeric($value)) {
75 echo PMA_formatNumber($value, 0);
76 $is_numeric = true;
77 } else {
78 echo htmlspecialchars($value);
79 $is_numeric = false;
81 ?></td>
82 <?php
83 if ($serverVarsGlobal[$name] !== $value) {
85 </tr>
86 <tr class="<?php
87 echo $odd_row ? 'odd' : 'even';
88 ?> marked">
89 <td>(<?php echo $strGlobalValue; ?>)</td>
90 <td class="value"><?php
91 if ($is_numeric) {
92 echo PMA_formatNumber($serverVarsGlobal[$name], 0);
93 } else {
94 echo htmlspecialchars($serverVarsGlobal[$name]);
96 ?></td>
97 <?php } ?>
98 </tr>
99 <?php
100 $odd_row = !$odd_row;
103 </tbody>
104 </table>
105 <?php
109 * Sends the footer
111 require_once './libraries/footer.inc.php';