bebc7f87a1739de545b3c994428b94118c809ccb
[squirrelmail.git] / functions / auth.php
1 <?php
2
3 /**
4 * auth.php
5 *
6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Contains functions used to do authentication.
10 *
11 * $Id$
12 */
13
14 require_once( '../functions/page_header.php' );
15
16 function is_logged_in () {
17 global $squirrelmail_language, $frame_top, $base_uri;
18
19 if ( session_is_registered('user_is_logged_in') ) {
20 return;
21 }
22
23 if (!isset($frame_top) || $frame_top == '' ) {
24 $frame_top = '_top';
25 }
26
27 set_up_language($squirrelmail_language, true);
28
29 displayHtmlHeader( 'SquirrelMail', '', FALSE );
30
31 echo "<body bgcolor=\"ffffff\">\n" .
32 '<br><br><center><b>' .
33 _("You must be logged in to access this page.").'</b><br><br>' .
34 "<a href=\"$base_uri" . "src/login.php\" target=\"$frame_top\">"._("Go to the login page")."</a>\n" .
35 "</center></body></html>\n";
36 exit;
37 }
38
39 ?>