Dell PowerConnect W Clearpass 100 Software Implementing Accounting-Based Autho - Page 14

assign var=traffic_limit value=200e6}

Page 14 highlights

{* NOTE: The allowed traffic limit is defined below: *} {assign var=traffic_limit value=200e6} {* Do not edit below this line *} {nwa_radius_query _method=GetIpAddressCurrentSession _assign=current_session} {if $current_session.username} {nwa_radius_query _method=GetUserTraffic username=$current_session.username from_time="00:00" to_time="now" _assign=traffic_used} {else} {assign var=traffic_used value=0} {/if} {assign var=traffic_remaining value=`$traffic_limit$traffic_used`} If you are using a traffic limit other than 200 MB, you should adjust the value in {assign var=traffic_limit value=200e6}. Here, 200e6 is a value indicating 200,000,000 bytes. For example, to set up a 500 MB quota, you could use the value 500e6 instead. 7. Enter the following template code in the Footer HTML text area. This code is used to display information about the guest's current usage, a message about the service, and a link to the guest's home page. {* This is the actual message displayed *} {if $current_session.username} Hello {$current_session.username}, you are now logged into the WiFi network. {else} You are now logged into the WiFi network. {/if} {* Your Usage *} Your Usage {nwa_icontext icon="images/icon-info22.png" valign="middle" novspace="1"} Your daily traffic quota is {$traffic_limit|NwaByteFormatBase10:0}. {/nwa_icontext} 14| Implementing Accounting-Based Authorization Amigopod |Technical Note

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22

14
| Implementing Accounting-Based Authorization
Amigopod
|Technical Note
{* NOTE: The allowed traffic limit is defined below: *}
{assign var=traffic_limit value=200e6}
{* Do not edit below this line *}
{nwa_radius_query _method=GetIpAddressCurrentSession
_assign=current_session}
{if $current_session.username}
{nwa_radius_query _method=GetUserTraffic
username=$current_session.username from_time="00:00"
to_time="now" _assign=traffic_used}
{else}
{assign var=traffic_used value=0}
{/if}
{assign var=traffic_remaining value=`$traffic_limit-
$traffic_used`}
If you are using a traffic limit other than 200 MB, you should adjust the value in
{assign var=traffic_limit value=200e6}
. Here,
200e6
is a value
indicating 200,000,000 bytes.
For example, to set up a 500 MB quota, you could use the
value
500e6
instead.
7.
Enter the following template code in the Footer HTML text area. This code is used to
display information about the guest’s current usage, a message about the service, and
a link to the guest’s home page.
{* This is the actual message displayed *}
{if $current_session.username}
<p>
Hello <b>{$current_session.username}</b>, you are now
logged into the WiFi network.
</p>
{else}
<p>
You are now logged into the WiFi network.
</p>
{/if}
{*
<h3>
Your Usage
</h3>
*}
<table {$table_class_content}>
<tr><th class="nwaTop">Your Usage</th></tr>
<tr><td class="nwaBody">
{nwa_icontext icon="images/icon-info22.png" valign="middle"
novspace="1"}
Your daily traffic quota is
<b>{$traffic_limit|NwaByteFormatBase10:0}</b>.
{/nwa_icontext}
</td></tr><tr><td class="nwaBody">