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 // Gets the font sizes to use
set_font_sizes(); 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"> <!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> <head>
<title>phpMyAdmin</title> <title>phpMyAdmin</title>

View File

@@ -31,9 +31,10 @@ if (empty($HTTP_HOST)) {
$url_query = 'lang=' . $lang $url_query = 'lang=' . $lang
. '&server=' . $server . '&server=' . $server
. (empty($db) ? '' : '&db=' . urlencode($db)); . (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"> <!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> <head>
<title>phpMyAdmin <?php echo PHPMYADMIN_VERSION; ?> - <?php echo $HTTP_HOST; ?></title> <title>phpMyAdmin <?php echo PHPMYADMIN_VERSION; ?> - <?php echo $HTTP_HOST; ?></title>
<style type="text/css"> <style type="text/css">
@@ -49,7 +50,7 @@ body {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $fo
<noframes> <noframes>
<body bgcolor="#FFFFFF"> <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> </body>
</noframes> </noframes>
</frameset> </frameset>

View File

@@ -73,9 +73,10 @@ header('Content-Type: text/html; charset=' . $charset);
*/ */
// Gets the font sizes to use // Gets the font sizes to use
set_font_sizes(); 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"> <!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> <head>
<title>phpMyAdmin</title> <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('WWW-Authenticate: Basic realm="phpMyAdmin ' . trim($GLOBALS['strRunning']) . ' ' . $GLOBALS['cfgServer']['host'] . '"');
header('HTTP/1.0 401 Unauthorized'); header('HTTP/1.0 401 Unauthorized');
header('status: 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"> <!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> <head>
<title><?php echo $GLOBALS['strAccessDenied']; ?></title> <title><?php echo $GLOBALS['strAccessDenied']; ?></title>
@@ -401,9 +403,8 @@ if (!defined('__LIB_COMMON__')){
// This maintenance is to fix code to work correctly for // This maintenance is to fix code to work correctly for
// regular expressions. // regular expressions.
if ($row['Select_priv'] != 'Y') { if ($row['Select_priv'] != 'Y') {
// User can be blank (anonymous 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 . '\' $local_query = 'SELECT DISTINCT Db FROM mysql.db WHERE Select_priv = \'Y\' AND (User = \'' . $PHP_AUTH_USER . '\' OR User = \'\')';
OR User = \'\') ';
$rs = mysql_query($local_query) or mysql_die('', $local_query, FALSE, FALSE); $rs = mysql_query($local_query) or mysql_die('', $local_query, FALSE, FALSE);
if (@mysql_numrows($rs) <= 0) { if (@mysql_numrows($rs) <= 0) {
$local_query = 'SELECT DISTINCT Db FROM mysql.tables_priv WHERE Table_priv LIKE \'%Select%\' AND User = \'' . $PHP_AUTH_USER . '\''; $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 // IE (<6)/Opera for win case: needs smaller fonts than anyone else
if (USR_OS == 'Win' if (USR_OS == 'Win'
&& ((USR_BROWSER_AGENT == 'IE' && USR_BROWSER_VER < 6) && (USR_BROWSER_AGENT == 'IE' || USR_BROWSER_AGENT == 'OPERA')) {
|| USR_BROWSER_AGENT == 'OPERA')) {
$font_size = 'x-small'; $font_size = 'x-small';
$font_bigger = 'large '; $font_bigger = 'large';
$font_smaller = (USR_BROWSER_AGENT == 'IE' && USR_BROWSER_VER < 5.5) $font_smaller = (USR_BROWSER_AGENT == 'IE' && USR_BROWSER_VER < 5.5)
? '80%' ? '80%'
: '90%'; : '90%';
@@ -547,7 +547,7 @@ if (!defined('__LIB_COMMON__')){
else if (USR_OS == 'Win') { else if (USR_OS == 'Win') {
$font_size = 'small'; $font_size = 'small';
$font_bigger = 'large '; $font_bigger = 'large ';
$font_smaller = (USR_BROWSER_AGENT == 'IE') ? '90%' : 'x-small'; $font_smaller = 'x-small';
$font_smallest = 'x-small'; $font_smallest = 'x-small';
} }
// Mac browsers: need bigger fonts // 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
*/ */
@@ -31,7 +31,9 @@ $lang_path = 'lang/';
* - the '|' character (it means 'OR'); * - the '|' character (it means 'OR');
* - the full language name. * - the full language name.
* 3. The second values associated to the key is the name of the file to load * 3. The second values associated to the key is the name of the file to load
* without the 'inc.php3' extension. * 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 * Beware that the sorting order (first values associated to keys by
* alphabetical reverse order in the array) is important: 'zh-tw' (chinese * alphabetical reverse order in the array) is important: 'zh-tw' (chinese
@@ -39,34 +41,34 @@ $lang_path = 'lang/';
* example. * example.
*/ */
$available_languages = array( $available_languages = array(
'bg' => array('bg|bulgarian', 'bulgarian-win1251'), 'bg' => array('bg|bulgarian', 'bulgarian-win1251', 'bg'),
'ca' => array('ca|catalan', 'catala'), 'ca' => array('ca|catalan', 'catala', 'ca'),
'cs-iso' => array('cs|czech', 'czech-iso'), 'cs-iso' => array('cs|czech', 'czech-iso', 'cs'),
'cs-win1250' => array('cs|czech', 'czech-win1250'), 'cs-win1250' => array('cs|czech', 'czech-win1250', 'cs'),
'da' => array('da|danish', 'danish'), 'da' => array('da|danish', 'danish', 'da'),
'de' => array('de([-_][[:alpha:]]{2})?|german', 'german'), 'de' => array('de([-_][[:alpha:]]{2})?|german', 'german', 'de'),
'el' => array('el|greek', 'greek'), 'el' => array('el|greek', 'greek', 'el'),
'en' => array('en([-_][[:alpha:]]{2})?|english', 'english'), 'en' => array('en([-_][[:alpha:]]{2})?|english', 'english', 'en'),
'es' => array('es([-_][[:alpha:]]{2})?|spanish', 'spanish'), 'es' => array('es([-_][[:alpha:]]{2})?|spanish', 'spanish', 'es'),
'fi' => array('fi|finnish', 'finnish'), 'fi' => array('fi|finnish', 'finnish', 'fi'),
'fr' => array('fr([-_][[:alpha:]]{2})?|french', 'french'), 'fr' => array('fr([-_][[:alpha:]]{2})?|french', 'french', 'fr'),
'gl' => array('gl|galician', 'galician'), 'gl' => array('gl|galician', 'galician', 'gl'),
'it' => array('it|italian', 'italian'), 'it' => array('it|italian', 'italian', 'it'),
'ja' => array('ja|japanese', 'japanese'), 'ja' => array('ja|japanese', 'japanese', 'ja'),
'ko' => array('ko|korean', 'korean'), 'ko' => array('ko|korean', 'korean', 'ko'),
'nl' => array('nl([-_][[:alpha:]]{2})?|dutch', 'dutch'), 'nl' => array('nl([-_][[:alpha:]]{2})?|dutch', 'dutch', 'nl'),
'no' => array('no|norwegian', 'norwegian'), 'no' => array('no|norwegian', 'norwegian', 'no'),
'pl' => array('pl|polish', 'polish'), 'pl' => array('pl|polish', 'polish', 'pl'),
'pt-br' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese'), 'pt-br' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese', 'pt-BR'),
'pt' => array('pt([-_][[:alpha:]]{2})?|portuguese', 'portuguese'), 'pt' => array('pt([-_][[:alpha:]]{2})?|portuguese', 'portuguese', 'pt'),
'ro' => array('ro|romanian', 'romanian'), 'ro' => array('ro|romanian', 'romanian', 'ro'),
'ru-koi8r' => array('ru|russian', 'russian-koi8'), 'ru-koi8r' => array('ru|russian', 'russian-koi8', 'ru'),
'ru-win1251' => array('ru|russian', 'russian-win1251'), 'ru-win1251' => array('ru|russian', 'russian-win1251', 'ru'),
'se' => array('se|swedish', 'swedish'), 'se' => array('se|swedish', 'swedish', 'se'),
'sk' => array('sk|slovak', 'slovak-iso'), 'sk' => array('sk|slovak', 'slovak-iso', 'sk'),
'th' => array('th|thai', 'thai'), 'th' => array('th|thai', 'thai', 'th'),
'zh-tw' => array('zh[-_]tw|chinese traditional', 'chinese_big5'), 'zh-tw' => array('zh[-_]tw|chinese traditional', 'chinese_big5', 'zh-TW'),
'zh' => array('zh|chinese simplified', 'chinese_gb') 'zh' => array('zh|chinese simplified', 'chinese_gb', 'zh')
); );