Merge remote-tracking branch 'origin/QA_4_0' into QA_4_0
[phpmyadmin.git] / test / theme.php
blob444c91de89994ceac362291e3cbc4468b69c3308
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * theme test
6 * @package PhpMyAdmin-test
7 */
9 define('PMA_TEST_THEME', true);
11 chdir('..');
13 /**
14 * Gets core libraries and defines some variables
16 require_once './libraries/common.inc.php';
17 $GLOBALS['pmaThemeImage'] = '../' . $GLOBALS['pmaThemeImage'];
19 $lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
21 // start output
22 header('Content-Type: text/html; charset=utf-8');
24 <!DOCTYPE HTML>
25 <html lang="<?php echo $lang_iso_code; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
26 <head>
27 <title>phpMyAdmin <?php echo PMA_VERSION; ?> -
28 <?php echo htmlspecialchars($_SERVER['HTTP_HOST']); ?> - Theme Test</title>
29 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
30 <link rel="stylesheet" type="text/css"
31 href="../phpmyadmin.css.php?<?php echo PMA_generate_common_url(); ?>&amp;nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
32 <link rel="stylesheet" type="text/css" media="print"
33 href="../print.css" />
34 <script src="../js/jquery/jquery-1.8.3.js" type="text/javascript"></script>
35 <script src="../js/messages.php" type="text/javascript"></script>
36 <script type="text/javascript">
37 var PMA_TEST_THEME = true;
38 </script>
39 <script src="../js/get_image.js.php" type="text/javascript"></script>
40 <script src="../js/functions.js" type="text/javascript"></script>
41 </head>
42 <body>
43 <?php
46 $separator = '<span class=\'separator item\'>&nbsp;»</span>' . "\n";
47 $item = '<a href="%1$s?%2$s" class="item">'
48 .' <img class="icon %5$s" src="../themes/dot.gif"'
49 .' width="16" height="16" alt="" /> ' . "\n"
50 .'%4$s: %3$s</a>' . "\n";
52 echo '<div id="serverinfo">' . "\n";
53 printf(
54 $item,
55 $GLOBALS['cfg']['DefaultTabServer'],
56 PMA_generate_common_url(),
57 'Server',
58 __('Server'),
59 'ic_s_host'
62 echo $separator;
63 printf(
64 $item,
65 $GLOBALS['cfg']['DefaultTabDatabase'],
66 '',
67 'Database',
68 __('Database'),
69 'ic_s_db'
72 echo $separator;
73 printf(
74 $item,
75 $GLOBALS['cfg']['DefaultTabTable'],
76 '',
77 'Table',
78 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view']
79 ? __('View')
80 : __('Table')),
81 (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view']
82 ? 'ic_b_views'
83 : 'ic_s_tbl')
86 echo '<span class="table_comment" id="span_table_comment">'
87 .'&quot;Table comment&quot;</span>' . "\n";
89 echo '</div>';
92 /**
93 * Displays tab links
95 $tabs = array();
97 $tabs['databases']['icon'] = 's_db.png';
98 $tabs['databases']['link'] = 'server_databases.php';
99 $tabs['databases']['text'] = __('Databases');
101 $tabs['sql']['icon'] = 'b_sql.png';
102 $tabs['sql']['link'] = 'server_sql.php';
103 $tabs['sql']['text'] = __('SQL');
105 $tabs['status']['icon'] = 's_status.png';
106 $tabs['status']['link'] = 'server_status.php';
107 $tabs['status']['text'] = __('Status');
109 $tabs['vars']['icon'] = 's_vars.png';
110 $tabs['vars']['link'] = 'server_variables.php';
111 $tabs['vars']['text'] = __('Variables');
113 $tabs['charset']['icon'] = 's_asci.png';
114 $tabs['charset']['link'] = 'server_collations.php';
115 $tabs['charset']['text'] = __('Charsets');
117 $tabs['engine']['icon'] = 'b_engine.png';
118 $tabs['engine']['link'] = 'server_engines.php';
119 $tabs['engine']['text'] = __('Engines');
121 $tabs['rights']['icon'] = 's_rights.png';
122 $tabs['rights']['link'] = 'server_privileges.php';
123 $tabs['rights']['text'] = __('Privileges');
125 $tabs['binlog']['icon'] = 's_tbl.png';
126 $tabs['binlog']['link'] = 'server_binlog.php';
127 $tabs['binlog']['text'] = __('Binary log');
129 $tabs['export']['icon'] = 'b_export.png';
130 $tabs['export']['text'] = 'disabled';
132 $tabs['export2']['icon'] = 'b_export.png';
133 $tabs['export2']['text'] = 'disabled caution';
134 $tabs['export2']['class'] = 'caution';
136 $tabs['import']['icon'] = 'b_import.png';
137 $tabs['import']['link'] = 'server_import.php';
138 $tabs['import']['text'] = 'active';
139 $tabs['import']['class'] = 'active';
141 echo PMA_Util::getHtmlTabs($tabs, array(), 'topmenu');
142 unset($tabs);
144 if (@file_exists($pmaThemeImage . 'logo_right.png')) {
146 <img id="pmalogoright" src="../<?php echo $pmaThemeImage; ?>logo_right.png"
147 alt="phpMyAdmin" />
148 <?php
151 <h1>
152 <?php
153 echo sprintf(
154 __('Welcome to %s'),
155 '<bdo dir="ltr" lang="en">phpMyAdmin ' . PMA_VERSION . '</bdo>'
158 </h1>
160 <hr class="clearfloat" />
162 <form method="post" action="theme.php">
163 <fieldset>
164 <legend><?php echo __('Theme'); ?></legend>
165 <?php
166 echo $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox(false);
168 </fieldset>
169 </form>
171 <hr />
173 <h1>H1 Header</h1>
174 <h2>H2 Header</h2>
175 <h3>H3 Header</h3>
176 <h4>H4 Header</h4>
178 <div class="success">
179 success message box content!
180 </div>
181 <div class="success">
182 <h1>Success message box header!</h1>
183 success message box content!
184 </div>
186 <div class="notice">
187 notice message box content!
188 </div>
189 <div class="notice">
190 <h1>Notice message box header!</h1>
191 notice message box content!
192 </div>
193 <div class="error">
194 error message box content!
195 </div>
196 <div class="error">
197 <h1>Error message box header!</h1>
198 error message box content!
199 </div>
201 <fieldset class="confirmation">
202 <legend>Confirmation fieldset</legend>
203 <code>QUERY TO EXECUTE;</code>
204 </fieldset>
205 <fieldset class="tblFooters">
206 <input type="submit" name="yes" value="YES" />
207 <input type="submit" name="no" value="NO" />
208 </fieldset>
210 <hr />
212 <div class="success">
213 success message box content!
214 </div>
215 <code class="sql">
216 <span class="syntax">
217 <span class="syntax_alpha syntax_alpha_reservedWord">SELECT</span>
218 <span class="syntax_punct">*</span> <br />
219 <span class="syntax_alpha syntax_alpha_reservedWord">FROM</span>
220 <span class="syntax_quote syntax_quote_backtick">`test`</span>
221 <span class="syntax_white syntax_white_newline"></span><br />
222 <span class="syntax_alpha syntax_alpha_reservedWord">LIMIT</span>
223 <span class="syntax_digit syntax_digit_integer">0</span>
224 <span class="syntax_punct syntax_punct_listsep">,</span>
225 <span class="syntax_digit syntax_digit_integer">30</span>;<br />
226 <span class="syntax_alpha syntax_alpha_reservedWord">SELECT</span>
227 <span class="syntax_punct">*</span> <br />
228 <span class="syntax_alpha syntax_alpha_reservedWord">FROM</span>
229 <span class="syntax_quote syntax_quote_backtick">`test`</span>
230 <span class="syntax_white syntax_white_newline"></span><br />
231 <span class="syntax_alpha syntax_alpha_reservedWord">LIMIT</span>
232 <span class="syntax_digit syntax_digit_integer">0</span>
233 <span class="syntax_punct syntax_punct_listsep">,</span>
234 <span class="syntax_digit syntax_digit_integer">30</span>;<br />
235 <span class="syntax_alpha syntax_alpha_reservedWord">SELECT</span>
236 <span class="syntax_punct">*</span> <br />
237 <span class="syntax_alpha syntax_alpha_reservedWord">FROM</span>
238 <span class="syntax_quote syntax_quote_backtick">`test`</span>
239 <span class="syntax_white syntax_white_newline"></span><br />
240 <span class="syntax_alpha syntax_alpha_reservedWord">LIMIT</span>
241 <span class="syntax_digit syntax_digit_integer">0</span>
242 <span class="syntax_punct syntax_punct_listsep">,</span>
243 <span class="syntax_digit syntax_digit_integer">30</span>;<br />
244 <span class="syntax_alpha syntax_alpha_reservedWord">SELECT</span>
245 <span class="syntax_punct">*</span> <br />
246 <span class="syntax_alpha syntax_alpha_reservedWord">FROM</span>
247 <span class="syntax_quote syntax_quote_backtick">`test`</span>
248 <span class="syntax_white syntax_white_newline"></span><br />
249 <span class="syntax_alpha syntax_alpha_reservedWord">LIMIT</span>
250 <span class="syntax_digit syntax_digit_integer">0</span>
251 <span class="syntax_punct syntax_punct_listsep">,</span>
252 <span class="syntax_digit syntax_digit_integer">30</span>;<br />
253 </span>
254 </code>
255 <div class="tools">
257 <a href="tbl_sql.php?db=test;table=test;sql_query=SELECT+%2A+FROM+%60test%60;show_query=1;token=266edabf70fa6368498d89b4054d01bf#querybox" onclick="PMA_querywindow.focus('SELECT * FROM `test`'); return false;">Bearbeiten</a>
259 <a href="import.php?db=test;table=test;sql_query=EXPLAIN+SELECT+%2A+FROM+%60test%60;token=266edabf70fa6368498d89b4054d01bf" >SQL erklären</a>
261 <a href="import.php?db=test;table=test;sql_query=SELECT+%2A+FROM+%60test%60;show_query=1;show_as_php=1;token=266edabf70fa6368498d89b4054d01bf" >PHP-Code erzeugen</a>
263 <a href="import.php?db=test;table=test;sql_query=SELECT+%2A+FROM+%60test%60;show_query=1;token=266edabf70fa6368498d89b4054d01bf" >Aktualisieren</a>
264 ]</div>
266 <hr />
268 <table class="data">
269 <caption>table.data caption</caption>
270 <thead>
271 <tr><th></th>
272 <th>table.data thead tr th</th>
273 <th>table.data thead tr th</th>
274 <th colspan="3">action</th>
275 <th>table.data thead tr th</th>
276 </tr>
277 </thead>
278 <tfoot>
279 <tr><th></th>
280 <th>table.data tfoot tr th</th>
281 <th class="value">table.data tfoot tr th</th>
282 <th colspan="3">action</th>
283 <th>table.data tfoot tr th</th>
284 </tr>
285 </tfoot>
286 <tbody>
287 <tr class="odd">
288 <td><input type="checkbox" id="checkbox_1" name="checkbox_1"
289 value="1" /></td>
290 <th><label for="checkbox_1">th label</label></th>
291 <td class="value">td.value</td>
292 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
293 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
294 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
295 <td>table.data tbody tr.odd td</td>
296 </tr>
297 <tr class="even">
298 <td><input type="checkbox" id="checkbox_2" name="checkbox_2"
299 value="1" /></td>
300 <th><label for="checkbox_2">th label</label></th>
301 <td class="value">td.value</td>
302 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
303 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
304 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
305 <td>table.data tbody tr.even td</td>
306 </tr>
307 <tr class="odd">
308 <td><input type="checkbox" id="checkbox_3" name="checkbox_3"
309 value="1" /></td>
310 <th><label for="checkbox_3">th label</label></th>
311 <td class="value">td.value</td>
312 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
313 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
314 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
315 <td>table.data tbody tr.odd td</td>
316 </tr>
317 <tr class="even">
318 <td><input type="checkbox" id="checkbox_4" name="checkbox_4"
319 value="1" /></td>
320 <th><label for="checkbox_4">th label</label></th>
321 <td class="value">td.value</td>
322 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
323 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
324 <td><img class="icon ic_bd_drop" src="../themes/dot.gif" alt="drop" /></td>
325 <td>table.data tbody tr.even td</td>
326 </tr>
327 </tbody>
328 </table>
329 </body>
330 </html>