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:
New Advertiser
http://[YOURADSERVER]/signup.php?login_base_url=http://somepage/page.php
New Publisher
http://[YOURADSERVER]/signup.php?user_type=pub&login_base_url=http://somepage/page.php
Lost Password
http://[YOURADSERVER]/index_client.php?lostpass=1&login_base_url=http://somepage/page.php
Sample Custom Login HTML Code Fragment
<form method="POST" action="http://[URL.TO.INCLICK.INSTALLATION]/client.php">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%"><b><font size="4">Sample Custom Log-In</font></b></td>
</tr>
<tr>
<td width="100%"><hr color="#C0C0C0" size="1"></td>
</tr>
<tr>
<td width="100%"><font size="2">Registered Advertisers and Publisher log in here.<br>
</font><table border="0" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="750">
<tr>
<td width="245" valign="top">
<p align="right"><font size="2">Username:</font></td>
<td width="502" valign="top"><input type="text" name="login_id" size="20" value=""></td>
</tr>
<tr>
<td width="245" valign="top">
<p align="right"><font size="2">Password:</font></td>
<td width="502" valign="top"><input type="password" name="login_password" size="20"><font size="2"><br>
<a href="http://[URL.TO.INCLICK.INSTALLATION]/index_client.php?lostpass=1&login_base_url=http://[LOCATION.OF.CUSTOM.LOGIN.PAGE]/customlogin.php">Forgot your password?</a></font></td>
</tr>
<tr>
<td width="245"> </td>
<td width="502">
<input type="hidden" name="action" value="login">
<input type="hidden" name="login_base_url" value="http://[LOCATION.OF.CUSTOM.LOGIN.PAGE]/customlogin.php">
<input type="submit" value="Log In" name="B1" style="float: left"></td>
</tr>
</table>
<p>
<font size="2">New advertisers <a href="http://[URL.TO.INCLICK.INSTALLATION]/signup.php?user_type=adv&login_base_url=http://[LOCATION.OF.CUSTOM.LOGIN.PAGE]/customlogin.php">sign up here</a>.
New publishers, <a href="http://[URL.TO.INCLICK.INSTALLATION]/signup.php?user_type=pub&login_base_url=http://[LOCATION.OF.CUSTOM.LOGIN.PAGE]/customlogin.php">sign up here</a>!</font></p>
</td>
</tr>
</table>
</form>
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
http://THEADSERVERURL/customlogin.php
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['valid_user_name'] | 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.
