XML

    <function name="rpcf_user5_get_tel_report" id="-0x4099">
      <input>
             <integer name="time_start" />
             <integer name="time_end" />
      </input>
      <output>
           <integer name="accounts_size" />
           <for name="i" from="0" count="accounts_size">
             <integer name="dhs_log_size" />
             <set dst="dhs_log_size_array" src="dhs_log_size" dst_index="i" />
             <for name="j" from="0" count="dhs_log_size">
                <integer name="recv_date" array_index="i,j" />
                <integer name="recv_date_plus_acct_sess_time" array_index="i,j" />
                <integer name="acct_sess_time" array_index="i,j" />
                <string name="Calling_Station_Id" array_index="i,j" />
                <string name="Called_Station_Id" array_index="i,j" />
                <string name="dname" array_index="i,j" />
                <double name="total_cost" array_index="i,j" />
             </for>
           </for>
      </output>
    </function>

PHP

        function rpcf_user5_get_tel_report($time_start,$time_end) { //-0x4099
            if (!$this->connection->urfa_call(-0x4099)) {
                print "Error calling function ". __FUNCTION__ ."\n";
                return FALSE;
            }
            $packet = $this->connection->getPacket();
            $packet->DataSetInt($time_start);
            $packet->DataSetInt($time_end);
            $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++) {
                    $dhs_log_size=$x->DataGetInt();
                    $tel['dhs_log_size']=$dhs_log_size;
                    for ($j=0;$j<$dhs_log_size;$j++) {
                        $report['recv_date']=$x->DataGetInt();
                        $report['recv_date_plus_acct_sess_time']=$x->DataGetInt();
                        $report['acct_sess_time']=$x->DataGetInt();
                        $report['Calling_Station_Id']=$x->DataGetString();
                        $report['Called_Station_Id']=$x->DataGetString();
                        $report['dname']=$x->DataGetString();
                        $report['total_cost']=$x->DataGetDouble();
                        $tel['report'][]=$report;
                    }
                    $ret['tel'][]=$tel;
                    unset($tel);
                }
                return $ret;
            }
    }

Функцию нужно проверить.

 
/home/u18456/wiki.flintnet.ru/www/data/pages/function_user5/function_name_rpcf_user5_get_tel_report_id_-0x4099.txt · Последние изменения: 2009/10/30 12:36 От 93.170.80.13
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: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