index.lib.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * set of functions for structure section in pma
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. if (!defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. require_once 'libraries/Index.class.php';
  12. /**
  13. * Get HTML for display indexes
  14. *
  15. * @return string $html_output
  16. */
  17. function PMA_getHtmlForDisplayIndexes()
  18. {
  19. $html_output = PMA_Util::getDivForSliderEffect(
  20. 'indexes', __('Indexes')
  21. );
  22. $html_output .= PMA_Index::getView($GLOBALS['table'], $GLOBALS['db']);
  23. $html_output .= '<fieldset class="tblFooters" style="text-align: left;">'
  24. . '<form action="tbl_indexes.php" method="post">';
  25. $html_output .= PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table'])
  26. . sprintf(
  27. __('Create an index on &nbsp;%s&nbsp;columns'),
  28. '<input type="text" size="2" name="added_fields" value="1" />'
  29. );
  30. $html_output .= '<input type="hidden" name="create_index" value="1" />'
  31. . '<input class="add_index ajax"'
  32. . ' type="submit" value="' . __('Go') . '" />';
  33. $html_output .= '</form>'
  34. . '</fieldset>'
  35. . '</div>'
  36. . '</div>';
  37. return $html_output;
  38. }