Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /usr/share/phpmyadmin/libraries/ |
Upload File : |
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * functions for displaying server Character Sets and Collations * * @usedby server_collations.php * * @package PhpMyAdmin */ if (! defined('PHPMYADMIN')) { exit; } /** * Returns the html for server Character Sets and Collations. * * @param Array $mysqlCharsets Mysql Charsets list * @param Array $mysqlCollations Mysql Collations list * @param Array $mysqlCharsetsDesc Charsets descriptions * @param Array $mysqlDftCollations Default Collations list * @param Array $mysqlCollAvailable Available Collations list * * @return string */ function PMA_getHtmlForCharsets($mysqlCharsets, $mysqlCollations, $mysqlCharsetsDesc, $mysqlDftCollations, $mysqlCollAvailable ) { /** * Outputs the result */ $html = '<div id="div_mysql_charset_collations">' . "\n" . '<table class="data noclick">' . "\n" . '<tr><th id="collationHeader">' . __('Collation') . '</th>' . "\n" . ' <th>' . __('Description') . '</th>' . "\n" . '</tr>' . "\n"; $table_row_count = count($mysqlCharsets) + count($mysqlCollations); foreach ($mysqlCharsets as $current_charset) { $html .= '<tr><th colspan="2" class="right">' . "\n" . ' ' . htmlspecialchars($current_charset) . "\n" . (empty($mysqlCharsetsDesc[$current_charset]) ? '' : ' (<i>' . htmlspecialchars( $mysqlCharsetsDesc[$current_charset] ) . '</i>)' . "\n") . ' </th>' . "\n" . '</tr>' . "\n"; $html .= PMA_getHtmlForCollationCurrentCharset( $current_charset, $mysqlCollations, $mysqlDftCollations, $mysqlCollAvailable ); } unset($table_row_count); $html .= '</table>' . "\n" . '</div>' . "\n"; return $html; } /** * Returns the html for Collations of Current Charset. * * @param String $currCharset Current Charset * @param Array $mysqlColl Collations list * @param Array $mysqlDefaultColl Default Collations list * @param Array $mysqlCollAvailable Available Collations list * * @return string */ function PMA_getHtmlForCollationCurrentCharset( $currCharset, $mysqlColl, $mysqlDefaultColl, $mysqlCollAvailable ) { $odd_row = true; $html = ''; foreach ($mysqlColl[$currCharset] as $current_collation) { $html .= '<tr class="' . ($odd_row ? 'odd' : 'even') . ($mysqlDefaultColl[$currCharset] == $current_collation ? ' marked' : '') . ($mysqlCollAvailable[$current_collation] ? '' : ' disabled') . '">' . "\n" . ' <td>' . htmlspecialchars($current_collation) . '</td>' . "\n" . ' <td>' . PMA_getCollationDescr($current_collation) . '</td>' . "\n" . '</tr>' . "\n"; $odd_row = !$odd_row; } return $html; }