bug #1918531 [compatibility] Navigation is not w3.org valid
[phpmyadmin/dkf.git] / server_collations.php
blobf815d6ac3cbe276475bf824a4cb76d7d95b46be5
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 */
8 /**
9 * requirements
11 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
12 define('PMA_NO_VARIABLES_IMPORT', true);
14 require_once './libraries/common.inc.php';
16 /**
17 * Does the common work
19 require './libraries/server_common.inc.php';
22 /**
23 * Displays the links
25 require './libraries/server_links.inc.php';
28 /**
29 * Displays the sub-page heading
31 echo '<h2>' . "\n"
32 . ' ' . ($GLOBALS['cfg']['MainPageIconic']
33 ? '<img class="icon" src="'. $GLOBALS['pmaThemeImage'] . 's_asci.png" alt="" />'
34 : '')
35 . '' . $strCharsetsAndCollations . "\n"
36 . '</h2>' . "\n";
39 /**
40 * exits if wrong MySQL version
41 * @todo Some nice Message :-)
43 if (PMA_MYSQL_INT_VERSION < 40100) {
44 require_once './libraries/footer.inc.php';
48 /**
49 * Includes the required charset library
51 require_once './libraries/mysql_charsets.lib.php';
54 /**
55 * Outputs the result
57 echo '<div id="div_mysql_charset_collations">' . "\n"
58 . '<table class="data">' . "\n"
59 . '<tr><th>' . $strCollation . '</th>' . "\n"
60 . ' <th>' . $strDescription . '</th>' . "\n"
61 . '</tr>' . "\n";
63 $i = 0;
64 $table_row_count = count($mysql_charsets) + $mysql_collations_count;
66 foreach ($mysql_charsets as $current_charset) {
67 if ($i >= $table_row_count / 2) {
68 $i = 0;
69 echo '</table>' . "\n"
70 . '<table class="data">' . "\n"
71 . '<tr><th>' . $strCollation . '</th>' . "\n"
72 . ' <th>' . $strDescription . '</th>' . "\n"
73 . '</tr>' . "\n";
75 $i++;
76 echo '<tr><th colspan="2" align="right">' . "\n"
77 . ' ' . htmlspecialchars($current_charset) . "\n"
78 . (empty($mysql_charsets_descriptions[$current_charset])
79 ? ''
80 : ' (<i>' . htmlspecialchars(
81 $mysql_charsets_descriptions[$current_charset]) . '</i>)' . "\n")
82 . ' </th>' . "\n"
83 . '</tr>' . "\n";
84 $odd_row = true;
85 foreach ($mysql_collations[$current_charset] as $current_collation) {
86 $i++;
87 echo '<tr class="'
88 . ($odd_row ? 'odd' : 'even')
89 . ($mysql_default_collations[$current_charset] == $current_collation
90 ? ' marked'
91 : '')
92 . ($mysql_collations_available[$current_collation] ? '' : ' disabled')
93 . '">' . "\n"
94 . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n"
95 . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n"
96 . '</tr>' . "\n";
97 $odd_row = !$odd_row;
100 unset($table_row_count);
101 echo '</table>' . "\n"
102 . '</div>' . "\n";
104 require_once './libraries/footer.inc.php';