<function name="rpcf_get_ipgroups_list" id="0x2900"> <input> </input> <output> <integer name="groups_size" /> <for name="i" from="0" count="groups_size"> <integer name="count" /> <set dst="count_array" src="count" dst_index="i" /> <for name="j" from="0" count="count"> <integer name="id" array_index="i,j" /> <ip_address name="ip" array_index="i,j" /> <ip_address name="mask" array_index="i,j" /> <string name="mac" array_index="i,j" /> <string name="login" array_index="i,j" /> <string name="allowed_cid" array_index="i,j" /> </for> </for> </output> </function>
function rpcf_get_ipgroups_list() { //0x2900 $ret=array(); if (!$this->connection->urfa_call(0x2900)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $x = $this->connection->urfa_get_data(); $groups_count=$x->DataGetInt(); $ret['groups_count']=$groups_count; for ($i=0;$i<$groups_count;$i++) { $x = $this->connection->urfa_get_data(); $count=$x->DataGetInt(); for($j=0; $j<$count;$j++) { // $x = $this->connection->urfa_get_data(); $group['id']=$x->DataGetInt(); $group['ip']=$x->DataGetIPAddress(); $group['mask']=$x->DataGetIPAddress(); $group['mac']=$x->DataGetString(); $group['login']=$x->DataGetString(); $group['allowed_cid']=$x->DataGetString(); $groups['group'][]=$group; } $groups['group_count']=$count; $ret['groups'][]=$groups; unset($groups); } // $this->connection->urfa_get_data(); return $ret; }