$client=$app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
// Check if the user may add another mailbox.
if($client["limit_dns_record"]>=0){
$tmp=$app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = $client_group_id");
$client=$app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
// Check if the user may add another mailbox.
if($this->id==0&&$client["limit_dns_record"]>=0){
$tmp=$app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = $client_group_id");
// Set the server ID of the rr record to the same server ID as the parent record.
$this->dataRecord["server_id"]=$soa["server_id"];
parent::onSubmit();
}
functiononAfterInsert(){
global$app,$conf;
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
$soa=$app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));