<?php
/**
-* redirect.php
-* Derived from webmail.php by Ralf Kraudelt <kraude@wiwi.uni-rostock.de>
-*
-* Copyright (c) 1999-2004 The SquirrelMail Project Team
-* Licensed under the GNU GPL. For full terms see the file COPYING.
-*
-* Prevents users from reposting their form data after a successful logout.
-*
-* @version $Id$
-* @package squirrelmail
-*/
+ * Prevents users from reposting their form data after a successful logout.
+ *
+ * Derived from webmail.php by Ralf Kraudelt <kraude@wiwi.uni-rostock.de>
+ *
+ * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ */
/**
* Path for SquirrelMail required files.
header('Pragma: no-cache');
$location = get_location();
+session_set_cookie_params (0, $base_uri);
sqsession_is_active();
sqsession_unregister ('user_is_logged_in');
sqGetGlobalVar('login_username', $login_username);
sqGetGlobalVar('secretkey', $secretkey);
if(!sqGetGlobalVar('squirrelmail_language', $squirrelmail_language) || $squirrelmail_language == '') {
- $squirrelmail_language = $squirrelmail_default_language;
+ $squirrelmail_language = $squirrelmail_default_language;
}
if (!sqgetGlobalVar('mailto', $mailto)) {
$mailto = '';
set_up_language($squirrelmail_language, true);
/* Refresh the language cookie. */
-setcookie('squirrelmail_language', $squirrelmail_language, time()+2592000,
+sqsetcookie('squirrelmail_language', $squirrelmail_language, time()+2592000,
$base_uri);
if (!isset($login_username)) {
include_once(SM_PATH . 'functions/display_messages.php' );
- logout_error( _("You must be logged in to access this page.") );
+ logout_error( _("You must be logged in to access this page.") );
exit;
}
$username = $login_username;
sqsession_register ($username, 'username');
- setcookie('key', $key, 0, $base_uri);
+ sqsetcookie('key', $key, false, $base_uri);
do_hook ('login_verified');
}
}
if($mailto != '') {
$redirect_url = $location . '/webmail.php?right_frame=compose.php&mailto=';
- $redirect_url .= $mailto;
+ $redirect_url .= urlencode($mailto);
}
/* Write session data and send them off to the appropriate page. */
global $attachment_common_types, $attachment_common_types_parsed;
$attachment_common_types_parsed[$str] = true;
-
- /*
- * Replace ", " with "," and explode on that as Mozilla 1.x seems to
+
+ /*
+ * Replace ", " with "," and explode on that as Mozilla 1.x seems to
* use "," to seperate whilst IE, and earlier versions of Mozilla use
* ", " to seperate
*/
-
+
$str = str_replace( ', ' , ',' , $str );
$types = explode(',', $str);
sqsession_register($attachment_common_types, 'attachment_common_types');
}
-?>
+?>
\ No newline at end of file