diff --git a/libraries/Theme.class.php b/libraries/Theme.class.php index 1bb289194..a5217ea42 100644 --- a/libraries/Theme.class.php +++ b/libraries/Theme.class.php @@ -211,6 +211,44 @@ class PMA_Theme { include( $_css_file ); } } + + /** + * prints out the preview for this theme + * + * @uses $this->getName() + * @uses $this->getVersion() + * @uses $this->getId() + * @uses $this->getPath() + * @uses $GLOBALS['strThemeNoPreviewAvailable'] + * @uses $GLOBALS['strTakeIt'] + * @uses PMA_generate_common_url() + * @uses addslashes() + * @uses file_exists() + * @uses htmlspecialchars() + */ + function printPreview() { + echo '
'; + echo '

' . htmlspecialchars( $this->getName() ) + .' (' . htmlspecialchars( $this->getVersion() ) . ')

' + .'

' + .''; + if ( @file_exists( $this->getPath() . '/screen.png' ) ) { + // if screen exists then output + + echo '' . htmlspecialchars( $this->getName() ) . '
'; + } else { + echo $GLOBALS['strThemeNoPreviewAvailable']; + } + + echo '[ ' . $GLOBALS['strTakeIt'] . ' ]
' + .'

' + .'
'; + } } ?> \ No newline at end of file