themes.php 956 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Displays list of themes.
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. use PhpMyAdmin\Core;
  9. use PhpMyAdmin\ThemeManager;
  10. use PhpMyAdmin\Response;
  11. /**
  12. * get some globals
  13. */
  14. require './libraries/common.inc.php';
  15. $response = Response::getInstance();
  16. $response->getFooter()->setMinimal();
  17. $header = $response->getHeader();
  18. $header->setBodyId('bodythemes');
  19. $header->setTitle('phpMyAdmin - ' . __('Theme'));
  20. $header->disableMenuAndConsole();
  21. $hash = '#pma_' . preg_replace('/([0-9]*)\.([0-9]*)\..*/', '\1_\2', PMA_VERSION);
  22. $url = Core::linkURL('https://www.phpmyadmin.net/themes/') . $hash;
  23. $output = '<h1>phpMyAdmin - ' . __('Theme') . '</h1>';
  24. $output .= '<p>';
  25. $output .= '<a href="' . $url . '" rel="noopener noreferrer" target="_blank">';
  26. $output .= __('Get more themes!');
  27. $output .= '</a>';
  28. $output .= '</p>';
  29. $output .= ThemeManager::getInstance()->getPrintPreviews();
  30. $response->addHTML($output);