make the login box be centered again on firefox/linux
[squirrelmail.git] / src / login.php
index ad93468f333e0a8c3b3330f532eb887a5d1f73df..5cbe981e2f2012383216952cf4a7c9c59ad988b2 100644 (file)
@@ -50,7 +50,13 @@ $base_uri = sqm_baseuri();
  */
 
 sqsession_destroy();
-sqsession_start();
+/**
+ * PHP bug. http://bugs.php.net/11643 (warning, spammed bug tracker) and
+ * http://bugs.php.net/13834
+ * SID constant is not destroyed in PHP 4.1.2, 4.2.3 and maybe other 
+ * versions. Produces warning on login page. Bug should be fixed only in 4.3.0
+ */
+@sqsession_start();
 header('Pragma: no-cache');
 
 /**
@@ -86,7 +92,7 @@ $loginname_value = (sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($
 
 /* Output the javascript onload function. */
 
-$header = "<script language=\"JavaScript\" type=\"text/javascript\">\n" .
+$header = "<script type=\"text/javascript\">\n" .
           "<!--\n".
           "  function squirrelmail_loginpage_onload() {\n".
           "    var textElements = 0;\n".
@@ -148,7 +154,7 @@ if(sqgetGlobalVar('mailto', $mailto)) {
 echo html_tag( 'table',
     html_tag( 'tr',
         html_tag( 'td',
-            '<center>'.
+            '<div style="text-align: center;">'.
             ( isset($org_logo) && $org_logo
               ? '<img src="' . $org_logo . '" alt="' .
                 sprintf(_("%s Logo"), $org_name) .'"' . $width_and_height .
@@ -191,10 +197,10 @@ echo html_tag( 'table',
                         ) .
                         html_tag( 'tr',
                                 html_tag( 'td',
-                                    '<center>'. addSubmit(_("Login")) .'</center>',
+                                    '<div style="text-align: center;">'. addSubmit(_("Login")) .'</div>',
                                     'left' )
                                 ),
-                        '', $color[4], 'border="0" width="350"' ) . '</center>',
+                        '', $color[4], 'border="0" width="350" align="center"' ) . '</div>',
                         'center' )
                         ) ,
                         '', $color[4], 'border="0" cellspacing="0" cellpadding="0" width="100%"' );
@@ -203,4 +209,4 @@ echo '</form>' . "\n";
 do_hook('login_bottom');
 
 ?>
-</body></html>
\ No newline at end of file
+</body></html>