XML

<function name="rpcf_get_iptraffic_service" id="0x2105">
    <input>
      <integer name="sid" />
    </input>
    <output>
      <string name="service_name" />
      <string name="comment" />
 
      <integer name="link_by_default" />
      <integer name="is_dynamic" />
      <double name="cost" />
      <integer name="pm_every_day" />
      <integer name="discount_method" />
      <integer name="start_date" />
      <integer name="expire_date" />
      <integer name="null_service_prepaid" />
      <integer name="borders_count" />
 
      <for name="i" from="0" count="borders_count">
        <integer name="tclass" array_index="i" />
        <if variable="tclass" value="-1" condition="ne">
          <long name="borders_size" />
          <set dst="borders_size_array" src="borders_size" dst_index="i" /> 
          <for name="j" from="0" count="borders_size">
            <long name="border_id" array_index="i,j" />
            <double name="border_cost" array_index="i,j" />
          </for>
 
        </if>
      </for>
      <integer name="prepaid_count" />
      <for name="i" from="0" count="prepaid_count">
        <integer name="tclass" array_index="i" />
        <if variable="tclass" value="-1" condition="ne">
          <long name="prepaid_amount" array_index="i" />
          <long name="prepaid_max" array_index="i" />
        </if>
 
      </for>
      <integer name="tclass_id2group_size" />
      <for name="i" from="0" count="tclass_id2group_size">
        <integer name="tclass_id" array_index="i" />
        <integer name="tclass_group_id" array_index="i" />
      </for>
      <integer name="service_data_parent_id" />
      <integer name="tariff_id" />
      <integer name="parent_id" />
 
    </output>
  </function>

PHP

function rpcf_get_iptraffic_service($sid)
 
  $ret=array();
  if (!$this->connection->urfa_call(0x2105)) {
    print "Error calling function ". __FUNCTION__ ."\n";
    return FALSE;
  }
 
  $packet = $this->connection->getPacket();
  $packet->DataSetInt($sid);
  $this->connection->urfa_send_param($packet);
  if ($x = $this->connection->urfa_get_data()) {
     $ret['service_name']=$x->DataGetString();
     $ret['comment']=$x->DataGetString();
     $ret['link_by_default']=$x->DataGetInt();
     $ret['is_dynamic']=$x->DataGetInt();
     $ret['cost']=$x->DataGetDouble();
     $ret['pm_every_day']=$x->DataGetInt();
     $ret['discount_method']=$x->DataGetInt();
     $ret['start_date']=$x->DataGetInt();
     $ret['expire_date']=$x->DataGetInt();
     $ret['null_service_prepaid']=$x->DataGetInt();
     $ret['borders_count']=$x->DataGetInt();
     for($i=0; $i<$ret['borders_count']; $i++) {
       $ret['borders'][$i]['tclass']=$x->DataGetInt();
       if($ret['borders'][$i]['tclass'] != -1) {
         $ret['borders'][$i]['borders_size'] = $x->DataGetLong();
         for($j=0; $j<$ret['borders'][$i]['borders_size']; $j++) {
           $ret['borders'][$i]['border'][$j]['border_id'] = $x->DataGetLong();
           $ret['borders'][$i]['border'][$j]['border_cost'] = $x->DataGetDouble();
         }
       }
     }
     $ret['prepaid_count']=$x->DataGetInt();
     for($i=0;$i<$ret['prepaid_count'];$i++) {
       $ret['prepaid'][$i]['tclass'] = $x->DataGetInt();
       if($ret['prepaid'][$i]['tclass'] != -1) {
         $ret['prepaid'][$i]['prepaid_amount'] = $x->DataGetLong();
         $ret['prepaid'][$i]['prepaid_max'] = $x->DataGetLong();
       }
     }
     $ret['tclass_id2group_size'] = $x->DataGetInt();
     for($i=0;$i<$ret['tclass_id2group_size'];$i++) {
       $ret['tclass_id2group'][$i]['tclass_id'] = $x->DataGetInt();
       $ret['tclass_id2group'][$i]['tclass_group_id'] = $x->DataGetInt();
     }
     $ret['service_data_parent_id'] = $x->DataGetInt();
     $ret['tariff_id'] = $x->DataGetInt();
     $ret['parent_id'] = $x->DataGetInt();
  }
  return $ret;
}
 
/home/u18456/wiki.flintnet.ru/www/data/pages/function_admin/function_name_rpcf_get_iptraffic_service_id_0x2105.txt · Последние изменения: 2010/02/12 08:28 От 88.204.14.83
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: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