Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxmujay <xmujay@gmail.com>2013-05-15 19:48:30 +0400
committerxmujay <xmujay@gmail.com>2013-05-15 19:48:30 +0400
commit76df1ca1c10d60a85432bd5355acd375038c2846 (patch)
tree56bbfe16a528ee9950ff94ef2872c24e5fa3f2a2 /server_collations.php
parentb07df013406426c41ec388fac679c807db4af64a (diff)
make function outside class starting with "PMA"; render HTML at once
Diffstat (limited to 'server_collations.php')
-rw-r--r--server_collations.php61
1 files changed, 32 insertions, 29 deletions
diff --git a/server_collations.php b/server_collations.php
index 2af16473d8..0e1164789a 100644
--- a/server_collations.php
+++ b/server_collations.php
@@ -15,14 +15,15 @@ require_once 'libraries/common.inc.php';
*/
require 'libraries/server_common.inc.php';
+$response = PMA_Response::getInstance();
/**
* Displays the sub-page heading
*/
-echo '<h2>' . "\n"
- . ' ' . PMA_Util::getImage('s_asci.png')
- . '' . __('Character Sets and Collations') . "\n"
- . '</h2>' . "\n";
+$html = '<h2>' . "\n"
+ . ' ' . PMA_Util::getImage('s_asci.png')
+ . '' . __('Character Sets and Collations') . "\n"
+ . '</h2>' . "\n";
/**
* Includes the required charset library
@@ -33,11 +34,11 @@ require_once 'libraries/mysql_charsets.lib.php';
/**
* Outputs the result
*/
-echo '<div id="div_mysql_charset_collations">' . "\n"
- . '<table class="data noclick">' . "\n"
- . '<tr><th>' . __('Collation') . '</th>' . "\n"
- . ' <th>' . __('Description') . '</th>' . "\n"
- . '</tr>' . "\n";
+$html .= '<div id="div_mysql_charset_collations">' . "\n"
+ . '<table class="data noclick">' . "\n"
+ . '<tr><th>' . __('Collation') . '</th>' . "\n"
+ . ' <th>' . __('Description') . '</th>' . "\n"
+ . '</tr>' . "\n";
$i = 0;
$table_row_count = count($mysql_charsets) + count($mysql_collations);
@@ -45,40 +46,42 @@ $table_row_count = count($mysql_charsets) + count($mysql_collations);
foreach ($mysql_charsets as $current_charset) {
if ($i >= $table_row_count / 2) {
$i = 0;
- echo '</table>' . "\n"
- . '<table class="data noclick">' . "\n"
- . '<tr><th>' . __('Collation') . '</th>' . "\n"
- . ' <th>' . __('Description') . '</th>' . "\n"
- . '</tr>' . "\n";
+ $html .= '</table>' . "\n"
+ . '<table class="data noclick">' . "\n"
+ . '<tr><th>' . __('Collation') . '</th>' . "\n"
+ . ' <th>' . __('Description') . '</th>' . "\n"
+ . '</tr>' . "\n";
}
$i++;
- echo '<tr><th colspan="2" class="right">' . "\n"
- . ' ' . htmlspecialchars($current_charset) . "\n"
- . (empty($mysql_charsets_descriptions[$current_charset])
+ $html .= '<tr><th colspan="2" class="right">' . "\n"
+ . ' ' . htmlspecialchars($current_charset) . "\n"
+ . (empty($mysql_charsets_descriptions[$current_charset])
? ''
: ' (<i>' . htmlspecialchars(
$mysql_charsets_descriptions[$current_charset]
) . '</i>)' . "\n")
- . ' </th>' . "\n"
- . '</tr>' . "\n";
+ . ' </th>' . "\n"
+ . '</tr>' . "\n";
$odd_row = true;
foreach ($mysql_collations[$current_charset] as $current_collation) {
$i++;
- echo '<tr class="'
- . ($odd_row ? 'odd' : 'even')
- . ($mysql_default_collations[$current_charset] == $current_collation
+ $html .= '<tr class="'
+ . ($odd_row ? 'odd' : 'even')
+ . ($mysql_default_collations[$current_charset] == $current_collation
? ' marked'
: '')
- . ($mysql_collations_available[$current_collation] ? '' : ' disabled')
- . '">' . "\n"
- . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n"
- . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n"
- . '</tr>' . "\n";
+ . ($mysql_collations_available[$current_collation] ? '' : ' disabled')
+ . '">' . "\n"
+ . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n"
+ . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n"
+ . '</tr>' . "\n";
$odd_row = !$odd_row;
}
}
unset($table_row_count);
-echo '</table>' . "\n"
- . '</div>' . "\n";
+$html .= '</table>' . "\n"
+ . '</div>' . "\n";
+
+$response->addHTML($html);
?>