Bug #3197273 Creating table with error does not show anything
[phpmyadmin/last10db.git] / server_variables.php
blobfefa1196f592a0874c8ca9648d97701a117b0d3e
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 /**
18 * Does the common work
20 require './libraries/server_common.inc.php';
23 /**
24 * Displays the links
26 require './libraries/server_links.inc.php';
29 /**
30 * Displays the sub-page heading
32 echo '<h2>' . "\n"
33 . ($cfg['MainPageIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_vars.png" width="16" height="16" alt="" />' : '')
34 . '' . __('Server variables and settings') . "\n"
35 . PMA_showMySQLDocu('server_system_variables','server_system_variables')
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 __('Variable'); ?></th>
53 <th>
54 <?php
55 echo __('Session value') . ' / ' . __('Global value');
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 __('Global value'); ?>)</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 './libraries/footer.inc.php';