server_status.php 897 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * object the server status page: processes, connections and traffic
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. use PhpMyAdmin\Message;
  9. use PhpMyAdmin\Response;
  10. use PhpMyAdmin\Server\Status;
  11. use PhpMyAdmin\Server\Status\Data;
  12. require_once 'libraries/common.inc.php';
  13. require_once 'libraries/server_common.inc.php';
  14. /**
  15. * Replication library
  16. */
  17. require_once 'libraries/replication.inc.php';
  18. /**
  19. * start output
  20. */
  21. $response = Response::getInstance();
  22. $response->addHTML('<div>');
  23. $serverStatusData = new Data();
  24. $response->addHTML($serverStatusData->getMenuHtml());
  25. if ($serverStatusData->dataLoaded) {
  26. $response->addHTML(Status::getHtml($serverStatusData));
  27. } else {
  28. $response->addHTML(
  29. Message::error(
  30. __('Not enough privilege to view server status.')
  31. )->getDisplay()
  32. );
  33. }
  34. $response->addHTML('</div>');
  35. exit;