==== XML ====
==== PHP ====
function rpcf_add_house($house) { //0x2811
if (!$this->connection->urfa_call(0x2811)) {
print "Error calling function ". __FUNCTION__ ."\n";
return FALSE;
}
$packet = $this->connection->getPacket();
$packet->DataSetInt(isset($house['house_id']) ? $house['house_id'] : 0);
$packet->DataSetInt(isset($house['connect_date']) ? $house['connect_date'] : time());
foreach (array('post_code','country','region',
'city','street','number','building') as $var)
$packet->DataSetString(isset($house[$var]) ? $house[$var] : "");
if (isset($house['ipzones'])) {
$packet->DataSetInt(count($house['ipzones'])); # count
foreach ($house['ipzones'] as $zone) {
$packet->DataSetInt($zone);
}
}else {
$packet->DataSetInt(1); # count
$packet->DataSetInt(1); # zone
}
$this->connection->urfa_send_param($packet);
$this->connection->urfa_get_data();
return 0;
}