6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * Contains functions used to do authentication.
14 require_once( '../functions/page_header.php' );
16 /* If a user opens a new session then comes back to this one,
17 * $base_uri isn't set because it the session is invalid.
20 if (! isset($base_uri)) {
21 ereg ('(^.*/)[^/]+/[^/]+$', $PHP_SELF, $regs);
26 function is_logged_in () {
27 global $squirrelmail_language, $frame_top, $base_uri;
29 if ( session_is_registered('user_is_logged_in') ) {
33 if (!isset($frame_top) ||
$frame_top == '' ) {
37 set_up_language($squirrelmail_language, true);
39 displayHtmlHeader( _("You must be logged in to access this page.") );
41 echo "<body bgcolor=\"ffffff\">\n" .
42 ' <p><center><b>' .
43 _("You must be logged in to access this page.").'</b><br><br>' .
44 '<a href="' . $base_uri . '" target="' . $frame_top . '">' .
45 _("Go to the login page") . "</a>\n" .
46 "</center></body></html>\n";