This has been fixed in PHP 5.1.0, we support 5.2+.
[phpmyadmin/crack.git] / server_collations.php
blobca425efa58e72233d29eb271aa6d17eac7efa080
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";
38 /**
39 * Includes the required charset library
41 require_once './libraries/mysql_charsets.lib.php';
44 /**
45 * Outputs the result
47 echo '<div id="div_mysql_charset_collations">' . "\n"
48 . '<table class="data">' . "\n"
49 . '<tr><th>' . $strCollation . '</th>' . "\n"
50 . ' <th>' . $strDescription . '</th>' . "\n"
51 . '</tr>' . "\n";
53 $i = 0;
54 $table_row_count = count($mysql_charsets) + $mysql_collations_count;
56 foreach ($mysql_charsets as $current_charset) {
57 if ($i >= $table_row_count / 2) {
58 $i = 0;
59 echo '</table>' . "\n"
60 . '<table class="data">' . "\n"
61 . '<tr><th>' . $strCollation . '</th>' . "\n"
62 . ' <th>' . $strDescription . '</th>' . "\n"
63 . '</tr>' . "\n";
65 $i++;
66 echo '<tr><th colspan="2" align="right">' . "\n"
67 . ' ' . htmlspecialchars($current_charset) . "\n"
68 . (empty($mysql_charsets_descriptions[$current_charset])
69 ? ''
70 : ' (<i>' . htmlspecialchars(
71 $mysql_charsets_descriptions[$current_charset]) . '</i>)' . "\n")
72 . ' </th>' . "\n"
73 . '</tr>' . "\n";
74 $odd_row = true;
75 foreach ($mysql_collations[$current_charset] as $current_collation) {
76 $i++;
77 echo '<tr class="'
78 . ($odd_row ? 'odd' : 'even')
79 . ($mysql_default_collations[$current_charset] == $current_collation
80 ? ' marked'
81 : '')
82 . ($mysql_collations_available[$current_collation] ? '' : ' disabled')
83 . '">' . "\n"
84 . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n"
85 . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n"
86 . '</tr>' . "\n";
87 $odd_row = !$odd_row;
90 unset($table_row_count);
91 echo '</table>' . "\n"
92 . '</div>' . "\n";
94 require_once './libraries/footer.inc.php';