Customize:CustomLogin

From InClickAdServer

Contents

Custom Login Page

The Custom Login Page is a way for you to use your own login page based on your own design or page layout. Using the information provided below, you can create a login box for any page within your site. A sample Custom Login Page is available here.

The Custom Login Process

The login page can be customized in that you would create your own form post to the inClick Ad Server. This custom login page could be a page you create or a part of your existing content pages outside of the ad server. When creating your custom login page, you must use a standard form POST to the client.php file with the following form post parameters:

Parameter Name Form Field Type Expected Data
login_id text Users Login ID
login_password text (Password) Users Password
login_base_url hidden The URL of the the current page, failed login, or logout landing
action hidden "login"

The parameter login_base_url is the redirect location for a failed login AND the logout URL when the user clicks on the logout link from within the ad server. The login_base_url can also be passed as a GET parameter when linking to the lost password, new advertiser, and new publisher work flow (See Section Links to New Advertiser, New Publisher, and Lost Password work flow below).

On a failed login attempt, the ad server will redirect the browser to this URL and append parameters for you to use to respond to the end user. These parameters are:

Parameter Name Possible Values Explanation of Value
result_code authentication_failed This value is returned when the login failed due to an invalid account ID, password, or both.
logout This value is returned when a user has logged out of the ad server
account_locked This value is returned when too many failed login attempts were made. To unlock a locked account, either a password reset will need to be completed -or- the user can try again in an hour.
account_suspended This value is returned when the account being accessed has been suspended.
login_id [THEPROVIDEDUSERNAME] This value returns what was provided by the end user. This value is provided in both a login failure condition and under a logout condition.

Links to New Advertiser, New Publisher, and Lost Password Workflow

In addition to the Custom Login parameters above, you can also pass the login_base_url parameter in the URL link to the New Advertiser, New Publisher, or Lost Password workflow. For example:

Sample Custom Login HTML Code Fragment

In addition to the parameters above, you will likely need to link to the New User Ad Creation work flow as well as the New Publisher sign up screen. These links can be found on your footer.html file located in the /html directory.

Sample Custom Login Page

A sample page exists in the root directory of your ad server. The file name is customlogin.php and is located in the root directory of your installation. To see it in action, go to

This file is also available in source form here.

Available Session Variables

The inClick Ad Server makes certain session variables available for you to utilize. Through these session variables, you can change the header and footer based on the type of login made.

Parameter Name Use Expected Value
$_SESSION['inclick_user_level'] Determines the account type. pub|adm
adv - Advertiser Login
pub - Publisher
adm - Adminstrator
$_SESSION['valid_user_id'] The users Account Number Numeric value
$_SESSION['inclick_username'] The users Login ID (username) Text, the users login name.
SHOW STOPPER: Do not change the value of the session variables as unexpected results will occur.