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);
25 function is_logged_in () {
26 global $squirrelmail_language, $frame_top, $base_uri;
28 if ( session_is_registered('user_is_logged_in') ) {
32 if (!isset($frame_top) ||
$frame_top == '' ) {
36 set_up_language($squirrelmail_language, true);
38 displayHtmlHeader( 'SquirrelMail', '', FALSE );
40 echo "<body bgcolor=\"ffffff\">\n" .
41 '<br><br><center><b>' .
42 _("You must be logged in to access this page.").'</b><br><br>' .
43 "<a href=\"$base_uri" . "src/login.php\" target=\"$frame_top\">"._("Go to the login page")."</a>\n" .
44 "</center></body></html>\n";