XML

    <function name="rpcf_user5_traffic_report" id="-0x4009">
      <input>
        <integer name="start_date"/>
        <integer name="end_date" default="now()"/>
      </input>
      <output>
        <integer name="account_id"/>
        <double name="bytes_in_kbyte"/>
        <integer name="rows_count"/>
        <for name="i" from="0" count="rows_count">
          <integer name="tclass_id" array_index="i"/>
          <string name="tclass_name" array_index="i" />
          <long name="bytes" array_index="i"/>
          <double name="base_cost" array_index="i" />
          <double name="discount" array_index="i" />
          <double name="discount_with_tax" array_index="i" />
        </for>
      </output>
    </function>

PHP

	function rpcf_user5_traffic_report($start_date,$end_date) { //-0x4009
		$ret=array();
		if (!$this->connection->urfa_call(-0x4009)) {
			print "Error calling function ". __FUNCTION__ ."\n";
			return FALSE;
		}
		$packet = $this->connection->getPacket();
		$packet->DataSetInt($start_date);
		$packet->DataSetInt($end_date);
		$this->connection->urfa_send_param($packet);
		if ($x = $this->connection->urfa_get_data()) {
			$ret['account_id'] = $x->DataGetInt();
			$ret['bytes_in_kbyte'] = $x->DataGetDouble();
			$ret['count'] = $x->DataGetInt();
			for ($i=0;$i<$ret['count'];$i++) {
//				$x = $this->connection->urfa_get_data();
				$traf['tclass_id'] = $x->DataGetInt();
				$traf['tclass_name'] = $x->DataGetString();
				$traf['bytes'] = $x->DataGetLong();
				$traf['base_cost'] = $x->DataGetDouble();
				$traf['discount'] = $x->DataGetDouble();
				$traf['discount_with_tax'] = $x->DataGetDouble();
				$ret['traffic'][]=$traf;
			}
//			$this->connection->urfa_get_data();
		}
		return $ret;
	}
 
/home/u18456/wiki.flintnet.ru/www/data/pages/function_user5/function_name_rpcf_user5_traffic_report_id_-0x4009.txt · Последние изменения: 2009/07/24 09:26 От 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