<function name="rpcf_get_users_list" id="0x2001"> <input> <integer name="from"/> <integer name="to" /> <integer name="card_user" default="0"/> </input> <output> <integer name="cnt" /> <for name="i" from="0" count="cnt"> <integer name="user_id_array" array_index="i"/> <string name="login_array" array_index="i"/> <integer name="basic_account" array_index="i"/> <string name="full_name" array_index="i" /> <integer name="is_blocked" array_index="i" /> <double name="balance" array_index="i" /> <integer name="ip_adr_size" /> <set dst="ip_adr_size_array" src="ip_adr_size" dst_index="i" /> <for name="j" from="0" count="ip_adr_size"> <integer name="group_size" /> <set dst="group_size_array" src="group_size" dst_index="i,j" /> <for name="x" from="0" count="group_size"> <ip_address name="ip_address" array_index="i,j,x"/> <ip_address name="mask" array_index="i,j,x" /> <integer name="group_type" array_index="i,j,x" /> </for> </for> <integer name="user_int_status" array_index="i" /> </for> </output> </function>
function rpcf_get_users_list($from,$to,$card_user=0) { //0x2001 $ret=array(); if (!$this->connection->urfa_call(0x2001)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet = $this->connection->getPacket(); $packet->DataSetInt($from); $packet->DataSetInt($to); $packet->DataSetInt($card_user); $this->connection->urfa_send_param($packet); if($x = $this->connection->urfa_get_data()){ $count=$x->DataGetInt(); $ret['count']=$count; for ($i=0;$i<$count;$i++) { $users['user_id']=$x->DataGetInt(); $users['login']=$x->DataGetString(); $users['basic_account']=$x->DataGetInt(); $users['full_name']=$x->DataGetString(); $users['is_blocked']=$x->DataGetInt(); $users['balance']=$x->DataGetDouble(); $ip_adr_size=$x->DataGetInt(); $users['ip_adr_size']=$ip_adr_size; $ipgroup=array(); for ($j=0;$j<$ip_adr_size;$j++) { $group_size=$x->DataGetInt(); $ipgroup['group_size']=$group_size; $ips=array(); for ($k=0;$k<$group_size;$k++) { $ips['ip_address']=$x->DataGetIPAddress(); $ips['mask']=$x->DataGetIPAddress(); $ips['group_type']=$x->DataGetInt(); $ipgroup['ips'][]=$ips; } $users['ipgroup']=$ipgroup; } $users['user_int_status']=$x->DataGetInt(); $ret['users'][]=$users; } } return $ret; }