Dreamweaver tutorials
To restrict access to our control panel (pages inside of the admin folder), we have created login page at the beginning of the second part of this tutorial.
Now we need to apply Restrict Access To Page server behavior to all of these pages, to ensure that no one except administrator can access them.
Restrict Access To Page server behavior checks if the user has logged in and depending on the answer will redirect him/her to the appropriate page.
To apply this server behavior open category_add.php file and in the Server Behavior tab of the Application panel press + sign.
From the list of options choose User Authentication > Restrict Access To Page (Fig. 185).

In the Restrict Access To Page window choose:
Restrict based on Username and password
If access denied, go to login.php
(Fig. 186)

Click OK, save and close the file.
Do the same thing with the following files:
category_edit.php
links_add.php
links_added.php
links_already_exists.php
links_edit.php
links_list.php
links_updated.php
Once you're done with them, open logout.php and in the Server Behaviors tab of the Application panel click + sign and from the list of options choose User Authentication > Log Out User (Fig. 187).

In the Log Out User window choose:
Log out when Page loads
When done, go to login.php
(Fig. 188)

Click OK, save and close the file.
And this is the end of the second part of this tutorial. Our control panel is finished and in the third part of this tutorial I will be explaining how to display links to the visitors, how to create Submit Link form and search engine.
Website Design Company | Website Design Company Sussex | Website Design Company Chichester | Website Design Packages | Tutorials Resources | Articles | Contact
© Web Design Tutorials – Sebastian Sulinski