Initial import.
[openemr.git] / interface / main / myadmin / server_collations.php
blob851de776070d1200067274665fbfa622dc5eeb4a
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Does the common work
8 */
9 require('./server_common.inc.php');
12 /**
13 * Displays the links
15 require('./server_links.inc.php');
18 /**
19 * Displays the sub-page heading
21 echo '<h2>' . "\n"
22 . ' ' . $strCharsetsAndCollations . "\n"
23 . '</h2>' . "\n";
26 /**
27 * Checks the MySQL version
29 if (PMA_MYSQL_INT_VERSION < 40100) {
30 // TODO: Some nice Message :-)
31 require_once('./footer.inc.php');
35 /**
36 * Includes the required charset library
38 require_once('./libraries/mysql_charsets.lib.php');
41 /**
42 * Outputs the result
44 echo '<table border="0">' . "\n"
45 . ' <tr>' . "\n"
46 . ' <td valign="top">' . "\n"
47 . ' <table border="0">' . "\n"
48 . ' <tr>' . "\n"
49 . ' <th>' . "\n"
50 . ' ' . $strCollation . "\n"
51 . ' </th>' . "\n"
52 . ' <th>' . "\n"
53 . ' ' . $strDescription . "\n"
54 . ' </th>' . "\n"
55 . ' </tr>' . "\n";
57 $i = 0;
58 $table_row_count = count($mysql_charsets) + $mysql_collations_count;
60 foreach ($mysql_charsets as $current_charset) {
61 if ($i > $table_row_count / 2) {
62 $i = 0;
63 echo ' </table>' . "\n"
64 . ' </td>' . "\n"
65 . ' <td valign="top">' . "\n"
66 . ' <table border="0">' . "\n"
67 . ' <tr>' . "\n"
68 . ' <th>' . "\n"
69 . ' ' . $strCollation . "\n"
70 . ' </th>' . "\n"
71 . ' <th>' . "\n"
72 . ' ' . $strDescription . "\n"
73 . ' </th>' . "\n"
74 . ' </tr>' . "\n";
76 $i++;
77 echo ' <tr>' . "\n"
78 . ' <td colspan="2" bgcolor="' . $cfg['ThBgcolor'] . '" align="right">' . "\n"
79 . ' &nbsp;<b>' . htmlspecialchars($current_charset) . '</b>' . "\n"
80 . ' (<i>' . htmlspecialchars($mysql_charsets_descriptions[$current_charset]) . '</i>)&nbsp;' . "\n"
81 . ' </td>' . "\n"
82 . ' </tr>' . "\n";
83 $useBgcolorOne = TRUE;
84 foreach ($mysql_collations[$current_charset] as $current_collation) {
85 $i++;
86 echo ' <tr>' . "\n"
87 . ' <td bgcolor="' . ($mysql_default_collations[$current_charset] == $current_collation ? $cfg['BrowseMarkerColor'] : ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'])) . '">' . "\n"
88 . ' &nbsp;' . htmlspecialchars($current_collation) . '&nbsp;' . "\n"
89 . ' </td>' . "\n"
90 . ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
91 . ' &nbsp;' . PMA_getCollationDescr($current_collation) . '&nbsp;' . "\n"
92 . ' </td>' . "\n"
93 . ' </tr>' . "\n";
94 $useBgcolorOne = !$useBgcolorOne;
97 unset($table_row_count);
98 echo ' </table>' . "\n"
99 . ' </td>' . "\n"
100 . ' </tr>' . "\n"
101 . '</table>' . "\n";
103 require_once('./footer.inc.php');