XML

    <function name="rpcf_get_all_services_for_user" id="0x2700">
      <input>
        <integer name="account_id"/>
      </input>
      <output>
        <integer name="slink_id_count"/>
        <for name="i" from="0" count="slink_id_count">
          <integer name="service_id"/>
          <if variable="service_id" value="-1" condition="ne">
            <set src="service_id" dst="service_id_array" dst_index="i"/>
            <integer name="service_type_array" array_index="i"/>
            <string name="service_name_array" array_index="i"/>
            <string name="tariff_name_array" array_index="i"/>
            <double name="service_cost_array" array_index="i"/>
            <integer name="slink_id_array" array_index="i"/>
            <integer name="discount_period_id_array" array_index="i"/>
          </if>
	  <if variable="service_id" value="-1" condition="eq">
	    <set dst="service_id_array" dst_index="i" value="-1"/>
	    <set dst="service_type_array" dst_index="i" value="-1"/>
	    <set dst="service_name_array" dst_index="i" value=""/>
	    <set dst="tariff_name_array" dst_index="i" value=""/>
	    <set dst="service_cost_array" dst_index="i" value="-1"/>
	    <set dst="slink_id_array" dst_index="i" value="-1"/>
	    <set dst="discount_period_id_array" dst_index="i" value="-1"/>
	  </if>
        </for>
      </output>
    </function>

PHP

	function rpcf_get_all_services_for_user($account_id) { //0x2700
		$ret=array();
		if (!$this->connection->urfa_call(0x2700)) {
			print "Error calling function ". __FUNCTION__ ."\n";
			return FALSE;
		}
		$packet = $this->connection->getPacket();
		$packet->DataSetInt($account_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++) {
//				$x = $this->connection->urfa_get_data();
				$service['id'] = $x->DataGetInt();
				if ($service['id'] != -1) {
					$service['type'] = $x->DataGetInt();
					$service['name'] = $x->DataGetString();
					$service['tarif_name'] = $x->DataGetString();
					$service['cost'] = $x->DataGetDouble();
					$service['slink_id'] = $x->DataGetInt();
					$service['period'] = $x->DataGetInt();
				} else {
					$service['type'] = -1;
					$service['name'] = "";
					$service['tarif_name'] = "";
					$service['cost'] = -1;
					$service['slink_id'] = -1;
					$service['period'] = -1;
				}
				$ret['services'][]=$service;
			}
//			$this->connection->urfa_get_data();
		}
		return $ret;
	}
 
/home/u18456/wiki.flintnet.ru/www/data/pages/function_admin/function_name_rpcf_get_all_services_for_user_id_0x2700.txt · Последние изменения: 2009/07/23 13:17 От swibl
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: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