add unique numbers to $strFileCouldNotBeRead to improve support when someone gets...
[phpmyadmin/crack.git] / server_collations.php
blob15b6ca7ea564314e6975dacc0e057ba2d64872f3
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 . ' ' . ($GLOBALS['cfg']['MainPageIconic'] ? '<img src="'. $GLOBALS['pmaThemeImage'] . 's_asci.png" border="0" hspace="2" align="middle" />' : '')
23 . '' . $strCharsetsAndCollations . "\n"
24 . '</h2>' . "\n";
27 /**
28 * Checks the MySQL version
30 if (PMA_MYSQL_INT_VERSION < 40100) {
31 // TODO: Some nice Message :-)
32 require_once('./footer.inc.php');
36 /**
37 * Includes the required charset library
39 require_once('./libraries/mysql_charsets.lib.php');
42 /**
43 * Outputs the result
45 echo '<table border="0">' . "\n"
46 . ' <tr>' . "\n"
47 . ' <td valign="top">' . "\n"
48 . ' <table border="0" cellpadding="2" cellspacing="1">' . "\n"
49 . ' <tr>' . "\n"
50 . ' <th>' . "\n"
51 . ' ' . $strCollation . "\n"
52 . ' </th>' . "\n"
53 . ' <th>' . "\n"
54 . ' ' . $strDescription . "\n"
55 . ' </th>' . "\n"
56 . ' </tr>' . "\n";
58 $i = 0;
59 $table_row_count = count($mysql_charsets) + $mysql_collations_count;
61 foreach ($mysql_charsets as $current_charset) {
62 if ($i >= $table_row_count / 2) {
63 $i = 0;
64 echo ' </table>' . "\n"
65 . ' </td>' . "\n"
66 . ' <td valign="top">' . "\n"
67 . ' <table border="0" cellpadding="2" cellspacing="1">' . "\n"
68 . ' <tr>' . "\n"
69 . ' <th>' . "\n"
70 . ' ' . $strCollation . "\n"
71 . ' </th>' . "\n"
72 . ' <th>' . "\n"
73 . ' ' . $strDescription . "\n"
74 . ' </th>' . "\n"
75 . ' </tr>' . "\n";
77 $i++;
78 echo ' <tr>' . "\n"
79 . ' <td colspan="2" bgcolor="' . $cfg['ThBgcolor'] . '" align="right">' . "\n"
80 . ' &nbsp;<b>' . htmlspecialchars($current_charset) . '</b>' . "\n"
81 . (empty($mysql_charsets_descriptions[$current_charset]) ? '' : ' (<i>' . htmlspecialchars($mysql_charsets_descriptions[$current_charset]) . '</i>)&nbsp;' . "\n")
82 . ' </td>' . "\n"
83 . ' </tr>' . "\n";
84 $useBgcolorOne = TRUE;
85 foreach ($mysql_collations[$current_charset] as $current_collation) {
86 $i++;
87 echo ' <tr' . ($mysql_collations_available[$current_collation] ? '' : ' class="disabled"') . '>' . "\n"
88 . ' <td bgcolor="' . ($mysql_default_collations[$current_charset] == $current_collation ? $cfg['BrowseMarkerColor'] : ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'])) . '">' . "\n"
89 . ' &nbsp;' . htmlspecialchars($current_collation) . '&nbsp;' . "\n"
90 . ' </td>' . "\n"
91 . ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
92 . ' &nbsp;' . PMA_getCollationDescr($current_collation) . '&nbsp;' . "\n"
93 . ' </td>' . "\n"
94 . ' </tr>' . "\n";
95 $useBgcolorOne = !$useBgcolorOne;
98 unset($table_row_count);
99 echo ' </table>' . "\n"
100 . ' </td>' . "\n"
101 . ' </tr>' . "\n"
102 . '</table>' . "\n";
104 require_once('./footer.inc.php');