homehomemembers areafeaturespricingdemonstrationorder onlinesupportDevelopment Teamonline manualAlbinator Merchandisecontact us

 contents  Adding custom templates  FAQ's
Manual ~ Albinator
go to the bottom close 
Search manual
> Making current pages under Albinator < 


Albinator's login system can work as login center for your website. Very easy to implement & can protect your current pages using Albinator's login procedures.

Integrating Login form: (sample)

<table border="0" cellpadding="0" cellspacing="0" align="center">
<form action="PATH_TO_ALBINATOR/login.php" method="post">
<tr>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">enter username and password:</font></td>
</tr>
<tr>
<td>
<input type="text" mame="uidform" size="7" maxlength="15">
<input type="password" name="passwordform" size="7" maxlength="15">
<input type="submit" value="login &gt;" name="submit">
<input type="hidden" name="ref" value="VALUE">
<input type="hidden" name="change" value="1">
</td>
</tr>
</form>
</table>

In the above form you just need to set 2 things:

  1. PATH_TO_ALBINATOR: the path to the directory of albinator where login.php exists.
  2. VALUE: this is a value for the reference of the page. If set to 1 will send the user after loggin back to the current page.

Form Output:

As you can see the form is so compact and can fit in any page of your current website and the user won't even know that albinator is loggin them in.

 

Protecting current pages under logging system:

This can be very handy if you wish to allow certain content to be viewed by only logged in users, in other words not everyone just the members of the site. You can do this on any page you wish to protect, as following:

  1. Create a new file, add the following on the top

    <?php

    include_once("dirpath.inc.php");
    require_once($dirpath."essential/dbc_essential.php");
    require_once($dirpath."essential/globalfunctions.php");
    $ucook = new UserCookie();
    $csr = new ComFunc();
    $design = new WebTemplate();

    if ( !isset($ucook) || !$ucook->LoggedIn() )
    {
    $errMsgarr[] = $_Lang_Statements[0];
    $design->errmsg = array($errMsgarr, $_Lang_Keywords[0], 'error', '70');
    $design->getTemplate( 'errmsg' );
    $design->evalOutput();
    }
    ?>


  2. Copy the file dirpath.inc.php from the Albinator root directory to the directory whereyour new files exisits.
  3. Edit this file to reflect the path to the Albinator's root directory.

e.g.
which must be changed to reflect the current path to albinator's directory e.g. your directory sturcture is as follows:

        Root >
                  > directory1
                  > directory2
                  > ... 
                  > ... 
                  > albinator
                     > user 
                     > ... 
                     > ... 

Now you wish to proctect a page under directory1, then your dirpath in the page under that directory will be as follows:

$dirpath = "../albinator";

That's it... now only the logged in users will be able to view the content page, other will be prompted to login.

 

top of the page 
 << adding custom templates
Manual version 2.0.7 updated 3/21/2004. Copyright © 2001-2008 Albinator. All rights reserved.

Copyright © 2001-2008 Albinator. All rights reserved.