norwegian update (2.11.x)
[phpmyadmin/sankalp_k.git] / server_variables.php
blobac18cea84f4820d551598cd12e38ad99d2fb451c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 */
8 /**
11 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
12 define('PMA_NO_VARIABLES_IMPORT', true);
14 require_once './libraries/common.inc.php';
16 /**
17 * Does the common work
19 require './libraries/server_common.inc.php';
22 /**
23 * Displays the links
25 require './libraries/server_links.inc.php';
28 /**
29 * Displays the sub-page heading
31 echo '<h2>' . "\n"
32 . ($cfg['MainPageIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_vars.png" width="16" height="16" alt="" />' : '')
33 . '' . $strServerVars . "\n"
34 . '</h2>' . "\n";
37 /**
38 * Sends the queries and buffers the results
40 if (PMA_MYSQL_INT_VERSION >= 40003) {
41 $serverVars = PMA_DBI_fetch_result('SHOW SESSION VARIABLES;', 0, 1);
42 $serverVarsGlobal = PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES;', 0, 1);
43 } else {
44 $serverVars = PMA_DBI_fetch_result('SHOW VARIABLES;', 0, 1);
48 /**
49 * Displays the page
52 <table class="data">
53 <thead>
54 <tr><th><?php echo $strVar; ?></th>
55 <th>
56 <?php
57 if (PMA_MYSQL_INT_VERSION >= 40003) {
58 echo $strSessionValue . ' / ' . $strGlobalValue;
59 } else {
60 echo $strValue;
63 </th>
64 </tr>
65 </thead>
66 <tbody>
67 <?php
68 $odd_row = true;
69 foreach ($serverVars as $name => $value) {
71 <tr class="<?php
72 echo $odd_row ? 'odd' : 'even';
73 if (PMA_MYSQL_INT_VERSION >= 40003
74 && $serverVarsGlobal[$name] !== $value) {
75 echo ' marked';
77 ?>">
78 <th nowrap="nowrap">
79 <?php echo htmlspecialchars(str_replace('_', ' ', $name)); ?></th>
80 <td class="value"><?php
81 if (strlen($value) < 16 && is_numeric($value)) {
82 echo PMA_formatNumber($value, 0);
83 $is_numeric = true;
84 } else {
85 echo htmlspecialchars($value);
86 $is_numeric = false;
88 ?></td>
89 <?php
90 if (PMA_MYSQL_INT_VERSION >= 40003
91 && $serverVarsGlobal[$name] !== $value) {
93 </tr>
94 <tr class="<?php
95 echo $odd_row ? 'odd' : 'even';
96 ?> marked">
97 <td>(<?php echo $strGlobalValue; ?>)</td>
98 <td class="value"><?php
99 if ($is_numeric) {
100 echo PMA_formatNumber($serverVarsGlobal[$name], 0);
101 } else {
102 echo htmlspecialchars($serverVarsGlobal[$name]);
104 ?></td>
105 <?php } ?>
106 </tr>
107 <?php
108 $odd_row = !$odd_row;
111 </tbody>
112 </table>
113 <?php
117 * Sends the footer
119 require_once './libraries/footer.inc.php';