index.lib.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 = '<div id="index_div" class="ajax" >';
  20. $html_output .= PMA_Util::getDivForSliderEffect(
  21. 'indexes', __('Indexes')
  22. );
  23. $html_output .= PMA_Index::getView($GLOBALS['table'], $GLOBALS['db']);
  24. $html_output .= '<fieldset class="tblFooters" style="text-align: left;">'
  25. . '<form action="tbl_indexes.php" method="post">';
  26. $html_output .= PMA_URL_getHiddenInputs(
  27. $GLOBALS['db'], $GLOBALS['table']
  28. );
  29. $html_output .= sprintf(
  30. __('Create an index on &nbsp;%s&nbsp;columns'),
  31. '<input type="number" name="added_fields" value="1" '
  32. . 'min="1" required="required" />'
  33. );
  34. $html_output .= '<input type="hidden" name="create_index" value="1" />'
  35. . '<input class="add_index ajax"'
  36. . ' type="submit" value="' . __('Go') . '" />';
  37. $html_output .= '</form>'
  38. . '</fieldset>'
  39. . '</div>'
  40. . '</div>';
  41. return $html_output;
  42. }