XML

 <function name="rpcf_get_user_othersets" id="0x9021">
        <input>
          <integer name="user_id" />
        </input>
        <output>
          <integer name="count" />
            <for name="i" from="0" count="count">
                <integer name="type" array_index="i" />
                <if variable="type" value="1" condition="eq">
                    <integer name="switch_id"  />
                    <integer name="port" />
                </if>
                <if variable="type" value="3" condition="eq">
                    <integer name="cur_id"  />
                    <string name="name" />
                </if>
            </for>
        </output>
      </function>

PHP

function rpcf_get_user_othersets($user_id=0) { //0x9021
                $ret=array();
                if (!$this->connection->urfa_call(0x9021)) {
                        print "Error calling function ". __FUNCTION__ ."\n";
                        return FALSE;
                }
                $packet = $this->connection->getPacket();
                $packet->DataSetInt($user_id);
                $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++) {
                                $othersets['type']=$x->DataGetInt();
                                if( $othersets['type'] == 1 )
                                {
                                        $othersets['switch_id'] = $x->DataGetInt();
                                        $othersets['port'] = $x->DataGetInt();
                                }
                                elseif( $othersets['type'] == 3 )
                                {
                                        $othersets['cur_id'] = $x->DataGetInt();
                                        $othersets['name'] = $x->DataGetString();
                                }
                                $ret['othersets'][]=$othersets;
                                unset( $othersets );
                        }
                }
                return $ret;
        }
 
/home/u18456/wiki.flintnet.ru/www/data/pages/function_admin/function_name_rpcf_get_user_othersets_id_0x9021.txt · Последние изменения: 2011/04/26 09:36 От 83.234.89.201
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki