config.inc.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Config file view and save screen
  5. *
  6. * @package PhpMyAdmin-Setup
  7. */
  8. if (!defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. /**
  12. * Core libraries.
  13. */
  14. require_once './libraries/config/FormDisplay.class.php';
  15. require_once './setup/lib/index.lib.php';
  16. require_once './setup/lib/ConfigGenerator.class.php';
  17. $config_readable = false;
  18. $config_writable = false;
  19. $config_exists = false;
  20. PMA_checkConfigRw($config_readable, $config_writable, $config_exists);
  21. echo '<h2>' . __('Configuration file') . '</h2>';
  22. PMA_displayFormTop('config.php');
  23. echo '<input type="hidden" name="eol" value="'
  24. . htmlspecialchars(PMA_ifSetOr($_GET['eol'], 'unix')) . '" />';
  25. PMA_displayFieldsetTop('config.inc.php', '', null, array('class' => 'simple'));
  26. echo '<tr>';
  27. echo '<td>';
  28. echo '<textarea cols="50" rows="20" name="textconfig" '
  29. . 'id="textconfig" spellcheck="false">';
  30. echo htmlspecialchars(ConfigGenerator::getConfigFile($GLOBALS['ConfigFile']));
  31. echo '</textarea>';
  32. echo '</td>';
  33. echo '</tr>';
  34. echo '<tr>';
  35. echo '<td class="lastrow" style="text-align: left">';
  36. echo '<input type="submit" name="submit_download" value="'
  37. . __('Download') . '" class="green" />';
  38. echo '<input type="submit" name="submit_save" value="' . __('Save') . '"';
  39. if (!$config_writable) {
  40. echo ' disabled="disabled"';
  41. }
  42. echo '/>';
  43. echo '</td>';
  44. echo '</tr>';
  45. PMA_displayFieldsetBottomSimple();
  46. PMA_displayFormBottom();
  47. ?>