From 86e776cbe309b3d3cf38c1864562dcaf9ebd4b44 Mon Sep 17 00:00:00 2001 From: stekkel Date: Wed, 31 Jul 2002 21:41:37 +0000 Subject: [PATCH] removed old method to continue with a compose session git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3209 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/login.php | 168 ++++++++++++++++++-------------------------------- 1 file changed, 59 insertions(+), 109 deletions(-) diff --git a/src/login.php b/src/login.php index fba85c64..c6bbb30d 100644 --- a/src/login.php +++ b/src/login.php @@ -11,55 +11,24 @@ * * $Id$ */ - -$rcptaddress = ''; -if (isset($emailaddress)) { - if (stristr($emailaddress, 'mailto:')) { - $rcptaddress = substr($emailaddress, 7); - } else { - $rcptaddress = $emailaddress; - } - - if (($pos = strpos($rcptaddress, '?')) !== false) { - $a = substr($rcptaddress, $pos + 1); - $rcptaddress = substr($rcptaddress, 0, $pos); - $a = explode('=', $a, 2); - if (isset($a[1])) { - $name = urldecode($a[0]); - $val = urldecode($a[1]); - global $$name; - $$name = $val; - } - } - - /* At this point, we have parsed a lot of the mailto stuff. */ - /* Let's do the rest -- CC, BCC, Subject, Body */ - /* Note: They can all be case insensitive */ - foreach ($GLOBALS as $k => $v) { - $key = strtolower($k); - $value = urlencode($v); - if ($key == 'cc') { - $rcptaddress .= '&send_to_cc=' . $value; - } else if ($key == 'bcc') { - $rcptaddress .= '&send_to_bcc=' . $value; - } else if ($key == 'subject') { - $rcptaddress .= '&subject=' . $value; - } else if ($key == 'body') { - $rcptaddress .= '&body=' . $value; - } - } - - /* Double-encode in this fashion to get past redirect.php properly. */ - $rcptaddress = urlencode($rcptaddress); -} - require_once('../functions/strings.php'); require_once('../config/config.php'); require_once('../functions/i18n.php'); require_once('../functions/plugin.php'); require_once('../functions/constants.php'); require_once('../functions/page_header.php'); -require_once('../functions/html.php'); +require_once('../class/browser.class'); + +// initialize some vars +if(!isset($UA)) $UA = ''; +if(!isset($cc)) $cc = ''; +if(!isset($dl)) $dl = ''; +if(!isset($am)) $am = ''; + +$sniffer_settings = array('check_cookies'=>$cc, + 'default_language'=>$dl, + 'allow_masquerading'=>$am); +$browser = new phpSniff($UA,$sniffer_settings); /* * $squirrelmail_language is set by a cookie when the user selects @@ -75,7 +44,8 @@ if (!function_exists('sqm_baseuri')){ } $base_uri = sqm_baseuri(); @session_destroy(); - +session_start(); +session_register('browser'); /* * In case the last session was not terminated properly, make sure * we get a new one. @@ -91,7 +61,7 @@ do_hook('login_cookie'); /* Output the javascript onload function. */ -$header = "