diff options
author | Michal Čihař <michal@cihar.com> | 2003-11-18 18:20:45 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2003-11-18 18:20:45 +0300 |
commit | 6884f9701a4052cf03c2af98ce799d2fd41241f5 (patch) | |
tree | 0037946d485432525dcf0d55b3e5399113192e1b /server_collations.php | |
parent | 4edf711ada5dc95ed7bb1ff2f57f1f8a1f67bd86 (diff) |
no more support for php3
Diffstat (limited to 'server_collations.php')
-rw-r--r-- | server_collations.php | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/server_collations.php b/server_collations.php new file mode 100644 index 0000000000..fe4a7afda4 --- /dev/null +++ b/server_collations.php @@ -0,0 +1,109 @@ +<?php +/* $Id$ */ +// vim: expandtab sw=4 ts=4 sts=4: + + +/** + * Does the common work + */ +require('./server_common.inc.php'); + + +/** + * Displays the links + */ +require('./server_links.inc.php'); + + +/** + * Displays the sub-page heading + */ +echo '<h2>' . "\n" + . ' ' . $strCharsetsAndCollations . "\n" + . '</h2>' . "\n"; + + +/** + * Checks the MySQL version + */ +if (PMA_MYSQL_INT_VERSION < 40100) { + // TODO: Some nice Message :-) + include('./footer.inc.php'); + exit; +} + + +/** + * Includes the required charset library + */ +require('./libraries/mysql_charsets.lib.php'); + + +/** + * Outputs the result + */ +echo '<table border="0">' . "\n" + . ' <tr>' . "\n" + . ' <td valign="top">' . "\n" + . ' <table border="0">' . "\n" + . ' <tr>' . "\n" + . ' <th>' . "\n" + . ' ' . $strCollation . "\n" + . ' </th>' . "\n" + . ' <th>' . "\n" + . ' ' . $strDescription . "\n" + . ' </th>' . "\n" + . ' </tr>' . "\n"; + +reset($mysql_charsets); +reset($mysql_collations); +$i = 0; +$table_row_count = count($mysql_charsets) + $mysql_collations_count; + +while (list(, $current_charset) = each($mysql_charsets)) { + if ($i > $table_row_count / 2) { + $i = 0; + echo ' </table>' . "\n" + . ' </td>' . "\n" + . ' <td valign="top">' . "\n" + . ' <table border="0">' . "\n" + . ' <tr>' . "\n" + . ' <th>' . "\n" + . ' ' . $strCollation . "\n" + . ' </th>' . "\n" + . ' <th>' . "\n" + . ' ' . $strDescription . "\n" + . ' </th>' . "\n" + . ' </tr>' . "\n"; + } + $i++; + echo ' <tr>' . "\n" + . ' <td colspan="2" bgcolor="' . $cfg['ThBgcolor'] . '" align="right">' . "\n" + . ' <b>' . htmlspecialchars($current_charset) . '</b>' . "\n" + . ' (<i>' . htmlspecialchars($mysql_charsets_descriptions[$current_charset]) . '</i>) ' . "\n" + . ' </td>' . "\n" + . ' </tr>' . "\n"; + $useBgcolorOne = TRUE; + reset($mysql_collations[$current_charset]); + while (list(, $current_collation) = each($mysql_collations[$current_charset])) { + $i++; + echo ' <tr>' . "\n" + . ' <td bgcolor="' . ($mysql_default_collations[$current_charset] == $current_collation ? $cfg['BrowseMarkerColor'] : ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'])) . '">' . "\n" + . ' ' . htmlspecialchars($current_collation) . ' ' . "\n" + . ' </td>' . "\n" + . ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n" + . ' ' . PMA_getCollationDescr($current_collation) . ' ' . "\n" + . ' </td>' . "\n" + . ' </tr>' . "\n"; + $useBgcolorOne = !$useBgcolorOne; + } +} +unset($table_row_count); +echo ' </table>' . "\n" + . ' </td>' . "\n" + . ' </tr>' . "\n" + . '</table>' . "\n"; + +require('./footer.inc.php'); + +?> |