<function name="rpcf_get_doc_templates_list" id="0x7022"> <input> <integer name="doc_type_id" /> </input> <output> <integer name="count" /> <for name="i" from="0" count="count"> <integer name="id" array_index="i" /> <integer name="doc_id" array_index="i" /> <integer name="date" array_index="i" /> <string name="doc_name" array_index="i" /> <integer name="def" array_index="i" /> </for> </output> </function>
function rpcf_get_doc_templates_list($doc_type_id) { //0x7022 $ret=array(); if (!$this->connection->urfa_call(0x7022)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet=$this->connection->getPacket(); $packet->DataSetInt($doc_type_id); $this->connection->urfa_send_param($packet); $x = $this->connection->urfa_get_data();// Tariff count $count = $x->DataGetInt(); $ret['count'] = $count; for ($i=0;$i<$count;$i++) { // $x = $this->connection->urfa_get_data(); $doc_template['id']=$x->DataGetInt(); $doc_template['doc_id']=$x->DataGetInt(); $doc_template['date']=$x->DataGetInt(); $doc_template['doc_name']=$x->DataGetString(); $doc_template['def']=$x->DataGetInt(); $ret['doc_templates'][]=$doc_template; } // $this->connection->urfa_get_data(); return $ret; }