sorry, wrong version checked in
[phpmyadmin/arisferyanto.git] / server_variables.php
blob7bb273a6b0c9d87ec83606470d68fa21bdc97872
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
5 require_once('./libraries/common.lib.php');
7 /**
8 * Does the common work
9 */
10 require('./server_common.inc.php');
13 /**
14 * Displays the links
16 require('./server_links.inc.php');
19 /**
20 * Displays the sub-page heading
22 echo '<h2>' . "\n"
23 . ($cfg['MainPageIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_vars.png" width="16" height="16" alt="" />' : '' )
24 . '' . $strServerVars . "\n"
25 . '</h2>' . "\n";
28 /**
29 * Sends the queries and buffers the results
31 if (PMA_MYSQL_INT_VERSION >= 40003) {
32 $res = PMA_DBI_query('SHOW SESSION VARIABLES;');
33 while ($row = PMA_DBI_fetch_row($res)) {
34 $serverVars[$row[0]] = $row[1];
36 PMA_DBI_free_result($res);
37 unset($res, $row);
38 $res = PMA_DBI_query('SHOW GLOBAL VARIABLES;');
39 while ($row = PMA_DBI_fetch_row($res)) {
40 $serverVarsGlobal[$row[0]] = $row[1];
42 PMA_DBI_free_result($res);
43 unset($res, $row);
44 } else {
45 $res = PMA_DBI_query('SHOW VARIABLES;');
46 while ($row = PMA_DBI_fetch_row($res)) {
47 $serverVars[$row[0]] = $row[1];
49 PMA_DBI_free_result($res);
50 unset($res, $row);
52 unset($res);
53 unset($row);
56 /**
57 * Displays the page
60 <table border="0" cellpadding="2" cellspacing="1" width="90%">
61 <tr>
62 <th>&nbsp;<?php echo $strVar; ?>&nbsp;</th>
63 <?php
64 echo ' <th>&nbsp;';
65 if (PMA_MYSQL_INT_VERSION >= 40003) {
66 echo $strSessionValue . '&nbsp;</th>' . "\n"
67 . ' <th>&nbsp;' . $strGlobalValue;
68 } else {
69 echo $strValue;
71 echo '&nbsp;</th>' . "\n";
73 </tr>
74 <?php
75 $useBgcolorOne = TRUE;
76 $on_mouse='';
77 foreach ($serverVars as $name => $value) {
78 if ($GLOBALS['cfg']['BrowsePointerEnable'] == TRUE) {
79 $on_mouse = ' onmouseover="this.style.backgroundColor=\'' . $GLOBALS['cfg']['BrowsePointerColor'] . '\';"'
80 . ' onmouseout="this.style.backgroundColor=\'' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '\';"';
81 } else {
82 $on_mouse = '';
85 <tr bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"<?php echo $on_mouse; ?>>
86 <td nowrap="nowrap" valign="top">
87 <b><?php echo htmlspecialchars(str_replace('_', ' ', $name)) . "\n"; ?></b>
88 </td>
89 <td>
90 <?php echo htmlspecialchars($value) . "\n"; ?>
91 </td>
92 <?php
93 if (PMA_MYSQL_INT_VERSION >= 40003) {
95 <td>
96 <?php echo htmlspecialchars($serverVarsGlobal[$name]) . "\n"; ?>
97 </td>
98 <?php
100 $useBgcolorOne = !$useBgcolorOne;
102 </tr>
103 <?php
106 </table>
107 <?php
111 * Sends the footer
113 require_once('./footer.inc.php');