added extra variable to make it possible to add more lines to the onload
[squirrelmail.git] / src / login.php
index 12efa9f266df71381296f63166aeafa24b51bb49..2ca0a49c820976d10eed417d1588143ef72111cb 100644 (file)
@@ -28,7 +28,7 @@ if (isset($emailaddress)) {
             $name = urldecode($a[0]);
             $val = urldecode($a[1]);
             global $$name;
-            $$naame = $val;
+            $$name = $val;
         }
     }
     
@@ -39,13 +39,13 @@ if (isset($emailaddress)) {
         $key = strtolower($k);
         $value = urlencode($v);
         if ($key == 'cc') {
-            $rcptaddress .= '&send_to_cc=' . $value;
+            $rcptaddress .= '&send_to_cc=' . $value;
         } else if ($key == 'bcc') {
-            $rcptaddress .= '&send_to_bcc=' . $value;
+            $rcptaddress .= '&send_to_bcc=' . $value;
         } else if ($key == 'subject') {
-            $rcptaddress .= '&subject=' . $value;
+            $rcptaddress .= '&subject=' . $value;
         } else if ($key == 'body') {
-            $rcptaddress .= '&body=' . $value;
+            $rcptaddress .= '&body=' . $value;
         }
     }
     
@@ -93,6 +93,7 @@ $header = "<SCRIPT LANGUAGE=\"JavaScript\">\n" .
           "  }\n".
           "// -->\n".
           "</script>\n";
+$custom_css = 'none';          
 displayHtmlHeader( "$org_name - " . _("Login"), $header, FALSE );
 
 /* Set the title of this page. */
@@ -105,8 +106,18 @@ do_hook('login_top');
 
 $loginname_value = (isset($loginname) ? htmlspecialchars($loginname) : '');
 
+/* Display width and height like good little people */
+$width_and_height = "";
+if (isset($org_logo_width) && is_int($org_logo_width) && $org_logo_width>0) {
+    $width_and_height = " WIDTH=\"$org_logo_width\"";
+}
+if (isset($org_logo_height) && is_int($org_logo_height) && $org_logo_height>0) {
+    $width_and_height .= " HEIGHT=\"$org_logo_height\"";
+}
+
 echo "<CENTER>".
-     "  <IMG SRC=\"$org_logo\"><BR>\n".
+     "  <IMG SRC=\"$org_logo\" ALT=\"" . sprintf(_("%s Logo"), $org_name) . 
+        "\"$width_and_height><BR>\n".
      ( $hide_sm_attributions ? '' :
        '<SMALL>' . sprintf (_("SquirrelMail version %s"), $version) . "<BR>\n".
        '  ' . _("By the SquirrelMail Development Team") . "<BR></SMALL>\n" ) .
@@ -148,4 +159,4 @@ echo "</FORM>\n";
 do_hook('login_bottom');
 echo "</BODY>\n".
      "</HTML>\n";
-?>
\ No newline at end of file
+?>