Cisco BBSM 5.1 SDK Developer Guide.
2 - Customizing and Creating Page Sets

Table Of Contents

Customizing and Creating Page Sets

Page Set Overview

Controlling Access to Page Sets

Using SSL in Page Sets

Activating Sessions in Page Sets

Using Bandwidth Manager in Page Sets

Using the iport_tools.asp in Page Sets

Using the disconnect.asp in Page Sets

Using the CommonSubroutines.asp in Page Sets

Sample Page Sets

AccessCode

BlockICS

CruiseLine

DailyHotel

DailyICS

DailyICSClear

MeetingRoom

Mega

MinuteICS

MinuteICSClear

RADIUS

RADIUSClear

RADIUSUBand

RADIUSUBandClear

Subscription

SubscriptionHome

SubscriptionHotel

SubscriptionHotelMultipleDay

SubscriptionICS

System and Error Messages

Customizing and Creating Your Own Page Sets

Customizing Page Sets

Determining the Page Set to Customize

Editing the Configuration Information

Modifying Pages with Custom Images and Colors

Creating Your Own Page Sets

Determining the Access and Accounting Policies

Developing Your Page Set

Adding Configuration Information

Registering Your Page Set

Testing Your Page Set

Enhancing the Searching Page

Page Set Reference

AccessPolicyAccessCodeASP.WebInterface Object

SendActivateSession Method

WriteDuplicateSessions Method

AccessPolicyBlockASP.WebInterface Object

SendActivateSession Method

AccessPolicyDailyASP.WebInterface Object

FormatTime Method

GetTotalSpent Method

GetWelcomeBack Method

SendActivateSession Method (Daily)

AccessPolicyMinuteASP.WebInterface Object

SendActivateSession Method

AccessPolicyRADIUSASP.WebInterface Object

CalculateUserTotals Method

GetTotalCharge Method

GetTotalSeconds Method

GetUserName Method

SendActivateSession Method

AccessPolicySubscriptionASP.WebInterface Object

GetSubscriptionEnd Method

IsExpired Method

SendActivateSession Method

Subscribe Method

CruiseLineValidationASP.WebInterface Object

IsValidCreditCard Method

IsValidFolioNumber Method

NotifyBilling.NotifyBilling Object

BandwidthBoost Method

CheckPage Method

ClientBye Method

ExpandURL Method

FormatPrice Method

GetManageBandwidth Method

GetOriginalURL Method

GetPortMapBandwidthKbps Method

GetPortMapRoomNumber Method

GetPortStateBandwidthKbps Method

GetRoomNumber Method

GetSearchStatus Method

GetSiteNumber Method

GetStartPage Method

IsConnected Method

PostSale Method

PreConnect Method

ResetDenied Method

CommonSubroutines.asp Functions

BandwidthKbpsToString Function

FormatDuration Function

FormatPrice Function

GenerateComboBox Function

MDSubGenerateComboBox Function

MDSubGenerateNBComboBox Function

GenerateUpgradeComboBox Function

OutputYear Function


Customizing and Creating Page Sets


This chapter describes how to customize BBSM page sets or create your own personalized page sets. To enable you to modify or develop page sets, this chapter provides the following:

An overview of how BBSM page sets work, including using SSL, activating the session, limiting bandwidth, and using the most common ASP files.

Descriptions of the page sets that ship with BBSM and the access policy and accounting policy that each page set uses.

Descriptions of system and error message ASP files and how they are generated.

Procedures on how to customize an existing page set or develop a new one.

At the end of the chapter, a reference that provides the BBSM objects, methods (including parameter descriptions), and functions that you can use to modify an existing BBSM page set or develop your own page set.

Page Set Overview

A page set is a collection of ASP files that use Microsoft IIS ASP technology. These ASP files implement the end-user interface to activate a session. The sample page sets that ship with BBSM implement various access and accounting combinations. These can be used as templates for you to tailor your own page sets. Each BBSM page set is identified with a unique name, such as DailyHotel.

BBSM also provides objects and methods so the page set can control the end user's experience. Several of these methods are mentioned in the sections that follow.

Controlling Access to Page Sets

BBSM stores a page set name per port, which allows a page in a page set to verify if an end user on a given port is allowed to view the page. This prevents an end user from manually navigating to a different page set than the one configured for the port. Many of the provided pages implement this access control using the CheckPage method. Not every page requires access control, so you do not have to call CheckPage from every page.

The "package" file for each page set (for example, DailyHotelPackage.asp), defines the strPageToCheck variable. The value of the strPageToCheck string (for example, var strPageToCheck = "DailyHotel";) must be the same as the name of the page set defined in the registry. The string is not case sensitive, so "DailyHotel" is the same as "dailyhotel.

Many of the pages call the CheckPage method (as shown below) to verify that the user is allowed to view the requested page. This allows you to prevent a user from viewing pages that do not belong to the page set configured for the user's port.

obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
if (obj.CheckPage (strPageToCheck))
{
... // Display page to end user.
}
else
{
... // Display access denied error message to end user.
}


See the "NotifyBilling.NotifyBilling Object" section for the details of the CheckPage method.

Using SSL in Page Sets

Some of the provided page sets collect information from the end user, such as credit card information or RADIUS username and password, that is sensitive in nature. You can configure BBSM to encrypt this information using Secure Socket Layer (SSL).

Configuring SSL does not change the end user interface significantly. When the end user requests a page that uses SSL, the web browser may inform the user that it is switching from a nonsecure link to a secure link. In a similar manner, the web browser may also inform the user when it switches from a secure link to a nonsecure link.

If a page set's start page collects sensitive information, the protocol part of the start page URL should be https instead of http. BBSM stores the list of available start pages in the registry. See the "Customizing and Creating Your Own Page Sets" section for details on adding a new start page to the registry.

If you want to switch between SSL and non-SSL pages in your page set, you must use absolute (rather than relative) URL syntax. BBSM provides a method to make specifying the absolute URLs portable across servers that have different IP addresses. You should use the ExpandURL method of the NotifyBilling object to switch between SSL and non SSL pages.

For example, if the current page is secure and you want to redirect the end user to a non-secure page, use the ExpandURL method:

obj.ExpandURL ("http://%iport%/ekgnkm/MegaFail.asp")

If the current page is non-secure and you want to redirect the end user to a secure page, 
use the ExpandURL method:

obj.ExpandURL ("https://%iport%/ekgnkm/MegaAccountingInfo.asp")

See the "ExpandURL Method" section for details of the method.

Activating Sessions in Page Sets

The purpose of a page set is to provide a user interface that allows an end user to gain access to the Internet by activating a session. Each BBSM-supplied page set contains a post page that invokes the SendActivateSession method provided by the web interface object of the access policy being used. For example, if the page set uses the Daily access policy, the page set calls SendActivateSession using "AccessPolicyDailyASP" web interface:

AccessPolicyDaily = Server.CreateObject
("AccessPolicyDailyASP.WebInterface.1");
strErrorURL =
Access"PolicyDaily.SendactivateSession(strAccountingInfo,...);


In the "Page Set Reference" section, see the Access Policy ASP object subsections for the details of each access policy's SendActivateSession method.

The post page constructs the strAccountingInfo parameter of the SendActivateSession method using information that the end user provides. This accounting information varies depending on the accounting policy the page set uses. Table 2-1 shows the format of the strAccountingInfo parameter for each accounting policy that Cisco supplies.

Table 2-1 strAccountingInfo Parameter Format

Accounting Policy
AccountingInfo Structure

CMSCreditCard

<CreditCard>
    <Name>Jane Doe</Name>
    <Number>1234123412341234</Number>
    <ExpirationYear>2002</ExpirationYear>
    <ExpirationMonth>10</ExpirationMonth>
</CreditCard>

CruiseLine

<CruiseLine>
    <CardType>AccessCard|CreditCard</CardType>
    <Name>Jane Doe</Name>
    <Number>1234123412341234</Number>
    <ExpirationYear>2002</ExpirationYear>
    <ExpirationMonth>10</ExpirationMonth>
    <FolioNumber>12345</FolioNumber>
    <CabinNumber>222</CabinNumber>
</CruiseLine>

ICSCreditCard

<CCard>
    <Name>John Doe</Name>
    <Acct>1234123412341234</Acct>
    <ExpYr>2002</ExpYr>
    <ExpMo>10</ExpMo>
    <Addr>6195 Lusk Boulevard</Addr>
    <City>San Diego</City>
    <St>CA</St>
    <ZIP>92121</ZIP>
    <Cntry>US</Cntry>
    <Ph>858-526-1000</Ph>
</CCard>

Hotel

"Default" (or other description string)

Null

None


You can define your own tagged parameters and data elements when developing your customized page sets, ActiveX server components, and MFC extension DLLs. The following example demonstrates how the tagged format is used in the message flow stemming from a page set through to the access and accounting policies.

The Daily ICS page set sends accounting information as a formatted tagged parameter with tagged data elements (see below) to the AccessPolicyDaily ActiveX server component SendActivateSession method in strAccountingInfo along with other parameters: strSessionBoundary, bPostAtStart, bRenewSession, bWelcomeBackMAC.

<CCard>
<Name>John Doe</Name>
<Acct>1234123412341234</Acct>
<ExpYr>2002</ExpYr>
<ExpMo>10</ExpMo>
<Addr>6195 Lusk Boulevard</Addr>
<City>San Diego</City>
<St>CA</St>
<ZIP>92121</ZIP>
<Cntry>US</Cntry>
<Ph>858-526-1000</Ph>
</CCard>


The AccessPolicyDaily ActiveX server component SendActivateSession method then formats a csAccessInfo tagged parameter, with tagged data elements, from the data passed by the page set:

<Daily>
<SessionBoundary>csSessionBoundary</SessionBoundary>
<PostAtStart>bPostAtStart</PostAtStart>
<RenewSession>bRenewSession</RenewSession>
<WelcomeBackMAC>bWelcomeBackMAC</WelcomeBackMAC>
</Daily>


The AccessPolicyDaily ActiveX server component SendActivateSession method further formats a tagged ActivateSession message containing the tagged csAccountingInfo and csAccessInfo parameters along with additional parameters:

<ActivateSession>
<ClientIP>csClientIP</ClientIP>
<AccessPolicy>csAccessPolicyName</AccessPolicy>
<AccessInfo>csAccessInfo</AccessInfo> (tagged parameter)
<AccountingPolicy>csAccountingPolicyName</AccountingPolicy>
<AccountingInfo>csAccountingInfo</AccountingInfo> (tagged parameter)
<DeniedURL>csDeniedURL</DeniedURL>
<Price>dPrice</Price>
<BandwidthKbps>nBandwidthKbps</BandwidthKbps>
</ActivateSession>


The entire ActivateSession tagged message is sent to the BBSM core component which then invokes the AccessPolicyDaily MFC extension DLL ActivateSession method. The AccessPolicyDaily MFC extension DLL methods uses the information in the csAccessInfo tagged parameter and passes the csAccountingInfo tagged parameter to the AccountingPolicyICSCreditCard MFC extension DLL when invoking accounting methods.

Using Bandwidth Manager in Page Sets

The bandwidth management feature, called "Bandwidth Manager," allows an administrator to limit the bandwidth that end users can use. This bandwidth limit on the end user's session is the session's bandwidth policy, which the page set can define when the administrator enables Bandwidth Manager. BBSM provides the GetManageBandwidth method so a page set can determine if the administrator has enabled Bandwidth Manager. For details of this method, see the "GetManageBandwidth Method" section.

When Bandwidth Manager is enabled, several of the provided page sets change the user interface to allow the end user to select the session's bandwidth policy. The page set ties each bandwidth policy to a price in a package. A page set includes a package file to define the packages available in a page set (for example, DailyHotelPackage.asp). BBSM provides the GenerateComboBox function to assist in displaying package information to an end user. GenerateComboBox is a function in CommonSubroutines.asp. For details of this function, see the "GenerateComboBox Function" section.

The DailyHotel page set provides an example of how you could present the bandwidth management feature to the end user.

Using the iport_tools.asp in Page Sets

The iport_tools.asp file displays a persistent window that contains BBSM utility buttons such as Disconnect, Print and Bandwidth Boost. This page is located in the c:\atcom\ekgnkm directory on the BBSM server. You can customize iport_tools.asp to enable or disable these utilities.

The standard page sets that ship with BBSM contain Post pages will load the iport_tools.asp page when the end user successfully activates a session. This page will display a button that allows the end user to disconnect from the session.


Note One exception is the DailyHotelPost.asp page. When using the DailyHotel page set with Web Printing disabled, the iport_tools.asp page will not be loaded. When using the DailyHotel page set with Web Printing enabled, the iport_tools.asp page will be loaded and display the Print button, but not the Disconnect button.


The Web Printing feature is disabled by default. To enable the feature, you must install the KeyView Pro 6.5 by Verity. For details on how to enable and configure the Web Printing feature, refer to the Cisco BBSM Software Configuration Guide, Software Rel. 5.1.

You can customize the display of the iport_tools.asp page by modifying the xxxPost.asp files. For example in DailyHotelPost.asp, there is a code section to conditionally display iport_tools.asp.

function OnUnload ()
{
open
(

"iport_tools.asp",
"iport_tools",
"toolbar=no,status=no,menubar=0,scrollbars=no,resizable=0,width=450,
height=120"
);
return true;
}
...
<%
if (bWebPrinting)
{
%>
<body bgcolor="#CCCC99" text="#000000" link="#000000" vlink="#000000"
alink="#000000" topmargin="0" leftmargin="0" onunload="OnUnload ();">
<%
}
else
{%>
<body bgcolor="#CCCC99" text="#000000" link="#000000" vlink="#000000"
alink="#000000" topmargin="0" leftmargin="0">
<%
}%>


You can also customize the iport_tools.asp page to display different buttons. The code examples below show how to display the Disconnect, Print, and Bandwidth Boost buttons.


Note Bandwidth Boost does not currently work with the RADIUSBand or RADIUSBandClear page sets.


Disconnect Button

<% if (!bDailyHotel)
{%>
<tr>
<td width=50% valign="top">
<center>
<input type="button" value="Disconnect" OnClick="OnDisconnect ();">
</center>
</td>
<td width=50% valign="top">
<font face="Arial"><small><small>
Press the disconnect button to end your session and close this window.
</small></small></font>
</td>
</tr>
<%
}
%>

Print Button

<% if (bWebPrinting) { %>
<tr>
<td width=50% valign="top">
<center>
<input type="button" value="Print" OnClick="OnPrint ();">
</center>
</td>
<td width=50% valign="top">
<font face="Arial"><small><small>
Press the Print button to display the Web Printing page.
</small></small></font>
</td>
</tr>
<% } %>

Bandwidth Boost Button

<% if (bDisplayBandwidthBoost) { %>
<tr>
<td width=50% valign="top">
<center>
<input type="button" value="Bandwidth Boost" OnClick="OnBandwidthBoost
();">
</center>
</td>
<td width=50% valign="top">
<font face="Arial"><small><small>
You are connected at <%= strPortStateBandwidthKbps %>.
Press the Bandwidth Boost button for more bandwidth.
</small></small></font>
</td>
</tr>
<% } %>


Using the disconnect.asp in Page Sets

The disconnect.asp page presents the end user with a confirmation page for session deactivation and is located in the following directory on the BBSM server:

c:\atcom\ekgnkm\

The pathway for invoking this page starts on a post page (for example, BlockICSPost.asp), with the exception of DailyHotelPost.asp. A JavaScript function in these pages calls iport_tools.asp, which provides the end user with a button to disconnect an active session. When the end user clicks on the Disconnect button, the disconnect.asp page is invoked as a pop up window with a graphic that states, You are now disconnected. The page makes a call to the ClientBye method and then automatically closes itself after 5 seconds. This page is necessary when the end user has the option of terminating a session.

When Bandwidth Manager is enabled and the end user is using the RADIUSUBand or RADIUSUBandClear page sets, disconnect.asp will provide the client with an estimated summary of time and charges for their active session. See the "RADIUSUBand" section.

Using the CommonSubroutines.asp in Page Sets

BBSM places the CommonSubroutines.asp file in the following server directory:

c:\atcom\ekgnkm\

Any page can include this file to make use of the functions provided. See the "CommonSubroutines.asp Functions" section for the details of these available functions.

FormatPrice—Use this function any time you want to display a price to an end user, administrator, operator, or reports viewer. Using this function ensures that every price will have the same format.

FormatDuration—Use this function to format the duration of a session.

BandwidthKbpsToString—Use this function to convert a numeric bandwidth value into a user readable string (complete with units and handling the special case of zero which means "full-speed" or "unrestricted").

GenerateComboBox—Use this method to generate an HTML SELECT tag of bandwidth/price packages.

MDSubGenerateComboBox—Use this method to generate an HTML SELECT tag of bandwidth/price/days packages for a bandwidth upgrade for the Single/Multiple Day Subscription page set.

MDSubGenerateNBComboBox—Use this method to generate an HTML SELECT tag of price/days packages for the Single/Multiple Day Subscription page set.

GenerateUpgradeComboBox—Use this method to generate an HTML SELECT tag of bandwidth/price packages for a bandwidth upgrade.

OutputYear—Use this method to generate an HTML SELECT tag of years that always includes the current year and several years into the future.

Sample Page Sets

Table 2-2 lists the page sets that ship with BBSM and the access policy and accounting policy that each page set uses. The sample page sets are described in alphabetical order after the table. The page sets that are described in detail are shown in bold in the table.


Note For information on creating PDA page sets, see "Creating PDA Page Sets."


Table 2-2 BBSM Page Sets and Associated Access and Accounting Policies

Page Set
Access Policy
Accounting Policy
See section and page

AccessCode

AccessCode

Null

AccessCode

BlockICS

Block

ICSCreditCard

BlockICS

CruiseLine

End user selects one of these access policies: Block or Minute

CruiseLine

CruiseLine

DailyHotel

Daily

Hotel

DailyHotel

DailyICS

Daily

ICSCreditCard

DailyICS

DailyICSClear

Daily

ICSCreditCard

DailyICSClear

MeetingRoom

AccessCode

Null

MeetingRoom

Mega

End user selects one of the following access policies: Access Code, Block, Daily, Minute, or RADIUS

For AccessCode or RADIUS access policies, the accounting policy is null.

For Block, Daily, or Minute, the end user selects ICSCreditCard or Hotel.

Mega

MinuteICS

Minute

ICSCreditCard

MinuteICS

MinuteICSClear

Minute

ICSCreditCard

MinuteICSClear

RADIUS

RADIUS

Null

RADIUS

RADIUSClear

RADIUS

Null

RADIUSClear

RADIUSUBand

RADIUS

Null

RADIUSUBand

RADIUSUBandClear

RADIUS

Null

RADIUSUBandClear

Subscription

Subscription

Null

Subscription

SubscriptionHome

Subscription

Null

SubscriptionHome

SubscriptionHotel

Subscription

Hotel

SubscriptionHotel

SubscriptionHotelMultipleDay

Subscription

Hotel

SubscriptionHotelMultipleDay

SubscriptionICS

Subscription

ICSCreditCard

SubscriptionICS


AccessCode

The AccessCode page set combines the AccessCode access policy with the Null accounting policy. The page set prompts the end user to enter an access code to access the Internet. The BBSM administrator configures the valid authorization period for an access code.

The AccessCode page set is similar to and interacts with the MeetingRoom page set. In fact, these two page sets differ only in name and in the setting of the bExclusive parameter to the SendActivateSession method. If the bExclusive parameter is true (as with the MeetingRoom page set), the system creates exclusive sessions. If the bExclusive parameter is false (as with the AccessCode page set), the system creates nonexclusive sessions.

When the system activates an exclusive session, it ensures that no other session (exclusive or nonexclusive) uses the same access code. When the system activates a nonexclusive session, it ensures that no other exclusive session uses the same access code. In other words, the only time the system allows more than one active session with the same access code is when all active sessions are nonexclusive.

BlockICS

The BlockICS page set combines the Block access policy with the ICSCreditCard accounting policy. The page set prompts the end user to enter credit card information to access the Internet for a block of minutes. BBSM performs credit card authentication and billing through the CyberSource ICS billing server.

CruiseLine

The CruiseLine page set combines the Minute and Block access policies with the CruiseLine accounting policy. (See Figure 2-1.) The page set prompts the end user to enter credit card information or access card information (access card information is not the same as an access code) to access the Internet per minute or for a block of minutes. BBSM performs credit card authentication and billing through the Ardent Communications CMS billing server. In case real-time credit card authentication does not exist on cruise ships (the ship posts credit card sales daily), BBSM performs as much credit card validity testing as possible. The IsValidFolioNumber and IsValidCreditCard methods provided by the CruiseLineValidationASP Object implement this function. CruiseLinePost.asp uses these methods to validate the information that the end user submitted from CruiseLineInfo.asp. See the "CruiseLineValidationASP.WebInterface Object" section for details of these two methods.

Figure 2-1 CruiseLine Page Set

This page set consists of six ASP files that are described in the sections below.

CruiseLinePackage.asp

This page, which the end user does not see, contains configuration information for the page set. This file contains the values for the options described in the "AccessPolicyMinuteASP.WebInterface Object" section and the "AccessPolicyBlockASP.WebInterface Object" section. The default configuration for the CruiseLine page appears below:

var strPageToCheck = "CruiseLine";
var dApprovalAmount = 10.00;
var dBlockDurationMinutes = 15;


The package file also defines the price package and bandwidth arrays. Each array provides the pricing options for the bandwidth packages that the page set uses to generate a combo box that allows the end user to select a package when Bandwidth Manager is enabled. The default bandwidth packages for the CruiseLine page set appear below.

var MinutePackagePriceArray = new Array
(
0.33, // package 1, 0.33
0.25, // package 2, 0.25
0.20, // package 3, 0.20
0.15, // package 4, 0.15
0.10  // package 5, 0.10
);

var BlockPackagePriceArray = new Array
(
3.00, // package 1, 3.00
2.50, // package 2, 2.50
2.00, // package 3, 2.00
1.50, // package 4, 1.50
1.00  // package 5, 1.00
);

var PackageKbpsArray = new Array
(
0,    // package 1, full speed
512,  // package 2, 512 Kbits/sec
256,  // package 3, 256 Kbits/sec
128,  // package 4, 128 Kbits/sec
64    // package 5, 64 Kbits/sec
);

CruiseLineStart.asp

The CruiseLineStart.asp page is the first page the end user sees. It displays a different user interface depending on whether Bandwidth Manager is enabled. The CruiseLineStart.asp page contains a form that prompts the end user to select either the Minute or Block access policy and to select charging to either a credit card or an access card. If Bandwidth Manager is enabled, CruiseLineStart.asp also displays a combo box of bandwidth packages from which the end user can select a package.

The form for this page contains the following:

Radio input—Minute

Radio input—Block (minute and block in one group)

Radio input—Charge my Access Card

Radio input—Charge my Credit Card (access card and credit card in another group)

Submit button—Next

Once the end user completes the form and presses the Next button, CruiseLinestart.asp invokes CruiseLineInfo.asp.

CruiseLineInfo.asp

This page displays a different user interface depending on the information that CruiseLineStart.asp submitted. If the end user selected access card, the page displays a form that prompts the end user for a folio number and cabin number. If the end user selected credit card, the page displays a form that prompts the end user for credit card information.

The access card form for this page contains the following:

Text input—Folio Number

Text input—Cabin Number

Submit button—Connect

The credit card form for this page contains the following:

Text input—Cardholder Name

Text input—Credit Card Number

Select input—Expiration Month

Select input—Expiration Year

Submit button—Connect

Once the end user enters the appropriate information and presses the Connect button, CruiseLineInfo.asp invokes CruiseLinePost.asp.

CruiseLinePost.asp

The CruiseLinePost.asp page processes the information that CruiseLineInfo.asp submitted that calls the appropriate validation methods to ensure the end user submitted valid information. The page first validates the information that the end user submitted. Then the page calls the SendActivateSession method to activate the session.

If the end user selected access card on CruiseLineStart.asp, the page validates the folio and cabin number submitted by the end user by calling the IsValidFolioNumber method. The folio number must be 5 or 8 numeric characters in length.

CruiseLineValidation = Server.CreateObject
("CruiseLineValidationASP.WebInterface.1");
bResult = CruiseLineValidation.IsValidFolioNumber(strFolioNumber);
if (!bResult)
{
// Invalid Folio Number
Response.Redirect (strDeniedURL);
}


If the end user selected credit card on CruiseLineStart.asp, the page validates the expiration data and the credit card number submitted by the end user by calling the IsValidCreditCard method. The credit card number must have a valid syntax (correct number of digits, correct leading digits, correct check digit). The method also determines the card type (for example, Visa or MasterCard) and returns the credit card type or a null string if the credit card number or expiration date is invalid.


Note This validation method does NOT authorize the credit card.


CruiseLineValidation = Server.CreateObject
("CruiseLineValidationASP.WebInterface.1");
strCardType = CruiseLineValidation.IsValidCreditCard(strCC,
strExpMonth, strExpYear);
if (strCardType == "")
{
// Invalid Credit Card Number or Expiration Date
Response.Redirect (strDeniedURL);
}


After validation, the page calls SendActivateSession method to activate the end user's session. If the end user selected the Minute access policy, the page calls the Minute access policy's SendActivateSession method to activate the session. If the end user selected the Block access policy, the page calls the Block access policy's SendActivateSession method to activate the session.

strAccountingInfo =
"<CruiseLine>" +
"<CardType>" + strCardType + "</CardType>" +
"<Name>" + strName + "</Name>" +
"<Number>" + strCC + "</Number>" +
"<ExpirationYear>" + strExpYear + "</ExpirationYear>" +
"<ExpirationMonth>" + strExpMonth + "</ExpirationMonth>" +
"<FolioNumber>" + strFolioNumber + "</FolioNumber>" +
"<CabinNumber>" + strCabinNumber + "</CabinNumber>" +
"</CruiseLine>";

if (strAccessPolicy == "Block")
{
AccessPolicyBlock = Server.CreateObject
("AccessPolicyBlockASP.WebInterface.1");
strErrorRedirectURL = AccessPolicyBlock.SendActivateSession
(
"CruiseLine",
strAccountingInfo,
obj.ExpandURL(strDeniedURL),

obj.ExpandURL("http://%iport%/ekgnkm/iporterror.asp?msg=
SendActivateSession+failed"),
BlockPackagePriceArray [intPackage - 1],
PackageKbpsArray [intPackage - 1],
dBlockDurationMinutes
);
}
else if (strAccessPolicy == "Minute")
{
AccessPolicyMinute = Server.CreateObject
("AccessPolicyMinuteASP.WebInterface.1");
strErrorRedirectURL = AccessPolicyMinute.SendActivateSession
(
"CruiseLine",
strAccountingInfo,
obj.ExpandURL(strDeniedURL),
obj.ExpandURL
("http://%iport%/ekgnkm/iporterror.asp?msg=
SendActivateSession+failed"),
MinutePackagePriceArray [intPackage - 1],
PackageKbpsArray [intPackage - 1],
dApprovalAmount
);
}


If the SendActivateSession method succeeds, which is indicated by an empty string return value, BBSM activates the end user's session. After a slight delay, it redirects the end user to the portal page. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page. After the end user's browser unloads CruiseLinePost.asp, the browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the user to deactivate the session.

When the end user clicks the Disconnect button, BBSM deactivates the session and bills the end user for the number of minutes used (Minute access policy only).

If the SendActivateSession method fails and the end user had selected access card, this page redirects the end user to CruiseLineAccessCardFail.asp

If the SendActivateSession method fails and the end user had selected credit card, this page redirects the end user to CruiseLineCCFail.asp

CruiseLineCCFail.asp

The CruiseLineCCFail.asp page displays a message to the end user stating that the credit card information could not be validated or authorized. The page displays a button that allows the end user to try again. If the end user clicks the button, CruiseLineCCFail.asp links to CruiseLineStart.asp.

CruiseLineAccessCardFail.asp

The CruiseLineAccessCardFail.asp page displays a message to the end user stating that the access card could not be authorized. The page displays a button that allows the end user to try again. If the end user clicks the button, CruiseLineAccessCardFail.asp links to CruiseLineStart.asp.

DailyHotel

The DailyHotel page set combines the Daily access policy with the Hotel accounting policy. (See Figure 2-2.) This combination gives the user access for a 24-hour period and charges the hotel's PMS.

Figure 2-2 DailyHotel Page Set

This page set consists of three ASP files that are described in the sections that follow.

DailyHotelPackage.asp

The DailyHotelPackage.asp page, which the end user does not see, contains configuration information for the page set. This file contains the values for the options described in the "Daily" section. The default configuration for the DailyHotel page set appear below.

var strPageToCheck = "DailyHotel";
var strSessionBoundary = "12:00";
var bPostAtStart = false;
var bRenewSession = true;
var bWelcomeBackMAC = false;


The package file also defines the price package and bandwidth arrays. Each array provides the pricing options for the bandwidth packages that the page set uses to generate a combo box, which allows the end user to select a package when Bandwidth Manager is enabled. The default bandwidth packages for the DailyHotel page set appear below:

var PackagePriceArray = new Array
(
9.95,  //  package 1, 9.95
7.95,  //  package 2, 7.95
5.95,  //  package 3, 5.95
3.95,  //  package 4, 3.95
1.95   //  package 5, 1.95
);
var PackageKbpsArray = new Array
(
0,     //  package 1, full speed
512,   //  package 2, 512 Kbits/sec
256,   //  package 3, 256 Kbits/sec
128,   //  package 4, 128 Kbits/sec
64     //  package 5, 64 Kbits/sec
);


DailyHotelStart. asp

The DailyHotelStart.asp page is the first page the end user sees. It displays a different user interface depending on whether or not Bandwidth Manager is enabled and whether the welcome back mode is on. Once a user activates a session and BBSM posts charges to the hotel PMS, BBSM allows the end user to return (deactivate and reactivate sessions) any number of times during the 24-hour period defined by the session boundary without being charged again. The welcome back mode is on except when the session boundary has expired or the first time the end user is attempting to access the Internet. The page also displays a Connect button that allows the end user to activate a session.

Table 2-3 shows what the DailyHotelStart.asp page displays when Bandwidth Manager is on or off and the welcome back mode is on or off.

Table 2-3 DailyHotelStart.asp Displays

Welcome Back Mode
Bandwidth Manager
On
Off
On

Displays a welcome back message as well as a list box of bandwidth packages. This case allows the end user to select a more expensive (and faster) package than the previous session. BBSM charges the difference to the PMS.

Displays a welcome back message stating the user is allowed to continue using the system for no charge until the session boundary ends.

Off

Displays a combo box populated with the bandwidth packages defined in DailyHotelPackage.asp.

Displays the price for access and the session boundary. When Bandwidth Manager is disabled, the page displays the price for the first package defined in DailyHotelPackage.asp.


Once the end user presses the Connect button, DailyHotelStart.asp invokes DailyHotelPost.asp.

DailyHotelPost.asp

The DailyHotelPost.asp page processes the information submitted by DailyHotelStart.asp and calls the Daily access policy SendActivateSession method to activate the end user session. The page specifies the Hotel accounting policy as the first parameter in SendActivateSession and Default as the accounting information parameter. The Hotel accounting policy does not require any accounting information from the end user. The page passes other parameters defined in the package file to control the behavior of the session.

strErrorURL = AccessPolicyDaily.SendActivateSession
(
"Hotel",
"Default",
obj.ExpandURL("http://%iport%/ekgnkm/iporterror.asp?msg=Accounting+Denied"),
obj.ExpandURL("http://%iport%/ekgnkm/iporterror.asp?msg=
SendActivate
Session+failed"),
PackagePriceArray [intPackage - 1],
PackageKbpsArray [intPackage - 1],
strSessionBoundary,
bPostAtStart,
bRenewSession,
bWelcomeBackMAC
);


If the SendActivateSession method succeeds (indicated by an empty string return value), BBSM allows the end user access for a day and redirects the end user to the portal page after a slight delay. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page.

if (! strErrorURL)
{
strPortal = "http://www.cisco.com/";
%>
<html>
<head>
<meta HTTP-EQUIV="refresh" content="5;url=<%= strPortal %>">


At the end of the session, BBSM posts a charge to the hotel's PMS.

If the SendActivateSession method does not succeed (indicated by a non-empty string return value), BBSM redirects the end user to an error page specified by the return value, which will be one of the error URLs passed as a parameter. Each error URL passed as a parameter specifies a different reason why SendActivateSession might fail.

<%
}
else
{
// The SendActivateSession method failed.
Response.Redirect (strErrorURL);
}


This page checks whether or not Web Printing is enabled. If Web Printing is enabled, the iport_tools.asp page is loaded when DailyHotelPost.asp unloads. If Web Printing is disabled, the iport_tools.asp page is not loaded. See the "Using the iport_tools.asp in Page Sets" section for more information.

DailyICS

The DailyICS page set combines the Daily access policy with the ICSCreditCard accounting policy. The page set prompts the end user to enter credit card information to access the Internet for a 24-hour period. BBSM performs credit card authentication and billing through the CyberSource ICS billing server.

DailyICSClear

This page set is similar to the DailyICS page set, but it does not use SSL to transmit information to the BBSM server. The end user's browser transmits credit card information to BBSM from the form on DailyICSClearStart.asp in clear text. Therefore, Cisco does not recommend using this page set in a production environment. BBSM provides this page set for demonstration and testing situations where the installation of a server certificate is not feasible.

MeetingRoom

The MeetingRoom page set combines the AccessCode access policy with the Null accounting policy. (See Figure 2-3.) The end user uses a unique access code to access the Internet.

Figure 2-3 HotelMeetingRoom Page Set

This page set consists of these four ASP files that are described in the sections that follow.

EventStart.asp

This is the first page displayed to the end user. The EventStart.asp page contains a form that prompts the end user for a username and an access code.

The form for this page contains the following:

Text input—Full Name

Text input—Access Code

Submit button—Submit

Once the user presses the Submit button, EventStart.asp invokes EventPost.asp.

EventPost.asp

The EventPost.asp page processes the information submitted by EventStart.asp and calls the AccessCode access policy SendActivateSession method to activate the end user's session. The page passes the username and access code to the SendActivateSession method:

strErrorRedirectURL = AccessPolicyAccessCode.SendActivateSession
(
strName,
strAccessCode,
true, // bExclusive
"iporterror.asp?msg=SendActivateSession+failed",
"AccessCodeFail.asp",
"AccessCodeBusy.asp?AccessCode=" + strAccessCode
);

The page sets the bExclusive parameter true because the MeetingRoom page set allows only one end user to activate a session using the a given access code. In other words, the MeetingRoom page set is exclusive (the AccessCode page set is not). See the detailed explanation of access code exclusivity in the "AccessCode" section.

If the SendActivateSession method succeeds (indicated by an empty string return value), BBSM activates the end user's session and redirects the end user to the portal page after a slight delay. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page. When the end user's browser unloads EventPost.asp, the browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the end user to deactivate the session.

If the access code is invalid (such as expired or not defined), the EventPost.asp page redirects the end user to EventFail.asp.

If an active exclusive or nonexclusive session exists, the EventPost.asp page redirects the end user to EventBusy.asp.

EventBusy.asp

The EventBusy.asp page displays a message to the end user stating that the access code cannot be used because another session is already using it. The page also displays the session or sessions that currently use the access code.

EventFail.asp

The EventFail.asp page displays a message to the end user stating that the access code is not valid and offers the end user a chance to try again. The page displays a button that will allow the end user to try again. If the end user clicks this button, the page invokes EventStart.asp, which prompts the end user to enter a username and an access code again.

Mega

Normally a page set forces the end user to create a session with exactly one access policy and one accounting policy. The CheckPage method prevents an end user from accessing other pages on the server, which locks the end user into one access policy and accounting policy. However, BBSM is more flexible than that. The Mega page set allows the end user to select the access policy and the accounting policy. (See Figures 2-4 and 2-5.) By using the CheckPage feature, the Mega page set still locks the end user into one page set, but now the end user has a choice of policies. This page set shows how to provide flexibility to the end user and still provide access control.

Figure 2-4 Mega Page Set

Figure 2-5 Mega Fail Pages

The Mega page set shows how to allow the end user to select one of the following access policies:

Access Code

Block

Daily

Minute

RADIUS

The RADIUS and AccessCode access policies do not require accounting information. However, if the end user selects Minute, Block, or Daily, the page set prompts the end user to select either Hotel or ICSCreditCard accounting to pay for the session.

This page set consists of 14 ASP files that are described in the sections that follow.

MegaPackage.asp

This page, which the end user does not see, contains configuration information for the page set. This file contains the values for the options of several access policies. The default configuration for the Mega page set appears below:

var strPageToCheck = "Mega";
var dApprovalAmount = 10.00;
var dBlockDurationMinutes = 15;
var dBlockPrice = 3.00;
var dMinutePrice = 0.30;
var dDailyPrice = 9.95;
var strSessionBoundary = "12:00";
var bPostAtStart = true;
var bRenewSession = false;
var bWelcomeBackMAC = true;

MegaStart.asp

This is the first page served to the end user. It displays a list of access policies from which the end user can select how to access the Internet.

The form for this page contains the following:

Radio input—RADIUS

Radio input—AccessCode

Radio input—Minute

Radio input—Block

Radio input—Daily

Button input—Next

Once the end user presses the Next button, MegaStart.asp links to the appropriate page depending on the selected access policy.

If the end user chooses RADIUS, MegaStart.asp links to MegaRADIUSUserInfo.asp.

If the end user chooses AccessCode, MegaStart.asp links to MegaAccessCodeInfo.asp.

If the end user chooses Minute, Block, or Daily, MegaStart.asp links to MegaAccountingInfo.asp.

MegaAccountingInfo.asp

The MegaAccountingInfo.asp page displays a form that allows the end user to choose to pay for Internet access by hotel bill or credit card.

The form for this page contains the following:

Radio input—Charge my Hotel Room

Radio input—Charge my Credit Card

Text input—Cardholder Name

Text input—Credit Card Number

Select input—Expiration Month

Select input—Expiration Year

Submit button—Connect

Once the end user enters the appropriate information and presses the Connect button, MegaAccountingInfo.asp invokes MegaPost.asp.

MegaRADIUSUserInfo.asp

The MegaRADIUSUserInfo page displays a form that prompts the end user to enter a RADIUS username and password.

The form for this page contains the following:

Text input—Username

Text input—Password

Submit button—Login

Once the user presses the Login button, MegaRADIUSUserInfo.asp invokes MegaRADIUSPost.asp.

MegaAccessCodeInfo.asp

The MegaAccessCodeInfo page displays a form that prompts the end user to enter a username and access code.

The form for this page contains the following:

Text input—Full Name

Text input—Access Code

Submit button—Submit

Once the user presses the Submit button, MegaAccessCodeInfo.asp invokes MegaAccessCodePost.asp.

MegaPost.asp

The MegaPost.asp page processes the information that MegaAccountingInfo.asp submitted. This page constructs the strAccountingInfo parameter, depending on whether the end user selected hotel accounting or credit card accounting.

else if (strAccountingPolicy == "ICSCreditCard")
{
strAccountingInfo =
"<CCard>" +
"<Name>" + strName + "</Name>" +
"<Acct>" + strCC + "</Acct>" +
"<ExpYr>" + strExpYear + "</ExpYr>" +
"<ExpMo>" + strExpMonth + "</ExpMo>" +
"<Addr>" + strAddress + "</Addr>" +
"<City>" + strCity + "</City>" +
"<St>" + strState + "</St>" +
"<ZIP>" + strZipCode + "</ZIP>" +
"<Cntry>" + strCountry + "</Cntry>" +
"<Ph>" + strPhone + "</Ph>" +
"</CCard>";

Next, the page calls the appropriate SendActivateSession method to activate the end user's session.

if (strAccessPolicy == "Block")
{
AccessPolicyBlock = Server.CreateObject
("AccessPolicyBlockASP.WebInterface.1");
strErrorURL = AccessPolicyBlock.SendActivateSession
(
strAccountingPolicy,
strAccountingInfo,
obj.ExpandURL("http://%iport%/ekgnkm/MegaFail.asp"),
obj.ExpandURL("http://%iport%/ekgnkm/iporterror.asp?msg=
SendActivateSession+failed"),
dBlockPrice,
nBandwidthKbps,
dBlockDurationMinutes
);
}


else if (strAccessPolicy == "Minute")
{
AccessPolicyMinute = Server.CreateObject
("AccessPolicyMinuteASP.WebInterface.1");
strErrorURL = AccessPolicyMinute.SendActivateSession
(
strAccountingPolicy,
strAccountingInfo,
obj.ExpandURL("http://%iport%/ekgnkm/MegaFail.asp"),
obj.ExpandURL("http://%iport%/ekgnkm/iporterror.asp?msg=
SendActivateSession+failed"),
dMinutePrice,
nBandwidthKbps,
dApprovalAmount
);
}
else if (strAccessPolicy =="Daily")
{
AccessPolicyDaily = Server.CreateObject
("AccessPolicyDailyASP.WebInterface.1");
strErrorURL = AccessPolicyDaily.SendActivateSession
(
strAccountingPolicy,
strAccountingInfo,
obj.ExpandURL("http://%iport%/ekgnkm/MegaFail.asp"),
obj.ExpandURL("http://%iport%/ekgnkm/iporterror.asp?msg
Send
ActivateSession+failed"),
dDailyPrice,
nBandwidthKbps,
strSessionBoundary,
bPostAtStart,
bRenewSession,
bWelcomeBackMAC
);
}


If the end user selected the Minute access policy and the credit card accounting policy, BBSM activates the session and performs an Authorize transaction in the background. Next the page redirects the end user to the portal page.

If the Authorize transaction succeeds, BBSM allows the end user to continue using the Internet. After the end user's web browser unloads MegaPost.asp, the web browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the user to deactivate the session.

When the end user clicks the Disconnect button, the iport_tools.asp page deactivates the session. BBSM performs a sale transaction to charge the end user for the number of minutes used.

If the Authorize transaction fails, the server performs a forced redirect to MegaFail.asp.

If the end user selected the Block access policy and the credit card accounting policy, BBSM activates the session, and performs an AuthorizeSale transaction in the background. Next the page redirects the end user to the portal page.

If the AuthorizeSale transaction succeeds, BBSM allows the end user to continue using the Internet. After the end user's web browser unloads MegaPost.asp, the web browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the user to deactivate the session.

When the user clicks the Disconnect button, the iport_tools.asp page deactivates the session. Because BBSM charged the end user for the block of minutes at the start of the session, BBSM does not perform any additional accounting at the end of the session.

If the AuthorizeSale transaction fails, the server performs a forced redirect to MegaFail.asp.

If the end user selected the Daily access policy and the credit card accounting policy, BBSM activates the session, and performs an AuthorizeSale transaction in the background. Next the page redirects the end user to the portal page.

If the AuthorizeSale transaction succeeds, BBSM allows the end user to continue using the Internet. After the end user's web browser unloads MegaPost.asp is unloaded, the web browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the end user to deactivate the session.

When the user clicks the Disconnect button, the iport_tools.asp page deactivates the session. Because BBSM charged the end user for the day at the start of the session, BBSM does not perform any additional accounting at the end of the session.

If the AuthorizeSale transaction fails, the server performs a forced redirect to MegaFail.asp.

If the end user selected the Minute, Daily, or Block access policy and the hotel accounting policy, the page calls the SendActivateSession method.

If the SendActivateSession method succeeds, BBSM allows the end user access per minute, for a day, or for a block (respectively) and redirects the end user to the portal page. After the end user's web browser unloads MegaPost.asp, the web browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the end user to deactivate the session.

When the user clicks the Disconnect button, the iport_tools.asp page deactivates the session. BBSM charges the end user for the Internet access according to the access type they selected.

If the SendActivateSession method fails, the page redirects the end user to an error page.


Note The Mega page set allows the end user access to the Internet before BBSM knows the result of the Authorize or AuthorizeSale transaction. Because the credit card server response time varies, for the credit card access policy, the end user may have access to the Internet for several minutes before BBSM receives a denial and performs a forced redirect to the MegaFail.asp page.


MegaRADIUSPost.asp

The MegaRADIUSPost page processes the information that MegaRADIUSUserInfo.asp submitted and calls the RADIUS access policy's SendActivateSession method to activate the end user's session. The page sends the username and password into the SendActivateSession method:

strErrorURL = AccessPolicyRADIUS.SendActivateSession
(
strUsername,
strPassword,
"MegaRADIUSServerFail.asp",
"MegaRADIUSFail.asp",
"MegaRADIUSBusy.asp",
"iporterror.asp?msg=SendActivateSession+failed",
0.0,
-1
);


If the SendActivateSession method succeeds, which is indicated by an empty string return value, BBSM activates the end user's session. After a slight delay, it redirects the end user to the portal page. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page. After the end user's browser unloads MegaRADIUSPost.asp, the browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the end user to deactivate the session.

If the RADIUS username or password is invalid, the MegaRADIUSPost.asp page redirects the end user to MegaRADIUSFail.asp.

If the site is configured to disallow duplicate RADIUS sessions and the username is in use by another session, MegaRADIUSPost.asp redirects the end user to MegaRADIUSBusy.asp.

If the RADIUS server is inaccessible at the time, MegaRADIUSPost.asp redirects the end user to MegaRADIUSServerFail.asp.

MegaAccessCodePost.asp

The MegaAccessCodePost.asp page processes the information that MegaAccessCodeInfo.asp submitted and calls the AccessCode access policy's SendActivateSession method to activate the end user's session. The page sends the username and access code into the SendActivateSession method:

strErrorRedirectURL = AccessPolicyAccessCode.SendActivateSession
(
strName,
strAccessCode,
false, // bExclusive
"iporterror.asp?msg=SendActivateSession+failed",
"MegaAccessCodeFail.asp",
"MegaAccessCodeBusy.asp?AccessCode=" + strAccessCode
);

The page sets the bExclusive false, because the Mega page set allows any number of end users to simultaneously activate sessions using a given access code; in other words, the mega page set is nonexclusive. See the detailed explanation of access code exclusivity in the "AccessCode" section.

If the SendActivateSession method succeeds, which is indicated by an empty string return value, BBSM activates the end user's session. After a slight delay, it redirects the end user to the portal page. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page. After the end user's browser unloads MegaAccessCodePost.asp, the browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the end user to deactivate the session.

If the access code is invalid, such as expired or undefined, the MegaAccessCodePost.asp page redirects the end user to MegaAccessCodeFail.asp.

If an active exclusive session exists, the MegaAccessCodePost.asp page redirects the end user to MegaAccessCodeBusy.asp.

MegaFail.asp

BBSM serves this page to the end user as the result of a forced redirect after an Authorize failure. The MegaFail.asp page displays a message to the end user indicating that the credit card authorization failed. The page displays a button that allows the end user to try again. If the end user clicks the button, BBSM serves the MegaStart.asp page.

MegaRADIUSFail.asp

The MegaRADIUSFail.asp page displays a message to the end user stating that the username or password is not valid. The page displays a button that allows the end user to try again. If the end user clicks the button, MegaRADIUSFail.asp links to MegaStart.asp.

MegaRADIUSBusy.asp

The MegaRADIUSBusy.asp page displays a message to the end user stating that the RADIUS account is already in use. The page displays a button that allows the end user to try again. If the end user clicks the button, MegaRADIUSBusy.asp links to MegaStart.asp.

MegaRADIUSServerFail.asp

The MegaRADIUSServerFail.asp page displays a message to the end user stating that the RADIUS server is currently inaccessible and displays a button that allows the end user a chance to try again. If the end user clicks the button, MegaRADIUSServerFail.asp links to MegaStart.asp.

MegaRADIUSServerFail.asp

The MegaRADIUSServerFail.asp page displays a message to the end user stating that the RADIUS server is currently inaccessible and displays a button that allows the end user a chance to try again. If the end user clicks the button, MegaRADIUSServerFail.asp links to MegaStart.asp.

MegaAccessCodeFail.asp

The MegaAccessCodeFail.asp page displays a message to the end user stating that the access code is not valid and offers the end user a chance to try again. The page displays a button that allows the end user to try again. If the end user clicks the button, MegaAccessCodeFail.asp links to MegaStart.asp.

MegaAccessCodeBusy.asp

The MegaAccessCodeBusy.asp page displays a message to the end user stating that the access code cannot be used because another session is already using it. Even though this page set does not activate exclusive access code sessions, an existing exclusive session prevents this page set from activating a nonexclusive session with the same access code. This page also displays the session or sessions that currently use the access code. The page displays a button that allows the end user to try again. If the end user clicks the button, MegaAccessCodeBusy.asp links to MegaStart.asp.\

MinuteICS

The MinuteICS page set combines the Minute access policy with the ICSCreditCard accounting policy. (See Figure 2-6.) The page set prompts the end user to enter credit card information to access the Internet per minute. BBSM performs credit card authentication and billing through the CyberSource ICS billing server.

Figure 2-6 MinuteICS Page Set

This page set consists of four ASP files that are described in the sections below.

MinuteICSPackage.asp

This page, which the end user does not see, contains configuration information for the page set. This file contains the values for the options described in the "Minute Access Policy" section. The default configuration for the MinuteICS page set appears below.

var strPageToCheck = "MinuteICS";
var dApprovalAmount = 10.00;

The package file also defines the price package and bandwidth arrays. Each array provides the pricing options for the bandwidth packages that the page set uses to generate a combo box, which allows the end user to select a package when Bandwidth Manager is enabled. The default bandwidth packages for the MinuteICS page set appear below.

var PackagePriceArray = new Array
(
0.33,  //  package 1, 0.33
0.25,  //  package 2, 0.25
0.20,  //  package 3, 0.20
0.15,  //  package 4, 0.15
0.10   //  package 5, 0.10
);

var PackageKbpsArray = new Array
(
0,     //  package 1, full speed
512,   //  package 2, 512 Kbits/sec
256,   //  package 3, 256 Kbits/sec
128,   //  package 4, 128 Kbits/sec
64     //  package 5, 64 Kbits/sec
);

MinuteICSStart.asp

This is the first page the end user sees. It displays a different user interface depending on whether Bandwidth Manager is enabled. The MinuteICSStart.asp page contains a form that prompts the end user to enter credit card information. If Bandwidth Manager is enabled, MinuteICSStart.asp also displays a combo box of bandwidth packages along with the credit card form.

The form for this page contains the following:

Text input—Cardholder Name

Text input—Street Address

Text input—City

Text input—State/Province

Text input—Zip Code

Text input—Country

Text input—Phone Number

Text input—Credit Card Number

Text input—Expiration Month

Select input—Expiration Year

Submit button—Submit Information

Once the end user presses the Submit Information button, MinuteICSStart.asp invokes MinuteICSPost.asp.

MinuteICSPost.asp

The MinuteICSPost.asp page processes the information submitted by MinuteICSStart.asp and calls the Minute access policy SendActivateSession method to activate the end user session. The page specifies the ICSCreditCard accounting policy as the first parameter in SendActivateSession and strAccountingInfo as the accounting information parameter. The page builds strAccountingInfo from the parameters that the end user submitted.

strAccountingInfo =
"<CCard>" +
"<Name>" + strName + "</Name>" +
"<Acct>" + strCC + "</Acct>" +
"<ExpYr>" + strExpYear + "</ExpYr>" +
"<ExpMo>" + strExpMonth + "</ExpMo>" +
"<Addr>" + strAddress + "</Addr>" +
"<City>" + strCity + "</City>" +
"<St>" + strState + "</St>" +
"<ZIP>" + strZipCode + "</ZIP>" +
"<Cntry>" + strCountry + "</Cntry>" +
"<Ph>" + strPhone + "</Ph>" +
"</CCard>";

strErrorURL = AccessPolicyMinute.SendActivateSession
(
"ICSCreditCard",
strAccountingInfo,
obj.ExpandURL("http://%iport%/ekgnkm/MinuteICSFail.asp"),
obj.ExpandURL("http://%iport%/ekgnkm/iporterror.asp?msg=SendActivate
Session+failed"),
PackagePriceArray [intPackage - 1],
PackageKbpsArray [intPackage - 1],
dApprovalAmount
);

BBSM activates the session, performing an accounting Authorize transaction in the background. Finally, the page redirects the end user to the portal page after a slight delay. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page.

If the Authorize transaction succeeds, BBSM allows the end user's session to continue. When the end user's browser unloads MinuteICSPost.asp, the browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the user to deactivate the session.

After the end user clicks the Disconnect button, the iport_tools.asp page deactivates the session. BBSM performs a sale transaction to charge the end user for the number of minutes used.

If the Authorize transaction fails, the server performs a forced redirect to MinuteICSFail.asp.

MinuteICSFail.asp

BBSM serves this page to the end user as the result of a forced redirect after an Authorize failure. The MinuteICSFail page displays a message to the end user indicating that the credit card authorization failed. The page displays a button that allows the end user to try again. If the end user clicks the button, BBSM serves the MinuteICSStart.asp page, which prompts the end user to enter credit card information again.


Note This page set allows the end user access to the Internet before BBSM knows the result of the Authorize transaction. Because the credit card server response time varies, the end user may have access to the Internet for several minutes before BBSM receives a denial and performs a forced redirect to the MinuteICSFail.asp page.


MinuteICSClear

This page set is similar to the MinuteICS page set, but it does not use SSL to transmit information to the BBSM server. The end user's browser transmits credit card information to BBSM from the form on MinuteICSClearStart.asp in clear text. Therefore, Cisco does not recommend using this page set in a production environment. BBSM provides this page set for demonstration and testing situations where the installation of a server certificate is not feasible.

RADIUS

The RADIUS page set combines the RADIUS access policy with the Null accounting policy. (See Figure 2-7.) The page set prompts the end user to enter a RADIUS username and password to access the Internet.

Figure 2-7 RADIUS Page Set

This page set consists of five ASP files that are described in the sections that follow.

RADIUSStart.asp

This is the first page the end user sees. The RADIUSStart.asp page contains a form that prompts the end user for a RADIUS username and password.

The form for this page contains the following:

Username—Text input

Password—Text input

Login—Submit button

Once the end user presses the Login button, RADIUSStart.asp invokes RADIUSPost.asp.

RADIUSPost.asp

The RADIUSPost.asp page processes the information that RADIUSStart.asp submitted and calls the RADIUS access policy's SendActivateSession method to activate the end user's session. The page passes the username and password to the SendActivateSession method:

strErrorURL = AccessPolicyRADIUS.SendActivateSession
(
strUserName,
strPassword,
"RADIUSServerFail.asp",
"RADIUSFail.asp",
"RADIUSBusy.asp",
"iporterror.asp?msg=SendActivateSession+failed",
0.0,
-1
);


If the SendActivateSession method succeeds (indicated by an empty string return value), BBSM activates the end user's session and redirects the end user to the portal page after a slight delay. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page. After the end user's browser unloads RADIUSPost.asp, the browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button, which allows the end user to deactivate the session.

If the RADIUS username or password is invalid, RADIUSPost.asp redirects the end user to RADIUSFail.asp.

If the site is configured to disallow duplicate RADIUS sessions and the username is in use by another session, RADIUSPost.asp redirects the end user to RADIUSBusy.asp.

If the RADIUS server is inaccessible at the time, RADIUSPost.asp redirects the end user to RADIUSServerFail.asp.

RADIUSBusy.asp

The RADIUSBusy.asp page displays a message to the end user stating that the RADIUS account is already in use.

RADIUSFail.asp

The RADIUSFail.asp page displays a message to the end user stating that the username or password is not valid and offers the end user a chance to try again. This page has the same form as RADIUSStart.asp to prompt the end user for a username and password again. Once the user presses the Login button, RADIUSFail.asp invokes RADIUSPost.asp.

RADIUSServerFail.asp

The RADIUSServerFail.asp page displays a message to the end user stating that the RADIUS server is currently inaccessible and offers the end user a chance to try again. This page has the same form as RADIUSStart.asp to prompt the end user for a username and password again. Once the user presses the Login button, RADIUSServerFail.asp invokes RADIUSPost.asp.

RADIUSClear

The RADIUSClear page set is similar to the RADIUS page set, but it does not use SSL to transmit information to the BBSM server. The end user's browser transmits the RADIUS username and password to BBSM from the form on RADIUSClearStart.asp in clear text. Therefore, Cisco does not recommend using this page set in a production environment. BBSM provides this page set for demonstration and testing situations where the installation of a server certificate is not feasible.

RADIUSUBand

The RADIUSUBand page set combines the RADIUS access policy with the Null accounting policy. (See Figure 2-8.) The page set prompts the end user to enter a RADIUS username and password to access the Internet. It also permits the end user to select their desired bandwidth at a specified price. For this page set, the disconnect.asp page will present the end user with an estimated summary for the time of his active session and the charges accrued at the selected bandwidth.

Figure 2-8 RADIUSUBand Page Set

This page set consists of six ASP files, as well as a specially designed function found on the disconnect.asp. The ASP files are described in the sections that follow. Both the RADIUSUBand and RADIUSUBandClear page sets, when Bandwidth Manager is enabled, will display an estimated summary of the end user's active session duration time and charges at the bandwidth they selected. (See the "AccessPolicyRADIUSASP.WebInterface Object" section.)

RADIUSUBandPackage.asp

This page, which the end user does not see, contains configuration information for the page set. This file contains the values for the options described in the "RADIUS" section. The default configuration for the RADIUSUBand page set appears below.

var strPageToCheck = "RADIUSUBand";

The package file also defines the price package and bandwidth arrays. Each array provides the pricing options for the bandwidth packages that the page set uses to generate a combo box, which allows the end user to select a package when Bandwidth Manager is enabled. The following are the default bandwidth packages for the RADIUSUBand page set.

var PackagePriceArray = new Array
(
0.50, // package 1, 0.50
0.40, // package 2, 0.40
0.30, // package 3, 0.30
0.20, // package 4, 0.20
0.15 // package 5, 0.15
);


var PackageKbpsArray = new Array
(
0, // package 1, full speed
512, // package 2, 512 Kbits/sec
256, // package 3, 256 Kbits/sec
128, // package 4, 128 Kbits/sec
64 // package 5, 64 Kbits/sec
);

RADIUSUBandStart.asp

This is the first page the end user sees. The RADIUSUBandStart.asp page contains a form that prompts the end user for a RADIUS username, password, and bandwidth selection.

The form for this page contains the following:

Text input—Username

Text input—Password

Select input—Bandwidth

Submit button—Login

Once the end user presses the Login button, RADIUSUBandStart.asp invokes RADIUSUBandPost.asp.

RADIUSUBandPost.asp

The RADIUSUBandPost.asp page processes the information that RADIUSUBandStart.asp submitted and calls the RADIUS access policy's SendActivateSession method to activate the end user's session. The page passes the username, password, and bandwidth price/kbps to the SendActivateSession method:

strErrorURL = AccessPolicyRADIUS.SendActivateSession
(
strUserName,
strPassword,
"RADIUSUBandServerFail.asp",
"RADIUSUBandFail.asp",
"RADIUSUBandBusy.asp",
"iporterror.asp?msg=SendActivateSession+failed",
PackagePriceArray [intPackage - 1],
PackageKbpsArray [intPackage - 1]
);


If the SendActivateSession method succeeds (indicated by an empty string return value), BBSM activates the end user's session and redirects the end user to the portal page after a slight delay. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page. After the end user's browser unloads RADIUSUBandPost.asp, the browser loads iport_tools.asp into a new window. The iport_tools.asp page contains a Disconnect button that allows the end user to deactivate the session as well as view summary information for the session.

If the RADIUS username or password is invalid, RADIUSUBandPost.asp redirects the end user to RADIUSUBandFail.asp.

If the site is configured to disallow duplicate RADIUS sessions and the username is in use by another session, RADIUSUBandPost.asp redirects the end user to RADIUSUBandBusy.asp.

If the RADIUS server is inaccessible at the time, RADIUSUBandPost.asp redirects the end user to RADIUSUBandServerFail.asp.

RADIUSUBandBusy.asp

The RADIUSUBandBusy.asp page displays a message to the end user stating that the RADIUS account is already being used and offers the end user a chance to try a different account. This page has the same form as RADIUSUBandStart.asp to prompt the end user for a username, password, and bandwidth again. Once the user presses the Login button, RADIUSUBandBusy.asp invokes RADIUSUBandPost.asp.

RADIUSUBandFail.asp

The RADIUSUBandFail.asp page displays a message to the end user stating that the username or password is not valid and offers the end user a chance to try again. This page has the same form as RADIUSUBandStart.asp to prompt the end user for a username, password and bandwidth again. Once the user presses the Login button, RADIUSUBandFail.asp invokes RADIUSUBandPost.asp.

RADIUSUBandServerFail.asp

The RADIUSUBandServerFail.asp page displays a message to the end user stating that the RADIUS server is currently inaccessible and offers the end user a chance to try again. This page has the same form as RADIUSUBandStart.asp to prompt the end user for a username, password, and bandwidth again. Once the user presses the Login button, RADIUSUBandServerFail.asp invokes RADIUSUBandPost.asp.

RADIUSUBandClear

The RADIUSUBandClear page set is similar to the RADIUSUBand page set, but it does not use SSL to transmit information to the BBSM server. The end user's browser transmits the RADIUS username and password to BBSM from the form on RADIUSUBandClearStart.asp in clear text. Therefore, Cisco does not recommend using this page set in a production environment. BBSM provides this page set for demonstration and testing situations where installing a server certificate is not feasible.

Subscription

The Subscription page set combines the Subscription access policy with the Null accounting policy. The page set allows the end user to access the Internet for a specific date range associated with the end user's port. When the end user activates a session using this page set, BBSM redirects the end user to a specified portal page.

SubscriptionHome

The SubscriptionHome page set combines the Subscription access policy with the Null accounting policy. The page set allows the end user to access the Internet for a specific date range associated with the end user's port. When the end user activates a session using this page set, BBSM redirects the end user to the originally requested URL, which is typically the home page set in the browser. This page set demonstrates the use of the GetOriginalURL method of the NotifyBilling object.

SubscriptionHotel

The SubscriptionHotel page set combines the Subscription access policy with the Hotel accounting policy. The page set allows the end user to access the Internet for a specific date range associated with the end user's port. If the end user attempts to access the Internet outside the date range, the page set allows the user to self-provision the subscription, billing the subscription to the hotel's PMS.

SubscriptionHotelMultipleDay

The SubscriptionHotelMultipleDay page set combines the Subscription access policy with the Hotel accounting policy. The page set allows the end user to access the Internet for a varied date range (set by the Administrator) associated with the end user's port. The date range, bandwidth, and pricing is set using the MDSubPackage.asp file. If the end user attempts to access the Internet outside the date range, the page set allows the user to self-provision the subscription, billing the subscription to the hotel's PMS.

SubscriptionICS

The SubscriptionICS page set combines the Subscription access policy with the ICSCreditCard accounting policy. The page set allows the end user to access the Internet for a specific date range associated with the end user's port. If the end user attempts to access the Internet outside the date range, the page set allows the user to self-provision the subscription, billing the subscription to a credit card. BBSM performs credit card authentication and billing through the CyberSource ICS billing server.

System and Error Messages

This section describes the ASP files that display system and error messages to the end user. The following ASP files, located in the "ekgnkm" directory, are used by BBSM to report system and error messages to the end user. These ASP files can be modified to a certain extent, as necessary, by following the guidelines shown in this guide. Table 2-4 describes the function of these ASP files.

Table 2-4 BBSM System Message ASP Files and Error Messages

ASP File
Function

default.asp

Displays an error message when the client is already connected but a specified URL cannot be returned; for example, if the Domain Name System (DNS) cannot be resolved.

iporterror.asp

Displays a number of error messages that BBSM returns. The following are three example error messages:

CheckPage failed—The page set name that is set with the strPageToCheck variable on the package page does not correctly match the page set name that is set on the Page Sets web page in WEBconfig. Check both places to ensure that they match. This mismatch can also occur if an end user tries to manually type a start page URL into the browser address that they are not permitted to access.

Invalid package—The price and/or bandwidth package is not being set correctly. If you are using a custom page set, make sure the strPackage variable is still being used and is spelled correctly in your start page. Verify that the CommonSubroutines.asp is still being listed as an include file at the top of your start page and check your package page to make sure that PackagePriceArray and PackageKbpsArray have an equal number of array members.

SendActivateSession failed—An error occurred while BBSM was trying to authenticate and approve an end user for an Internet session.

searching.asp

Displays the "Searching for Client" message. This page generally occurs when there is a delay in determining the correct configuration for the client after the end user requests an Internet session. BBSM will return one of the following messages: an error message, such as authentication failed, an error stating that the maximum user capacity has been reached, or a message that the system will continue searching.

terms.asp

A link to this page is displayed on the start page. This ASP page is used to display to the end user the terms and conditions for using the BBSM server and the associated software when the end user clicks the Terms link.

trouble.asp

A link to this page is displayed on the start page. This ASP page is used to display error information to the end user when the end user cannot connect to the service and clicks the "Having trouble viewing this page?" link.

unavailable.asp

Displays an error message when the AtDial service is suspended due to configuration changes through WEBconfig. Any changes using WEBconfig require the service to be stopped and restarted for the changes to take place. While in this transition phase, this page will be displayed to users attempting to connect.


Customizing and Creating Your Own Page Sets

This section describes how to customize or create your own page sets. It assumes that you understand the following technologies:

Microsoft ASP technology

JScript (server side)

JavaScript (client side)

HTML

We highly recommend that you read this entire chapter before attempting to customize or create new page sets.

Most page sets include a form that collects information from the end user. A page set that uses a form also includes a "post" page that receives and processes the information that the end user submitted. Most page sets also contain JScript and JavaScript logic to control page behavior.

A page set contains a collection of ASP files and .gif images. The page sets provided with BBSM are in located in the following directory:

c:\atcom\ekgnkm

This section does not discuss customizing or creating these .gif images or making changes to pricing. To change the pricing for a page set, see the Cisco BBSM Software Configuration Guide, Software Rel. 5.1.

When saving your new page set, you must save the files in the c:\atcom\ekgnkm directory or subdirectory on the BBSM server. We recommend that you create a subdirectory in the ekgnkm directory to store your page set files. The following is an example subdirectory:

c:\atcom\ekgnkm\YourNewDirectory

Customizing or creating new page sets also requires an understanding of access and accounting policies. We recommend that you read the following chapters:

"Creating Access Policy Modules"

"Creating Accounting Policy Modules"

The following sections describe how to customize or create your own page sets:

Customizing Page Sets, describes how to customize a page set that BBSM provides.

Creating Your Own Page Sets, describes how to create your own page set.

Testing Your Page Set, describes how to test your new page set.


Note You will need Administrator privileges to use WEBconfig to add your page set to the registry.


See the "Page Set Reference" section for descriptions of the objects, methods, and functions that can be used in page sets.

Customizing Page Sets

The procedures in this section explain how to customize BBSM page sets. Note that if you are customizing the page set GUIs, you can make these changes without using the SDK. However, if you are customizing the way your page sets interact with BBSM, you need to use the SDK. After examining the SDK documentation, you may decide to customize certain methods to use in your page sets that are only available through the SDK. Please review this entire chapter to ensure that you are using everything you need so the end user has a good experience.

You will need a BBSM server for the following procedures. The editor available on a BBSM server is Microsoft Notepad. These instructions assume you are using Microsoft Notepad to edit the ASP files.


Note If you want to debug ActiveX server components in page sets, you can develop your page set on a server that has the development environment installed and use Microsoft Visual Studio as an editor.


The following are the basic procedures for customizing a page set:

Determine which existing page set to customize.

Edit the configuration file for the page set.

Modify pages from the page set with custom images and colors.

Register your new page set. (See the "Registering Your Page Set" section.)

Test your page set. (See the "Testing Your Page Set" section.)

The following subsections describe these procedures in detail.


Determining the Page Set to Customize

To determine which page set meets your requirements, review the "Page Set Overview" section for detailed descriptions of the BBSM sample page sets.

Once you have determined the page set to modify, copy the set of ASP files for it and rename them. Next, edit the package file for the selected page set, if one exists. The following section describes how to modify the package file.


Note If your selected page set does not have a package file, skip the next section.


Editing the Configuration Information

Follow these steps to edit the package file for your page set.


Step 1 Start your editor. From the File menu, choose Open.

Step 2 Navigate to the c:\atcom\ekgnkm directory.

Step 3 Locate the appropriate package file for your page set.

Step 4 Click Open.

Step 5 Modify the strPageToCheck variable with the name of your new page set:

var strPageToCheck = "NewName";


Caution Be sure to give your customized page set a new name. The BBSM page sets are to be used as templates only. If you do not rename your customized page sets, they can be removed or replaced when a BBSM service pack is installed.


Note If you have installed a BBSM service pack and inadvertently overwritten a customized page set, the previous page set can be retrieved. A backup of all prior page sets is created in the c:\atcom\patch directory. Look for the patch number that corresponds to your service pack (this can be found on WEBpatch). When you locate your original page set, do not directly copy it back to the "ekgknm" folder. Instead, you must integrate your customized page set with the new page set that was installed with the service pack. We recommend that you cut and paste any customizations that you made to the old page set into the new page set so you are using the most up-to-date page set with your new service pack.


Step 6 If your package file has pricing information, modify the PackagePriceArray with your pricing values.

Step 7 If your package file has bandwidth information, modify the PackageKbpsArray with your bandwidth values.

Step 8 If your package file has session arguments, modify their values to get the desired behavior. In the "Page Set Reference" section, see the SendActivateSession method description for your corresponding ActiveX server component, such as AccessPolicyDailyASP.

Step 9 Save your package file and close your editor.

Step 10 Change all references to the names of your new ASP files; for example, NewNamePost.asp.


Modifying Pages with Custom Images and Colors

How you customize your page set depends on your requirements for graphics, styles, and the end-user experience. The following are the basic steps for customizing your set of pages.


Step 1 Search your set of pages for references to .gif files; such as DailyHotelStart.gif.

Step 2 Replace these with references to your customized images.

Step 3 Replace the background colors with your customized colors.

Step 4 Replace text and font displayed to the end user with your customized text.

Now you are ready to test your modified page set. Go to the "Testing Your Page Set" section for details on testing.


Creating Your Own Page Sets

The procedures in the following sections explain how to create your own BBSM page set.

If you are going to develop a page set that requests sensitive information from the end user, such as passwords or credit card information, you should use SSL in the pages requesting the information. See the "Using SSL in Page Sets" section for details on how to do this.

You will need a BBSM server for the following procedures. The editor available on a BBSM server is Microsoft Notepad. These instructions assume you are using Microsoft Notepad to edit the ASP files.

The following are the basic procedures for creating your own page set.

Determine which access and accounting policies to use.

Develop your page set.

Add configuration information.

Register your new page set. (See the "Registering Your Page Set" section.)

Test your new page set. (See the "Testing Your Page Set" section.)

The following subsections describe these procedures in detail.


Caution The Building Broadband Service Director (BBSD), which is a stand-alone feature module included with BBSM, enables a central system in the data center to manage remote BBSM systems. It includes a feature that can back up page set files on BBSM servers. To back up these files, BBSD connects to the BBSM server using a Windows user account. This user account must have read/write permissions for each ASP file in a page set for BBSD to successfully back up that page set. For this reason, when creating a new page set, make sure that each file in the new page set gives the BBSD Windows user account read/write permissions. To set up the file permissions for the new page set, copy the file permissions from one of the existing BBSM page sets.

Determining the Access and Accounting Policies

For detailed descriptions of policies that BBSM provides, read the access and accounting policy chapters:

"Creating Access Policy Modules"

"Creating Accounting Policy Modules"

Then determine which access and accounting policies will meet your requirements.

If you have written your own access policy, you only need to determine which accounting policy to use. If you have written your own accounting policy, you only need to determine which access policy to use.

If you want the end user to have a choice of access or accounting policies, see the detailed description in the "Mega" section for an example. The "CruiseLine" section also gives an example of allowing the end user to select the access policy to use.

Developing Your Page Set

Use the following procedure to develop your page set.


Step 1 Using your editor, create a start page.

Step 2 Develop your start page to satisfy the requirements of your page set. Use the ActiveX sever component method available to customize the behavior of your start page. Depending on which access policy you ar using, you may have to prompt the end user for information.

Step 3 Save your new file. We recommend following the existing naming convention. So, your new start page would be named, NewNameStart.asp.

Step 4 Using your editor, create a post page.

Step 5 Develop your post page to satisfy the requirements of your page set. This is where you will add logic to create the ActiveX server component for your access policy and call its SendActivateSession method to activate the end user's session. Here's an example of server-side JScript from DailyHotelPost.asp:

AccessPolicyDaily =
Server.CreateObject("AccessPolicyDailyASP.WebInterface.1");
strErrorURL = AccessPolicyDaily.SendActivateSession
(
"Hotel",
"Default",
obj.ExpandURL("http://%iport%/ekgnkm/iporterror.asp?msg=Accounting+
Denied"),
obj.ExpandURL("http://%iport%/ekgnkm/iporterror.asp?msg=SendActivate
Session+failed"),
PackagePriceArray [intPackage - 1],
PackageKbpsArray [intPackage - 1],
strSessionBoundary,
bPostAtStart,
bRenewSession,
bWelcomeBackMAC
);


Step 6 Save your new file. (NewNamePost.asp)

Step 7 Using your editor, create a package file and save it. (NewNamePackage.asp) The next section describes how to add the configuration information to this file. Remember to include this package file in your other ASP files in your page set.

Step 8 Using your editor, create any additional pages, such as a fail or error pages.

You must save your new page set files in the following directory or subdirectories on the server:

c:\atcom\ekgnkm

When you add your page set to the registry, you will specify the location of your pages. See the "Registering Your Page Set" section for the steps.


Adding Configuration Information

Follow these steps to add configuration settings to your package file.


Step 1 Start your editor and open the package file you created in the previous step.

Step 2 Add a variable with the value of the name of your page set (see the example below). This value is used throughout your other pages to make sure the end user is only allowed to view pages they are supposed to view. This is implemented using the CheckPage method. See the "Controlling Access to Page Sets" section for more details on how this works.

var strPageToCheck = "NewName";

Step 3 If you are using BandwidthManager, you can add the pricing and bandwidth values for the bandwidth packages that get displayed to the user. You can also add other packages if you want. We do not suggest that you post pricing information or bandwidth information from your start page to your post page. To do so would allow a savvy user to post any price or any bandwidth. Instead, post a package identifier from start to post page. This restricts the end user to the packages you define. Here is an example of how the price and bandwidth packages are defined:

var PackagePriceArray = new Array
(
9.95, // package 1, 9.95
7.95, // package 2, 7.95
5.95, // package 3, 5.95
3.95, // package 4, 3.95
1.95  // package 5, 1.95
);
var PackageKbpsArray = new Array
(
0,   // package 1, full speed
512, // package 2, 512 Kbits/sec
256, // package 3, 256 Kbits/sec
128, // package 4, 128 Kbits/sec
64   // package 5, 64 Kbits/sec
);


Step 4 Depending on which access policy you are using, session arguments may need to be defined in the package file. In the "Page Set Reference" section, see the SendActivateSession method description for your corresponding ActiveX server component, for example, AccessPolicyDailyASP. Here is an example of session arguments from DailyHotelPackage.asp:

var strSessionBoundary = "12:00";
var bPostAtStart = false;
var bRenewSession = true;
var bWelcomeBackMAC = false;


Step 5 Save your package file and close your editor.


Registering Your Page Set

Use the following procedure to register your page set.


Step 1 Open your browser.

Step 2 Click WEBConfig from the BBSM Dashboard.

Step 3 Click the Page Sets tab.

Step 4 In the Page Set text box, type the name of your page set (for example, NewName).

Step 5 In the Start Page text box, type the URL of where your start page is located. For example, if you saved your page set in the standard c:\atcom\ekgnkm directory, you would type the following:

http://%iport%/ekgnkm/YourNewDirectory/NewNameStart.asp

The %iport% is automatically expanded to the IP address of the BBSM server.


Caution If your start page requests sensitive information from the end user, you should use SSL, and the protocol part of the URL should be, https, instead of http.

Step 6 Click Update. The server will save your page set to the registry.

Testing Your Page Set

If your page set uses SSL, you must have a valid certificate installed on your server to test your pages. If you do not have a certificate installed, when you connect a client, you will be unable to view the secure pages. For testing purposes, you can make your BBSM a certificate authority and then sign your own certificate. This procedure should only be used on a development server and never on a release server. This method is only used for testing secure page sets and is not an acceptable solution for installing a valid certificate on your server. For detailed instructions, see "Requesting and Installing a Test SSL Certificate on a BBSM Server."

If you want to debug the ActiveX server components used in your pages, install the Microsoft development environment on your BBSM server and see the "Standalone Debugging ActiveX Server Components" section.

Use the following procedure to test your completed page set.


Step 1 Connect a client to a port.

Step 2 Click the Port Control link from the BBSM Dashboard on the server.

Step 3 Click on the port number (in the # column) that the client is connected to.

Step 4 Select your page set from the drop-down list under Page Set. The Start Page text box will automatically populate with the URL of your start page.

Step 5 Click Update.

Step 6 Open the browser on the client. Your start page should be displayed.

Step 7 Emulate the end user's experience and test your pages. If BBSM displays error messages when you are testing your page set, see Table 2-4 for an explanation of these messages.


Enhancing the Searching Page

The BBSM searching page has been modified to reduce the search refresh delay from 5 to 2 seconds. In addition, the search dead time delay was removed. These two changes will reduce your existing searching times.

Although these enhancements have been incorporated into BBSM, they are not available on existing systems. They will be incorporated into BBSM Release 5.2. To take advantage of these changes on existing BBSM servers, you can revise the searching.asp file, as shown below. The revisions to be added are shown in bold:

NextURL = obj.GetSearchStatus("searching.asp", "iporterror.asp",
"maxcapacity.asp");
var RefreshDelay = 0;
if (NextURL == "searching.asp")
{
RefreshDelay = 2;
}
...
...
<meta HTTP-EQUIV="refresh" content="<%=RefreshDelay%>;url=<%= NextURL%>">

Page Set Reference

The following sections provide a reference of the ActiveX server components and methods available to you:

AccessPolicyAccessCodeASP.WebInterface Object

AccessPolicyBlockASP.WebInterface Object

AccessPolicyDailyASP.WebInterface Object

AccessPolicyMinuteASP.WebInterface Object

AccessPolicyRADIUSASP.WebInterface Object

AccessPolicySubscriptionASP.WebInterface Object

CruiseLineValidationASP.WebInterface Object

NotifyBilling.NotifyBilling Object

CommonSubroutines.asp Functions

You can use these objects, methods, and functions to modify an existing page set or to develop your own page set.

AccessPolicyAccessCodeASP.WebInterface Object

The AccessCode access policy allows access to the Internet through an access code. An access code is a short string, typically a 5-digit number. An end user enters the access code into a form, clicks submit, and gains access to the Internet.

The following sections describe the members that the AccessPolicyAccessCodeASP.WebInterface object provides.

SendActivateSession Method

Parameters

strName

If you prompt an end user for a name, you can associate the name with the activated session. The name will appear in output from the WriteDuplicateSessions method.

strAccessCode

This parameter specifies the access code to use for the session. The access policy analyzes the access code before sending the activate session message.

bExclusive

The access policy prevents more than one active, exclusive session with a given access code:

If this parameter is true, the system activates an exclusive session using the access code.

If this parameter is false, the system activates a nonexclusive session.

Note that the access policy may prevent session activation even when this parameter is false. If an exclusive session exists, the access policy will not activate a new session with the same access code.

strErrorURL

This method returns strErrorURL if a general error occurs processing the request; for example, the system does not recognize the IP address of the request. You can use this parameter to redirect to an error page. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

strAccessCodeFailURL

This method returns strAccessCodeFailURL if the access code does not exist for the site or if the current time is outside the valid date range for the access code. You can use this parameter to redirect to your access code fail page. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

strAccessCodeBusyURL

This method returns strAccessCodeBusyURL if you attempt to activate a session when an exclusive session using the same access code already exists on the same site or if you try to activate an exclusive session with an access code in use by any active session on the same site. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

Return Value

If this method successfully sends the activate session message to AtDial, the method returns an empty string. In this case, you should redirect to a portal page on the Internet. Otherwise, this method returns the appropriate error URL you passed as a parameter. In this case, you should redirect to the returned URL.

Remarks

This method sends an activate session message to AtDial to activate a session using the access code access policy. However, before sending the activate session message, this method analyzes the access code to determine if the access code is valid. The access code is valid under the following conditions:

The access code must exist for the site that owns the port to which the end user is connected.

The valid date range for the access code must include the current time.

There must not be an exclusive session using the access code on the same site.

There must not be any session using the access code on the same site if the bExclusive parameter is true.

Example

Note the following fragment derived from the AccessCodePost.asp.

...
<%
strName = Request.Form ("strName");
strAccessCode = Request.Form ("strAccessCode");
AccessPolicyAccessCode =
Server.CreateObject ("AccessPolicyAccessCodeASP.WebInterface.1");

strErrorRedirectURL = AccessPolicyAccessCode.SendActivateSession
(
strName,
strAccessCode,
false, // bExclusive
"iporterror.asp?msg=SendActivateSession+failed",
"AccessCodeFail.asp",
"AccessCodeBusy.asp?AccessCode=" + strAccessCode
);
if (strErrorRedirectURL)
{
Response.Redirect (strErrorRedirectURL);
}
else
{
strPortal = "http://www.cisco.com/";
}
...

WriteDuplicateSessions Method

Parameters

strAccessCode

The access code for which you want to print active sessions.

Return Value

This method has no return value.

Remarks

This method prints a list of active sessions using the access code specified by strAccessCode. It prints the one HTML table row per active session, and you should invoke this method within an HTML table tag. Typically, you would use this method to display a list of sessions using an access code when an end user attempts to activate a session with an access code, and that code is already in use by one or more sessions.

Example

Note the following fragment derived from the AccessCodeBusy.asp.

...
<%
AccessPolicyAccessCode =
Server.CreateObject ("AccessPolicyAccessCodeASP.WebInterface.1");
strAccessCode = Request ("AccessCode");
%>
...
<center>
The access code you entered, <%= strAccessCode %>, is in use by the following sessions.
<table border="0">
<% AccessPolicyAccessCode.WriteDuplicateSessions (strAccessCode); %>
</table>
</center>
...

AccessPolicyBlockASP.WebInterface Object

The Block access policy allows access to the Internet for a block of time, measured in minutes (such as 15 minutes or 30 minutes) and bills the access to an accounting policy (credit card, hotel PMS, or an accounting policy you develop). At the end of the block, the access policy automatically deactivates the session.

The following section describes the members that the AccessPolicyBlockASP.WebInterface object provides.

SendActivateSession Method

Parameters

strAccountingPolicy

This parameter specifies the accounting policy to use for the session. For example, you pass "Hotel" in this parameter to specify the hotel accounting policy.

strAccountingInfo

This parameter specifies the accounting information string, and its value varies depending on the accounting policy parameter. See the example at the end of this section.

strDeniedURL

If this method successfully sends the activate session message to AtDial, the accounting policy (in AtDial) may still deny the session. If the accounting policy denies the session, the system will perform a forced redirect to this URL. Because this is a forced redirect URL, you must use absolute URL syntax for this parameter.

strErrorURL

If a general error occurs attempting to send the activate session message (for example, the system does not recognize the requesting IP address), the method returns this URL. You do not need to use absolute URL syntax for this parameter, because it is not a forced redirect URL.

dPrice

This parameter specifies the price (with no specific currency) for the block. The access policy will charge this amount through the specified accounting policy at the beginning of the session. If the accounting policy denies the transaction, the access policy will deactivate the session.

nBandwidthKbps

This parameter specifies the bandwidth (in kbps) to apply to the session.

nBlockDurationMinutes

This parameter specifies the duration of the block in minutes. If the session is still active at the end of the block, the access policy deactivates the session.

Return Value

If this method successfully sends the activate session message to AtDial, the method returns an empty string. In this case, you should redirect to a page on the Internet. Otherwise, this method returns the strErrorURL you passed as a parameter. In this case, you should redirect to the returned URL.

Remarks

This method sends an activate session message to AtDial to activate a session using the Block access policy. You must specify an accounting policy and you must supply the appropriate accounting information for the accounting policy. If the accounting policy can deny the session, you must also specify a denied URL (in absolute URL syntax).

Example

Note the following fragment derived from the BlockICSPost.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
AccessPolicyBlock =
Server.CreateObject ("AccessPolicyBlockASP.WebInterface.1");
strErrorURL = AccessPolicyBlock.SendActivateSession
(
"Hotel", // strAccountingPolicy
"Default", // strAccountingInfo
obj.ExpandURL ("http://%iport%/ekgnkm/Denied.asp"),
obj.ExpandURL ("http://%iport%/ekgnkm/Error.asp"),
7.95, // dPrice
512,  // nBandwidthKbps
30    // nBlockDurationMinutes
);
if (strErrorURL)
{
Response.Redirect (strErrorURL);
}
else
{
strPortal = "http://www.cisco.com/";
}
%>
...

AccessPolicyDailyASP.WebInterface Object

The Daily access policy allows access to the Internet for a day. This access policy has a "welcome back" feature that allows the end user to activate and deactivate several sessions in the same day for one price. In addition to the welcome back feature, this access policy has several parameters that you can vary to change the behavior of the access policy. See the "SendActivateSession Method (Daily)" section for more information.

The welcome back feature has two modes of operation:

By MAC address—Welcome back MAC activates the welcome back feature for a returning MAC address on any port.

By port—Welcome back port activates the welcome back feature for a subsequent session by any MAC on exactly one port.

You control the welcome back mode of operation using the bWelcomeBackMAC parameter passed into methods of this object.

The following sections describe the members that the AccessPolicyDailyASP.WebInterface object provides.

FormatTime Method

Parameters

strTime

This parameter specifies the session boundary and it has the form HH:MM, where HH is the hour of the session boundary in military format with a range of 0 through 23 and MM is the minute of the session boundary in the range 00 through 59.

Return Value

This method returns a string containing the formatted time. The output format is %I:%M %p, where %I represents the hour in 12-hour format, %M represents the minute in the range 00-59, and %p represents the AM/PM indicator.

Remarks

This method formats a Daily access policy session boundary into an end user readable time string. You should use this method to display the session boundary to the end user.

Example

Note the following fragment derived from the DailyHotelStart.asp.

...
<%
AccessPolicyDaily =
Server.CreateObject ("AccessPolicyDailyASP.WebInterface.1");
StrSessionBoundary = "13:00";
%>
<html>
...
This service costs <%= FormatPrice (9.95) %> until <%=
AccessPolicyDaily.FormatTime (strSessionBoundary) %>.
...
</html>

GetTotalSpent Method

This section describes the GetTotalSpent method and its parameter and provides an example.

Parameters

bWelcomeBackMAC

If your page set uses welcome back based on MAC address, pass true in this parameter. If your page set uses welcome back based on port, pass false in this parameter.

Return Value

This method returns the total amount spent during the welcome back period.

Remarks

You can use this method to calculate the price an end user would be charged if the end user upgrades a subsequent session to a higher bandwidth; for example, if you offer two price/bandwidth packages and the end user activates the first session with the lower bandwidth. When the user comes back, you can use this method to determine how much the end user spent for the first session. You can call this method at any time, but the return value is meaningful only if the GetWelcomeBack method returns a nonempty string.

Example

Note the following fragment derived from the DailyHotelStart.asp.

...
<%
AccessPolicyDaily =
Server.CreateObject ("AccessPolicyDailyASP.WebInterface.1");
dTotalSpent = AccessPolicyDaily.GetTotalSpent (true);
%>
<html>
...
Welcome back, you've spent <%= FormatPrice (dTotalSpent) %>
...
</html>

GetWelcomeBack Method

Parameters

bWelcomeBackMAC

If your page set uses welcome back based on MAC address, pass true as the value of this parameter. If your page set uses welcome back based on port, pass false.

Return Value

This method returns the time at which an end user's welcome back period ends based on the welcome back mode that you pass in. If the welcome back period does not exist or has already expired, this method returns an empty string. Otherwise, this method returns a string representing the time at which the welcome back period ends. You can display this string to the end user.

Remarks

You should use the same value for bWelcomeBackMAC that you intend to pass to the SendActivateSession method. Use this method on the start page for a page set using the Daily access policy to determine if the welcome back feature is active, and if so, when it ends.

Example

Note the following fragment derived from the DailyHotelStart.asp.

...
<%
AccessPolicyDaily =
Server.CreateObject ("AccessPolicyDailyASP.WebInterface.1");
strEndWelcomeBack = AccessPolicyDaily.GetWelcomeBack (true);
if (strEndWelcomeBack)
{
%>
Welcome back. You can use this service until <%= strEndWelcomeBack %>
for no additional charge.
<%
}
%>
...

SendActivateSession Method (Daily)

Parameters

strAccountingPolicy

This parameter specifies the accounting policy to use for the session. For example, you pass "Hotel" in this parameter to specify the hotel accounting policy.

strAccountingInfo

This parameter specifies the accounting information string, and its value varies depending on the accounting policy parameter. See the example at the end of this section.

strDeniedURL

If this method successfully sends the activate session message to AtDial, the accounting policy (in AtDial) may still deny the session. If the accounting policy denies the session, the system will perform a forced redirect to this URL. Because this is a forced redirect URL, you must use absolute URL syntax for this parameter.

strErrorURL

If a general error occurs attempting to send the activate session (for example, the system does not recognize the requesting IP address), the method returns this URL. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

dPrice

This parameter specifies the price (with no specific currency) for the day. The access policy will charge this amount through the specified accounting policy at the beginning of the session or end of the session depending on the value of bPostAtStart. The access policy will also charge this amount at each session boundary if bRenewSession is true. If the accounting policy denies the transaction, the access policy will deactivate the session.

nBandwidthKbps

This parameter specifies the bandwidth (in kbps) to apply to the session.

strSessionBoundary

Use the strSessionBoundary variable to control the checkin-to-checkout cycle. The Daily access policy uses this variable to determine when a session boundary occurs. You can specify an empty string for the session boundary to be 24 hours from the start of the session. If you specify a time, the session boundary occurs at that time, regardless of session start time. Use a string of the form HH:MM, where:

HH = the hours in the range 0 through 23 (0 means midnight, 12 means noon, and 23 means 11 p.m.)

MM = the minute in the range 00 through 59.

The system default is as follows:

var strSessionBoundary = "12:00" (the same as var strSessionBoundary="12:00")

If you place a space between the quotation marks, the session boundary is set to the default time of noon; for example, as follows:

var strSessionBoundary = " "

If you want the session boundary to be set for 24 hours after activation, modify the line to specify an empty string for the session boundary (with no space between the ""); for example, as follows:

var strSessionBoundary = ""

bPostatStart

Use the bPostAtStart parameter to control when the Daily access policy performs the accounting function for the session:

If this parameter is true, the Daily access policy will perform the accounting function at the start of the session and at each session boundary.

If this variable is false, the Daily access policy will perform the accounting function at each session boundary and at the end of the session.

bRenewSession

Use the bRenewSession parameter to control what happens to a session at a session boundary. If this variable is true, the Daily access policy will renew the session. Otherwise, the Daily access policy will deactivate the session.

bWelcomeBackMAC

Use the bWelcomeBackMAC parameter to control how the Daily access policy records information to implement the welcome back feature:

If this parameter is true, the Daily access policy will record information about the specific MAC address and welcome back that MAC address on any port.

If the parameter is false, the Daily access policy will welcome back any MAC address on this port only.

Return Value

If this method successfully sends the activate session message to AtDial, this method returns an empty string. In this case, you should redirect to a page on the Internet. Otherwise, this method returns the strErrorURL you passed as a parameter. In this case, you should redirect to the returned URL.

Remarks

This method sends an activate session message to AtDial to activate a session using the Daily access policy. You must specify an accounting policy and you must supply the appropriate accounting information for the accounting policy. If the accounting policy can deny the session, you must also specify a denied URL (in absolute URL syntax).

Example

Note the following fragment from the DailyHotelPost.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
AccessPolicyDaily =
Server.CreateObject ("AccessPolicyDailyASP.WebInterface.1");
strErrorURL = AccessPolicyDaily.SendActivateSession
(
"Hotel",
"Default",
obj.ExpandURL("http://%iport%/ekgnkm/Denied.asp"),
obj.ExpandURL("http://%iport%/ekgnkm/Error.asp"),
9.95,
0,
"13:00",
true,
true,
false
);

if (strErrorURL)
{
Response.Redirect (strErrorURL);
}
else
{
strPortal = "http://www.cisco.com/";}
...
}
%>

AccessPolicyMinuteASP.WebInterface Object

The Minute access policy allows access to the Internet on a per-minute basis. The access policy performs an accounting authorization at the beginning of the session for a fixed amount that you specify. At the end of the session, the access policy performs an accounting sale for the amount calculated from the number of minutes times the price.

The following sections describe the members provided by the AccessPolicyMinuteASP.WebInterface object.

SendActivateSession Method

Parameters

strAccountingPolicy

This parameter specifies the accounting policy to use for the session. For example, you pass "Hotel" in this parameter to specify the hotel accounting policy.

strAccountingInfo

This parameter specifies the accounting information string, and its value varies depending on the accounting policy parameter. See the example at the end of this section.

strDeniedURL

If this method successfully sends the activate session message to AtDial, the accounting policy (in AtDial) may still deny the session. If the accounting policy denies the session, the system will perform a forced redirect to this URL. Because this is a forced redirect URL, you must use absolute URL syntax for this parameter.

strErrorURL

If a general error occurs attempting to send the activate session message (for example, the system does not recognize the requesting IP address), the method returns this URL. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

dPrice

This parameter specifies the price (with no specific currency) per minute. The access policy will compute the total price at the end of the session by multiplying the number of minutes by this value. Then the access policy will execute a sale transaction through the specified accounting policy.

nBandwidthKbps

This parameter specifies the bandwidth (in kbps) to apply to the session.

dApprovalAmount

This parameter specifies the approval amount (with no specific currency) for the accounting authorization that the access policy performs at the beginning of the session.

Return Value

If this method successfully sends the activate session message to AtDial, this method returns an empty string. In this case, you should redirect to a page on the Internet. Otherwise, this method returns the strErrorURL you passed as a parameter. In this case, you should redirect to the returned URL.

Remarks

This method sends an activate session message to AtDial to activate a session using the Minute access policy. You must specify an accounting policy and you must supply the appropriate accounting information for the accounting policy. If the accounting policy can deny the session, you must also specify a denied URL (in absolute URL syntax).

Example

Note the following fragment derived from the MinuteICSPost.asp.

<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
AccessPolicyMinute =
Server.CreateObject ("AccessPolicyMinuteASP.WebInterface.1");
strErrorURL = AccessPolicyMinute.SendActivateSession
(
"Hotel",
"Default",
obj.ExpandURL("http://%iport%/ekgnkm/Denied.asp"),
obj.ExpandURL("http://%iport%/ekgnkm/Error.asp"),
0.33,
512,
15.00
);


if (strErrorURL)
{
Response.Redirect (strErrorURL);
}
else
{
strPortal = "http://www.cisco.com/";
}
%>
...

AccessPolicyRADIUSASP.WebInterface Object

The RADIUS access policy allows access to the Internet through RADIUS authentication. This access policy accepts a username and password from an end user, performs authentication to a RADIUS server, and grants or denies access to the Internet based on the response from the RADIUS server. This access policy does not perform any accounting functions.

The following sections describe the members provided by the AccessPolicyRADIUSASP.WebInterface object.

CalculateUserTotals Method

Parameters

nDuration

This parameter specifies the number of minutes to calculate charges based on; this value should be passed in as 1 for standard implementation.

Return Value

This method returns true if successful in updating the in-memory variables with the results; otherwise, this method returns false.

Remarks

Invokes the AccessPolicyRADIUS extension DLL method to calculate the estimate charges for the end-user session based on session duration and the price per minute for the bandwidth selected by the end-user when starting his/her session.

Example

Note the following fragment derived from the disconnect.asp.

...
<%
BillingObj= Server.CreateObject ("NotifyBilling.NotifyBilling.1");
if (BillingObj.CheckPage ("RADIUSUBandClear") || BillingObj.CheckPage
"RADIUSUBand"))
{

bManageBandwidth = BillingObj.GetManageBandwidth ();
var strUsername;
var nTotalSeconds;
var nTime;
var nTotalCharge;
AccessPolicyRADIUS = Server.CreateObject
("AccessPolicyRADIUSASP.WebInterface.1");
AccessPolicyRADIUS.CalculateUserTotals(1);
strUsername = AccessPolicyRADIUS.GetUsername();
nTotalSeconds = AccessPolicyRADIUS.GetTotalSeconds();
nTotalCharge = AccessPolicyRADIUS.GetTotalCharge();
nTotalMin = nTotalSeconds/60 ; //min
if ( nTotalMin <1 )
{
nTotalMin = "1";
}
else
{
nTotalMin = Math.ceil( nTotalMin );
}
}
%>

...


GetTotalCharge Method

Parameters

None

Return Value

This method returns the total estimated charge for the end-user session. It will return 0.0 if no calculations were performed.

Remarks

Returns the total charge calculated by the call to CalculateUserTotals.

Example

Note the following fragment derived from the disconnect.asp.

...
<%
BillingObj= Server.CreateObject ("NotifyBilling.NotifyBilling.1");
if (BillingObj.CheckPage ("RADIUSUBandClear") || BillingObj.CheckPage
("RADIUSUBand"))
{
bManageBandwidth = BillingObj.GetManageBandwidth ();
var strUsername;
var nTotalSeconds;
var nTime;
var nTotalCharge;
AccessPolicyRADIUS = Server.CreateObject
("AccessPolicyRADIUSASP.WebInterface.1");
AccessPolicyRADIUS.CalculateUserTotals(1);
strUsername = AccessPolicyRADIUS.GetUsername();
nTotalSeconds = AccessPolicyRADIUS.GetTotalSeconds();
nTotalCharge = AccessPolicyRADIUS.GetTotalCharge();
nTotalMin = nTotalSeconds/60 ; //min
if ( nTotalMin < 1 )
{
nTotalMin = "1";
}
else
{
nTotalMin = Math.ceil( nTotalMin );
}
}
%>...


GetTotalSeconds Method

Parameters

None

Return Value

This method returns the total seconds for the end-user session. It will return 0 if no calculations were performed.

Remarks

Returns the total seconds for the end-user session as calculated by CalculateUserTotals.

Example

Note the following fragment derived from the disconnect.asp.

...

<%

BillingObj= Server.CreateObject ("NotifyBilling.NotifyBilling.1");
if (BillingObj.CheckPage ("RADIUSUBandClear") || BillingObj.CheckPage
("RADIUSUBand"))
{
bManageBandwidth = BillingObj.GetManageBandwidth ();
var strUsername;
var nTotalSeconds;
var nTime;
var nTotalCharge;
AccessPolicyRADIUS = Server.CreateObject
"AccessPolicyRADIUSASP.WebInterface.1");
AccessPolicyRADIUS.CalculateUserTotals(1);
strUsername = AccessPolicyRADIUS.GetUsername();
nTotalSeconds = AccessPolicyRADIUS.GetTotalSeconds();
nTotalCharge = AccessPolicyRADIUS.GetTotalCharge();
nTotalMin = nTotalSeconds/60 ; //min
if ( nTotalMin < 1 )
{
nTotalMin = "1";
}
else
{
nTotalMin = Math.ceil( nTotalMin );
}

}

%>...


GetUserName Method

Parameters

None

Return Value

This method returns the user name for which total seconds and total charge were calculated. It will return "" if no calculations were performed.

Remarks

Returns the user name for which total seconds and total charge were calculated by the call to CalculateUserTotals.

Example

Note the following fragment derived from the disconnect.asp.

...
<%
BillingObj= Server.CreateObject ("NotifyBilling.NotifyBilling.1");
if (BillingObj.CheckPage ("RADIUSUBandClear") || BillingObj.CheckPage
"RADIUSUBand"))
{
bManageBandwidth = BillingObj.GetManageBandwidth ();
var strUsername;
var nTotalSeconds;
var nTime;
var nTotalCharge;
AccessPolicyRADIUS = Server.CreateObject
"AccessPolicyRADIUSASP.WebInterface.1");
AccessPolicyRADIUS.CalculateUserTotals(1);
strUsername = AccessPolicyRADIUS.GetUsername();
nTotalSeconds = AccessPolicyRADIUS.GetTotalSeconds();
nTotalCharge = AccessPolicyRADIUS.GetTotalCharge();
nTotalMin = nTotalSeconds/60 ; //min
if ( nTotalMin < 1 )
{
nTotalMin = "1";
}
else
{
nTotalMin = Math.ceil( nTotalMin );
}
}

%>...


SendActivateSession Method

Parameters

strUserName

This parameter specifies the username that the access policy should pass to the RADIUS server.

strPassword

This parameter specifies the password that the access policy should pass to the RADIUS server. The access policy encrypts this password according to RFC 2865 before sending it over the network to the RADIUS server.

strAuthenticationFailURL

This method returns strAuthenticationFailURL if none of the configured RADIUS servers accept the username and password. You should use this parameter to refer to your authentication failure page. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

strAuthenticationServerFailURL

This method returns strAuthenticationServerFailURL if the RADIUS authentication server responds to an Access-Request packet but fails to send an Access-Accept packet. You should use this parameter to redirect the end user to your authentication failure page. You do not need to use absolute URL syntax for this parameter, because it is not a forced redirect URL.

strAccountBusyURL

This method returns strAccountBusyURL if an active session already exists using the same username and the site is configured to deny multiple RADIUS sessions with the same username. You should use this parameter to refer to your RADIUS account busy page. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

strErrorURL

If a general error occurs attempting to send the activate session message (for example, the system does not recognize the requesting IP address), the method returns this URL. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

dPrice

This parameter specifies the price (with no specific currency) per minute for the bandwidth kbps selected for the session. The end user selects the price per minute (along with the session connection speed) when the RADIUSUBand and RADIUSUBandClear page sets are in use. For all other RADIUS page sets, the value passed in should be 0.0. The access policy computes the total price at the end of the session by multiplying the duration of the session (in minutes) by this value. This calculated session charge is displayed to the end user upon deactivation of the RADIUSUBand or RADIUSUBandClear session.

nBandwidthKbps

This parameter specifies the bandwidth (in kbps) the end user has selected to apply to the session. The end user selects the session connection speed (along with the corresponding price per minute) when the RADIUSUBand and RADIUSUBandClear page sets are in use. For all other RADIUS page sets, the value passed should be -1 to indicate that the access policy should check whether the RADIUS server sends a bandwidth kbps value in the authentication response packet. The access policy will throttle the session bandwidth to either the kbps value selected by the end user or sent by the RADIUS authentication server.

Return Value

If this method successfully sends the activate session message to AtDial, this method returns an empty string. In this case, you should redirect to a page on the Internet. Otherwise, this method returns the appropriate error URL you passed as a parameter. In this case, you should redirect to the returned URL.

Remarks

This method sends an activate session message to AtDial to activate a session using the RADIUS access policy. You must supply a username and a password that the access policy will forward to a RADIUS server for authentication. You must also supply several URLs, one to handle each failure scenario.

Example

Note the following fragment derived from the RADIUSPost.asp.

...
<%
strUserName = Request.Form ("strUserName");
strPassword = Request.Form ("strPassword");
AccessPolicyRADIUS =
Server.CreateObject ("AccessPolicyRADIUSASP.WebInterface.1");

strErrorURL = AccessPolicyRADIUS.SendActivateSession
(
strUserName,
strPassword,
"RADIUSServerFail.asp",
"RADIUSFail.asp",
"RADIUSBusy.asp",
obj.ExpandURL("http:11%iport%/ekgnkm/Error.asp"),
0.0,
-1
"
);

if (strErrorURL)
{
Response.Redirect (strErrorURL);
}
else
{
strPortal = "http://www.cisco.com/";
}
%>
...

AccessPolicySubscriptionASP.WebInterface Object

The Subscription access policy allows access to the Internet based on a subscription. An end user subscribes to Internet service for a date range, and the access policy allows the end user to activate and deactivate any number of sessions in the date range. Outside the date range, the access policy does not allow the end user to activate a session. However, the access policy provides a mechanism for the end user to self-provision a subscription, charging the subscription to any supported accounting policy.

The following is a list of methods available from the AccessPolicySubscriptionASP.WebInterface object.

GetSubscriptionEnd Method

Parameters

None

Return Value

This method returns the date and time at which a subscription ends.

Remarks

Use this method to obtain a human readable string that specifies when a subscription ends. You could call this method from a start page to inform the end user how much longer the subscription will last. If the subscription is expired, this method does not return meaningful information, so you should call this method only if the IsExpired method returns false.

Example

Note the following fragment derived from the SubscriptionStart.asp.

...
<%
AccessPolicySubscription =
Server.CreateObject ("AccessPolicySubscriptionASP.WebInterface.1");
strSubscriptionEnd = AccessPolicySubscription.GetSubscriptionEnd ();
%>
<html>
...
Your subscription ends <%= strSubscriptionEnd %>.
...
</html>

IsExpired Method

Parameters

None

Return Value

This method returns true if the client's subscription has expired. Otherwise, this method returns false.

Remarks

You can use this method to determine if a client's subscription has expired. For example, you could invoke this method on the start page. If the method returns false (the subscription is not expired), you could display a button to activate a session (or even automatically activate a session). If the method returns true (the subscription is expired), you could redirect to an error page or a self-provisioning page.

Example

Note the following fragment derived from the SubscriptionStart.asp.

...
<%
AccessPolicySubscription =
Server.CreateObject ("AccessPolicySubscriptionASP.WebInterface.1");
if (AccessPolicySubscription.IsExpired ())
{
Response.Redirect ("Expired.asp");
}
%>
...

SendActivateSession Method

Parameters

strAccountingPolicy

This parameter specifies the accounting policy to use for the session. For example, you pass "Hotel" in this parameter to specify the hotel accounting policy. The Subscription access policy does not perform any accounting functions on a per-session basis. However, if you use the bandwidth boost feature, the system will perform accounting using the accounting policy you specify here.

strAccountingInfo

This parameter specifies the accounting information string, and its value varies depending on the accounting policy parameter. See the example at the end of this section.

strDeniedURL

If this method successfully sends the activate session message to AtDial, the accounting policy (in AtDial) may still deny the subscription. If the accounting policy denies the subscription, the system will perform a forced redirect to this URL. Because this is a forced redirect URL, you must use absolute URL syntax for this parameter.

strErrorURL

If a general error occurs attempting to send the activate session (for example, the system does not recognize the requesting IP address), the method returns this URL. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

Return Value

If this method successfully sends the activate session message to AtDial, this method returns an empty string. In this case, you should redirect to a page on the Internet. Otherwise, this method returns the strErrorURL you passed as a parameter. In this case, you should redirect to the returned URL.

Remarks

This method sends an activate session message to AtDial to activate a session using the Subscription access policy.

Example

Note the following fragment derived from the SubscriptionHotelActivate.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
AccessPolicySubscription =
Server.CreateObject ("AccessPolicySubscriptionASP.WebInterface.1");

strErrorURL = AccessPolicySubscription.SendActivateSession
(
"Hotel",
"Default",
obj.ExpandURL("http://%iport%/ekgnkm/Denied.asp"),
obj.ExpandURL("http://%iport%/ekgnkm/Error.asp")
);
if (strErrorURL)
{
Response.Redirect (strErrorURL);
}
else
{
strPortal = "http://www.cisco.com/";
}
%>
...

Subscribe Method

Parameters

strAccountingPolicy

This parameter specifies the accounting policy to use for the subscription. For example, you pass "Hotel" in this parameter to specify the hotel accounting policy.

strAccountingInfo

This parameter specifies the accounting information string, and its value varies depending on the accounting policy parameter. See the example at the end of this section.

strDeniedURL

If this method successfully provisions a subscription, the accounting policy (in AtDial) may still deny the subscription. If the accounting policy denies the subscription, the system will perform a forced redirect to this URL. Because this is a forced redirect URL, you must use absolute URL syntax for this parameter.

dPrice

This parameter specifies the price (with no specific currency) for the subscription. The access policy will charge this amount through the specified accounting policy when you invoke this method. If the accounting policy denies the transaction, the access policy will invalidate the subscription.

nBandwidthKbps

This parameter specifies the bandwidth (in kbps) to apply to the subscription. The access policy will apply this bandwidth to each session that the end user activates within the subscription period.

nDays

This parameter specifies the number of days that the subscription will be active. The subscription starts on the date and time that you invoke this method, and it ends nDays later.

Return Value

This method returns true if it successfully provisions a subscription. Otherwise it returns false. Even if this method returns true, the accounting policy (in AtDial) may deny the subscription causing a forced redirect to strDeniedURL.

Remarks

Use this method to implement end user self provisioning. This method provisions a subscription for a specified number of days charging a specified priced to the specified accounting policy. The method also accepts a bandwidth parameter to apply to the subscription. For each session that the end user activates during the subscription period, the access policy will apply the bandwidth that you specify to this method.

Example

Note the following fragment derived from the SubscriptionHotelSubscribe.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
AccessPolicySubscription =
Server.CreateObject ("AccessPolicySubscriptionASP.WebInterface.1");

if (! AccessPolicySubscription.Subscribe
(
"Hotel",
"Default",
obj.ExpandURL("http://%iport%/ekgnkm/Denied.asp"),
49.95,
512,
7
)) {
Response.Redirect ("Error.asp");
}
%>
...

CruiseLineValidationASP.WebInterface Object

The following is a list of methods available from the CruiseLineValidationASP.WebInterface object.

IsValidCreditCard Method


Caution This method does not authenticate credit card transactions; there is no communication with the CruiseLine billing server. It should only be used to validate the syntax and expiration date of the credit card information provided by the end user.

Parameters

strCC

This parameter specifies the credit card number entered by the end user.

strExpMonth

This parameter specifies the expiration month entered by the end user.

strExpYear

This parameter specifies the expiration year entered by the end user.

Return Value

If the credit card number and expiration date are valid, then this method returns the card type (for example, Visa or MasterCard). If any of the credit card information is invalid, then the method returns a blank string.

Remarks

This method checks that the expiration date is not expired and that the credit card number has valid syntax (correct number of digits, correct leading digits, correct check digit). The method will also determine the card type (for example, Visa or MasterCard) and return the appropriate type.

Example

Note the following fragment derived from the CruiseLinePost.asp

...
<%
strCC = Request.Form ("strCC");
strExpYear = Request.Form ("strExpYear");
strExpMonth = Request.Form ("strExpMonth");
strDeniedURL = obj.ExpandURL("http://%iport%/ekgnkm/CruiseLineCCFail.asp");
CruiseLineValidation =
Server.CreateObject("CruiseLineValidationASP.WebInterface.1");
strCardType = CruiseLineValidation.IsValidCreditCard(strCC, strExpMonth,
strExpYear);
if (strCardType == "")
{
// Invalid Credit Card Number or Expiration Date
Response.Redirect (strDeniedURL);
}
%>
...

IsValidFolioNumber Method


Caution This method does not authenticate access card transactions; there is no communication with the CruiseLine billing server. It should be used only to validate the syntax of the access card information (folio number) provided by the end user.

Parameters

strFolioNumber

This parameter specifies the folio number entered by the end user.

Return Value

If the folio number is valid, the method returns true. Otherwise, the method returns false.

Remarks

This method checks that the folio number is valid. The folio number must be 5 or 8 numeric characters. The access card type of crew or guest card is determined by the length of numeric characters.

Example

Note the following fragment derived from the CruiseLinePost.asp.

...
<%
strFolioNumber = Request.Form("strFolioNumber");
strCabinNumber = Request.Form("strCabinNumber");
strDeniedURL = obj.ExpandURL("http://%iport%/ekgnkm/CruiseLineAccessCardFail.asp");

CruiseLineValidation =
Server.CreateObject("CruiseLineValidationASP.WebInterface.1");
bResult = CruiseLineValidation.IsValidFolioNumber(strFolioNumber);
if (!bResult)
{
// Invalid Folio Number
Response.Redirect (strDeniedURL);
}
%>
...

NotifyBilling.NotifyBilling Object

The NotifyBilling.NotifyBilling object (or just NotifyBilling) implements core features of BBSM. The methods that NotifyBilling provides may be useful for any number of page sets or access policies, which is why they are part of the core.

The following sections describe the methods provided by the NotifyBilling.NotifyBilling object.

BandwidthBoost Method

Parameters

nDurationMinutes

This parameter specifies the duration of the bandwidth boost in minutes.

nBandwidthKbps

This parameter specifies the new, temporary bandwidth to apply to a session. Use the special value zero to specify no bandwidth limit (that is, the session can transmit packets as fast as the pipe will allow).

dPrice

This parameter specifies the price (with no specific currency) for the boost. BBSM charges this amount through the accounting policy specified at the activation of the session.

Return Value

None

Remarks

The BandwidthBoost method boosts the bandwidth of a session to nBandwidthKbps for nDurationMinutes for dPrice. This method performs a sale transaction through the accounting policy that you specified when you activated the session. Then the method increases the bandwidth to the specified value. When the specified duration expires, the method restores the bandwidth to the previous value. This method does not check that nBandwidthKbps is faster than the current bandwidth, you must do that using the GetPortStateBandwidthKbps method. If you call this method for an inactive session, the core software ignores the request.

Example

Note the following fragment derived from the Bandwidth_boost_ack.asp.

...
<%
nBandwidthKbps = 256;
nDurationMinutes = 60;
dPrice = 1.95;

obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
obj.BandwidthBoost (nDurationMinutes, nBandwidthKbps, dPrice);
strBandwidthKbps = BandwidthKbpsToString (nBandwidthKbps);
%>
Bandwidth Boosted for <%= nDurationMinutes %>
Bandwidth Boosted to <%= strBandwidthKbps %>
Price <%= FormatPrice (dprice) %>
...

CheckPage Method

Parameters

strPageToCheck

The name of the page set.

Return Value

This method returns true if the end user is allowed to view the page set passed in the strPageToCheck parameter. Otherwise, this method returns false.

Remarks

This method implements page set access control. Each port is allowed to view only one page set. Each restricted page in a page set should call this method to verify that the end user is allowed to view the page. If CheckPage returns true, you should display the page normally. Otherwise, you should redirect to an error page.

Example

Note the following fragment derived from the AccessCodeStart.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");

if (! obj.CheckPage ("AccessCode"))
{
Response.Redirect ("NotAllowed.asp");
}
%>
...

ClientBye Method

Parameters

None

Return Value

None

Remarks

This method sends a deactivate session message to AtDial to deactivate a session. You should use this method if you provide a user interface that allows the end user to deactivate a session.

Example

Note the following fragment derived from the disconnect.asp

<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
obj.ClientBye ();
%>
<html>
...
You are now disconnected.
...
</html>

ExpandURL Method

Parameters

strURL

The strURL parameter specifies the URL to expand. This method changes %iport% to the IP address of the internal interface.

Return Value

This method returns the expanded version of strURL. If strURL contained %iport%, then the return value has %iport% replaced with the IP address of the internal interface.

Remarks

The ExpandURL expands %iport% in the strURL parameter to the IP address of the internal interface. For example, if strURL is http://%iport%/ekgnkm/preconnect.asp and the IP address of the internal interface is 192.168.0.1, then the return value of this method will be http://192.168.0.1/ekgnkm/preconnect.asp. The purpose of this method is to allow you to deploy the page set on a large number of servers, possibly with differing IP addresses. The BBSM software will take care of the expanding the URLs for you.

You must use this method in the following situations:

When you specify a URL that is a forced redirect URL. Because the forced redirect spoofs an end user's web request, you must use absolute URL syntax for the forced redirect URL. Otherwise, the end user's web browser may enter an infinite redirect loop.

When you switch from clear text (http) to secure (https). If you're page set uses SSL, you must use absolute URL syntax to switch from http to https and back to http.

Example

Note the following fragment derived from the preconnect.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
Response.Redirect
(obj.ExpandURL ("http://%iport%/ekgnkm/preconnect2.asp"));
%>
...

FormatPrice Method

Parameters

strFormat

This parameter specifies the format to use when formatting the price. You may include a currency symbol if you want to specify a currency. You must include exactly one printf style floating point format specification such as %0.2f. If you fail to include such a specification, the results are undefined.

dPrice

This parameter is a floating point number representing the price that you want to format.

Return Value

This method returns a string representing the price formatted as specified by the format.

Remarks

This method formats a price according to the format string that you specify. You can use this method to specify the currency and number of significant decimal places for your system. Typically you would not call this method directly, but you would call this method through the FormatPrice method (documented in the Miscellaneous Subroutines section) so that your entire system will use the same format specification for all prices.

Example

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
strPrice = obj.FormatPrice ("US$ %0.2f", 9.5);
%>
...
The price is <%= strPrice %>.
...

GetManageBandwidth Method

Parameters

None

Return Value

The GetManageBandwidth method returns true if the end user is subject to bandwidth management. Otherwise, this method returns false.

Remarks

The bandwidth management features of BBSM are optional. You may wish to vary your user interface depending on whether the bandwidth management feature is on. This method returns true if a port is subject to bandwidth management. Otherwise, this method returns false.

Example

Note the following fragment derived from the DailyHotelStart.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
bManageBandwidth = obj.GetManageBandwidth ();
%>
...
<% if (bManageBandwidth) { %>
<!-- Display the user interface for bandwidth management. >
<% } else { %>
<!-- Display the non-bandwidth management user interface. >
<% } %>
...

GetOriginalURL Method

Parameters

None

Return Value

This method returns the URL that the end user requested before the system performed a forced redirect.

Remarks

When performing a forced redirect, the system saves the originally requested URL. You can use this method to retrieve the originally requested URL so that you can redirect the end user to that page after a forced redirect.

Example

Note the following fragment derived from the SubscriptionHomeActivate.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
strOriginalURL = obj.GetOriginalURL ();
%>
<html>
...
Click <a href="<%= strOriginalURL %>">here</a> for the original URL.
...
</html>

GetPortMapBandwidthKbps Method

Parameters

None

Return Value

This method returns the default bandwidth (in kbps) of the port.

Remarks

This method returns the value of this port's BandwidthKbps column from the port map table. The BandwidthKbps column contains the bandwidth (in kbps) that the system uses for a session if the activate session message does not override the bandwidth. In other words, this method returns the port's default bandwidth. Note that this value may differ from the actual bandwidth if the user boosts bandwidth or uses a page set that specifies a different bandwidth. You can use this method to display the subscribed bandwidth to an end user.

Example

Note the following fragment derived from the SubscriptionStart.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
nPortMapBandwidthKbps = obj.GetPortMapBandwidthKbps ();
strBandwidthKbps = BandwidthKbpsToString (nPortMapBandwidthKbps)";
%>
<html>
...
Your port speed is <%= strBandwidthKbps %>
...
</html>

GetPortMapRoomNumber Method

Parameters

None

Return Value

This method returns the room number of the port to which the end user is connected.

Remarks

This method returns the room number of a client, whether active or not. This method is deprecated and may not appear in future releases.

Example

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
strRoom = obj.GetPortMapRoomNumber();
%>
...

GetPortStateBandwidthKbps Method

Parameters

None

Return Value

This method returns the bandwidth (in kbps) of an active session. The special value zero means that the bandwidth is not limited.

Remarks

The GetPortStateBandwidthKbps method returns the bandwidth (in kbps) for an active session from the port state table. This value may differ from the value in the port map table if the user boosts bandwidth or if the port has a page set that allows the user to select a bandwidth at the beginning of the session. You can use this method to ensure that you do not boost to a bandwidth lower than the active bandwidth, or you can use this method to display the active bandwidth to an end user.

Example

Note the following fragment derived from the bandwidth_boost_form.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
nPortStateBandwidthKbps = obj.GetPortStateBandwidthKbps ();
strBandwidthKbps = BandwidthKbpsToString (nBandwidthKbps);
%>
<html>
...
Your current bandwidth is <%= strBandwidthKbps %>
...
</html>

GetRoomNumber Method

Parameters

None

Return Value

This method returns the room number of an active client.

Remarks

This method is deprecated and may not appear in future releases.

The GetRoomNumber method returns the room number of an active client.

Example

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
strRoom = obj.GetRoomNumber ();
%>
<html>
...
You're in room <%= strRoom %>.
...
</html>

GetSearchStatus Method

Parameters

strSearchingURL

This parameter specifies the URL that you want this method to return if the system is still trying to determine the location of the end user. You do not need to use absolute URL syntax for this parameter, because it is not a forced redirect URL.

strErrorURL

This parameter specifies the URL that you want this method to return if the system is unable to determine the location of the end user. You do not need to use absolute URL syntax for this parameter, because it is not a forced redirect URL.

strMaxedOutURL

This parameter specifies the URL that you want this method to return if the system is at the maximum amount of users it will allow. You do not need to use absolute URL syntax for this parameter, because it is not a forced redirect URL.

Return Value

The GetSearchStatus method returns one of five URLs.

If the system is still trying to determine the end user's location (port), this method returns the strSearchingURL.

If the system was unable to determine the end user's location, this method returns the strErrorURL.

If the system has determined that the maximum number of allowed users has been reached, the method returns the strMaxedOutURL.

If the system has determined the end user's location and the session state is denied, this method returns the session denied URL.

Otherwise, this method returns the start page.

Remarks

This method checks the status of the searching process, which determines the location of the end user. You start the searching process by calling the PreConnect method. The PreConnect method accepts a strSearchingURL parameter. That parameter should specify a page that invokes this method. You should pass the same strSearchingURL into this method so that the searching process will loop on the same page until the system either locates or fails to locate the end user.

Example

Note the following fragment derived from the Searching.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
NextURL = obj.GetSearchStatus ("searching.asp", "iporterror.asp"),
"maxcapacity.asp");
%>
<html>
...
<a href="<%=NextURL%>">We are searching for your computer, click here to proceed.</a>
...
</html>

GetSiteNumber Method

Parameters

None

Return Value

This method returns the site number of the port to which the end user is connected.

Remarks

The GetSiteNumber method returns the site number of the port to which an end user is connected. This method is deprecated and may not appear in future releases.

Example

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
lSiteNumber = obj.GetSiteNumber ();
%>
...

GetStartPage Method

Parameters

None

Return Value

This method returns the start page from the port map table for the port on which the end user is connected. If the system cannot determine the start page (for example, the system does not recognize the IP address of the request), this method returns the string "error."

Remarks

This method returns the start page from the port map table for the port on which the end user is connected.


Note This method is deprecated and may not appear in future releases.


Example

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
strStartPage = obj.GetStartPage ();
%>
...

IsConnected Method

Parameters

strRoomNumber

Note that this parameter is deprecated and may not appear in future releases.

Return Value

The IsConnected method returns true if the end user's session is active.

Remarks

This method determines if a session is active. You should use this method if you wish to change the user interface on a page if the session is active.

Example

Note the following fragment derived from the DailyHotelStart.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
var strRoomNumber;
bIsConnected = obj.IsConnected (strRoomNumber);

if (bIsConnected)
{
Response.Redirect ("default.asp");
}
else
{
...
}
%>
...

PostSale Method

Parameters

strAmount

This parameter specifies the amount to charge.

strDescription

This parameter specifies the description of the charge. The description is an index into the CallTypeLookup table in the AtDial database. For example, if the description is "In Room Movie," you could add a record to the CallTypeLookup table that maps "In Room Movie" to the letter "M." BBSM will post the letter M to the PMS along with the amount.

Return Value

This method returns true if successful, or false otherwise. This method will return false if it is unable to determine who the end user is.

Remarks

The PostSale method posts a charge to the PMS (Property Management System) to charge an end user's room. BBSM provides this method so that customer-developed premium-content web applications can charge an amount to an end user's room bill. This method works only with the hotel accounting policy.

Example

Note the following fragment derived from the test_post_sale_ack.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
strAmount = Request.Form ("strAmount");
strDescription = Request.Form ("strDescription");
bResult = obj.PostSale (strAmount, strDescription);
%>
<html>
...
Invoked PostSale method:
<ul>
<li>Amount = <%= strAmount %>
<li>Description = "<%= strDescription %>"
<li>Result = <%= bResult %>
</ul>
...
</html>

PreConnect Method

Parameters

strSearchingURL

This parameter specifies the URL you want this method to return if the system must search to determine the location of the end user. If you invoke this method from preconnect.asp, you must use absolute URL syntax for this parameter because it is a forced redirect URL. Otherwise, you can use relative URL syntax.

strErrorURL

This parameter specifies the URL you want this method to return if the system is unable to determine the location of the end user. If you invoke this method from preconnect.asp, you must use absolute URL syntax for this parameter because it is a forced redirect URL. Otherwise, you can use relative URL syntax.

strUnavailableURL

This parameter is the URL to redirect to if Internet access is unavailable. If you invoke this method from preconnect.asp, you must use absolute URL syntax for this parameter because it is a forced redirect URL. Otherwise, you can use relative URL syntax.

strMaxedOutURL

This parameter specifies the URL you want this method to return if the system is at the maximum amount of users it will allow. You do not need to use absolute URL syntax for this parameter because it is not a forced redirect URL.

Return Value

This method returns one of six URLs.

If the system must search to determine the end user's location (port), this method returns the strSearchingURL.

If the system was unable to determine the end user's location, this method returns the strErrorURL.

If the system is temporarily offline (for example, for applying configuration changes), this method returns the strUnavailableURL.

If the system has determined that the maximum number of allowed users has been reached, the method returns the strMaxedOutURL.

If the system has determined the end user's location and the session state is denied, this method returns the session denied URL.

Otherwise, this method returns the start page.

Remarks

This method starts searching process, which determines the location of the end user. You continue the searching process by calling the GetSearchStatus method. The PreConnect method accepts a strSearchingURL parameter. That parameter should specify a page that invokes the GetSearchStatus method. You should pass the same strSearchingURL into this method so that the searching process will loop on the same page until the system either locates or fails to locate the end user.

Example

Note the following fragment derived from the preconnect.asp.

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
Response.Redirect (obj.PreConnect
(
"http://%iport%/ekgnkm/searching.asp",
"http://%iport%/ekgnkm/iporterror.asp",
"http://%iport%/ekgnkm/unavailable.asp",
"http://%iport%/ekgnkm/maxcapacity.asp"
));
%>
...

ResetDenied Method

Parameters

None

Return Value

None

Remarks

This method changes the state of a session to Inactive. On a forced redirect, the system generally redirects the end user to the start page for the port. However, if the session state is Denied (as a result of a denied accounting request), the system performs a forced redirect to the denied URL specified in a SendActivateSession method instead of the start page. In your denied page, you should call this method to reset the session state to inactive so that a subsequent forced redirect will return the start page and not the denied URL.

Example

Note the following fragment derived from the BlockICSFail.asp

...
<%
obj = Server.CreateObject ("NotifyBilling.NotifyBilling.1");
obj.ResetDenied ();
%>
...

CommonSubroutines.asp Functions

The following JScript functions are available for use in creating page sets. The function definitions are located in the following file:

c:\atcom\ekgnkm\CommonSubroutines.asp

BandwidthKbpsToString Function

Parameters

nBandwidthKbps

The bandwidth (in kbps) to format.

Return Value

This function returns a formatted string containing the bandwidth specified.

Remarks

This function receives as input a bandwidth (in kbps) and returns a formatted string containing the specified bandwidth either as "full-speed" or a number followed by "Kbits/sec," depending on the specified bandwidth value.

Example

Note the following fragment derived from the SubscriptionICSStart.asp.

strPortMapBandwidthKbps = BandwidthKbpsToString (nPortMapBandwidthKbps);

FormatDuration Function

Parameters

nDuration

The number of seconds in the duration to format for display.

Return Value

This function returns a formatted string containing the time duration specified.

Remarks

This function receives as input a time duration in seconds and returns as a formatted string containing the specified duration broken into hours, minutes and seconds.

Example

<td nowrap><font face=Arial size=1><%= FormatDuration(rsPorts.Fields(
"Prev_state_duration" )) %></td>

FormatPrice Function

Parameters

dPrice

The monetary amount to format for display.

Return Value

This function returns a formatted string containing the amount specified.

Remarks

This function receives as input a monetary amount and returns a formatted string containing the specified amount. The function will supply the currency type that is selected under the Servers tab in WEBconfig. You can use this area to change the currency type at any time.

Example

Note the following fragment derived from the DailyICSStart.asp.

<center>
<font face="Arial"><small><strong>
This service costs <%= FormatPrice (PackagePriceArray [0]) %> for unlimited Internet
access <%= strSessionBoundary %>
</strong></small></font>
</center>

GenerateComboBox Function

Parameters

PackagePriceArray

This parameter is an array of prices for packages offered to the client.

bWelcomeBack

This parameter is a Boolean indicating whether this client is in a welcome back state or not.

dPreviousPrice

If this client is in a welcome back state, this parameter contains the price of the package selected by the client in his previous connection. This amount will be indicated as the initial selected package in the generated selection list. If the client is not in a welcome back state, this parameter is ignored.

strPackage

This parameter is the name of generated selection list control. The name can be used by scripting languages to refer to the list control.

Return Value

This method has no return value.

Remarks

This method generates HTML to display a selection list of all packages corresponding to the package prices listed in the given array.

Example

Note the following fragment derived from the MinuteICSStart.asp.

<% if (bManageBandwidth) { %>
<tr>
<td width="50%"><font face="Arial"><small><strong>Select
Package:</strong></small></font></td>
<td width="50%"><% GenerateComboBox (PackagePriceArray, false,
0.0, "strPackage"); %></td>
</tr>
<% } %>

MDSubGenerateComboBox Function

Parameters

PackagePriceArray

This parameter is an array of prices for packages offered to the client.

bWelcomeBack

This parameter is a Boolean indicating whether this client is in a welcome back state or not.

dPreviousPrice

If this client is in a welcome back state, this parameter contains the price of the package selected by the client in his previous connection. This amount will be indicated as the initial selected package in the generated selection list. If the client is not in a welcome back state, this parameter is ignored.

strPackage

This parameter is the name of generated selection list control. The name can be used by scripting languages to refer to the list control.

PackageDaysArray

This parameter is an array of days for packages offered to the client.

Return Value

This method has no return value.

Remarks

This method generates HTML to display a selection list of all packages corresponding to the package prices listed in the given array and is used when bandwidth management is activated.

Example

Note the following fragment derived from the MDSubExpired.asp.

...
<table border="0" cellspacing="0" cellpadding="0">
<% if (bManageBandwidth) { %>
<tr>
<td width="50%"><font face="Arial"><small><strong>Select
Package:</strong></small></font></td>
<td width="50%">
<%MDSubGenerateComboBox (PackagePriceArray, false, 0.0, "strPackage",
PackageDaysArray); %></td>
</tr>
<% } else {%>
...


MDSubGenerateNBComboBox Function

Parameters

PackagePriceArray

This parameter is an array of prices for packages offered to the client.

bWelcomeBack

This parameter is a Boolean indicating whether this client is in a welcome back state or not.

dPreviousPrice

If this client is in a welcome back state, this parameter contains the price of the package selected by the client in his previous connection. This amount will be indicated as the initial selected package in the generated selection list. If the client is not in a welcome back state, this parameter is ignored.

strPackage

This parameter is the name of generated selection list control. The name can be used by scripting languages to refer to the list control.

PackageDaysArray

This parameter is an array of days for packages offered to the client.

Return Value

This method has no return value.

Remarks

This method generates HTML to display a selection list of all packages corresponding to the package prices listed in the given array and is used when bandwidth management is not activated.

Example

Note the following fragment derived from the MDSubExpired.asp.

...

<% } else {%>

<tr>

<td width="50%"><font face="Arial"><small><strong>Select
Package:</strong></small></font></td>
<td width="50%">
<%MDSubGenerateNBComboBox (PackagePriceArray, false, 0.0,
"strPackage",PackageDaysArray); %></td>

</tr>
<% } %>
</table>
...


GenerateUpgradeComboBox Function

Parameters

nPortStateBandwidthKbps

The bandwidth of the currently selected bandwidth package.

Return Value

This method has no return value.

Remarks

This method generates HTML to display a bandwidth boost selection list. The selection list lists all bandwidth packages with bandwidths equal to or higher than the specified currently selected package bandwidth.

Example

Note the following fragment derived from the bandwidth_boost_form.asp.

<center>
<font face="Arial"><small><strong>
Select bandwidth boost for the next 60 minutes.
</strong></small></font>

<table border="0">
<tr>
<td width="50%"><font face="Arial"><small><strong>Your current
speed:</strong></small></font></td>
<td width="50%"><font face="Arial"><small><strong><%=
strPortStateBandwidthKbps %></strong></small></font></td>
</tr>
<% GenerateUpgradeComboBox (nPortStateBandwidthKbps); %>
<tr>
<td width="50%"><center><input type="submit"
value="Boost"></center></td>
<td width="50%"><center><input type="button" value="Cancel"
onclick="OnCancel ();"></center></td>
</tr>
   </table>
   </center>

OutputYear Function

Parameters

None

Return Value

None

Remarks

This method generates HTML to display a selection list of 15 years starting with the current year. This is useful for obtaining credit card expiration dates from end "users.

Example

Note the following fragment derived from the MinuteICSStart.asp.

<font face="Arial"><small><strong>/</strong></small></font>
<select name="strExpYear" size="1">
<% OutputYear() %>
</select>