Documentation

Installing/Configuring AJLogin

  1. Create a copy of the inc_config.sample.asp file called inc_config.asp and set appropriate preferences and site properties as instructed by the descriptive notes within the file.
  2. Visit the install.asp to create your admin account and then IMMEDIATELY DELETE THE INSTALL.ASP FILE.
  3. Upload all files to your web server. It is usually a good idea to keep all the AJLogin files (except the database) together in one folder, separate from other existing site files.
  4. Move the database to an offline folder for security purposes. Make sure that both the database and the parent folder of the database have permissions set to allow read and write.

Using AJLogin

To protect an ASP page (that resides in the same folder as the AJLogin files) so that only members of your site can access it, paste the following code at the top of the page:

<!--#INCLUDE file="inc_common.asp"-->
<% RestrictPageAccesToLevel(1) %>

The value passed to the RestrictPageAccesToLevel function (in this case: 1) dictates what access level a member must have in order to view the page. All new members default to level 1 and then can be promoted to higher security clearances using the admin control panel. You may use as many different access levels as you need, but the standard configuration is to use level 1 as a regular member, level 2 as a site moderator and level 3 as a site admin.

To protect an ASP page (that resides in the same folder as the AJLogin files) so that only site administrators can access it, include the following code at the top of the page:

<!--#INCLUDE file="inc_common.asp"-->
<% RestrictPageAccesToLevel(ajlogin_adminlevel) %>

To protect pages outside of the directory containing the AJLogin files, change the code that reads #INCLUDE file to #INCLUDE virtual. You also must preface the included file name with the full virtual path to the file. An example that assumes the AJLogin files are in a directory called "ajlogin" in the site's root directory would look like this:

<!--#INCLUDE virtual="/AJLogin/inc_common.asp"-->

Any questions/bugs/compliments can be sent to adam (at) adamjarret.com.