add unique numbers to $strFileCouldNotBeRead to improve support when someone gets...
[phpmyadmin/crack.git] / server_variables.php
blob9bee7c4390f9169db54bb06fdd673bab83e093c4
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Does the common work
8 */
9 require('./server_common.inc.php');
12 /**
13 * Displays the links
15 require('./server_links.inc.php');
18 /**
19 * Displays the sub-page heading
21 echo '<h2>' . "\n"
22 . ($cfg['MainPageIconic'] ? '<img src="' . $pmaThemeImage . 's_vars.png" width="16" height="16" border="0" hspace="2" align="middle" />' : '' )
23 . '' . $strServerVars . "\n"
24 . '</h2>' . "\n";
27 /**
28 * Checks if the user is allowed to do what he tries to...
30 if (!$is_superuser && !$cfg['ShowMysqlVars']) {
31 echo $strNoPrivileges;
32 require_once('./footer.inc.php');
36 /**
37 * Sends the queries and buffers the results
39 if (PMA_MYSQL_INT_VERSION >= 40003) {
40 $res = PMA_DBI_query('SHOW SESSION VARIABLES;');
41 while ($row = PMA_DBI_fetch_row($res)) {
42 $serverVars[$row[0]] = $row[1];
44 PMA_DBI_free_result($res);
45 unset($res, $row);
46 $res = PMA_DBI_query('SHOW GLOBAL VARIABLES;');
47 while ($row = PMA_DBI_fetch_row($res)) {
48 $serverVarsGlobal[$row[0]] = $row[1];
50 PMA_DBI_free_result($res);
51 unset($res, $row);
52 } else {
53 $res = PMA_DBI_query('SHOW VARIABLES;');
54 while ($row = PMA_DBI_fetch_row($res)) {
55 $serverVars[$row[0]] = $row[1];
57 PMA_DBI_free_result($res);
58 unset($res, $row);
60 unset($res);
61 unset($row);
64 /**
65 * Displays the page
68 <table border="0" cellpadding="2" cellspacing="1" width="90%">
69 <tr>
70 <th>&nbsp;<?php echo $strVar; ?>&nbsp;</th>
71 <?php
72 echo ' <th>&nbsp;';
73 if (PMA_MYSQL_INT_VERSION >= 40003) {
74 echo $strSessionValue . '&nbsp;</th>' . "\n"
75 . ' <th>&nbsp;' . $strGlobalValue;
76 } else {
77 echo $strValue;
79 echo '&nbsp;</th>' . "\n";
81 </tr>
82 <?php
83 $useBgcolorOne = TRUE;
84 $on_mouse='';
85 foreach ($serverVars as $name => $value) {
86 if ($GLOBALS['cfg']['BrowsePointerEnable'] == TRUE) {
87 $on_mouse = ' onmouseover="this.style.backgroundColor=\'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\';"'
88 . ' onmouseout="this.style.backgroundColor=\'' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '\';"';
89 } else {
90 $on_mouse = '';
93 <tr bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"<?php echo $on_mouse; ?>>
94 <td nowrap="nowrap" valign="top">
95 <b><?php echo htmlspecialchars(str_replace('_', ' ', $name)) . "\n"; ?></b>
96 </td>
97 <td>
98 <?php echo htmlspecialchars($value) . "\n"; ?>
99 </td>
100 <?php
101 if (PMA_MYSQL_INT_VERSION >= 40003) {
103 <td>
104 <?php echo htmlspecialchars($serverVarsGlobal[$name]) . "\n"; ?>
105 </td>
106 <?php
108 $useBgcolorOne = !$useBgcolorOne;
110 </tr>
111 <?php
114 </table>
115 <?php
119 * Sends the footer
121 require_once('./footer.inc.php');