Re: [Phplib-users] Default Auth? 7.2d
Brought to you by:
nhruby,
richardarcher
From: Layne W. <la...@if...> - 2002-02-13 18:23:11
|
> Now, I show a footer on all pages (including welcome.php) that > has copyright info with links to a few things such as a Terms of > Use document. All documents and articles on the site are viewed > through library.php (which parses the articles into a template). > Library.php uses my normal auth class and works fine, as long as > the user is logged in, which is what I want...most of the time. > > However, I need to be able to grant access to Terms of Use, etc. > to users who haven't logged in (such as viewing the document > from welcome.php). I don't even bother with default auth in these cases. In library.php I would do this: if("/terms_of_use.php" == $HTTP_SERVER_VARS["SCRIPT_NAME"]) { page_open(array("sess" => "My_Session")); } else { page_open(array("sess" => "My_Session", "auth" => "My_Auth")); } Layne Weathers Ifworld Inc. |