\n"; echo "

"; echo "
"; echo ""._("You must be logged in to access this page.")."
"; echo ""._("Go to the login page")."\n"; echo "
"; echo "\n"; exit; } // Refresh the language cookie. if (isset($squirrelmail_language)) { setcookie('squirrelmail_language', $squirrelmail_language, time()+2592000); } include ('../functions/prefs.php'); include ('../functions/imap.php'); include ('../functions/plugin.php'); if (!session_is_registered('user_is_logged_in')) { do_hook ('login_before'); $secretkey = $key ; $onetimepad = OneTimePadCreate(strlen($secretkey)); $key = OneTimePadEncrypt($secretkey, $onetimepad); session_register('onetimepad'); // verify that username and password are correct if ($force_username_lowercase) $login_username = strtolower($login_username); $login_username = $login_username."@".$mailserv; // echo $key ; // echo $login_username ; $imapConnection = sqimap_login($login_username, $key, $imapServerAddress, $imapPort, 0); if (!$imapConnection) { echo "\n"; echo "

"; echo "
"; echo ""._("There was an error contacting the mail server.")."
"; echo _("Contact your administrator for help.")."\n"; echo "
"; echo "\n"; exit; } sqimap_logout($imapConnection); setcookie('username', $login_username, 0, $base_uri); setcookie('key', $key, 0, $base_uri); do_hook ('login_verified'); } $user_is_logged_in = true; session_register ('user_is_logged_in'); if(isset($rcptemail)) header("Location: webmail.php?right_frame=compose.php&rcptaddress=$rcptemail"); else header("Location: webmail.php"); ?>