http://www.php.net/manual/ru/function.hash-init.phpAndrewE писал(а):А у меня ругается на hash_init
PHP 5 >= 5.1.2
В версиях младше нет этой функции
http://www.php.net/manual/ru/function.hash-init.phpAndrewE писал(а):А у меня ругается на hash_init
Код: Выделить всё
rpcf_get_tariffs_list() //0x3010
rpcf_core_version() //0x0045
rpcf_core_build() //0x0046
rpcf_get_discount_periods() //0x2600
rpcf_get_bytes_in_kb() //0x10002
rpcf_get_currency_list() //0x2910
rpcf_get_payment_methods_list() //0x3100
rpcf_get_userinfo($user_id) //0x2006
rpcf_get_ipgroups_list() //0x2900
rpcf_get_tclass($class_id) //0x2302
rpcf_get_accountinfo($account_id) //0x2030
Код: Выделить всё
rpcf_get_user_account_list($user_id) //0x2033
rpcf_block_account($account_id,$block) //0x2037
rpcf_get_tclasses() //0x2300
Код: Выделить всё
rpcf_general_report_new($user_id=0,$account_id=0,$group_id=0,$discount_period_id=0,$start_date,$end_date) //0x3020
Код: Выделить всё
function rpcf_get_all_services_for_user($account_id) { //0x2700
$ret=array();
if (!urfa_call(0x2700)) {
print "Error calling function ". __FUNCTION__ ."\n";
return FALSE;
}
$packet = new Packet();
$packet->DataSetInt($account_id);
urfa_send_param($packet);
$x = urfa_get_data();
$count=$x->DataGetInt();
$ret['count']=$count;
for($i=0; $i<$count;$i++) {
$x = 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'] = $x->DataGetInt();
$service['period'] = $x->DataGetInt();
}
else
{
$service['type'] = -1;
$service['name'] = "";
$service['tarif_name'] = "";
$service['cost'] = -1;
$service['slink'] = -1;
$service['period'] = -1;
}
$ret['services'][]=$service;
}
urfa_get_data();
return $ret;
}
Код: Выделить всё
<?xml version="1.0"?>
<urfa>
<parameter name="user_id"/>
<parameter name="tariff_next"/>
<call function="rpcf_get_user_tariffs"/>
<if variable="user_tariffs_size" value="0" condition="eq">
<error comment="tariffs not linked"/>
</if>
<set dst="tariff_current" src="tariff_current_array"/>
<set dst="discount_period_id" src="discount_period_id_array"/>
<set dst="tariff_link_id" src="tariff_link_id_array"/>
<call function="rpcf_link_user_tariff"/>
</urfa>
Код: Выделить всё
function rpcf_remove_user_from_group($user_id,$group_id) { //0x2408
$ret=array();
if (!urfa_call(0x2408)) {
print "Error calling function ". __FUNCTION__ ."\n";
return FALSE;
}
$packet = new Packet();
$packet->DataSetInt($user_id);
$packet->DataSetInt($group_id);
urfa_send_param($packet);
urfa_get_data();
return $ret;
}
Код: Выделить всё
function rpcf_add_group_to_user($user_id,$group_id) { //0x2552
$ret=array();
if (!urfa_call(0x2552)) {
print "Error calling function ". __FUNCTION__ ."\n";
return FALSE;
}
$packet = new Packet();
$packet->DataSetInt($user_id);
$packet->DataSetInt($group_id);
urfa_send_param($packet);
urfa_get_data();
return $ret;
}