' . "\n" . ' ' . $strServerStatus . "\n" . '' . "\n"; /** * Checks if the user is allowed to do what he tries to... */ if (!$is_superuser && !$cfg['ShowMysqlInfo']) { echo $strNoPrivileges; include('./footer.inc.php3'); exit; } /** * Sends the query and buffers the result */ $res = @PMA_mysql_query('SHOW STATUS;', $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), 'SHOW STATUS;'); while ($row = PMA_mysql_fetch_row($res)) { $serverStatus[$row[0]] = $row[1]; } @mysql_free_result($res); unset($res); unset($row); /** * Displays the page */ //Uptime calculation $res = @PMA_mysql_query('SELECT UNIX_TIMESTAMP() - ' . $serverStatus['Uptime'] . ';'); $row = PMA_mysql_fetch_row($res); echo sprintf($strServerStatusUptime, PMA_timespanFormat($serverStatus['Uptime']), PMA_localisedDate($row[0])) . "\n"; mysql_free_result($res); unset($res); unset($row); //Get query statistics $queryStats = array(); $tmp_array = $serverStatus; while (list($name, $value) = each($tmp_array)) { if (substr($name, 0, 4) == 'Com_') { $queryStats[str_replace('_', ' ', substr($name, 4))] = $value; unset($serverStatus[$name]); } } unset($tmp_array); ?>