Updated documentation.
[openemr.git] / interface / main / myadmin / server_variables.php
blobcb836e8e335f3a5b044ede65ce94350c112254c3
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 . ' ' . $strServerVars . "\n"
23 . '</h2>' . "\n";
26 /**
27 * Checks if the user is allowed to do what he tries to...
29 if (!$is_superuser && !$cfg['ShowMysqlVars']) {
30 echo $strNoPrivileges;
31 require_once('./footer.inc.php');
35 /**
36 * Sends the queries and buffers the results
38 if (PMA_MYSQL_INT_VERSION >= 40003) {
39 $res = @PMA_mysql_query('SHOW SESSION VARIABLES;', $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), 'SHOW SESSION VARIABLES;');
40 while ($row = PMA_mysql_fetch_row($res)) {
41 $serverVars[$row[0]] = $row[1];
43 @mysql_free_result($res);
44 $res = @PMA_mysql_query('SHOW GLOBAL VARIABLES;', $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), 'SHOW GLOBAL VARIABLES;');
45 while ($row = PMA_mysql_fetch_row($res)) {
46 $serverVarsGlobal[$row[0]] = $row[1];
48 @mysql_free_result($res);
49 } else {
50 $res = @PMA_mysql_query('SHOW VARIABLES;', $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), 'SHOW VARIABLES;');
51 while ($row = PMA_mysql_fetch_row($res)) {
52 $serverVars[$row[0]] = $row[1];
54 @mysql_free_result($res);
56 unset($res);
57 unset($row);
60 /**
61 * Displays the page
64 <table border="0">
65 <tr>
66 <th>&nbsp;<?php echo $strVar; ?>&nbsp;</th>
67 <?php
68 echo ' <th>&nbsp;';
69 if (PMA_MYSQL_INT_VERSION >= 40003) {
70 echo $strSessionValue . '&nbsp;</th>' . "\n"
71 . ' <th>&nbsp;' . $strGlobalValue;
72 } else {
73 echo $strValue;
75 echo '&nbsp;</th>' . "\n";
77 </tr>
78 <?php
79 $useBgcolorOne = TRUE;
80 foreach ($serverVars as $name => $value) {
82 <tr>
83 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">
84 <?php echo htmlspecialchars(str_replace('_', ' ', $name)) . "\n"; ?>
85 </td>
86 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">
87 <?php echo htmlspecialchars($value) . "\n"; ?>
88 </td>
89 <?php
90 if (PMA_MYSQL_INT_VERSION >= 40003) {
92 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">
93 <?php echo htmlspecialchars($serverVarsGlobal[$name]) . "\n"; ?>
94 </td>
95 <?php
97 $useBgcolorOne = !$useBgcolorOne;
99 </tr>
100 <?php
103 </table>
104 <?php
108 * Sends the footer
110 require_once('./footer.inc.php');