Explorar o código

* Great little patch to open up the compose screen initially
* Thanks to Marc Lucks
* Added docs to Wiki -- http://www.squirrelmail.org/wiki/WindowsMailto

Tyler Akins %!s(int64=24) %!d(string=hai) anos
pai
achega
238c10968a
Modificáronse 3 ficheiros con 14 adicións e 2 borrados
  1. 8 1
      src/login.php
  2. 4 1
      src/redirect.php
  3. 2 0
      src/webmail.php

+ 8 - 1
src/login.php

@@ -76,7 +76,14 @@
    echo _("Password:");
    echo "               </TD><TD WIDTH=* ALIGN=left>\n";
    echo "                  <INPUT TYPE=PASSWORD NAME=\"$password_form_name\">\n";
-   echo "               </TD>\n"; 
+   echo "               </TD>\n";
+   if (isset($emailaddress)) {
+      if (stristr($emailaddress,"mailto:"))
+         $rcptaddress = substr ($emailaddress, 7,strlen($emailaddress)-7);
+      else
+         $rcptaddress = $emailaddress;
+      echo "               <INPUT TYPE=HIDDEN NAME=\"rcptemail\" VALUE=\"".htmlspecialchars($rcptaddress)."\">\n";
+   }
    echo "         </TABLE>\n";
    echo "      </TD>\n";
    echo "   </TR><TR>\n";

+ 4 - 1
src/redirect.php

@@ -84,5 +84,8 @@
    $user_is_logged_in = true;
    session_register ('user_is_logged_in');
 
-   header("Location: webmail.php");
+   if(isset($rcptemail))
+      header("Location: webmail.php?right_frame=compose.php&rcptaddress=$rcptemail");
+   else
+      header("Location: webmail.php");
 ?>

+ 2 - 0
src/webmail.php

@@ -79,6 +79,8 @@
       $right_frame_url = 'options.php';
    } else if ($right_frame == 'folders.php') {
       $right_frame_url = 'folders.php';
+   } else if ($right_frame == 'compose.php') {
+      $right_frame_url = "compose.php?send_to=$rcptaddress";
    } else {
       if (!isset($just_logged_in)) $just_logged_in = 0;
       $right_frame_url = "right_main.php?just_logged_in=$just_logged_in";