но что то съезжают поля, что то там не то...<function name="rpcf_user5_get_turbo_mode_settings" id="-0x1200c">
<input>
<integer name="slink_id"/>
</input>
<output>
<integer name="cnt"/>
<for name="i" from="0" count="cnt">
<integer name="id" array_index="i"/>
<string name="name" array_index="i"/>
<integer name="incoming_rate" array_index="i"/>
<integer name="outgoing_rate" array_index="i"/>
<integer name="duration" array_index="i"/>
<long name="incoming_limit" array_index="i"/>
<long name="outgoing_limit" array_index="i"/>
<double name="cost" array_index="i"/>
</for>
</output>
</function>
код из ЛК УТМ
Код: Выделить всё
$this->urfa->call(-0x1200c);
$this->urfa->put_int($this->slink_id);
$this->urfa->send();
$modesCnt = $this->urfa->get_int();
$modes = array();
for($m = 0; $m < $modesCnt; $m++){
$modes[$m] = array();
$modes[$m]['id'] = $this->urfa->get_int();
$modes[$m]['name'] = $this->urfa->get_string();
$modes[$m]['incoming_rate'] = $this->urfa->get_int();
$modes[$m]['outgoing_rate'] = $this->urfa->get_int();
if($modes[$m]['incoming_rate'] == 0)
$modes[$m]['incoming_rate'] = $modes[$m]['outgoing_rate'];
if($modes[$m]['outgoing_rate'] == 0)
$modes[$m]['outgoing_rate'] = $modes[$m]['incoming_rate'];
$isDuration = $this->urfa->get_int();
if($isDuration)
$modes[$m]['duration'] = $this->urfa->get_int();
else {
$modes[$m]['incoming_limit'] = $this->urfa->get_long();
$modes[$m]['outgoing_limit'] = $this->urfa->get_long();
}
$modes[$m]['cost'] = $this->urfa->get_double();
}
$this->urfa->finish();
вот такой:
Код: Выделить всё
Array
(
[cnt] => Array
(
[0] => Array
(
[id] => 1
[name] => turbo
[incoming_rate] => 50
[outgoing_rate] => 50
[incoming_limit] =>
[outgoing_limit] =>
[cost] => 100
)
[1] => Array
(
[id] => 2
[name] => turbo2
[incoming_rate] => 55
[outgoing_rate] => 66
[incoming_limit] =>
[outgoing_limit] => 1024.0000000
[cost] => 1.0118464426829E-320
)
)
)
второй по лимитам, тут похоже что 1 параметра не хватает над incoming_limit