Translated using Weblate (Bulgarian)
[phpmyadmin.git] / server_collations.php
blob0e1164789acaa7ef343dda69fe004b9b3e27b4e3
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package PhpMyAdmin
6 */
8 /**
9 * requirements
11 require_once 'libraries/common.inc.php';
13 /**
14 * Does the common work
16 require 'libraries/server_common.inc.php';
18 $response = PMA_Response::getInstance();
20 /**
21 * Displays the sub-page heading
23 $html = '<h2>' . "\n"
24 . ' ' . PMA_Util::getImage('s_asci.png')
25 . '' . __('Character Sets and Collations') . "\n"
26 . '</h2>' . "\n";
28 /**
29 * Includes the required charset library
31 require_once 'libraries/mysql_charsets.lib.php';
34 /**
35 * Outputs the result
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"
41 . '</tr>' . "\n";
43 $i = 0;
44 $table_row_count = count($mysql_charsets) + count($mysql_collations);
46 foreach ($mysql_charsets as $current_charset) {
47 if ($i >= $table_row_count / 2) {
48 $i = 0;
49 $html .= '</table>' . "\n"
50 . '<table class="data noclick">' . "\n"
51 . '<tr><th>' . __('Collation') . '</th>' . "\n"
52 . ' <th>' . __('Description') . '</th>' . "\n"
53 . '</tr>' . "\n";
55 $i++;
56 $html .= '<tr><th colspan="2" class="right">' . "\n"
57 . ' ' . htmlspecialchars($current_charset) . "\n"
58 . (empty($mysql_charsets_descriptions[$current_charset])
59 ? ''
60 : ' (<i>' . htmlspecialchars(
61 $mysql_charsets_descriptions[$current_charset]
62 ) . '</i>)' . "\n")
63 . ' </th>' . "\n"
64 . '</tr>' . "\n";
65 $odd_row = true;
66 foreach ($mysql_collations[$current_charset] as $current_collation) {
67 $i++;
68 $html .= '<tr class="'
69 . ($odd_row ? 'odd' : 'even')
70 . ($mysql_default_collations[$current_charset] == $current_collation
71 ? ' marked'
72 : '')
73 . ($mysql_collations_available[$current_collation] ? '' : ' disabled')
74 . '">' . "\n"
75 . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n"
76 . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n"
77 . '</tr>' . "\n";
78 $odd_row = !$odd_row;
81 unset($table_row_count);
82 $html .= '</table>' . "\n"
83 . '</div>' . "\n";
85 $response->addHTML($html);