improved xhtml1.0 compliance

This commit is contained in:
Loïc Chapeaux
2001-09-21 20:09:46 +00:00
parent e7212db53e
commit 2c9fbe2a47
5 changed files with 47 additions and 42 deletions

View File

@@ -34,9 +34,10 @@ header('Content-Type: text/html; charset=' . $charset);
*/
// Gets the font sizes to use
set_font_sizes();
echo '<?xml version="1.0" encoding="' . strtoupper($charset) . '"?>' . "\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][2]; ?>" lang="<?php echo $available_languages[$lang][2]; ?>">
<head>
<title>phpMyAdmin</title>

View File

@@ -31,9 +31,10 @@ if (empty($HTTP_HOST)) {
$url_query = 'lang=' . $lang
. '&server=' . $server
. (empty($db) ? '' : '&db=' . urlencode($db));
echo '<?xml version="1.0" encoding="' . strtoupper($charset) . '"?>' . "\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "DTD/xhtml1-frameset.dtd">
<html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][2]; ?>" lang="<?php echo $available_languages[$lang][2]; ?>">
<head>
<title>phpMyAdmin <?php echo PHPMYADMIN_VERSION; ?> - <?php echo $HTTP_HOST; ?></title>
<style type="text/css">
@@ -49,7 +50,7 @@ body {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $fo
<noframes>
<body bgcolor="#FFFFFF">
<p>phpMyAdmin requires a <b>frames-capable</b> browser.</p>
<p>phpMyAdmin is more friendly with a <b>frames-capable</b> browser.</p>
</body>
</noframes>
</frameset>

View File

@@ -73,9 +73,10 @@ header('Content-Type: text/html; charset=' . $charset);
*/
// Gets the font sizes to use
set_font_sizes();
echo '<?xml version="1.0" encoding="' . strtoupper($charset) . '"?>' . "\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][2]; ?>" lang="<?php echo $available_languages[$lang][2]; ?>">
<head>
<title>phpMyAdmin</title>

View File

@@ -69,9 +69,11 @@ if (!defined('__LIB_COMMON__')){
header('WWW-Authenticate: Basic realm="phpMyAdmin ' . trim($GLOBALS['strRunning']) . ' ' . $GLOBALS['cfgServer']['host'] . '"');
header('HTTP/1.0 401 Unauthorized');
header('status: 401 Unauthorized');
echo '<?xml version="1.0" encoding="' . strtoupper($charset) . '"?>' . "\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][2]; ?>" lang="<?php echo $available_languages[$lang][2]; ?>">
<head>
<title><?php echo $GLOBALS['strAccessDenied']; ?></title>
@@ -401,9 +403,8 @@ if (!defined('__LIB_COMMON__')){
// This maintenance is to fix code to work correctly for
// regular expressions.
if ($row['Select_priv'] != 'Y') {
// User can be blank (anonymous user)
$local_query = 'SELECT DISTINCT Db FROM mysql.db WHERE Select_priv = \'Y\' AND (User = \'' . $PHP_AUTH_USER . '\'
OR User = \'\') ';
// lem9: User can be blank (anonymous user)
$local_query = 'SELECT DISTINCT Db FROM mysql.db WHERE Select_priv = \'Y\' AND (User = \'' . $PHP_AUTH_USER . '\' OR User = \'\')';
$rs = mysql_query($local_query) or mysql_die('', $local_query, FALSE, FALSE);
if (@mysql_numrows($rs) <= 0) {
$local_query = 'SELECT DISTINCT Db FROM mysql.tables_priv WHERE Table_priv LIKE \'%Select%\' AND User = \'' . $PHP_AUTH_USER . '\'';
@@ -534,10 +535,9 @@ if (!defined('__LIB_COMMON__')){
// IE (<6)/Opera for win case: needs smaller fonts than anyone else
if (USR_OS == 'Win'
&& ((USR_BROWSER_AGENT == 'IE' && USR_BROWSER_VER < 6)
|| USR_BROWSER_AGENT == 'OPERA')) {
&& (USR_BROWSER_AGENT == 'IE' || USR_BROWSER_AGENT == 'OPERA')) {
$font_size = 'x-small';
$font_bigger = 'large ';
$font_bigger = 'large';
$font_smaller = (USR_BROWSER_AGENT == 'IE' && USR_BROWSER_VER < 5.5)
? '80%'
: '90%';
@@ -547,7 +547,7 @@ if (!defined('__LIB_COMMON__')){
else if (USR_OS == 'Win') {
$font_size = 'small';
$font_bigger = 'large ';
$font_smaller = (USR_BROWSER_AGENT == 'IE') ? '90%' : 'x-small';
$font_smaller = 'x-small';
$font_smallest = 'x-small';
}
// Mac browsers: need bigger fonts

View File

@@ -3,7 +3,7 @@
/**
* phpMyAdmin Language Loading File - lolo@phpheaven.net 01 may 2001
* phpMyAdmin Language Loading File
*/
@@ -32,6 +32,8 @@ $lang_path = 'lang/';
* - the full language name.
* 3. The second values associated to the key is the name of the file to load
* without the 'inc.php3' extension.
* 4. The last values associated to the key is the language code as defined by
* the RFC1766.
*
* Beware that the sorting order (first values associated to keys by
* alphabetical reverse order in the array) is important: 'zh-tw' (chinese
@@ -39,34 +41,34 @@ $lang_path = 'lang/';
* example.
*/
$available_languages = array(
'bg' => array('bg|bulgarian', 'bulgarian-win1251'),
'ca' => array('ca|catalan', 'catala'),
'cs-iso' => array('cs|czech', 'czech-iso'),
'cs-win1250' => array('cs|czech', 'czech-win1250'),
'da' => array('da|danish', 'danish'),
'de' => array('de([-_][[:alpha:]]{2})?|german', 'german'),
'el' => array('el|greek', 'greek'),
'en' => array('en([-_][[:alpha:]]{2})?|english', 'english'),
'es' => array('es([-_][[:alpha:]]{2})?|spanish', 'spanish'),
'fi' => array('fi|finnish', 'finnish'),
'fr' => array('fr([-_][[:alpha:]]{2})?|french', 'french'),
'gl' => array('gl|galician', 'galician'),
'it' => array('it|italian', 'italian'),
'ja' => array('ja|japanese', 'japanese'),
'ko' => array('ko|korean', 'korean'),
'nl' => array('nl([-_][[:alpha:]]{2})?|dutch', 'dutch'),
'no' => array('no|norwegian', 'norwegian'),
'pl' => array('pl|polish', 'polish'),
'pt-br' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese'),
'pt' => array('pt([-_][[:alpha:]]{2})?|portuguese', 'portuguese'),
'ro' => array('ro|romanian', 'romanian'),
'ru-koi8r' => array('ru|russian', 'russian-koi8'),
'ru-win1251' => array('ru|russian', 'russian-win1251'),
'se' => array('se|swedish', 'swedish'),
'sk' => array('sk|slovak', 'slovak-iso'),
'th' => array('th|thai', 'thai'),
'zh-tw' => array('zh[-_]tw|chinese traditional', 'chinese_big5'),
'zh' => array('zh|chinese simplified', 'chinese_gb')
'bg' => array('bg|bulgarian', 'bulgarian-win1251', 'bg'),
'ca' => array('ca|catalan', 'catala', 'ca'),
'cs-iso' => array('cs|czech', 'czech-iso', 'cs'),
'cs-win1250' => array('cs|czech', 'czech-win1250', 'cs'),
'da' => array('da|danish', 'danish', 'da'),
'de' => array('de([-_][[:alpha:]]{2})?|german', 'german', 'de'),
'el' => array('el|greek', 'greek', 'el'),
'en' => array('en([-_][[:alpha:]]{2})?|english', 'english', 'en'),
'es' => array('es([-_][[:alpha:]]{2})?|spanish', 'spanish', 'es'),
'fi' => array('fi|finnish', 'finnish', 'fi'),
'fr' => array('fr([-_][[:alpha:]]{2})?|french', 'french', 'fr'),
'gl' => array('gl|galician', 'galician', 'gl'),
'it' => array('it|italian', 'italian', 'it'),
'ja' => array('ja|japanese', 'japanese', 'ja'),
'ko' => array('ko|korean', 'korean', 'ko'),
'nl' => array('nl([-_][[:alpha:]]{2})?|dutch', 'dutch', 'nl'),
'no' => array('no|norwegian', 'norwegian', 'no'),
'pl' => array('pl|polish', 'polish', 'pl'),
'pt-br' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese', 'pt-BR'),
'pt' => array('pt([-_][[:alpha:]]{2})?|portuguese', 'portuguese', 'pt'),
'ro' => array('ro|romanian', 'romanian', 'ro'),
'ru-koi8r' => array('ru|russian', 'russian-koi8', 'ru'),
'ru-win1251' => array('ru|russian', 'russian-win1251', 'ru'),
'se' => array('se|swedish', 'swedish', 'se'),
'sk' => array('sk|slovak', 'slovak-iso', 'sk'),
'th' => array('th|thai', 'thai', 'th'),
'zh-tw' => array('zh[-_]tw|chinese traditional', 'chinese_big5', 'zh-TW'),
'zh' => array('zh|chinese simplified', 'chinese_gb', 'zh')
);