2 /* vim: set expandtab sw=4 ts=4 sts=4: */
11 require_once 'libraries/common.inc.php';
14 * Does the common work
16 require 'libraries/server_common.inc.php';
18 $response = PMA_Response
::getInstance();
21 * Displays the sub-page heading
24 . ' ' . PMA_Util
::getImage('s_asci.png')
25 . '' . __('Character Sets and Collations') . "\n"
29 * Includes the required charset library
31 require_once 'libraries/mysql_charsets.lib.php';
37 $html .= '<div id="div_mysql_charset_collations">' . "\n"
38 . '<table class="data noclick">' . "\n"
39 . '<tr><th>' . __('Collation') . '</th>' . "\n"
40 . ' <th>' . __('Description') . '</th>' . "\n"
44 $table_row_count = count($mysql_charsets) +
count($mysql_collations);
46 foreach ($mysql_charsets as $current_charset) {
47 if ($i >= $table_row_count / 2) {
49 $html .= '</table>' . "\n"
50 . '<table class="data noclick">' . "\n"
51 . '<tr><th>' . __('Collation') . '</th>' . "\n"
52 . ' <th>' . __('Description') . '</th>' . "\n"
56 $html .= '<tr><th colspan="2" class="right">' . "\n"
57 . ' ' . htmlspecialchars($current_charset) . "\n"
58 . (empty($mysql_charsets_descriptions[$current_charset])
60 : ' (<i>' . htmlspecialchars(
61 $mysql_charsets_descriptions[$current_charset]
66 foreach ($mysql_collations[$current_charset] as $current_collation) {
68 $html .= '<tr class="'
69 . ($odd_row ?
'odd' : 'even')
70 . ($mysql_default_collations[$current_charset] == $current_collation
73 . ($mysql_collations_available[$current_collation] ?
'' : ' disabled')
75 . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n"
76 . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n"
81 unset($table_row_count);
82 $html .= '</table>' . "\n"
85 $response->addHTML($html);