XML

  <function name="rpcf_get_tps_for_user" id="0x301a"> <!-- Gets the services and service links in the frame of tariff-->
    <input>
      <integer name="uid" /> <!--user id-->
      <integer name="aid" /> <!--account id-->
      <integer name="tpid" /> <!--tariff plan id-->
      <integer name="tplink" /> <!--tariff link id-->
      <integer name="unused" /> 
    </input>
    <output>
      <integer name="service_size" />
      <for name="i" from="0" count="service_size">
        <integer name="sid" array_index="i" />
        <string name="service_name" array_index="i" />
        <integer name="service_type" array_index="i" />
        <string name="comment" array_index="i" />
        <integer name="slink" array_index="i" />
        <integer name="value" array_index="i" />
      </for>
    </output>
  </function>

PHP

function rpcf_get_tps_for_user($uid,$aid,$tpid,$tplink) { //0x301a
	  if (!$this->connection->urfa_call(0x301a)) {
	       print "Error calling function ". __FUNCTION__ ."\n";
	       return FALSE;
    }
		$packet = $this->connection->getPacket();
		$packet->DataSetInt($uid);
		$packet->DataSetInt($aid);
		$packet->DataSetInt($tpid);
		$packet->DataSetInt($tplink);
		$packet->DataSetInt('');
		$this->connection->urfa_send_param($packet);
 
		$x = $this->connection->urfa_get_data();
		$service_size=$x->DataGetInt();
		$ret = array();
		for($i = 0;$i < $service_size;$i++){
			$ret[$i]['sid'] = $x->DataGetInt();
			$ret[$i]['service_name'] = $x->DataGetString();
			$ret[$i]['service_type'] = $x->DataGetInt();
			$ret[$i]['comment'] = $x->DataGetString();
			$ret[$i]['slink'] = $x->DataGetInt();
			$ret[$i]['value'] = $x->DataGetInt();
		}
		return $ret;
 
}
 
/home/u18456/wiki.flintnet.ru/www/data/pages/function_admin/function_name_rpcf_get_tps_for_user_id_0x301a.txt · Последние изменения: 2011/08/31 17:59 От 91.204.148.102
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: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