X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fauth.php;h=ba8a6de1ec05b6ac0fced55142293000dbb806fe;hb=e080b080522c3d5802580a3d992bde91db98788f;hp=594567fd577a5147e49bb67ee7e00e4d66accd74;hpb=3c13b9fbe25c208d9618b7f2eb2262605ebf6b44;p=squirrelmail.git diff --git a/functions/auth.php b/functions/auth.php index 594567fd..ba8a6de1 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -1,22 +1,50 @@ \n\n"; - exit; - } else { - return true; - } - } + * auth.php + * + * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Licensed under the GNU GPL. For full terms see the file COPYING. + * + * Contains functions used to do authentication. + * + * $Id$ + */ + +/*****************************************************************/ +/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/ +/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/ +/*** + Base level indent should begin at left margin, as ***/ +/*** the require_once below. ***/ +/*** + All identation should consist of four space blocks ***/ +/*** + Tab characters are evil. ***/ +/*** + all comments should use "slash-star ... star-slash" ***/ +/*** style -- no pound characters, no slash-slash style ***/ +/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/ +/*** ALWAYS USE { AND } CHARACTERS!!! ***/ +/*** + Please use ' instead of ", when possible. Note " ***/ +/*** should always be used in _( ) function calls. ***/ +/*** Thank you for your help making the SM code more readable. ***/ +/*****************************************************************/ + +require_once( '../functions/page_header.php' ); + + function is_logged_in () { + global $squirrelmail_language; + + if ( session_is_registered('user_is_logged_in') ) + return; + + set_up_language($squirrelmail_language, true); + + displayHtmlHeader( 'SquirrelMail', '', FALSE ); + + echo "\n" . + '

'. + _("You must be logged in to access this page.").'

'. + ""._("Go to the login page")."\n". + "
\n"; + exit; + } ?>