transformation_overview.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Lists available transformation plugins
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. /**
  9. * Gets some core libraries and displays a top message if required
  10. */
  11. require_once './libraries/common.inc.php';
  12. require_once './libraries/transformations.lib.php';
  13. $response = PMA_Response::getInstance();
  14. $header = $response->getHeader();
  15. $header->disableMenu();
  16. $types = PMA_getAvailableMIMEtypes();
  17. ?>
  18. <h2><?php echo __('Available MIME types'); ?></h2>
  19. <?php
  20. foreach ($types['mimetype'] as $key => $mimetype) {
  21. if (isset($types['empty_mimetype'][$mimetype])) {
  22. echo '<i>' . $mimetype . '</i><br />';
  23. } else {
  24. echo $mimetype . '<br />';
  25. }
  26. }
  27. ?>
  28. <br />
  29. <h2><?php echo __('Available transformations'); ?></h2>
  30. <table width="90%">
  31. <thead>
  32. <tr>
  33. <th><?php echo __('Browser transformation'); ?></th>
  34. <th><?php echo _pgettext('for MIME transformation', 'Description'); ?></th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <?php
  39. $odd_row = true;
  40. foreach ($types['transformation'] as $key => $transform) {
  41. $desc = PMA_getTransformationDescription($types['transformation_file'][$key]);
  42. ?>
  43. <tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
  44. <td><?php echo $transform; ?></td>
  45. <td><?php echo $desc; ?></td>
  46. </tr>
  47. <?php
  48. $odd_row = !$odd_row;
  49. }
  50. ?>
  51. </tbody>
  52. </table>