3 require_once('./libraries/grab_globals.lib.php');
4 require_once('./libraries/common.lib.php');
7 $path_to_themes = $cfg['ThemePath'] . '/';
8 require_once('./libraries/select_theme.lib.php');
10 /* set language and charset */
11 require_once('./libraries/header_http.inc.php');
13 /* Gets the font sizes to use */
15 /* remove vertical scroll bar bug in ie */
16 echo "<?xml version=\"1.0\" encoding=\"" . $GLOBALS['charset'] . "\"?".">";
18 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
19 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
20 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang
="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir
="<?php echo $GLOBALS['text_dir']; ?>">
23 <title
>phpMyAdmin
<?php
echo PMA_VERSION
; ?
></title
>
24 <meta http
-equiv
="Content-Type" content
="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
25 <meta http
-equiv
="imagetoolbar" content
="no">
26 <script language
="JavaScript" type
="text/javascript">
28 /* added 2004-06-10 by Michael Keck
29 * we need this for Backwards-Compatibility and resolving problems
30 * with non DOM browsers, which may have problems with css 2 (like NC 4)
32 var isDOM
= (typeof(document
.getElementsByTagName
) != 'undefined'
33 && typeof(document
.createElement
) != 'undefined')
35 var isIE4
= (typeof(document
.all
) != 'undefined'
36 && parseInt(navigator
.appVersion
) >= 4)
38 var isNS4
= (typeof(document
.layers
) != 'undefined')
40 var capable
= (isDOM || isIE4 || isNS4
)
42 // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
44 if (typeof(window
.opera
) != 'undefined') {
45 var browserName
= ' ' + navigator
.userAgent
.toLowerCase();
46 if ((browserName
.indexOf('konqueror 7') == 0)) {
49 } else if (typeof(navigator
.userAgent
) != 'undefined') {
50 var browserName
= ' ' + navigator
.userAgent
.toLowerCase();
51 if ((browserName
.indexOf('konqueror') > 0) && (browserName
.indexOf('konqueror/3') == 0)) {
54 } // end if... else if...
56 document
.writeln('<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR
') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages
'][$GLOBALS['lang
']][2]; ?>&js_frame=right&js_isDOM=' + isDOM +
'" />');
60 <link rel
="stylesheet" type
="text/css" href
="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&js_frame=right" />
62 <script language
="JavaScript">
64 function takeThis(what
){
65 if (window
.opener
&& window
.opener
.document
.forms
['setTheme'].elements
['set_theme']) {
66 window
.opener
.document
.forms
['setTheme'].elements
['set_theme'].value
= what
;
67 window
.opener
.document
.forms
['setTheme'].submit();
70 alert('<?php echo sprintf($strNoThemeSupport, $cfg['ThemePath
']); ?>');
78 <body bgcolor
="<?php echo $cfg['RightBgColor']; ?>">
79 <table border
="0" align
="center" cellpadding
="3" cellspacing
="1">
81 <th
class="tblHeaders"><b
>phpMyAdmin
- <?php
echo $strTheme; ?
></b
></th
>
84 <td
><img src
="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width
="1" height
="1" border
="0" alt
="" /></td
>
87 if ($handleThemes = opendir($path_to_themes)) { // open themes
88 while (false !== ($PMA_Theme = readdir($handleThemes))) { // get screens
89 if ($PMA_Theme != "." && $PMA_Theme != "..") {
90 $screen_directory = $path_to_themes . $PMA_Theme;
92 // check for theme requires/name
93 unset($theme_name, $theme_generation, $theme_version);
94 @include
($path_to_themes . $PMA_Theme . '/info.inc.php');
96 // did it set correctly?
97 if (!isset($theme_name, $theme_generation, $theme_version))
98 continue; // invalid theme
100 if ($theme_generation != PMA_THEME_GENERATION
)
101 continue; // different generation
103 if ($theme_version < PMA_THEME_VERSION
)
104 continue; // too old version
107 if (is_dir($screen_directory) && @file_exists
($screen_directory.'/screen.png')) { // if screen exists then output
112 echo '<b>' . htmlspecialchars($theme_name) . '</b>';
117 <td align
="center" bgcolor
="<?php echo $cfg['BgcolorOne']; ?>" class="navNorm">
118 <script language
="JavaScript">
120 document
.write('<a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
121 document
.write('<img src="<?php echo $screen_directory; ?>/screen.png" border="1" ');
122 if (document
.getElementById
) {
123 document
.write('style="border: 1px solid #000000;" ');
125 document
.write('alt="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" ');
126 document
.write('title="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" />');
127 document
.write('</a><br />');
128 document
.write('[ <b><a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
129 document
.write('<?php echo addslashes($strTakeIt); ?>');
130 document
.write('</a></b> ]');
135 echo '<img src="' . $screen_directory . '/screen.png" border="1" alt="' . htmlspecialchars($theme_name) . ' - Theme" />';
141 <td
><img src
="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width
="1" height
="1" border
="0" alt
="" /></td
>
144 } // end 'screen output'
145 } // end 'check theme'
146 } // end 'get screens'
147 closedir($handleThemes);
148 } // end 'open themes'