![MikroTik RouterOS v2.9 Reference Manual Download Page 538](http://html1.mh-extra.com/html/mikrotik/routeros-v2-9/routeros-v2-9_reference-manual_1794644538.webp)
• radius<id>u - show the attribute identified with <id> in unsigned form (in case RADIUS
authentication was used; "0" otherwise)
• radius<id>-<vnd-id> - show the attribute identified with <id> and vendor ID <vnd-id> in text
string form (in case RADIUS authentication was used; "" otherwise)
• radius<id>-<vnd-id>u - show the attribute identified with <id> and vendor ID <vnd-id> in
unsigned form (in case RADIUS authentication was used; "0" otherwise)
Working with variables
$(if <var_name>)
statements can be used in theses pages. Following content will be included, if
value of <var_name> will not be an empty string. It is an equivalent to
$(if <var_name> != "")
It
is possible to compare on equivalence as well:
$(if <var_name> == <value>)
These statements
have effect until
$(elif <var_name>)
,
$(else)
or
$(endif)
. In general case it looks like this:
Only one of those expressions will be shown. Which one - depends on values of those variables for
each client.
Customizing Error Messages
All error messages are stored in the errors.txt file within the respective HotSpot servlet directory.
You can change and translate all these messages to your native language. To do so, edit the
errors.txt file. You can also use variables in the messages. All instructions are given in that file.
Multiple Versions of HotSpot Pages
Multiple hotspot page sets for the same hotspot server are supported. They can be chosen by user
(to select language) or automatically by JavaScript (to select PDA/regular version of HTML pages).
To utilize this feature, create subdirectories in HotSpot HTML directory, and place those HTML
files, which are different, in that subdirectory. For example, to translate everything in Latvian,
subdirectory "lv" can be created with login.html, logout.html, status.html, alogin.html, radvert.html
and errors.txt files, which are translated into Latvian. If the requested HTML page can not be found
in the requested subdirectory, the corresponding HTML file from the main directory will be used.
Then main login.html file would contain link to "/lv/login?dst=$(link-orig-esc)", which then
displays Latvian version of login page:
<a href="/lv/login?dst=$(link-orig-esc)">Latviski</a>
.
And
Latvian
version
would
contain
link
to
English
version:
<a
href="/login?dst=$(link-orig-esc)">English</a>
Another way of referencing directories is to specify 'target' variable:
After preferred directory has been selected (for example, "lv"), all links to local HotSpot pages will
contain that path (for example,
$(link-status) = "http://hotspot.mt.lv/lv/status"
). So, if all
hotspot pages reference links using "$(link-xxx)" variables, then no more changes are to be made -
each client will stay within the selected directory all the time.
Notes
If you want to use HTTP-CHAP authentication method it is supposed that you include the
doLogin() function (which references to the md5.js which must be already loaded) before the
Page 524 of 695
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.