3.3.9.2 ChangeLog
[phpmyadmin-themes.git] / server_collations.php
blobaa228130b343d2bf28fbd294801d41f1fc2c3fda
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 * @package phpMyAdmin
7 */
9 /**
10 * no need for variables importing
11 * @ignore
13 if (! defined('PMA_NO_VARIABLES_IMPORT')) {
14 define('PMA_NO_VARIABLES_IMPORT', true);
16 /**
17 * requirements
19 require_once './libraries/common.inc.php';
21 /**
22 * Does the common work
24 require './libraries/server_common.inc.php';
27 /**
28 * Displays the links
30 require './libraries/server_links.inc.php';
33 /**
34 * Displays the sub-page heading
36 echo '<h2>' . "\n"
37 . ' ' . ($GLOBALS['cfg']['MainPageIconic']
38 ? '<img class="icon" src="'. $GLOBALS['pmaThemeImage'] . 's_asci.png" alt="" />'
39 : '')
40 . '' . $strCharsetsAndCollations . "\n"
41 . '</h2>' . "\n";
43 /**
44 * Includes the required charset library
46 require_once './libraries/mysql_charsets.lib.php';
49 /**
50 * Outputs the result
52 echo '<div id="div_mysql_charset_collations">' . "\n"
53 . '<table class="data">' . "\n"
54 . '<tr><th>' . $strCollation . '</th>' . "\n"
55 . ' <th>' . $strDescription . '</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 . '<table class="data">' . "\n"
66 . '<tr><th>' . $strCollation . '</th>' . "\n"
67 . ' <th>' . $strDescription . '</th>' . "\n"
68 . '</tr>' . "\n";
70 $i++;
71 echo '<tr><th colspan="2" align="right">' . "\n"
72 . ' ' . htmlspecialchars($current_charset) . "\n"
73 . (empty($mysql_charsets_descriptions[$current_charset])
74 ? ''
75 : ' (<i>' . htmlspecialchars(
76 $mysql_charsets_descriptions[$current_charset]) . '</i>)' . "\n")
77 . ' </th>' . "\n"
78 . '</tr>' . "\n";
79 $odd_row = true;
80 foreach ($mysql_collations[$current_charset] as $current_collation) {
81 $i++;
82 echo '<tr class="'
83 . ($odd_row ? 'odd' : 'even')
84 . ($mysql_default_collations[$current_charset] == $current_collation
85 ? ' marked'
86 : '')
87 . ($mysql_collations_available[$current_collation] ? '' : ' disabled')
88 . '">' . "\n"
89 . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n"
90 . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n"
91 . '</tr>' . "\n";
92 $odd_row = !$odd_row;
95 unset($table_row_count);
96 echo '</table>' . "\n"
97 . '</div>' . "\n";
99 require_once './libraries/footer.inc.php';