Recipe1.User Login


Recipe 1. User Login

An intranet is a very different animal from the free-ranging Internet. Whereas designers building for the Web thrive on the number of eyeballs they capture, intranet developers place a premium on their pages being seen by just the right eyeballs. Critical to an intranet is the concept of user authentication. Before anyone can browse an intranet area, he must be authenticated against the company records, and the records, of course, are maintained in a data source by system administrators.

Muchin many cases, allof a company's intranet is protected against unauthorized viewing. As you'll see in this application, the term unauthorized means more than "not registered." For robust authentication applications like the one you're about to build, it means "not cleared to view this particular content," which can be anything from an entire site down to an isolated area of a single page.

Macromedia Dreamweaver 8 provides a solid foundation of user authentication tools that we will use as the base upon which to build our application. In all, there are eight separate pages in our application that fall into either the user or the administrator category. We do, of course, use our own authentication routines to isolate the administrator-oriented applications from those intended for all users.

Our application starts with the login page, where registered users enter their user name and password. If they had previously specified that their user name be remembered, that field is filled automatically. If the login succeeds, users are taken to a confirmation or welcome page where they have an opportunity to update their login info. If the login fails, an error message appears on the login page itself, and they can try again. Users who have forgotten their password can visit a page to request that the password be emailed to them. The login page also provides a link for new users. After completing the registration successfully, the new users are returned to the login page, where their newly registered user name is already in place.

All the pages in the application contain links to the administrative functions, but these links can be seen only by administrators, thanks to the conditional logic embedded on the page. The administrator's main page provides both a paged listing of all users (sorted so that the newest are displayed first) and a form for entering new user information. Each of the user listings is linked to a page where the administrator can modify or delete the user's record. On another page, the administrator can get an overview of user registration to see how many users are in the system and how much activity the registration system has seen over various time periods.




Macromedia Dreamweaver 8 Recipes
Macromedia Dreamweaver 8 Recipes
ISBN: 0321393910
EAN: 2147483647
Year: 2003
Pages: 121

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net