server_variables.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Server variables
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. require_once 'libraries/common.inc.php';
  9. require_once 'libraries/server_variables.lib.php';
  10. $response = PMA_Response::getInstance();
  11. $header = $response->getHeader();
  12. $scripts = $header->getScripts();
  13. $scripts->addFile('server_variables.js');
  14. /**
  15. * Does the common work
  16. */
  17. require 'libraries/server_common.inc.php';
  18. /**
  19. * Array of documentation links
  20. */
  21. $variable_doc_links = PMA_getArrayForDocumentLinks();
  22. /**
  23. * Ajax request
  24. */
  25. if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) {
  26. if (isset($_REQUEST['type'])) {
  27. if ($_REQUEST['type'] === 'getval') {
  28. PMA_getAjaxReturnForGetVal($variable_doc_links);
  29. } else if ($_REQUEST['type'] === 'setval') {
  30. PMA_getAjaxReturnForSetVal($variable_doc_links);
  31. }
  32. exit;
  33. }
  34. }
  35. /**
  36. * Displays the sub-page heading
  37. */
  38. $doc_link = PMA_Util::showMySQLDocu('server_system_variables');
  39. $response->addHtml(PMA_getHtmlForSubPageHeader('variables', $doc_link));
  40. /**
  41. * Link templates
  42. */
  43. $response->addHtml(PMA_getHtmlForLinkTemplates());
  44. /**
  45. * Displays the page
  46. */
  47. $response->addHtml(PMA_getHtmlForServerVariables($variable_doc_links));
  48. exit;
  49. ?>