typo
[phpmyadmin/crack.git] / server_variables.php
blobb1e930af591713dea6e5c9de1411b20349a1fa60
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 $serverVars = PMA_DBI_fetch_result('SHOW SESSION VARIABLES;', 0, 1);
41 $serverVarsGlobal = PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES;', 0, 1);
44 /**
45 * Displays the page
48 <table class="data">
49 <thead>
50 <tr><th><?php echo $strVar; ?></th>
51 <th>
52 <?php
53 echo $strSessionValue . ' / ' . $strGlobalValue;
55 </th>
56 </tr>
57 </thead>
58 <tbody>
59 <?php
60 $odd_row = true;
61 foreach ($serverVars as $name => $value) {
63 <tr class="<?php
64 echo $odd_row ? 'odd' : 'even';
65 if ($serverVarsGlobal[$name] !== $value) {
66 echo ' marked';
68 ?>">
69 <th nowrap="nowrap">
70 <?php echo htmlspecialchars(str_replace('_', ' ', $name)); ?></th>
71 <td class="value"><?php
72 if (strlen($value) < 16 && is_numeric($value)) {
73 echo PMA_formatNumber($value, 0);
74 $is_numeric = true;
75 } else {
76 echo htmlspecialchars($value);
77 $is_numeric = false;
79 ?></td>
80 <?php
81 if ($serverVarsGlobal[$name] !== $value) {
83 </tr>
84 <tr class="<?php
85 echo $odd_row ? 'odd' : 'even';
86 ?> marked">
87 <td>(<?php echo $strGlobalValue; ?>)</td>
88 <td class="value"><?php
89 if ($is_numeric) {
90 echo PMA_formatNumber($serverVarsGlobal[$name], 0);
91 } else {
92 echo htmlspecialchars($serverVarsGlobal[$name]);
94 ?></td>
95 <?php } ?>
96 </tr>
97 <?php
98 $odd_row = !$odd_row;
101 </tbody>
102 </table>
103 <?php
107 * Sends the footer
109 require_once './libraries/footer.inc.php';