+ // Need the base URI to set the cookies. (Same code as in webmail.php)
+ ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
+ $base_uri = $regs[1];
+
+ setcookie("username", "", 0, $base_uri);
+ setcookie("key", "", 0, $base_uri);
+ setcookie("logged_in", 0, 0, $base_uri);
+
+ // In case the last session was not terminated properly, make sure
+ // we get a new one.
+ setcookie("PHPSESSID", "", 0, $base_uri);
+