/home/mjc1/public_html/db_admin/server_collations.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
/* $Id: server_collations.php,v 2.7 2004/08/12 15:13:19 nijel Exp $ */
// 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"
   
'    ' . ($GLOBALS['cfg']['MainPageIconic'] ? '<img src="'$GLOBALS['pmaThemeImage'] . 's_asci.png" border="0" hspace="2" align="middle" />' ''
   . 
'' $strCharsetsAndCollations "\n"
   
'</h2>' "\n";


/**
 * Checks the MySQL version
 */
if (PMA_MYSQL_INT_VERSION 40100) {
    
// TODO: Some nice Message :-)
    
require_once('./footer.inc.php');
}


/**
 * Includes the required charset library
 */
require_once('./libraries/mysql_charsets.lib.php');


/**
 * Outputs the result
 */
echo '<table border="0">' "\n"
   
'    <tr>' "\n"
   
'        <td valign="top">' "\n"
   
'            <table border="0" cellpadding="2" cellspacing="1">' "\n"
   
'                <tr>' "\n"
   
'                <th>' "\n"
   
'                    ' $strCollation "\n"
   
'                </th>' "\n"
   
'                <th>' "\n"
   
'                    ' $strDescription "\n"
   
'                </th>' "\n"
   
'            </tr>' "\n";

$i 0;
$table_row_count count($mysql_charsets) + $mysql_collations_count;

foreach (
$mysql_charsets as $current_charset) {
    if (
$i >= $table_row_count 2) {
        
$i 0;
        echo 
'            </table>' "\n"
           
'        </td>' "\n"
           
'        <td valign="top">' "\n"
           
'            <table border="0" cellpadding="2" cellspacing="1">' "\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"
       
'                    &nbsp;<b>' htmlspecialchars($current_charset) . '</b>' "\n"
       
. (empty($mysql_charsets_descriptions[$current_charset]) ? '' '                    (<i>' htmlspecialchars($mysql_charsets_descriptions[$current_charset]) . '</i>)&nbsp;' "\n")
       . 
'                </td>' "\n"
       
'            </tr>' "\n";
    
$useBgcolorOne TRUE;
    foreach (
$mysql_collations[$current_charset] as $current_collation) {
        
$i++;
        echo 
'            <tr>' "\n"
           
'                <td bgcolor="' . ($mysql_default_collations[$current_charset] == $current_collation $cfg['BrowseMarkerColor'] : ($useBgcolorOne $cfg['BgcolorOne'] : $cfg['BgcolorTwo'])) . '">' "\n"
           
'                    &nbsp;' htmlspecialchars($current_collation) . '&nbsp;' "\n"
           
'                </td>' "\n"
           
'                <td bgcolor="' . ($useBgcolorOne $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' "\n"
           
'                    &nbsp;' PMA_getCollationDescr($current_collation) . '&nbsp;' "\n"
           
'                </td>' "\n"
           
'            </tr>' "\n";
        
$useBgcolorOne = !$useBgcolorOne;
    }
}
unset(
$table_row_count);
echo 
'            </table>' "\n"
   
'        </td>' "\n"
   
'    </tr>' "\n"
   
'</table>' "\n";

require_once(
'./footer.inc.php');

?>