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:
authorMichal Čihař <michal@cihar.com>2005-10-13 19:01:19 +0400
committerMichal Čihař <michal@cihar.com>2005-10-13 19:01:19 +0400
commit52bb3fd79bb954f1509d6d9f5808aa0cf99161af (patch)
tree9df3657edec8f23992a10e0e4d4142582861ee29
parentf78aa1b2ef8700f0388b71f9842b0814c2c49a69 (diff)
Use common header.
-rwxr-xr-xChangeLog4
-rw-r--r--libraries/auth/config.auth.lib.php53
-rw-r--r--libraries/auth/cookie.auth.lib.php49
-rw-r--r--libraries/auth/http.auth.lib.php52
-rw-r--r--themes.php49
5 files changed, 15 insertions, 192 deletions
diff --git a/ChangeLog b/ChangeLog
index 4757c939d3..fd23d81c8e 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,7 +7,9 @@ $Source$
2005-10-13 Michal Čihař <michal@cihar.com>
* Documentation.html: Fix URL rewriting not to match empty parts.
- * calendar.php: Use common header.
+ * calendar.php, themes.php, libraries/auth/config.auth.lib.php,
+ libraries/auth/cookie.auth.lib.php, libraries/auth/http.auth.lib.php:
+ Use common header.
* libraries/header_meta_style.inc.php: Add support for defining page
title.
diff --git a/libraries/auth/config.auth.lib.php b/libraries/auth/config.auth.lib.php
index 4fe33dc1b5..9ebef1adbe 100644
--- a/libraries/auth/config.auth.lib.php
+++ b/libraries/auth/config.auth.lib.php
@@ -81,57 +81,10 @@ function PMA_auth_fails()
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
// Defines the theme to be used
require_once('./libraries/select_theme.lib.php');
+ /* HTML header */
+ $page_title = $GLOBALS['strAccessDenied'];
+ require('./libraries/header_meta_style.inc.php');
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
-
-<head>
-<title><?php echo $GLOBALS['strAccessDenied']; ?></title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
-<style type="text/css">
-<!--
-body {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
-h1 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold}
-//-->
-</style>
-<script language="JavaScript" type="text/javascript">
-<!--
- /* added 2004-06-10 by Michael Keck
- * we need this for Backwards-Compatibility and resolving problems
- * with non DOM browsers, which may have problems with css 2 (like NC 4)
- */
- var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
- && typeof(document.createElement) != 'undefined')
- ? 1 : 0;
- var isIE4 = (typeof(document.all) != 'undefined'
- && parseInt(navigator.appVersion) >= 4)
- ? 1 : 0;
- var isNS4 = (typeof(document.layers) != 'undefined')
- ? 1 : 0;
- var capable = (isDOM || isIE4 || isNS4)
- ? 1 : 0;
- // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
- if (capable) {
- if (typeof(window.opera) != 'undefined') {
- var browserName = ' ' + navigator.userAgent.toLowerCase();
- if ((browserName.indexOf('konqueror 7') == 0)) {
- capable = 0;
- }
- } else if (typeof(navigator.userAgent) != 'undefined') {
- var browserName = ' ' + navigator.userAgent.toLowerCase();
- if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
- capable = 0;
- }
- } // end if... else if...
- } // end if
- document.writeln('<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right&amp;js_isDOM=' + isDOM + '" />');
-//-->
-</script>
-<noscript>
- <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right" />
-</noscript>
-
</head>
<body bgcolor="<?php echo $cfg['RightBgColor']; ?>">
diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php
index 8929d50c09..70e970683a 100644
--- a/libraries/auth/cookie.auth.lib.php
+++ b/libraries/auth/cookie.auth.lib.php
@@ -113,53 +113,10 @@ function PMA_auth()
// Defines the "item" image depending on text direction
$item_img = $GLOBALS['pmaThemeImage'] . 'item_ltr.png';
- // Title
+ /* HTML header */
+ $page_title = 'phpMyAdmin ' . PMA_VERSION;
+ require('./libraries/header_meta_style.inc.php');
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
-
-<head>
-<title>phpMyAdmin <?php echo PMA_VERSION; ?></title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
-<script language="JavaScript" type="text/javascript">
-<!--
- /* added 2004-06-10 by Michael Keck
- * we need this for Backwards-Compatibility and resolving problems
- * with non DOM browsers, which may have problems with css 2 (like NC 4)
- */
- var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
- && typeof(document.createElement) != 'undefined')
- ? 1 : 0;
- var isIE4 = (typeof(document.all) != 'undefined'
- && parseInt(navigator.appVersion) >= 4)
- ? 1 : 0;
- var isNS4 = (typeof(document.layers) != 'undefined')
- ? 1 : 0;
- var capable = (isDOM || isIE4 || isNS4)
- ? 1 : 0;
- // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
- if (capable) {
- if (typeof(window.opera) != 'undefined') {
- var browserName = ' ' + navigator.userAgent.toLowerCase();
- if ((browserName.indexOf('konqueror 7') == 0)) {
- capable = 0;
- }
- } else if (typeof(navigator.userAgent) != 'undefined') {
- var browserName = ' ' + navigator.userAgent.toLowerCase();
- if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
- capable = 0;
- }
- } // end if... else if...
- } // end if
- document.writeln('<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right&amp;js_isDOM=' + isDOM + '" />');
-//-->
-</script>
-<noscript>
- <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right" />
-</noscript>
-
-<base href="<?php echo $cfg['PmaAbsoluteUri']; ?>" />
<script language="javascript" type="text/javascript">
<!--
// show login form in top frame
diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php
index 1dd070f829..e4157882b9 100644
--- a/libraries/auth/http.auth.lib.php
+++ b/libraries/auth/http.auth.lib.php
@@ -29,56 +29,10 @@ function PMA_auth()
// Defines the charset to be used
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
+ /* HTML header */
+ $page_title = $GLOBALS['strAccessDenied'];
+ require('./libraries/header_meta_style.inc.php');
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
-
-<head>
-<title><?php echo $GLOBALS['strAccessDenied']; ?></title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
-<style type="text/css">
-<!--
-body {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_size; ?>; color: #000000}
-h1 {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $font_bigger; ?>; font-weight: bold}
-//-->
-</style>
-<script language="JavaScript" type="text/javascript">
-<!--
- /* added 2004-06-10 by Michael Keck
- * we need this for Backwards-Compatibility and resolving problems
- * with non DOM browsers, which may have problems with css 2 (like NC 4)
- */
- var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
- && typeof(document.createElement) != 'undefined')
- ? 1 : 0;
- var isIE4 = (typeof(document.all) != 'undefined'
- && parseInt(navigator.appVersion) >= 4)
- ? 1 : 0;
- var isNS4 = (typeof(document.layers) != 'undefined')
- ? 1 : 0;
- var capable = (isDOM || isIE4 || isNS4)
- ? 1 : 0;
- // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
- if (capable) {
- if (typeof(window.opera) != 'undefined') {
- var browserName = ' ' + navigator.userAgent.toLowerCase();
- if ((browserName.indexOf('konqueror 7') == 0)) {
- capable = 0;
- }
- } else if (typeof(navigator.userAgent) != 'undefined') {
- var browserName = ' ' + navigator.userAgent.toLowerCase();
- if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
- capable = 0;
- }
- } // end if... else if...
- } // end if
- document.writeln('<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right&amp;js_isDOM=' + isDOM + '" />');
-//-->
-</script>
-<noscript>
- <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right" />
-</noscript>
</head>
<body bgcolor="<?php echo $GLOBALS['cfg']['RightBgColor']; ?>">
diff --git a/themes.php b/themes.php
index db40b5520e..f58f669699 100644
--- a/themes.php
+++ b/themes.php
@@ -12,53 +12,10 @@ require_once('./libraries/header_http.inc.php');
/* Gets the font sizes to use */
PMA_setFontSizes();
-/* remove vertical scroll bar bug in ie */
-echo "<?xml version=\"1.0\" encoding=\"" . $GLOBALS['charset'] . "\"?".">";
+/* HTML header */
+$page_title = 'phpMyAdmin - ' . $strTheme;
+require('./libraries/header_meta_style.inc.php');
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
-
-<head>
-<title>phpMyAdmin <?php echo PMA_VERSION; ?></title>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
-<meta http-equiv="imagetoolbar" content="no">
-<script language="JavaScript" type="text/javascript">
-<!--
- /* added 2004-06-10 by Michael Keck
- * we need this for Backwards-Compatibility and resolving problems
- * with non DOM browsers, which may have problems with css 2 (like NC 4)
- */
- var isDOM = (typeof(document.getElementsByTagName) != 'undefined'
- && typeof(document.createElement) != 'undefined')
- ? 1 : 0;
- var isIE4 = (typeof(document.all) != 'undefined'
- && parseInt(navigator.appVersion) >= 4)
- ? 1 : 0;
- var isNS4 = (typeof(document.layers) != 'undefined')
- ? 1 : 0;
- var capable = (isDOM || isIE4 || isNS4)
- ? 1 : 0;
- // Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant
- if (capable) {
- if (typeof(window.opera) != 'undefined') {
- var browserName = ' ' + navigator.userAgent.toLowerCase();
- if ((browserName.indexOf('konqueror 7') == 0)) {
- capable = 0;
- }
- } else if (typeof(navigator.userAgent) != 'undefined') {
- var browserName = ' ' + navigator.userAgent.toLowerCase();
- if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) {
- capable = 0;
- }
- } // end if... else if...
- } // end if
- document.writeln('<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right&amp;js_isDOM=' + isDOM + '" />');
-//-->
-</script>
-<noscript>
- <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : './'; ?>css/phpmyadmin.css.php?lang=<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>&amp;js_frame=right" />
-</noscript>
<script language="JavaScript">
<!--
function takeThis(what){