source: mysql/server_collations.php@ 5

Last change on this file since 5 was 5, checked in by george, 18 years ago

import

File size: 2.7 KB
Line 
1<?php
2/* $Id: server_collations.php 9438 2006-09-21 14:28:46Z cybot_tm $ */
3// vim: expandtab sw=4 ts=4 sts=4:
4
5/**
6 * requirements
7 */
8if ( ! defined( 'PMA_NO_VARIABLES_IMPORT' ) ) {
9 define( 'PMA_NO_VARIABLES_IMPORT', true );
10}
11require_once('./libraries/common.lib.php');
12
13/**
14 * Does the common work
15 */
16require('./libraries/server_common.inc.php');
17
18
19/**
20 * Displays the links
21 */
22require('./libraries/server_links.inc.php');
23
24
25/**
26 * Displays the sub-page heading
27 */
28echo '<h2>' . "\n"
29 . ' ' . ($GLOBALS['cfg']['MainPageIconic']
30 ? '<img class="icon" src="'. $GLOBALS['pmaThemeImage'] . 's_asci.png" alt="" />'
31 : '')
32 . '' . $strCharsetsAndCollations . "\n"
33 . '</h2>' . "\n";
34
35
36/**
37 * exits if wrong MySQL version
38 * @todo Some nice Message :-)
39 */
40if (PMA_MYSQL_INT_VERSION < 40100) {
41 require_once('./libraries/footer.inc.php');
42}
43
44
45/**
46 * Includes the required charset library
47 */
48require_once('./libraries/mysql_charsets.lib.php');
49
50
51/**
52 * Outputs the result
53 */
54echo '<div id="div_mysql_charset_collations">' . "\n"
55 . '<table class="data">' . "\n"
56 . '<tr><th>' . $strCollation . '</th>' . "\n"
57 . ' <th>' . $strDescription . '</th>' . "\n"
58 . '</tr>' . "\n";
59
60$i = 0;
61$table_row_count = count($mysql_charsets) + $mysql_collations_count;
62
63foreach ($mysql_charsets as $current_charset) {
64 if ($i >= $table_row_count / 2) {
65 $i = 0;
66 echo '</table>' . "\n"
67 . '<table class="data">' . "\n"
68 . '<tr><th>' . $strCollation . '</th>' . "\n"
69 . ' <th>' . $strDescription . '</th>' . "\n"
70 . '</tr>' . "\n";
71 }
72 $i++;
73 echo '<tr><th colspan="2" align="right">' . "\n"
74 . ' ' . htmlspecialchars($current_charset) . "\n"
75 . (empty($mysql_charsets_descriptions[$current_charset])
76 ? ''
77 : ' (<i>' . htmlspecialchars(
78 $mysql_charsets_descriptions[$current_charset]) . '</i>)' . "\n")
79 . ' </th>' . "\n"
80 . '</tr>' . "\n";
81 $odd_row = true;
82 foreach ($mysql_collations[$current_charset] as $current_collation) {
83 $i++;
84 echo '<tr class="'
85 . ( $odd_row ? 'odd' : 'even' )
86 . ($mysql_default_collations[$current_charset] == $current_collation
87 ? ' marked'
88 : '')
89 . ($mysql_collations_available[$current_collation] ? '' : ' disabled')
90 . '">' . "\n"
91 . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n"
92 . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n"
93 . '</tr>' . "\n";
94 $odd_row = !$odd_row;
95 }
96}
97unset($table_row_count);
98echo '</table>' . "\n"
99 . '</div>' . "\n";
100
101require_once('./libraries/footer.inc.php');
102
103?>
Note: See TracBrowser for help on using the repository browser.