Revert initial commit
[phpmyadmin/blinky.git] / transformation_overview.php
blob12ca3951311c6fdc5d866df558503f72dc12463d
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 * @package phpMyAdmin
7 */
9 /**
10 * Don't display the page heading
11 * @ignore
13 define('PMA_DISPLAY_HEADING', 0);
15 /**
16 * Gets some core libraries and displays a top message if required
18 require_once './libraries/common.inc.php';
19 require_once './libraries/header.inc.php';
20 require_once './libraries/transformations.lib.php';
22 $types = PMA_getAvailableMIMEtypes();
25 <h2><?php echo __('Available MIME types'); ?></h2>
26 <?php
27 foreach ($types['mimetype'] as $key => $mimetype) {
29 if (isset($types['empty_mimetype'][$mimetype])) {
30 echo '<i>' . $mimetype . '</i><br />';
31 } else {
32 echo $mimetype . '<br />';
37 <br />
38 <i>(<?php echo __('MIME types printed in italics do not have a separate transformation function'); ?>)</i>
40 <br />
41 <br />
42 <br />
43 <h2><?php echo __('Available transformations'); ?></h2>
44 <table border="0" width="90%">
45 <thead>
46 <tr>
47 <th><?php echo __('Browser transformation'); ?></th>
48 <th><?php echo _pgettext('for MIME transformation', 'Description'); ?></th>
49 </tr>
50 </thead>
51 <tbody>
52 <?php
53 $odd_row = true;
54 foreach ($types['transformation'] as $key => $transform) {
55 $func = strtolower(str_ireplace('.inc.php', '', $types['transformation_file'][$key]));
56 require './libraries/transformations/' . $types['transformation_file'][$key];
57 $funcname = 'PMA_transformation_' . $func . '_info';
58 $desc = '<i>' . sprintf(__('No description is available for this transformation.<br />Please ask the author what %s does.'), 'PMA_transformation_' . $func . '()') . '</i>';
59 if (function_exists($funcname)) {
60 $desc_arr = $funcname();
61 if (isset($desc_arr['info'])) {
62 $desc = $desc_arr['info'];
66 <tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
67 <td><?php echo $transform; ?></td>
68 <td><?php echo $desc; ?></td>
69 </tr>
70 <?php
71 $odd_row = !$odd_row;
74 </tbody>
75 </table>
77 <?php
78 /**
79 * Displays the footer
81 require_once './libraries/footer.inc.php';