Код: Выделить всё
function rpcf_edit_fwrule_new($rule_id,$flags,$events,$router_id,$tariff_id,$group_id,$user_id,$rule,$comment) { //0x5022
$ret=0;
if (!$this->connection->urfa_call(0x5022)) {
print "Error calling function ". __FUNCTION__ ."\n";
return FALSE;
}
$packet = $this->connection->getPacket();
$packet->DataSetInt($rule_id);
$packet->DataSetInt($flags);
$packet->DataSetLong($events);
$packet->DataSetInt($router_id);
$packet->DataSetInt($tariff_id);
$packet->DataSetInt($group_id);
$packet->DataSetInt($user_id);
$packet->DataSetString($rule);
$packet->DataSetString($comment);
$this->connection->urfa_send_param($packet);
if ($x = $this->connection->urfa_get_data()){
$ret = $x->DataGetInt();
$this->connection->urfa_get_data();
}
return $ret;
}
function rpcf_add_fwrule_new($flags,$events,$router_id,$tariff_id,$group_id,$user_id,$rule,$comment) { //0x5021
if (!$this->connection->urfa_call(0x5021)) {
print "Error calling function ". __FUNCTION__ ."\n";
return FALSE;
}
$packet = $this->connection->getPacket();
$packet->DataSetInt($flags);
$packet->DataSetLong($events);
$packet->DataSetInt($router_id);
$packet->DataSetInt($tariff_id);
$packet->DataSetInt($group_id);
$packet->DataSetInt($user_id);
$packet->DataSetString($rule);
$packet->DataSetString($comment);
$this->connection->urfa_send_param($packet);
if ($x = $this->connection->urfa_get_data()){
$ret = $x->DataGetInt();
$this->connection->urfa_get_data();
}
return $ret;
}
Код: Выделить всё
$rfwedit=$urfa_admin->rpcf_edit_fwrule_new(61,0,131137,1,14,0,0,"table 1 add UIP/UBITS","OK1"); //0x5022
print_r($rfwedit);
print "<BR>****************************************<BR>";