RFE #1177459, BOOL column type
[phpmyadmin/crack.git] / themes.php
blobdb40b5520ee8c9b43636537a69d0c2ce9dfc712b
1 <?php
2 /* get some globals */
3 require_once('./libraries/grab_globals.lib.php');
4 require_once('./libraries/common.lib.php');
6 /* Theme Select */
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 */
14 PMA_setFontSizes();
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']; ?>">
22 <head>
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">
27 <!--
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')
34 ? 1 : 0;
35 var isIE4 = (typeof(document.all) != 'undefined'
36 && parseInt(navigator.appVersion) >= 4)
37 ? 1 : 0;
38 var isNS4 = (typeof(document.layers) != 'undefined')
39 ? 1 : 0;
40 var capable = (isDOM || isIE4 || isNS4)
41 ? 1 : 0;
42 // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
43 if (capable) {
44 if (typeof(window.opera) != 'undefined') {
45 var browserName = ' ' + navigator.userAgent.toLowerCase();
46 if ((browserName.indexOf('konqueror 7') == 0)) {
47 capable = 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)) {
52 capable = 0;
54 } // end if... else if...
55 } // end 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]; ?>&amp;js_frame=right&amp;js_isDOM=' + isDOM + '" />');
57 //-->
58 </script>
59 <noscript>
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]; ?>&amp;js_frame=right" />
61 </noscript>
62 <script language="JavaScript">
63 <!--
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();
68 self.close();
69 } else {
70 alert('<?php echo sprintf($strNoThemeSupport, $cfg['ThemePath']); ?>');
71 self.close();
74 //-->
75 </script>
76 </head>
78 <body bgcolor="<?php echo $cfg['RightBgColor']; ?>">
79 <table border="0" align="center" cellpadding="3" cellspacing="1">
80 <tr>
81 <th class="tblHeaders"><b>phpMyAdmin - <?php echo $strTheme; ?></b></th>
82 </tr>
83 <tr>
84 <td><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td>
85 </tr>
86 <?php
87 foreach ($available_themes_choices AS $PMA_Theme) {
88 $screen_directory = $path_to_themes . $PMA_Theme;
90 // check for theme requires/name
91 unset($theme_name, $theme_generation, $theme_version);
92 @include($path_to_themes . $PMA_Theme . '/info.inc.php');
94 // did it set correctly?
95 if (!isset($theme_name, $theme_generation, $theme_version))
96 continue; // invalid theme
98 if ($theme_generation != PMA_THEME_GENERATION)
99 continue; // different generation
101 if ($theme_version < PMA_THEME_VERSION)
102 continue; // too old version
105 if (is_dir($screen_directory) && @file_exists($screen_directory.'/screen.png')) { // if screen exists then output
107 <tr>
108 <th align="left">
109 <?php
110 echo '<b>' . htmlspecialchars($theme_name) . '</b>';
112 </th>
113 </tr>
114 <tr>
115 <td align="center" bgcolor="<?php echo $cfg['BgcolorOne']; ?>" class="navNorm">
116 <script language="JavaScript">
117 <!--
118 document.write('<a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
119 document.write('<img src="<?php echo $screen_directory; ?>/screen.png" border="1" ');
120 if (document.getElementById) {
121 document.write('style="border: 1px solid #000000;" ');
123 document.write('alt="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" ');
124 document.write('title="<?php echo htmlspecialchars(addslashes($theme_name)); ?>" />');
125 document.write('</a><br />');
126 document.write('[ <b><a href="#top" onclick="takeThis(\'<?php echo $PMA_Theme; ?>\'); return false;">');
127 document.write('<?php echo addslashes($strTakeIt); ?>');
128 document.write('</a></b> ]');
129 //-->
130 </script>
131 <noscript>
132 <?php
133 echo '<img src="' . $screen_directory . '/screen.png" border="1" alt="' . htmlspecialchars($theme_name) . ' - Theme" />';
135 </noscript>
136 </td>
137 </tr>
138 <tr>
139 <td><img src="<?php echo $GLOBALS['pmaThemeImage'] . 'spacer.png'; ?>" width="1" height="1" border="0" alt="" /></td>
140 </tr>
141 <?php
142 } // end 'screen output'
143 } // end 'open themes'
145 </table>
146 </body>
147 </html>