#!/usr/local/bin/perl
@noteMech
= (
"NONE"
,
"NOTIFIER"
,
"EMAIL"
,
"?"
);
@licType
= (
"NONE"
,
"FIXED"
,
"FLOATING"
,
"FIXED2"
);
@licTag
= (
""
,
"WRITE"
,
"FULL_TEXT"
,
"RESERVED1"
);
(
$c
= ars_Login(
shift
,
shift
,
shift
)) ||
die
"login: $ars_errstr"
;
print
"Calling GetListUser and asking for all connected users...\n"
;
(
@h
= ars_GetListUser(
$c
,
&ARS::AR_USER_LIST_REGISTERED
)) ||
die
"ERR: $ars_errstr\n"
;
print
"errstr=$ars_errstr\n"
;
print
"GetListUser returned the following:\n"
;
foreach
$userHash
(
@h
) {
print
"userName: $userHash->{userName}\n"
;
print
"\tconnectTime: "
.
localtime
(
$userHash
->{connectTime}).
"\n"
;
print
"\tlastAccess: "
.
localtime
(
$userHash
->{lastAccess}).
"\n"
;
print
"\tnotify mech: $userHash->{defaultNotifyMech} ("
.
$noteMech
[
$userHash
->{defaultNotifyMech}].
")\n"
;
print
"\temail addr: $userHash->{emailAddr}\n"
;
for
(
$i
= 0;
$i
<= $
print
"\tlicense \#$i info:\n"
;
print
"\t\tlicenseTag: "
.@{
$userHash
->{licenseTag}}[
$i
].
" ("
.
$licTag
[@{
$userHash
->{licenseTag}}[
$i
]].
")\n"
;
print
"\t\tlicenseType: "
.@{
$userHash
->{licenseType}}[
$i
].
" ("
.
$licType
[@{
$userHash
->{licenseType}}[
$i
]].
")\n"
;
print
"\t\tcurrentLicenseType: "
.@{
$userHash
->{currentLicenseType}}[
$i
].
" ("
.
$licType
[@{
$userHash
->{currentLicenseType}}[
$i
]].
")\n"
;
}
}
ars_Logoff(
$c
);