sorry, wrong version checked in
[phpmyadmin/arisferyanto.git] / themes.php
blobea0fcf81a50946972dd0a0e46e33ca954931ec53
1 <?php
2 /* get some globals */
3 require_once('./libraries/common.lib.php');
5 /* Theme Select */
6 $path_to_themes = $cfg['ThemePath'] . '/';
7 require_once('./libraries/select_theme.lib.php');
9 /* set language and charset */
10 require_once('./libraries/header_http.inc.php');
12 /* Gets the font sizes to use */
13 PMA_setFontSizes();
14 /* HTML header */
15 $page_title = 'phpMyAdmin - ' . $strTheme;
16 require('./libraries/header_meta_style.inc.php');
18 <script language="JavaScript">
19 <!--
20 function takeThis(what){
21 if (window.opener && window.opener.document.forms['setTheme'].elements['set_theme']) {
22 window.opener.document.forms['setTheme'].elements['set_theme'].value = what;
23 window.opener.document.forms['setTheme'].submit();
24 self.close();
25 } else {
26 alert('<?php echo sprintf($strNoThemeSupport, $cfg['ThemePath']); ?>');
27 self.close();
30 //-->
31 </script>
32 </head>
34 <body bgcolor="<?php echo $cfg['RightBgColor']; ?>">
35 <table border="0" align="center" cellpadding="3" cellspacing="1">
36 <tr>
37 <th class="tblHeaders"><b>phpMyAdmin - <?php echo $strTheme; ?></b></th>
38 </tr>
39 <tr>
40 <td><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td>
41 </tr>
42 <?php
43 foreach ($available_themes_choices AS $PMA_Theme) {
44 $screen_directory = $path_to_themes . $PMA_Theme;
46 // check for theme requires/name
47 unset($theme_name, $theme_generation, $theme_version);
48 @include($path_to_themes . $PMA_Theme . '/info.inc.php');
50 // did it set correctly?
51 if (!isset($theme_name, $theme_generation, $theme_version))
52 continue; // invalid theme
54 if ($theme_generation != PMA_THEME_GENERATION)
55 continue; // different generation
57 if ($theme_version < PMA_THEME_VERSION)
58 continue; // too old version
61 if (is_dir($screen_directory) && @file_exists($screen_directory.'/screen.png')) { // if screen exists then output
63 <tr>
64 <th align="left">
65 <?php
66 echo '<b>' . htmlspecialchars($theme_name) . '</b>';
68 </th>
69 </tr>
70 <tr>
71 <td align="center" bgcolor="<?php echo $cfg['BgcolorOne']; ?>" class="navNorm">
72 <script language="JavaScript">
73 <!--
74 document.write('<a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
75 document.write('<img src="<?php echo $screen_directory; ?>/screen.png" border="1" ');
76 if (document.getElementById) {
77 document.write('style="border: 1px solid #000000;" ');
79 document.write('alt="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" ');
80 document.write('title="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" />');
81 document.write('</a><br />');
82 document.write('[ <b><a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
83 document.write('<?php echo addslashes($strTakeIt); ?>');
84 document.write('</a></b> ]');
85 //-->
86 </script>
87 <noscript>
88 <?php
89 echo '<img src="' . $screen_directory . '/screen.png" border="1" alt="' . htmlspecialchars($theme_name) . ' - Theme" />';
91 </noscript>
92 </td>
93 </tr>
94 <tr>
95 <td><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td>
96 </tr>
97 <?php
98 } // end 'screen output'
99 } // end 'open themes'
101 </table>
102 </body>
103 </html>