We are using XHTML now and HTML is not an option. The headers config has been update...
authormr-russ <mr-russ>
Wed, 18 Apr 2007 14:08:48 +0000 (14:08 +0000)
committermr-russ <mr-russ>
Wed, 18 Apr 2007 14:08:48 +0000 (14:08 +0000)
Updates were also applied to correctly identify the frameset in use.

classes/Misc.php
conf/config.inc.php-dist
index.php

index 4a871c5b3f711519811220d5d6eba038d79fcb50..68b621698dc242f5b871bf136458cffb7e7f7e1e 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.141 2007/04/13 11:18:11 mr-russ Exp $
+        * $Id: Misc.php,v 1.142 2007/04/18 14:08:48 mr-russ Exp $
         */
         
        class Misc {
                 * @param $title The title of the page
                 * @param $script script tag
                 */
-               function printHeader($title = '', $script = null) {
+               function printHeader($title = '', $script = null, $frameset = false) {
                        global $appName, $lang, $_no_output, $conf;
 
                        if (!isset($_no_output)) {
                                header("Content-Type: text/html; charset=" . $lang['appcharset']);
-                               // Send XHTML headers, or regular HTML headers
-                               if (isset($conf['use_xhtml']) && $conf['use_xhtml']) {
-                                       $closeTag = "/";
-                                       echo "<?xml version=\"1.0\" encoding=\"", htmlspecialchars($lang['appcharset']), "\"?>\n";
+                               // Send XHTML headers, or regular XHTML strict headers
+                               echo "<?xml version=\"1.0\" encoding=\"", htmlspecialchars($lang['appcharset']), "\"?>\n";
+                               if ($frameset !== null) {
+                                       echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n";
+                               } else if (isset($conf['use_xhtml_strict']) && $conf['use_xhtml_strict']) {
+                                       echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd\">\n";
+                               } else {                                                
                                        echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd\">\n";
-                                       echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"{$lang['applocale']}\" lang=\"{$lang['applocale']}\"";
-                                       if (strcasecmp($lang['applangdir'], 'ltr') != 0) echo " dir=\"", htmlspecialchars($lang['applangdir']), "\"";
-                                       echo ">\n";
-                               } else {
-                                       $closeTag = "";
-                                       echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
-                                       echo "<html lang=\"{$lang['applocale']}\"";
-                                       if (strcasecmp($lang['applangdir'], 'ltr') != 0) echo " dir=\"", htmlspecialchars($lang['applangdir']), "\"";
-                                       echo ">\n";
                                }
+                               echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"{$lang['applocale']}\" lang=\"{$lang['applocale']}\"";
+                               if (strcasecmp($lang['applangdir'], 'ltr') != 0) echo " dir=\"", htmlspecialchars($lang['applangdir']), "\"";
+                               echo ">\n";
+
                                echo "<head>\n";
-                               echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$lang['appcharset']}\" {$closeTag}>\n";
+                               echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$lang['appcharset']}\" />\n";
                                // Theme
-                               echo "<link rel=\"stylesheet\" href=\"themes/{$conf['theme']}/global.css\" type=\"text/css\" {$closeTag}>\n";
+                               echo "<link rel=\"stylesheet\" href=\"themes/{$conf['theme']}/global.css\" type=\"text/css\" />\n";
                                echo "<title>", htmlspecialchars($appName);
                                if ($title != '') echo " - {$title}";
                                echo "</title>\n";
index a8f9c933fdf8b60f107d63d48216c325368aa29c..b10727426783170dd14e826caafbd2125667b304 100644 (file)
@@ -4,7 +4,7 @@
         * Central phpPgAdmin configuration.  As a user you may modify the
         * settings here for your particular configuration.
         *
-        * $Id: config.inc.php-dist,v 1.52 2007/04/14 08:00:03 mr-russ Exp $
+        * $Id: config.inc.php-dist,v 1.53 2007/04/18 14:08:48 mr-russ Exp $
         */
 
        // An example server.  Create as many of these as you wish,
        // Max chars of each field to display by default in browse mode
        $conf['max_chars'] = 50;
 
-       // Send XHTML headers?
-       $conf['use_xhtml'] = false;
+       // Send XHTML strict headers?
+       $conf['use_xhtml_strict'] = false;
 
        // Base URL for PostgreSQL documentation.
        // '%s', if present, will be replaced with the PostgreSQL version
         * Don't modify anything below this line *
         *****************************************/
 
-       $conf['version'] = 18;
+       $conf['version'] = 19;
 
 ?>
index f506fcd3821cc995f684ace8743d8c6a1a5656b7..9fe0c8604c47df804c97b4958bec9b3a5b63cc49 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -3,13 +3,13 @@
        /**
         * Main access point to the app.
         *
-        * $Id: index.php,v 1.12 2005/05/02 15:47:23 chriskl Exp $
+        * $Id: index.php,v 1.13 2007/04/18 14:08:48 mr-russ Exp $
         */
 
        // Include application functions
        $_no_db_connection = true;
        include_once('./libraries/lib.inc.php');
-       $misc->printHeader();
+       $misc->printHeader('', null, true);
        
        $rtl = (strcasecmp($lang['applangdir'], 'rtl') == 0);