Fix from Russell for 'Ensure login frame is always at top level'. HTML bugfixes.
authorsoranzo <soranzo>
Sun, 23 Jan 2005 12:42:35 +0000 (12:42 +0000)
committersoranzo <soranzo>
Sun, 23 Jan 2005 12:42:35 +0000 (12:42 +0000)
classes/HTML_TreeMenu/TreeMenu.php
classes/Misc.php
login.php
tables.php
views.php

index 17314957c21f3698b1653bd6ff776768c52ffce1..cea301f111812f9cb651f91fffe9a40cc804f655 100755 (executable)
@@ -33,7 +33,7 @@
 // |         Harald Radi <[email protected]>                              |
 // +-----------------------------------------------------------------------+
 //
-// $Id: TreeMenu.php,v 1.4 2004/02/02 06:32:18 chriskl Exp $
+// $Id: TreeMenu.php,v 1.5 2005/01/23 12:42:36 soranzo Exp $
 
 /**
 * HTML_TreeMenu Class
@@ -628,7 +628,7 @@ class HTML_TreeMenu_DHTML extends HTML_TreeMenu_Presentation
         $menuObj     = 'objTreeMenu_' . ++$count;
 
         $html  = "\n";
-        $html .= '<script language="javascript" type="text/javascript">' . "\n\t";
+        $html .= '<script type="text/javascript">' . "\n\t";
         $html .= sprintf('%s = new TreeMenu("%s", "%s", "%s", "%s", %s, %s);',
                          $menuObj,
                          $this->images,
index 459495e379410dce7e2a7a4287b2ee74da5da123..ad127a3f3740a43aaab598a06fa83aac1db4dd56 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.97 2005/01/21 18:05:02 soranzo Exp $
+        * $Id: Misc.php,v 1.98 2005/01/23 12:42:35 soranzo Exp $
         */
         
        class Misc {
                 * @param $database True if dropping a database, false otherwise
                 */
                function printReload($database) {
-                       echo "<script language=\"JavaScript\">\n";
+                       echo "<script type=\"text/javascript\">\n";
                        if ($database)
                                echo "\tparent.frames.browser.location.href=\"browser.php\";\n";
                        else
                 * @param $object eg. forms[0].username
                 */
                function setFocus($object) {
-                       echo "<script language=\"JavaScript\">\n";
+                       echo "<script type=\"text/javascript\">\n";
                        echo "<!--\n";
                        echo "   document.{$object}.focus();\n";
                        echo "-->\n";
index 2241e04105e991ea87aceeb475256c0d06bcd4ae..5c344f3b1238a115a9359b1da963e618a966b729 100755 (executable)
--- a/login.php
+++ b/login.php
@@ -3,7 +3,7 @@
        /**
         * Login screen
         *
-        * $Id: login.php,v 1.20 2005/01/19 16:09:08 soranzo Exp $
+        * $Id: login.php,v 1.21 2005/01/23 12:42:35 soranzo Exp $
         */
 
        // This needs to be an include once to prevent lib.inc.php infinite recursive includes.
        // Force encoding to UTF-8
        $lang['appcharset'] = 'UTF-8';
 
-       // Output header        
-       $misc->printHeader($lang['strlogin'], "<script language=\"javascript\" type=\"text/javascript\"><!--
-               // show login form in top frame
-               if (top != self) {
-                       window.top.location.href='{$_SERVER['REQUEST_URI']}';
-               }
-               //-->
-               </script>");
+       // Output header
+       if (isset($_failed) && $_failed) {
+               $misc->printHeader($lang['strlogin'], "<script type=\"text/javascript\"><!--
+       // show login form in top frame
+       if (top != self) {
+               window.top.location.href='{$_SERVER['REQUEST_URI']}';
+       }
+       //-->
+</script>");
+       } else {
+               $misc->printHeader($lang['strlogin']);
+       }
        $misc->printBody();
 ?>
 
-       <table class="navbar" border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
-               <tr height="115">
+       <table class="navbar" border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
+               <tr>
                        <td height="115" align="center" valign="middle">
                                <center>
                                <h1><?php echo $appName ?> <?php echo $appVersion ?> <?php echo $lang['strlogin'] ?></h1>                               
                                <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post" name="login_form">
                                <table class="navbar" border="0" cellpadding="5" cellspacing="3">
                                        <tr>
-                                               <th><?php echo $lang['strusername'] ?>:</td>
+                                               <th><?php echo $lang['strusername'] ?>:</th>
                                                <td><input type="text" name="formUsername" value="<?php echo (isset($_POST['formUsername'])) ? htmlspecialchars($_POST['formUsername']) : '' ?>" size="24" /></td>
                                        </tr>
                                        <tr>
-                                               <th><?php echo $lang['strpassword'] ?>:</td>
+                                               <th><?php echo $lang['strpassword'] ?>:</th>
                                                <td><input type="password" name="formPassword" size="24" /></td>
                                        </tr>
                                        <tr>
-                                               <th><?php echo $lang['strserver'] ?>:</td>
+                                               <th><?php echo $lang['strserver'] ?>:</th>
                                                <td><select name="formServer">
                                                <?php
                                                        for ($i = 0; $i < sizeof($conf['servers']); $i++) {
                                                </select></td>
                                        </tr>
                                        <tr>
-                                               <th><?php echo $lang['strlanguage'] ?>:</td>
+                                               <th><?php echo $lang['strlanguage'] ?>:</th>
                                                <td><select name="formLanguage">
                                                <?php
                                                        // Language name already encoded
                                <p><input type="submit" name="submitLogin" value="<?php echo $lang['strlogin'] ?>" /></p>
                                </form>
                                </center>
-                               <script language="javascript">
+                               <script type="text/javascript">
                                <!--
                                        var uname = document.login_form.formUsername;
                                        var pword = document.login_form.formPassword;
                                        } else {
                                                pword.focus();
                                        }
-                               -->
+                               //-->
                                </script>
                        </td>
                </tr>
index 5a665d672836a7113007a6c2a587f3e9e07f3b50..2450f5c9d3d14a8cfa190165292d4bdb6f3938f1 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.68 2004/10/11 10:29:15 jollytoad Exp $
+        * $Id: tables.php,v 1.69 2005/01/23 12:42:35 soranzo Exp $
         */
 
        // Include application functions
                        echo "<form action=\"$PHP_SELF\" method=\"post\" name=\"selectform\">\n";
                        if ($attrs->recordCount() > 0) {
                                // JavaScript for select all feature
-                               echo "<script language=\"JavaScript\">\n";
+                               echo "<script type=\"text/javascript\">\n";
                                echo "<!--\n";
                                echo "  function selectAll() {\n";
                                echo "          for (var i=0; i<document.selectform.elements.length; i++) {\n";
index ec057e03f0b3e6385e5a351a250d837e77a1edac..dd8022d805cb03becd2ab76b086e86e99446192c 100644 (file)
--- a/views.php
+++ b/views.php
@@ -3,7 +3,7 @@
        /**
         * Manage views in a database
         *
-        * $Id: views.php,v 1.51 2004/09/07 13:58:21 jollytoad Exp $
+        * $Id: views.php,v 1.52 2005/01/23 12:42:35 soranzo Exp $
         */
 
        // Include application functions
@@ -32,7 +32,7 @@
                        echo "<form action=\"$PHP_SELF\" method=\"get\" name=\"selectform\">\n";
                        if ($attrs->recordCount() > 0) {
                                // JavaScript for select all feature
-                               echo "<script language=\"JavaScript\">\n";
+                               echo "<script type=\"text/javascript\">\n";
                                echo "<!--\n";
                                echo "  function selectAll() {\n";
                                echo "          for (var i=0; i<document.selectform.elements.length; i++) {\n";