Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Mendel <cybot_tm@users.sourceforge.net>2005-11-23 19:56:16 +0300
committerSebastian Mendel <cybot_tm@users.sourceforge.net>2005-11-23 19:56:16 +0300
commit8f1bb568964ea10dba174c1e8dc9d19917682f10 (patch)
treeb9e6957012816328361ee440bc4e988aed88dd50 /themes.php
parentfef607cd64e0bf5a469e3127d4e14a2e8b549a58 (diff)
- moved styles into css
- no need for javascript for theme selection
Diffstat (limited to 'themes.php')
-rw-r--r--themes.php111
1 files changed, 40 insertions, 71 deletions
diff --git a/themes.php b/themes.php
index b9348d6355..fcda420fb1 100644
--- a/themes.php
+++ b/themes.php
@@ -13,89 +13,58 @@ require_once('./libraries/header_http.inc.php');
$page_title = 'phpMyAdmin - ' . $strTheme;
require('./libraries/header_meta_style.inc.php');
?>
-<script language="JavaScript">
-<!--
- function takeThis(what){
- if (window.opener && window.opener.document.forms['setTheme'].elements['set_theme']) {
- window.opener.document.forms['setTheme'].elements['set_theme'].value = what;
- window.opener.document.forms['setTheme'].submit();
- self.close();
- } else {
- alert('<?php echo sprintf($strNoThemeSupport, $cfg['ThemePath']); ?>');
- self.close();
- }
+<script language="JavaScript" type="text/javascript">
+// <![CDATA[
+function takeThis(what){
+ if (window.opener && window.opener.document.forms['setTheme'].elements['set_theme']) {
+ window.opener.document.forms['setTheme'].elements['set_theme'].value = what;
+ window.opener.document.forms['setTheme'].submit();
+ self.close();
+ } else {
+ alert('<?php echo sprintf($strNoThemeSupport, $cfg['ThemePath']); ?>');
+ self.close();
}
-//-->
+}
+// ]]>
</script>
</head>
-<body>
- <table border="0" align="center" cellpadding="3" cellspacing="1">
- <tr>
- <th class="tblHeaders"><b>phpMyAdmin - <?php echo $strTheme; ?></b></th>
- </tr>
- <tr>
- <td><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td>
- </tr>
- <?php
+<body id="bodythemes">
+<h1>phpMyAdmin - <?php echo $strTheme; ?></h1>
+<?php
foreach ($available_themes_choices AS $PMA_Theme) {
- $screen_directory = $path_to_themes . $PMA_Theme;
-
- // check for theme requires/name
- unset($theme_name, $theme_generation, $theme_version);
- @include($path_to_themes . $PMA_Theme . '/info.inc.php');
+ $screen_directory = $path_to_themes . $PMA_Theme;
- // did it set correctly?
- if (!isset($theme_name, $theme_generation, $theme_version))
- continue; // invalid theme
+ // check for theme requires/name
+ unset($theme_name, $theme_generation, $theme_version);
+ @include($path_to_themes . $PMA_Theme . '/info.inc.php');
- if ($theme_generation != PMA_THEME_GENERATION)
- continue; // different generation
+ // did it set correctly?
+ if (!isset($theme_name, $theme_generation, $theme_version))
+ continue; // invalid theme
- if ($theme_version < PMA_THEME_VERSION)
- continue; // too old version
+ if ($theme_generation != PMA_THEME_GENERATION)
+ continue; // different generation
+ if ($theme_version < PMA_THEME_VERSION)
+ continue; // too old version
- if (is_dir($screen_directory) && @file_exists($screen_directory.'/screen.png')) { // if screen exists then output
+ if (is_dir($screen_directory) && @file_exists($screen_directory.'/screen.png')) {
+ // if screen exists then output
?>
- <tr>
- <th align="left">
- <?php
- echo '<b>' . htmlspecialchars($theme_name) . '</b>';
- ?>
- </th>
- </tr>
- <tr>
- <td align="center" bgcolor="<?php echo $cfg['BgcolorOne']; ?>" class="navNorm">
- <script language="JavaScript">
- <!--
- document.write('<a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
- document.write('<img src="<?php echo $screen_directory; ?>/screen.png" border="1" ');
- if (document.getElementById) {
- document.write('style="border: 1px solid #000000;" ');
- }
- document.write('alt="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" ');
- document.write('title="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" />');
- document.write('</a><br />');
- document.write('[ <b><a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
- document.write('<?php echo addslashes($strTakeIt); ?>');
- document.write('</a></b> ]');
- //-->
- </script>
- <noscript>
- <?php
- echo '<img src="' . $screen_directory . '/screen.png" border="1" alt="' . htmlspecialchars($theme_name) . ' - Theme" />';
- ?>
- </noscript>
- </td>
- </tr>
- <tr>
- <td><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td>
- </tr>
-<?php
- } // end 'screen output'
+<h2><?php echo htmlspecialchars( $theme_name ); ?></h2>
+
+<p> <a href="index.php?set_theme=<?php echo $PMA_Theme; ?>&amp;<?php echo PMA_generate_common_url(); ?>"
+ target="_top"
+ onclick="takeThis('<?php echo addslashes( $PMA_Theme ); ?>'); return false;">
+ <img src="<?php echo $screen_directory; ?>/screen.png" border="1"
+ alt="<?php echo htmlspecialchars( $theme_name ); ?>"
+ title="<?php echo htmlspecialchars( $theme_name ); ?>" /><br />
+ [ <b><?php echo $strTakeIt; ?></b> ]</a>
+</p>
+ <?php
+ } // end 'screen output'
} // end 'open themes'
?>
- </table>
</body>
</html>